Advertisement
Guest User

EO+ Daily Stat Training + Random Amounts

a guest
Jan 3rd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.46 KB | None | 0 0
  1. Main
  2. {
  3. questname "Intensive Training (Daily)"
  4. version 1
  5. }
  6. State Begin
  7. {
  8. desc "Talk to Trainer (Daily)"
  9.  
  10. action AddNpcText(#,"Greetings! Once per day, you can come to me for Intensive Training!");
  11. action AddNpcText(#,"The price for this service, is AMOUNT");
  12. action AddNpcText(#,"You can choose which statistic we will target for each training session!");
  13. action AddNpcText(#,"With my help, you can increase your desired stat between 10 - 15 points each day!");
  14. action AddNpcInput(#,1,"Okay!");
  15.  
  16. rule InputNpc (1) goto Menu1
  17. }
  18. State Menu1
  19. {
  20. desc "Choose Stat?"
  21. action ShowHint("You will be charged if you proceed with training...");
  22. action AddNpcText(#,"Which statistic shall we focus on for your Intensive Training today?");
  23. action AddNpcInput(#,1,"Strength.");
  24. action AddNpcInput(#,2,"Intelligence.");
  25. action AddNpcInput(#,3,"Agility.");
  26. action AddNpcInput(#,4,"Constitution.");
  27. action AddNpcInput(#,5,"Wisdom.");
  28. action AddNpcInput(#,6,"Charisma.");
  29.  
  30. rule InputNpc(1) goto Check1
  31. rule InputNpc(2) goto Check2
  32. rule InputNpc(3) goto Check3
  33. rule InputNpc(4) goto Check4
  34. rule InputNpc(5) goto Check5
  35. rule InputNpc(6) goto Check6
  36. }
  37. State Check1
  38. {
  39. if GotItems(1,100) goto CheckStr
  40. else SetState("SoftReset1");
  41. }
  42. State Check2
  43. {
  44. if GotItems(1,100) goto CheckInt
  45. else SetState("SoftReset1");
  46. }
  47. State Check3
  48. {
  49. if GotItems(1,100) goto CheckAgi
  50. else SetState("SoftReset1");
  51. }
  52. State Check4
  53. {
  54. if GotItems(1,100) goto CheckCon
  55. else SetState("SoftReset1");
  56. }
  57. State Check5
  58. {
  59. if GotItems(1,100) goto CheckWis
  60. else SetState("SoftReset1");
  61. }
  62. State Check6
  63. {
  64. if GotItems(1,100) goto CheckCha
  65. else SetState("SoftReset1");
  66. }
  67. State CheckStr
  68. {
  69. action Roll(5)
  70.  
  71. rule DoneDaily(1) goto DailyReset
  72. rule Rolled(1) goto Str1
  73. rule Rolled(2) goto Str2
  74. rule Rolled(3) goto Str3
  75. rule Rolled(4) goto Str4
  76. rule Rolled(5) goto Str5
  77. }
  78. state Str1
  79. {
  80. action RemoveItem(1,100);
  81. action GiveStat("str",1);
  82. action ShowHint("Your Strength has increased by 1 today!");
  83. action SetState("GetReward");
  84. }
  85. state Str2
  86. {
  87. action RemoveItem(1,100);
  88. action GiveStat("str",2);
  89. action ShowHint("Your Strength has increased by 2 today!");
  90. action SetState("GetReward");
  91. }
  92. state Str3
  93. {
  94. action RemoveItem(1,100);
  95. action GiveStat("str",3);
  96. action ShowHint("Your Strength has increased by 3 today!");
  97. action SetState("GetReward");
  98. }
  99. state Str4
  100. {
  101. action RemoveItem(1,100);
  102. action GiveStat("str",4);
  103. action ShowHint("Your Strength has increased by 4 today!");
  104. action SetState("GetReward");
  105. }
  106. state Str5
  107. {
  108. action RemoveItem(1,100);
  109. action GiveStat("str",5);
  110. action ShowHint("Your Strength has increased by 5 today!");
  111. action SetState("GetReward");
  112. }
  113. state CheckInt
  114. {
  115. action Roll(5)
  116.  
  117. rule DoneDaily(1) goto DailyReset
  118. rule Rolled(1) goto Int1
  119. rule Rolled(2) goto Int2
  120. rule Rolled(3) goto Int3
  121. rule Rolled(4) goto Int4
  122. rule Rolled(5) goto Int5
  123. }
  124. state Int1
  125. {
  126. action RemoveItem(1,100);
  127. action GiveStat("int",1);
  128. action ShowHint("Your Intelligence has increased by 1 today!");
  129. action SetState("GetReward");
  130. }
  131. state Int2
  132. {
  133. action RemoveItem(1,100);
  134. action GiveStat("int",2);
  135. action ShowHint("Your Intelligence has increased by 2 today!");
  136. action SetState("GetReward");
  137. }
  138. state Int3
  139. {
  140. action RemoveItem(1,100);
  141. action GiveStat("int",3);
  142. action ShowHint("Your Intelligence has increased by 3 today!");
  143. action SetState("GetReward");
  144. }
  145. state Int4
  146. {
  147. action RemoveItem(1,100);
  148. action GiveStat("int",4);
  149. action ShowHint("Your Intelligence has increased by 4 today!");
  150. action SetState("GetReward");
  151. }
  152. state Int5
  153. {
  154. action RemoveItem(1,100);
  155. action GiveStat("int",5);
  156. action ShowHint("Your Intelligence has increased by 5 today!");
  157. action SetState("GetReward");
  158. }
  159. state CheckAgi
  160. {
  161. action Roll(5)
  162.  
  163. rule DoneDaily(1) goto DailyReset
  164. rule Rolled(1) goto Agi1
  165. rule Rolled(2) goto Agi2
  166. rule Rolled(3) goto Agi3
  167. rule Rolled(4) goto Agi4
  168. rule Rolled(5) goto Agi5
  169. }
  170. state Agi1
  171. {
  172. action RemoveItem(1,100);
  173. action GiveStat("agi",1);
  174. action ShowHint("Your Agility has increased by 1 today!");
  175. action SetState("GetReward");
  176. }
  177. state Agi2
  178. {
  179. action RemoveItem(1,100);
  180. action GiveStat("agi",2);
  181. action ShowHint("Your Agility has increased by 2 today!");
  182. action SetState("GetReward");
  183. }
  184. state Agi3
  185. {
  186. action RemoveItem(1,100);
  187. action GiveStat("agi",3);
  188. action ShowHint("Your Agility has increased by 3 today!");
  189. action SetState("GetReward");
  190. }
  191. state Agi4
  192. {
  193. action RemoveItem(1,100);
  194. action GiveStat("agi",4);
  195. action ShowHint("Your Agility has increased by 4 today!");
  196. action SetState("GetReward");
  197. }
  198. state Agi5
  199. {
  200. action RemoveItem(1,100);
  201. action GiveStat("agi",5);
  202. action ShowHint("Your Agility has increased by 5 today!");
  203. action SetState("GetReward");
  204. }
  205. state CheckCon
  206. {
  207. action Roll(5)
  208.  
  209. rule DoneDaily(1) goto DailyReset
  210. rule Rolled(1) goto Con1
  211. rule Rolled(2) goto Con2
  212. rule Rolled(3) goto Con3
  213. rule Rolled(4) goto Con4
  214. rule Rolled(5) goto Con5
  215. }
  216. state Con1
  217. {
  218. action RemoveItem(1,100);
  219. action GiveStat("con",1);
  220. action ShowHint("Your Constitution has increased by 1 today!");
  221. action SetState("GetReward");
  222. }
  223. state Con2
  224. {
  225. action RemoveItem(1,100);
  226. action GiveStat("con",2);
  227. action ShowHint("Your Constitution has increased by 2 today!");
  228. action SetState("GetReward");
  229. }
  230. state Con3
  231. {
  232. action RemoveItem(1,100);
  233. action GiveStat("con",3);
  234. action ShowHint("Your Constitution has increased by 3 today!");
  235. action SetState("GetReward");
  236. }
  237. state Con4
  238. {
  239. action RemoveItem(1,100);
  240. action GiveStat("con",4);
  241. action ShowHint("Your Constitution has increased by 4 today!");
  242. action SetState("GetReward");
  243. }
  244. state Con5
  245. {
  246. action RemoveItem(1,100);
  247. action GiveStat("con",5);
  248. action ShowHint("Your Constitution has increased by 5 today!");
  249. action SetState("GetReward");
  250. }
  251. state CheckWis
  252. {
  253. action Roll(5)
  254.  
  255. rule DoneDaily(1) goto DailyReset
  256. rule Rolled(1) goto Wis1
  257. rule Rolled(2) goto Wis2
  258. rule Rolled(3) goto Wis3
  259. rule Rolled(4) goto Wis4
  260. rule Rolled(5) goto Wis5
  261. }
  262. state Wis1
  263. {
  264. action RemoveItem(1,100);
  265. action GiveStat("wis",1);
  266. action ShowHint("Your Wisdom has increased by 1 today!");
  267. action SetState("GetReward");
  268. }
  269. state Wis2
  270. {
  271. action RemoveItem(1,100);
  272. action GiveStat("wis",2);
  273. action ShowHint("Your Wisdom has increased by 2 today!");
  274. action SetState("GetReward");
  275. }
  276. state Wis3
  277. {
  278. action RemoveItem(1,100);
  279. action GiveStat("wis",3);
  280. action ShowHint("Your Wisdom has increased by 3 today!");
  281. action SetState("GetReward");
  282. }
  283. state Wis4
  284. {
  285. action RemoveItem(1,100);
  286. action GiveStat("wis",4);
  287. action ShowHint("Your Wisdom has increased by 4 today!");
  288. action SetState("GetReward");
  289. }
  290. state Wis5
  291. {
  292. action RemoveItem(1,100);
  293. action GiveStat("wis",5);
  294. action ShowHint("Your Wisdom has increased by 5 today!");
  295. action SetState("GetReward");
  296. }
  297. state CheckCha
  298. {
  299. action Roll(5)
  300.  
  301. rule DoneDaily(1) goto DailyReset
  302. rule Rolled(1) goto Cha1
  303. rule Rolled(2) goto Cha2
  304. rule Rolled(3) goto Cha3
  305. rule Rolled(4) goto Cha4
  306. rule Rolled(5) goto Cha5
  307. }
  308. state Cha1
  309. {
  310. action RemoveItem(1,100);
  311. action GiveStat("cha",1);
  312. action ShowHint("Your Charisma has increased by 1 today!");
  313. action SetState("GetReward");
  314. }
  315. state Cha2
  316. {
  317. action RemoveItem(1,100);
  318. action GiveStat("cha",2);
  319. action ShowHint("Your Charisma has increased by 2 today!");
  320. action SetState("GetReward");
  321. }
  322. state Cha3
  323. {
  324. action RemoveItem(1,100);
  325. action GiveStat("cha",3);
  326. action ShowHint("Your Charisma has increased by 3 today!");
  327. action SetState("GetReward");
  328. }
  329. state Cha4
  330. {
  331. action RemoveItem(1,100);
  332. action GiveStat("cha",4);
  333. action ShowHint("Your Charisma has increased by 4 today!");
  334. action SetState("GetReward");
  335. }
  336. state Cha5
  337. {
  338. action RemoveItem(1,100);
  339. action GiveStat("cha",5);
  340. action ShowHint("Your Charisma has increased by 5 today!");
  341. action SetState("GetReward");
  342. }
  343. state GetReward
  344. {
  345. action ShowHint("Your Intensive Training is completed for today! (DAILY)");
  346. action PlaySound(17);
  347. action GiveExp(100);
  348. action ResetDaily();
  349. }
  350. state DailyReset
  351. {
  352. desc "Intensive Training (Daily)"
  353. action ShowHint("You can only complete your Intensive Training once a day.");
  354. action AddNpcText(#,"You have already completed your training today, please come back tomorrow." );
  355.  
  356. rule TalkedToNpc(#) goto Reset
  357. }
  358. state Reset
  359. {
  360. action ShowHint("Intensive Training (Daily) aborted...")
  361. action Reset();
  362. }
  363. State SoftReset1
  364. {
  365. action ShowHint("Insufficient funds.");
  366. action Reset();
  367. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement