Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.69 KB | None | 0 0
  1. Main
  2. {
  3. questname "SHOP NAME"
  4. version 1.0
  5. }
  6. State Begin
  7. {
  8. desc "Buy Items?"
  9. action AddNpcText(#,"Welcome to my store!");
  10. action AddNpcText(#,"I am the master of items! I can be set to sell you things for money, or trade for items!" );
  11. action AddNpcInput(#,1,"Continue.");
  12. action AddNpcInput(#,2,"Exit.");
  13.  
  14. rule InputNpc(1) goto Menu1
  15. rule InputNPC(2) goto Reset
  16. }
  17. State Menu1
  18. {
  19. desc "Buy Items?"
  20. action ShowHint("You will be charged if you proceed...");
  21. action AddNpcText(#,"Item List:" );
  22. action AddNpcInput(#,1,"Abort! Cancel!");
  23. action AddNpcInput(#,2,"Item Name - Item Price");
  24. action AddNpcInput(#,3,"Item Name - Item Price");
  25. action AddNpcInput(#,4,"Item Name - Item Price");
  26. action AddNpcInput(#,5,"Item Name - Item Price");
  27. action AddNpcInput(#,6,"Item Name - Item Price");
  28. action AddNpcInput(#,7,"Item Name - Item Price");
  29. action AddNpcInput(#,8,"Item Name - Item Price");
  30. action AddNpcInput(#,9,"Next Page ->");
  31.  
  32. rule InputNpc(1) goto Reset
  33. rule InputNpc(2) goto Check1
  34. rule InputNpc(3) goto Check2
  35. rule InputNpc(4) goto Check3
  36. rule InputNpc(5) goto Check4
  37. rule InputNpc(6) goto Check5
  38. rule InputNpc(7) goto Check6
  39. rule InputNpc(8) goto Check7
  40. rule InputNpc(9) goto Menu2
  41. }
  42. State Menu2
  43. {
  44. desc "Buy Items?"
  45. action AddNpcText(#,"Item List:" );
  46. action AddNpcInput(#,1,"Abort! Cancel!");
  47. action AddNpcInput(#,2,"Item Name - Item Price");
  48. action AddNpcInput(#,3,"Item Name - Item Price");
  49. action AddNpcInput(#,4,"Item Name - Item Price");
  50. action AddNpcInput(#,5,"Item Name - Item Price");
  51. action AddNpcInput(#,6,"Item Name - Item Price");
  52. action AddNpcInput(#,7,"Item Name - Item Price");
  53. action AddNpcInput(#,8,"<- Previous Page");
  54. action AddNpcInput(#,9,"Next Page ->");
  55.  
  56. rule InputNpc(1) goto Reset
  57. rule InputNpc(2) goto Check8
  58. rule InputNpc(3) goto Check9
  59. rule InputNpc(4) goto Check10
  60. rule InputNpc(5) goto Check11
  61. rule InputNpc(6) goto Check12
  62. rule InputNpc(7) goto Check13
  63. rule InputNpc(8) goto Menu1
  64. rule InputNpc(9) goto Menu3
  65. }
  66. State Menu3
  67. {
  68. desc "Buy Items?"
  69. action AddNpcText(#,"Item List:" );
  70. action AddNpcInput(#,1,"Abort! Cancel!");
  71. action AddNpcInput(#,2,"Item Name - Item Price");
  72. action AddNpcInput(#,3,"Item Name - Item Price");
  73. action AddNpcInput(#,4,"Item Name - Item Price");
  74. action AddNpcInput(#,5,"Item Name - Item Price");
  75. action AddNpcInput(#,6,"Item Name - Item Price");
  76. action AddNpcInput(#,7,"Item Name - Item Price");
  77. action AddNpcInput(#,8,"Item Name - Item Price");
  78. action AddNpcInput(#,9,"<- Previous Page
  79.  
  80. rule InputNpc(1) goto Reset
  81. rule InputNpc(2) goto Check14
  82. rule InputNpc(3) goto Check15
  83. rule InputNpc(4) goto Check16
  84. rule InputNpc(5) goto Check17
  85. rule InputNpc(6) goto Check18
  86. rule InputNpc(7) goto Check19
  87. rule InputNpc(8) goto Check20
  88. rule InputNpc(9) goto Menu2
  89. }
  90. State Check1
  91. {
  92. if GotItems(1,100) goto Check1A
  93. else SetState("SoftReset1");
  94. }
  95. State Check1A
  96. {
  97. action ShowHint("You have purchased ITEM 1");
  98. action RemoveItem(1,100);
  99. action GiveItem(CHANGE-ME-ITEM1, 1);
  100. action PlaySound(5);
  101. action SetState("SoftReset2");
  102. }
  103. State Check2
  104. {
  105. if GotItems(1,100) goto Check2A
  106. else SetState("SoftReset1");
  107. }
  108. State Check2A
  109. {
  110. action ShowHint("You have purchased ITEM 1");
  111. action RemoveItem(1,100);
  112. action GiveItem(CHANGE-ME-ITEM1, 1);
  113. action PlaySound(5);
  114. action SetState("SoftReset2");
  115. }
  116. State Check3
  117. {
  118. if GotItems(1,100) goto Check3A
  119. else SetState("SoftReset1");
  120. }
  121. State Check3A
  122. {
  123. action ShowHint("You have purchased ITEM 1");
  124. action RemoveItem(1,100);
  125. action GiveItem(CHANGE-ME-ITEM1, 1);
  126. action PlaySound(5);
  127. action SetState("SoftReset2");
  128. }
  129. State Check4
  130. {
  131. if GotItems(1,100) goto Check4A
  132. else SetState("SoftReset1");
  133. }
  134. State Check4A
  135. {
  136. action ShowHint("You have purchased ITEM 1");
  137. action RemoveItem(1,100);
  138. action GiveItem(CHANGE-ME-ITEM1, 1);
  139. action PlaySound(5);
  140. action SetState("SoftReset2");
  141. }
  142. State Check5
  143. {
  144. if GotItems(1,100) goto Check5A
  145. else SetState("SoftReset1");
  146. }
  147. State Check5A
  148. {
  149. action ShowHint("You have purchased ITEM 1");
  150. action RemoveItem(1,100);
  151. action GiveItem(CHANGE-ME-ITEM1, 1);
  152. action PlaySound(5);
  153. action SetState("SoftReset2");
  154. }
  155. State Check6
  156. {
  157. if GotItems(1,100) goto Check6A
  158. else SetState("SoftReset1");
  159. }
  160. State Check6A
  161. {
  162. action ShowHint("You have purchased ITEM 1");
  163. action RemoveItem(1,100);
  164. action GiveItem(CHANGE-ME-ITEM1, 1);
  165. action PlaySound(5);
  166. action SetState("SoftReset2");
  167. }
  168. State Check7
  169. {
  170. if GotItems(1,100) goto Check7A
  171. else SetState("SoftReset1");
  172. }
  173. State Check7A
  174. {
  175. action ShowHint("You have purchased ITEM 1");
  176. action RemoveItem(1,100);
  177. action GiveItem(CHANGE-ME-ITEM1, 1);
  178. action PlaySound(5);
  179. action SetState("SoftReset2");
  180. }
  181. State Check8
  182. {
  183. if GotItems(1,100) goto Check8A
  184. else SetState("SoftReset1");
  185. }
  186. State Check8A
  187. {
  188. action ShowHint("You have purchased ITEM 1");
  189. action RemoveItem(1,100);
  190. action GiveItem(CHANGE-ME-ITEM1, 1);
  191. action PlaySound(5);
  192. action SetState("SoftReset2");
  193. }
  194. State Check9
  195. {
  196. if GotItems(1,100) goto Check9A
  197. else SetState("SoftReset1");
  198. }
  199. State Check9A
  200. {
  201. action ShowHint("You have purchased ITEM 1");
  202. action RemoveItem(1,100);
  203. action GiveItem(CHANGE-ME-ITEM1, 1);
  204. action PlaySound(5);
  205. action SetState("SoftReset2");
  206. }
  207. State Check10
  208. {
  209. if GotItems(1,100) goto Check10A
  210. else SetState("SoftReset1");
  211. }
  212. State Check10A
  213. {
  214. action ShowHint("You have purchased ITEM 1");
  215. action RemoveItem(1,100);
  216. action GiveItem(CHANGE-ME-ITEM1, 1);
  217. action PlaySound(5);
  218. action SetState("SoftReset2");
  219. }
  220. State Check11
  221. {
  222. if GotItems(1,100) goto Check11A
  223. else SetState("SoftReset1");
  224. }
  225. State Check11A
  226. {
  227. action ShowHint("You have purchased ITEM 1");
  228. action RemoveItem(1,100);
  229. action GiveItem(CHANGE-ME-ITEM1, 1);
  230. action PlaySound(5);
  231. action SetState("SoftReset2");
  232. }
  233. State Check12
  234. {
  235. if GotItems(1,100) goto Check12A
  236. else SetState("SoftReset1");
  237. }
  238. State Check12A
  239. {
  240. action ShowHint("You have purchased ITEM 1");
  241. action RemoveItem(1,100);
  242. action GiveItem(CHANGE-ME-ITEM1, 1);
  243. action PlaySound(5);
  244. action SetState("SoftReset2");
  245. }
  246. State Check13
  247. {
  248. if GotItems(1,100) goto Check13A
  249. else SetState("SoftReset1");
  250. }
  251. State Check13A
  252. {
  253. action ShowHint("You have purchased ITEM 1");
  254. action RemoveItem(1,100);
  255. action GiveItem(CHANGE-ME-ITEM1, 1);
  256. action PlaySound(5);
  257. action SetState("SoftReset2");
  258. }
  259. State Check14
  260. {
  261. if GotItems(1,100) goto Check14A
  262. else SetState("SoftReset1");
  263. }
  264. State Check14A
  265. {
  266. action ShowHint("You have purchased ITEM 1");
  267. action RemoveItem(1,100);
  268. action GiveItem(CHANGE-ME-ITEM1, 1);
  269. action PlaySound(5);
  270. action SetState("SoftReset2");
  271. }
  272. State Check15
  273. {
  274. if GotItems(1,100) goto Check15A
  275. else SetState("SoftReset1");
  276. }
  277. State Check15A
  278. {
  279. action ShowHint("You have purchased ITEM 1");
  280. action RemoveItem(1,100);
  281. action GiveItem(CHANGE-ME-ITEM1, 1);
  282. action PlaySound(5);
  283. action SetState("SoftReset2");
  284. }
  285. State Check16
  286. {
  287. if GotItems(1,100) goto Check16A
  288. else SetState("SoftReset1");
  289. }
  290. State Check16A
  291. {
  292. action ShowHint("You have purchased ITEM 1");
  293. action RemoveItem(1,100);
  294. action GiveItem(CHANGE-ME-ITEM1, 1);
  295. action PlaySound(5);
  296. action SetState("SoftReset2");
  297. }
  298. State Check17
  299. {
  300. if GotItems(1,100) goto Check17A
  301. else SetState("SoftReset1");
  302. }
  303. State Check17A
  304. {
  305. action ShowHint("You have purchased ITEM 1");
  306. action RemoveItem(1,100);
  307. action GiveItem(CHANGE-ME-ITEM1, 1);
  308. action PlaySound(5);
  309. action SetState("SoftReset2");
  310. }
  311. State Check18
  312. {
  313. if GotItems(1,100) goto Check18A
  314. else SetState("SoftReset1");
  315. }
  316. State Check18A
  317. {
  318. action ShowHint("You have purchased ITEM 1");
  319. action RemoveItem(1,100);
  320. action GiveItem(CHANGE-ME-ITEM1, 1);
  321. action PlaySound(5);
  322. action SetState("SoftReset2");
  323. }
  324. State Check19
  325. {
  326. if GotItems(1,100) goto Check19A
  327. else SetState("SoftReset1");
  328. }
  329. State Check19A
  330. {
  331. action ShowHint("You have purchased ITEM 1");
  332. action RemoveItem(1,100);
  333. action GiveItem(CHANGE-ME-ITEM1, 1);
  334. action PlaySound(5);
  335. action SetState("SoftReset2");
  336. }
  337. State Check20
  338. {
  339. if GotItems(1,100) goto Check20A
  340. else SetState("SoftReset1");
  341. }
  342. State Check20A
  343. {
  344. action ShowHint("You have purchased ITEM 1");
  345. action RemoveItem(1,100);
  346. action GiveItem(CHANGE-ME-ITEM1, 1);
  347. action PlaySound(5);
  348. action SetState("SoftReset2");
  349. }
  350. State SoftReset1
  351. {
  352. action ShowHint("Insufficient funds.");
  353. action Reset();
  354. }
  355. State SoftReset2
  356. {
  357. action ShowHint("Transaction completed succesfully!");
  358. action Reset();
  359. }
  360. State Reset
  361. {
  362. action Reset();
  363. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement