Guest User

Untitled

a guest
Dec 23rd, 2018
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.12 KB | None | 0 0
  1. Main
  2. {
  3. questname "Change Class"
  4. version 1
  5. }
  6.  
  7.  
  8.  
  9.  
  10. state Begin
  11. {
  12.  
  13. desc "Talk to Wise Man"
  14. action AddNpcChat( 4 , "Hellow stranger" );
  15. action AddNpcText( 4 , "Hellow stranger, what can I do for you?" );
  16. action AddNpcInput( 4 , 1 , "View Classes");
  17. action AddNpcInput( 4 , 2 , "Exit");
  18.  
  19. rule InputNpc( 1 ) goto ClassMenu
  20. rule InputNpc( 2 ) goto QuestReset
  21. }
  22.  
  23.  
  24.  
  25.  
  26. state ClassMenu
  27. {
  28. desc "Talk to Wise Man"
  29. action ShowHint("Class menu opened");
  30.  
  31. action AddNpcText( 4 , "Would you like to buy a class?" );
  32. action AddNpcInput( 4 , 1 , "Priest Class");
  33. action AddNpcInput( 4 , 2 , "Magician Class");
  34. action AddNpcInput( 4 , 3 , "Rogue Class");
  35. action AddNpcInput( 4 , 4 , "Archer Class");
  36. action AddNpcInput( 4 , 5 , "Warrior Class");
  37.  
  38. rule InputNpc( 1 ) goto PriestSelected
  39. rule InputNpc( 2 ) goto MagicianSelected
  40. rule InputNpc( 3 ) goto RogueSelected
  41. rule InputNpc( 4 ) goto ArcherSelected
  42. rule InputNpc( 5 ) goto WarriorSelected
  43. }
  44.  
  45.  
  46.  
  47.  
  48. state PriestSelected
  49. {
  50. action AddNpcText( 4 , "Priest Cost: 100G");
  51. action AddNpcInput( 4 , 1 , "Buy Priest");
  52. action AddNpcInput( 4 , 2 , "View Classes");
  53. action AddNpcInput( 4 , 3 , "Exit");
  54.  
  55. rule InputNpc( 1 ) goto PriestBought
  56. rule InputNpc( 2 ) goto ClassMenu
  57. rule InputNpc( 3 ) goto QuestReset
  58. }
  59.  
  60. state MagicianSelected
  61. {
  62. action AddNpcText( 4 , "Magician Cost: 200G");
  63. action AddNpcInput( 4 , 1 , "Buy Magician");
  64. action AddNpcInput( 4 , 2 , "View Classes");
  65. action AddNpcInput( 4 , 3 , "Exit");
  66.  
  67. rule InputNpc( 1 ) goto MagicianBought
  68. rule InputNpc( 2 ) goto ClassMenu
  69. rule InputNpc( 3 ) goto QuestReset
  70. }
  71.  
  72. state RogueSelected
  73. {
  74. action AddNpcText( 4 , "Rogue Cost: 300G");
  75. action AddNpcInput( 4 , 1 , "Buy Rogue");
  76. action AddNpcInput( 4 , 2 , "View Classes");
  77. action AddNpcInput( 4 , 3 , "Exit");
  78.  
  79. rule InputNpc( 1 ) goto RogueBought
  80. rule InputNpc( 2 ) goto ClassMenu
  81. rule InputNpc( 3 ) goto QuestReset
  82. }
  83.  
  84. state ArcherSelected
  85. {
  86. action AddNpcText( 4 , "Archer Cost: 400G");
  87. action AddNpcInput( 4 , 1 , "Buy Archer");
  88. action AddNpcInput( 4 , 2 , "View Classes");
  89. action AddNpcInput( 4 , 3 , "Exit");
  90.  
  91. rule InputNpc( 1 ) goto ArcherBought
  92. rule InputNpc( 2 ) goto ClassMenu
  93. rule InputNpc( 3 ) goto QuestReset
  94. }
  95.  
  96. state WarriorSelected
  97. {
  98. action AddNpcText( 4 , "Warrior Cost: 500G");
  99. action AddNpcInput( 4 , 1 , "Buy Warrior");
  100. action AddNpcInput( 4 , 2 , "View Classes");
  101. action AddNpcInput( 4 , 3 , "Exit");
  102.  
  103. rule InputNpc( 1 ) goto WarriorBought
  104. rule InputNpc( 2 ) goto ClassMenu
  105. rule InputNpc( 3 ) goto QuestReset
  106. }
  107.  
  108.  
  109.  
  110.  
  111.  
  112. state PriestBought
  113. {
  114. action SetClass(2);
  115. action RemoveItem( 1 , 100)
  116. action ShowHint("You bought the Priest Class for: 100 Gold.");
  117. action Reset();
  118. }
  119.  
  120. state MagicianBought
  121. {
  122. action SetClass(3);
  123. action RemoveItem( 1 , 200)
  124. action ShowHint("You bought the Magician Class for: 200 Gold.");
  125. action Reset();
  126. }
  127.  
  128. state RogueBought
  129. {
  130. action SetClass(4);
  131. action RemoveItem( 1 , 300)
  132. action ShowHint("You bought the Rogue Class for: 300 Gold.");
  133. action Reset();
  134. }
  135.  
  136. state ArcherBought
  137. {
  138. action SetClass(5);
  139. action RemoveItem( 1 , 400)
  140. action ShowHint("You bought the Archer Class for: 400 Gold.");
  141. action Reset();
  142. }
  143.  
  144. state WarriorBought
  145. {
  146. action SetClass(6);
  147. action RemoveItem( 1 , 500)
  148. action ShowHint("You bought the Warrior Class for: 500 Gold.");
  149. action Reset();
  150. }
  151.  
  152.  
  153.  
  154.  
  155. state QuestReset
  156. {
  157. action Reset();
  158. }
Advertisement
Add Comment
Please, Sign In to add comment