home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1996 December / CD_shareware_12-96.iso / DOS / Comunic / RPGSPC09.ZIP / RPGCRE01.ACS < prev    next >
Encoding:
Text File  |  1996-07-25  |  10.5 KB  |  276 lines

  1. // RPGCRE01.ACS -- RPGCREAT.WAD script file for MAP01
  2. #define X_MapID 1
  3. #include "rpglib.acs"
  4.  
  5. #define I_SetClass 51
  6. #define I_UnBar 52
  7. #define I_TeleportPlayer 53
  8. #define I_RandStat 54
  9. #define I_ReviewStats 55
  10. #define O_SetStats 240
  11.  
  12. #define L_Teleport_1 1
  13. #define L_Bars 2
  14.  
  15. #define T_T_1 1
  16.  
  17. int Class;
  18.  
  19. script I_SetClass (int ClassNum) {
  20.    ACS_Execute(C_FTalkOn,X_MapID,0,0,0);
  21.    Class = ClassNum;
  22.    switch(Class) {
  23.       case CLASS_Fighter: print(s: "YOU HAVE CHOSEN THE WAY OF THE FIGHTER!"); break;
  24.       case CLASS_Mage: print(s: "YOU HAVE CHOSEN THE WAY OF THE MAGE!"); break;
  25.       case CLASS_Cleric: print(s: "YOU HAVE CHOSEN THE WAY OF THE CLERIC!"); break;
  26.    };
  27.    setlinespecial(L_Teleport_1, SS_Teleport, T_T_1, 0, 0, 0, 0);
  28.    setlinespecial(L_Bars, SS_UsePuzzleItem, 10+Class, I_UnBar, 0, 0, 0);
  29.    delay(35);
  30.    ACS_Execute(C_FTalkOff,X_MapID,0,0,0);
  31. }
  32.  
  33. script I_Unbar (void) {
  34.    setlineblocking(L_Bars, OFF);
  35.    setlinetexture(L_Bars, SIDE_Front, TEXTURE_Middle, "-");
  36.    ACS_Execute(C_FTalkOn,X_MapID,0,0,0);
  37.    print(s: "YOUR PATH IS CLEAR");
  38.    delay(35);
  39.    ACS_Execute(C_FTalkOff,X_MapID,0,0,0);
  40. }
  41.  
  42. script I_TeleportPlayer (void) {
  43.    ACS_Execute(C_FTalkOn,X_MapID,0,0,0);
  44.    Teleport(gameskill()+20);
  45.    switch(gameskill()) {
  46.      case SKILL_Very_Easy: printbold(s: "THE EASIEST ROUTE..."); delay(70);
  47.                            printbold(s: "IS THE CHOICE OF COWARDS."); break;
  48.      case SKILL_Easy:      printbold(s: "THE EASY ROUTES ARE THOSE..."); delay(70);
  49.                            printbold(s: "WHICH LACK SATISFACTION AFTER VICTORY."); break;
  50.      case SKILL_Normal:    printbold(s: "THE AVERAGE CAN NEVER TRIUMPH,"); delay(70);
  51.                            printbold(s: "AS THEY CAN ONLY SUCCEED."); break;
  52.      case SKILL_Hard:      printbold(s: "THE HARDER THE PATH..."); delay(70);
  53.                            printbold(s: "THE GREATER THE VICTORY!"); break;
  54.      case SKILL_Very_Hard: printbold(s: "THE GREATEST CHALLENGE,"); delay(70);
  55.                            printbold(s: "CAN BRING IN THE GREATEST GLORY!"); break;
  56.    };
  57.    delay(35);
  58.    ACS_Execute(C_FTalkOff,X_MapID,0,0,0);
  59. }
  60.  
  61. int S_int, S_str, S_chr, S_con, S_dex, S_wis;
  62.  
  63. script I_RandStat(int Stat) {
  64.    int DieTotal, Die1, Die2, Die3, Die4;
  65.    switch(Stat) {
  66.       case V_int:
  67.          if(Class==CLASS_Mage) {
  68.             Die4 = random(1,6);
  69.             Die3 = random(1,6);
  70.             if(Die3<Die4) { DieTotal = Die4; Die4 = Die3; Die3 = DieTotal;};
  71.             Die2 = random(1,6);
  72.             if(Die2<Die4) { DieTotal = Die4; Die4 = Die2; Die2 = DieTotal;};
  73.             Die1 = random(1,6);
  74.             if(Die1<Die4) { DieTotal = Die4; Die4 = Die1; Die1 = DieTotal;};
  75.             Die1 += 1;
  76.          } else {
  77.             Die4 = random(1,6);
  78.             Die3 = random(1,6);
  79.             if(Die3>Die4) { DieTotal = Die4; Die4 = Die3; Die3 = DieTotal;};
  80.             Die2 = random(1,6);
  81.             if(Die2>Die4) { DieTotal = Die4; Die4 = Die2; Die2 = DieTotal;};
  82.             Die1 = random(1,6);
  83.             if(Die1>Die4) { DieTotal = Die4; Die4 = Die1; Die1 = DieTotal;};
  84.          };
  85.          S_int = Die1+Die2+Die3;
  86.          if(S_int>18) {S_int = 18;};
  87.          print(s: "YOUR INTELLIGENCE IS ", d: S_int);
  88.          break;
  89.       case V_dex:
  90.          if(Class==CLASS_Cleric) {
  91.             Die4 = random(1,6);
  92.             Die3 = random(1,6);
  93.             if(Die3<Die4) { DieTotal = Die4; Die4 = Die3; Die3 = DieTotal;};
  94.             Die2 = random(1,6);
  95.             if(Die2<Die4) { DieTotal = Die4; Die4 = Die2; Die2 = DieTotal;};
  96.             Die1 = random(1,6);
  97.             if(Die1<Die4) { DieTotal = Die4; Die4 = Die1; Die1 = DieTotal;};
  98.             Die1 += 1;
  99.          } else {
  100.             Die4 = random(1,6);
  101.             Die3 = random(1,6);
  102.             if(Die3>Die4) { DieTotal = Die4; Die4 = Die3; Die3 = DieTotal;};
  103.             Die2 = random(1,6);
  104.             if(Die2>Die4) { DieTotal = Die4; Die4 = Die2; Die2 = DieTotal;};
  105.             Die1 = random(1,6);
  106.             if(Die1>Die4) { DieTotal = Die4; Die4 = Die1; Die1 = DieTotal;};
  107.          };
  108.          S_dex = Die1+Die2+Die3;
  109.          if(S_dex>18) {S_dex = 18;};
  110.          print(s: "YOUR DEXTERITY IS ", d: S_dex);
  111.          break;
  112.       case V_str:
  113.          if(Class==CLASS_Fighter) {
  114.             Die4 = random(1,6);
  115.             Die3 = random(1,6);
  116.             if(Die3<Die4) { DieTotal = Die4; Die4 = Die3; Die3 = DieTotal;};
  117.             Die2 = random(1,6);
  118.             if(Die2<Die4) { DieTotal = Die4; Die4 = Die2; Die2 = DieTotal;};
  119.             Die1 = random(1,6);
  120.             if(Die1<Die4) { DieTotal = Die4; Die4 = Die1; Die1 = DieTotal;};
  121.             Die1 += 1;
  122.          } else {
  123.             Die4 = random(1,6);
  124.             Die3 = random(1,6);
  125.             if(Die3>Die4) { DieTotal = Die4; Die4 = Die3; Die3 = DieTotal;};
  126.             Die2 = random(1,6);
  127.             if(Die2>Die4) { DieTotal = Die4; Die4 = Die2; Die2 = DieTotal;};
  128.             Die1 = random(1,6);
  129.             if(Die1>Die4) { DieTotal = Die4; Die4 = Die1; Die1 = DieTotal;};
  130.          };
  131.          S_str = Die1+Die2+Die3;
  132.          if(S_str>18) {S_str = 18;};
  133.          print(s: "YOUR STRENGTH IS ", d: S_str);
  134.          break;
  135.       case V_con:
  136.          if(Class==CLASS_Fighter) {
  137.             Die4 = random(1,6);
  138.             Die3 = random(1,6);
  139.             if(Die3<Die4) { DieTotal = Die4; Die4 = Die3; Die3 = DieTotal;};
  140.             Die2 = random(1,6);
  141.             if(Die2<Die4) { DieTotal = Die4; Die4 = Die2; Die2 = DieTotal;};
  142.             Die1 = random(1,6);
  143.             if(Die1<Die4) { DieTotal = Die4; Die4 = Die1; Die1 = DieTotal;};
  144.             Die1 += 1;
  145.          } else {
  146.             Die4 = random(1,6);
  147.             Die3 = random(1,6);
  148.             if(Die3>Die4) { DieTotal = Die4; Die4 = Die3; Die3 = DieTotal;};
  149.             Die2 = random(1,6);
  150.             if(Die2>Die4) { DieTotal = Die4; Die4 = Die2; Die2 = DieTotal;};
  151.             Die1 = random(1,6);
  152.             if(Die1>Die4) { DieTotal = Die4; Die4 = Die1; Die1 = DieTotal;};
  153.          };
  154.          S_con = Die1+Die2+Die3;
  155.          if(S_con>18) {S_con = 18;};
  156.          print(s: "YOUR CONSTITUTION IS ", d: S_con);
  157.          break;
  158.       case V_chr:
  159.          if(Class==CLASS_Mage) {
  160.             Die4 = random(1,6);
  161.             Die3 = random(1,6);
  162.             if(Die3<Die4) { DieTotal = Die4; Die4 = Die3; Die3 = DieTotal;};
  163.             Die2 = random(1,6);
  164.             if(Die2<Die4) { DieTotal = Die4; Die4 = Die2; Die2 = DieTotal;};
  165.             Die1 = random(1,6);
  166.             if(Die1<Die4) { DieTotal = Die4; Die4 = Die1; Die1 = DieTotal;};
  167.             Die1 += 1;
  168.          } else {
  169.             Die4 = random(1,6);
  170.             Die3 = random(1,6);
  171.             if(Die3>Die4) { DieTotal = Die4; Die4 = Die3; Die3 = DieTotal;};
  172.             Die2 = random(1,6);
  173.             if(Die2>Die4) { DieTotal = Die4; Die4 = Die2; Die2 = DieTotal;};
  174.             Die1 = random(1,6);
  175.             if(Die1>Die4) { DieTotal = Die4; Die4 = Die1; Die1 = DieTotal;};
  176.          };
  177.          S_chr = Die1+Die2+Die3;
  178.          if(S_chr>18) {S_chr = 18;};
  179.          print(s: "YOUR CHARM IS ", d: S_chr);
  180.          break;
  181.       case V_wis:
  182.          if(Class==CLASS_Cleric) {
  183.             Die4 = random(1,6);
  184.             Die3 = random(1,6);
  185.             if(Die3<Die4) { DieTotal = Die4; Die4 = Die3; Die3 = DieTotal;};
  186.             Die2 = random(1,6);
  187.             if(Die2<Die4) { DieTotal = Die4; Die4 = Die2; Die2 = DieTotal;};
  188.             Die1 = random(1,6);
  189.             if(Die1<Die4) { DieTotal = Die4; Die4 = Die1; Die1 = DieTotal;};
  190.             Die1 += 1;
  191.          } else {
  192.             Die4 = random(1,6);
  193.             Die3 = random(1,6);
  194.             if(Die3>Die4) { DieTotal = Die4; Die4 = Die3; Die3 = DieTotal;};
  195.             Die2 = random(1,6);
  196.             if(Die2>Die4) { DieTotal = Die4; Die4 = Die2; Die2 = DieTotal;};
  197.             Die1 = random(1,6);
  198.             if(Die1>Die4) { DieTotal = Die4; Die4 = Die1; Die1 = DieTotal;};
  199.          };
  200.          S_wis = Die1+Die2+Die3;
  201.          if(S_wis>18) {S_wis = 18;};
  202.          print(s: "YOUR WISDOM IS ", d: S_wis);
  203.          break;
  204.    };
  205. }
  206.  
  207. script I_ReviewStats (void) {
  208.    ACS_Execute(C_FTalkOn,X_MapID,0,0,0);
  209.    Teleport_NoFog(26);
  210.    print(s: "THE GODS HAVE DEEMED YOU READY."); delay(70);
  211.    print(s: "THEY START TO ENCODE YOUR STATS IN FLESH..."); delay(35);
  212.    ACS_Execute(C_SetVar, X_MapID, V_class, Class, 0);
  213.    scriptwait(C_SetVar);
  214.    ACS_Execute(C_SetVar, X_MapID, V_int, S_int, 0);
  215.    scriptwait(C_SetVar);
  216.    ACS_Execute(C_SetVar, X_MapID, V_str, S_str, 0);
  217.    scriptwait(C_SetVar);
  218.    ACS_Execute(C_SetVar, X_MapID, V_chr, S_chr, 0);
  219.    scriptwait(C_SetVar);
  220.    ACS_Execute(C_SetVar, X_MapID, V_con, S_con, 0);
  221.    scriptwait(C_SetVar);
  222.    ACS_Execute(C_SetVar, X_MapID, V_dex, S_dex, 0);
  223.    scriptwait(C_SetVar);
  224.    ACS_Execute(C_SetVar, X_MapID, V_wis, S_wis, 0);
  225.    scriptwait(C_SetVar);
  226.    ACS_Execute(C_SetVar, X_MapID, V_MagiLevel, 1, 0);
  227.    scriptwait(C_SetVar);
  228.    delay(140);
  229.    print(s: "IT HAS BEEN DONE."); delay(70);
  230.    print(s: "YOU MULL OVER WHAT YOU HAVE BECOME..."); delay(70);
  231.    ACS_Execute(C_GetVar, X_MapID, V_class, 0,0);
  232.    scriptwait(C_GetVar);
  233.    Class = C_Result;
  234.    switch(Class) {
  235.      case CLASS_Mage: print(s: "A MAGE,"); break;
  236.      case CLASS_Fighter: print(s: "A FIGHTER,"); break;
  237.      case CLASS_Cleric: print(s: "A CLERIC,"); break;
  238.      default: print(s: "AN UNKOWN.."); break;
  239.    };
  240.    delay(70);
  241.    ACS_Execute(C_GetVar, X_MapID, V_str,0,0);
  242.    scriptwait(C_GetVar);
  243.    S_str = C_Result;
  244.    print(s: "...WITH A STRENGTH OF ", d: S_str, s:"..."); delay(70);
  245.    ACS_Execute(C_GetVar, X_MapID, V_con,0,0);
  246.    scriptwait(C_GetVar);
  247.    S_con = C_Result;
  248.    print(s: "...A CONSTITUTION OF ", d: S_con, s:"..."); delay(70);
  249.    ACS_Execute(C_GetVar, X_MapID, V_dex,0,0);
  250.    scriptwait(C_GetVar);
  251.    S_dex = C_Result;
  252.    print(s: "...A DEXTERITY OF ", d: S_dex, s:"..."); delay(70);
  253.    ACS_Execute(C_GetVar, X_MapID, V_int,0,0);
  254.    scriptwait(C_GetVar);
  255.    S_int = C_Result;
  256.    print(s: "...AN INTELLIGENCE OF ", d: S_int, s:"..."); delay(70);
  257.    ACS_Execute(C_GetVar, X_MapID, V_wis,0,0);
  258.    scriptwait(C_GetVar);
  259.    S_wis = C_Result;
  260.    print(s: "...A WISDOM OF ", d: S_wis, s:"..."); delay(70);
  261.    ACS_Execute(C_GetVar, X_MapID, V_chr,0,0);
  262.    scriptwait(C_GetVar);
  263.    S_chr = C_Result;
  264.    print(s: "...AND A CHARISMA OF ", d: S_chr, s:"."); delay(140);
  265.    print(s: "YOUR SOUL IS INCARNATED..."); delay(35);
  266.    ACS_Execute(C_FTalkOff,X_MapID,0,0,0);
  267.    Teleport_NewMap(64, 0);
  268. }
  269.  
  270. script O_SetStats OPEN {
  271. //  stats_1 = 0;
  272. //  stats_2 = 0;
  273. //  experience = 0;
  274. //  gold = 0;
  275. }
  276.