Advertisement
Guest User

The Island - Trade Post Script

a guest
Mar 17th, 2017
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.79 KB | None | 0 0
  1. Main
  2. {
  3. questname "Trade Ships (20x Daily)"
  4. version 1
  5. }
  6. state Begin
  7. {
  8. desc "Trade Menu (Daily Trading)"
  9. action ShowHint("You will be charged if you proceed with a trade...");
  10. action AddNpcText(30,"Trade Ship Search: 20x per day search limit.");
  11. action AddNpcInput(30,1,"Search to buy resources.");
  12. action AddNpcInput(30,2,"Search to sell resources.");
  13. action AddNpcInput(30,3,"Cancel.");
  14.  
  15. rule InputNpc(1) goto BuyMenuRoll
  16. rule InputNpc(2) goto SellMenuRoll
  17. rule InputNpc(3) goto Reset
  18. }
  19. State BuyMenuRoll
  20. {
  21. action Roll(7)
  22. rule DoneDaily(20) goto DailyResetDialogue
  23. rule Rolled(1) goto BuyMenu1
  24. rule Rolled(2) goto BuyMenu2
  25. rule Rolled(3) goto BuyMenu3
  26. rule Rolled(4) goto BuyMenu4
  27. rule Rolled(5) goto BuyMenu5
  28. rule Rolled(6) goto BuyMenu6
  29. rule Rolled(7) goto BuyMenu7
  30. }
  31. State SellMenuRoll
  32. {
  33. action Roll(7)
  34. rule DoneDaily(20) goto DailyResetDialogue
  35. rule Rolled(1) goto SellMenu1
  36. rule Rolled(2) goto SellMenu2
  37. rule Rolled(3) goto SellMenu3
  38. rule Rolled(4) goto SellMenu4
  39. rule Rolled(5) goto SellMenu5
  40. rule Rolled(6) goto SellMenu6
  41. rule Rolled(7) goto SellMenu7
  42. }
  43. state BuyMenu1
  44. {
  45. desc "Trade Menu (Daily Trading)"
  46. action ShowHint("You will be charged if you proceed with a trade...");
  47. action AddNpcText(30,"Ship: The Everglow - Buy");
  48. action AddNpcInput(30,1,"100 Stone [658c]");
  49. action AddNpcInput(30,2,"100 Clay [752c]");
  50. action AddNpcInput(30,3,"100 Wood [357c]");
  51. action AddNpcInput(30,4,"100 Metal [851c]");
  52. action AddNpcInput(30,5,"100 Berries [165c]");
  53. action AddNpcInput(30,6,"Reject Trade");
  54. rule InputNpc(1) goto BuyMenu1Stone
  55. rule InputNpc(2) goto BuyMenu1Clay
  56. rule InputNpc(3) goto BuyMenu1Wood
  57. rule InputNpc(4) goto BuyMenu1Metal
  58. rule InputNpc(5) goto BuyMenu1Berries
  59. rule InputNpc(6) goto ResetNoExp
  60. }
  61. state BuyMenu1Stone
  62. {
  63. if GotItems(1,658) goto BuyMenu1Stone1
  64. else SetState("nofunds");
  65. }
  66. state BuyMenu1Clay
  67. {
  68. if GotItems(1,752) goto BuyMenu1Clay1
  69. else SetState("nofunds");
  70. }
  71. state BuyMenu1Wood
  72. {
  73. if GotItems(1,357) goto BuyMenu1Wood1
  74. else SetState("nofunds");
  75. }
  76. state BuyMenu1Metal
  77. {
  78. if GotItems(1,851) goto BuyMenu1Metal1
  79. else SetState("nofunds");
  80. }
  81. state BuyMenu1Berries
  82. {
  83. if GotItems(1,165) goto BuyMenu1Berries1
  84. else SetState("nofunds");
  85. }
  86. state BuyMenu1Stone1
  87. {
  88. action RemoveItem(1,658);
  89. action GiveItem(193,100);
  90. action ShowHint("You have purchased 100 Stone!");
  91. action SetState("GetReward");
  92. }
  93. state BuyMenu1Clay1
  94. {
  95. action RemoveItem(1,752);
  96. action GiveItem(194,100);
  97. action ShowHint("You have purchased 100 Clay!");
  98. action SetState("GetReward");
  99. }
  100. state BuyMenu1Wood1
  101. {
  102. action RemoveItem(1,357);
  103. action GiveItem(195,100);
  104. action ShowHint("You have purchased 100 Wood!");
  105. action SetState("GetReward");
  106. }
  107. state BuyMenu1Metal1
  108. {
  109. action RemoveItem(1,851);
  110. action GiveItem(196,100);
  111. action ShowHint("You have purchased 100 Metal!");
  112. action SetState("GetReward");
  113. }
  114. state BuyMenu1Berries1
  115. {
  116. action RemoveItem(1,165);
  117. action GiveItem(197,100);
  118. action ShowHint("You have purchased 100 Berries!");
  119. action SetState("GetReward");
  120. }
  121. state BuyMenu2
  122. {
  123. desc "Trade Menu (Daily Trading)"
  124. action ShowHint("You will be charged if you proceed with a trade...");
  125. action AddNpcText(30,"Ship: The Trident - Buy");
  126. action AddNpcInput(30,1,"100 Stone [743c]");
  127. action AddNpcInput(30,2,"100 Clay [627c]");
  128. action AddNpcInput(30,3,"100 Wood [431c]");
  129. action AddNpcInput(30,4,"100 Metal [1012c]");
  130. action AddNpcInput(30,5,"100 Berries [202c]");
  131. action AddNpcInput(30,6,"Reject Trade");
  132. rule InputNpc(1) goto BuyMenu2Stone
  133. rule InputNpc(2) goto BuyMenu2Clay
  134. rule InputNpc(3) goto BuyMenu2Wood
  135. rule InputNpc(4) goto BuyMenu2Metal
  136. rule InputNpc(5) goto BuyMenu2Berries
  137. rule InputNpc(6) goto ResetNoExp
  138. }
  139. state BuyMenu2Stone
  140. {
  141. if GotItems(1,743) goto BuyMenu2Stone2
  142. else SetState("nofunds");
  143. }
  144. state BuyMenu2Clay
  145. {
  146. if GotItems(1,627) goto BuyMenu2Clay2
  147. else SetState("nofunds");
  148. }
  149. state BuyMenu2Wood
  150. {
  151. if GotItems(1,431) goto BuyMenu2Wood2
  152. else SetState("nofunds");
  153. }
  154. state BuyMenu2Metal
  155. {
  156. if GotItems(1,1012) goto BuyMenu2Metal2
  157. else SetState("nofunds");
  158. }
  159. state BuyMenu2Berries
  160. {
  161. if GotItems(1,202) goto BuyMenu2Berries2
  162. else SetState("nofunds");
  163. }
  164. state BuyMenu2Stone2
  165. {
  166. action RemoveItem(1,743);
  167. action GiveItem(193,100);
  168. action ShowHint("You have purchased 100 Stone!");
  169. action SetState("GetReward");
  170. }
  171. state BuyMenu2Clay2
  172. {
  173. action RemoveItem(1,627);
  174. action GiveItem(194,100);
  175. action ShowHint("You have purchased 100 Clay!");
  176. action SetState("GetReward");
  177. }
  178. state BuyMenu2Wood2
  179. {
  180. action RemoveItem(1,431);
  181. action GiveItem(195,100);
  182. action ShowHint("You have purchased 100 Wood!");
  183. action SetState("GetReward");
  184. }
  185. state BuyMenu2Metal2
  186. {
  187. action RemoveItem(1,1012);
  188. action GiveItem(196,100);
  189. action ShowHint("You have purchased 100 Metal!");
  190. action SetState("GetReward");
  191. }
  192. state BuyMenu2Berries2
  193. {
  194. action RemoveItem(1,202);
  195. action GiveItem(197,100);
  196. action ShowHint("You have purchased 100 Berries!");
  197. action SetState("GetReward");
  198. }
  199. state BuyMenu3
  200. {
  201. desc "Trade Menu (Daily Trading)"
  202. action ShowHint("You will be charged if you proceed with a trade...");
  203. action AddNpcText(30,"Ship: The Gaunt - Buy");
  204. action AddNpcInput(30,1,"100 Stone [817c]");
  205. action AddNpcInput(30,2,"100 Clay [689c]");
  206. action AddNpcInput(30,3,"100 Wood [474c]");
  207. action AddNpcInput(30,4,"100 Metal [1102c]");
  208. action AddNpcInput(30,5,"100 Berries [221c]");
  209. action AddNpcInput(30,6,"Reject Trade");
  210. rule InputNpc(1) goto BuyMenu3Stone
  211. rule InputNpc(2) goto BuyMenu3Clay
  212. rule InputNpc(3) goto BuyMenu3Wood
  213. rule InputNpc(4) goto BuyMenu3Metal
  214. rule InputNpc(5) goto BuyMenu3Berries
  215. rule InputNpc(6) goto ResetNoExp
  216. }
  217. state BuyMenu3Stone
  218. {
  219. if GotItems(1,817) goto BuyMenu3Stone3
  220. else SetState("nofunds");
  221. }
  222. state BuyMenu3Clay
  223. {
  224. if GotItems(1,689) goto BuyMenu3Clay3
  225. else SetState("nofunds");
  226. }
  227. state BuyMenu3Wood
  228. {
  229. if GotItems(1,474) goto BuyMenu3Wood3
  230. else SetState("nofunds");
  231. }
  232. state BuyMenu3Metal
  233. {
  234. if GotItems(1,1102) goto BuyMenu3Metal3
  235. else SetState("nofunds");
  236. }
  237. state BuyMenu3Berries
  238. {
  239. if GotItems(1,221) goto BuyMenu3Berries3
  240. else SetState("nofunds");
  241. }
  242. state BuyMenu3Stone3
  243. {
  244. action RemoveItem(1,817);
  245. action GiveItem(193,100);
  246. action ShowHint("You have purchased 100 Stone!");
  247. action SetState("GetReward");
  248. }
  249. state BuyMenu3Clay3
  250. {
  251. action RemoveItem(1,689);
  252. action GiveItem(194,100);
  253. action ShowHint("You have purchased 100 Clay!");
  254. action SetState("GetReward");
  255. }
  256. state BuyMenu3Wood3
  257. {
  258. action RemoveItem(1,474);
  259. action GiveItem(195,100);
  260. action ShowHint("You have purchased 100 Wood!");
  261. action SetState("GetReward");
  262. }
  263. state BuyMenu3Metal3
  264. {
  265. action RemoveItem(1,1102);
  266. action GiveItem(196,100);
  267. action ShowHint("You have purchased 100 Metal!");
  268. action SetState("GetReward");
  269. }
  270. state BuyMenu3Berries3
  271. {
  272. action RemoveItem(1,221);
  273. action GiveItem(197,100);
  274. action ShowHint("You have purchased 100 Berries!");
  275. action SetState("GetReward");
  276. }
  277. state BuyMenu4
  278. {
  279. desc "Trade Menu (Daily Trading)"
  280. action ShowHint("You will be charged if you proceed with a trade...");
  281. action AddNpcText(30,"Ship: The Hallowed - Buy");
  282. action AddNpcInput(30,1,"100 Stone [898c]");
  283. action AddNpcInput(30,2,"100 Clay [757c]");
  284. action AddNpcInput(30,3,"100 Wood [521c]");
  285. action AddNpcInput(30,4,"100 Metal [1212c]");
  286. action AddNpcInput(30,5,"100 Berries [243c]");
  287. action AddNpcInput(30,6,"Reject Trade");
  288. rule InputNpc(1) goto BuyMenu4Stone
  289. rule InputNpc(2) goto BuyMenu4Clay
  290. rule InputNpc(3) goto BuyMenu4Wood
  291. rule InputNpc(4) goto BuyMenu4Metal
  292. rule InputNpc(5) goto BuyMenu4Berries
  293. rule InputNpc(6) goto ResetNoExp
  294. }
  295. state BuyMenu4Stone
  296. {
  297. if GotItems(1,898) goto BuyMenu4Stone4
  298. else SetState("nofunds");
  299. }
  300. state BuyMenu4Clay
  301. {
  302. if GotItems(1,757) goto BuyMenu4Clay4
  303. else SetState("nofunds");
  304. }
  305. state BuyMenu4Wood
  306. {
  307. if GotItems(1,521) goto BuyMenu4Wood4
  308. else SetState("nofunds");
  309. }
  310. state BuyMenu4Metal
  311. {
  312. if GotItems(1,1212) goto BuyMenu4Metal4
  313. else SetState("nofunds");
  314. }
  315. state BuyMenu4Berries
  316. {
  317. if GotItems(1,243) goto BuyMenu4Berries4
  318. else SetState("nofunds");
  319. }
  320. state BuyMenu4Stone4
  321. {
  322. action RemoveItem(1,898);
  323. action GiveItem(193,100);
  324. action ShowHint("You have purchased 100 Stone!");
  325. action SetState("GetReward");
  326. }
  327. state BuyMenu4Clay4
  328. {
  329. action RemoveItem(1,757);
  330. action GiveItem(194,100);
  331. action ShowHint("You have purchased 100 Clay!");
  332. action SetState("GetReward");
  333. }
  334. state BuyMenu4Wood4
  335. {
  336. action RemoveItem(1,521);
  337. action GiveItem(195,100);
  338. action ShowHint("You have purchased 100 Wood!");
  339. action SetState("GetReward");
  340. }
  341. state BuyMenu4Metal4
  342. {
  343. action RemoveItem(1,1212);
  344. action GiveItem(196,100);
  345. action ShowHint("You have purchased 100 Metal!");
  346. action SetState("GetReward");
  347. }
  348. state BuyMenu4Berries4
  349. {
  350. action RemoveItem(1,243);
  351. action GiveItem(197,100);
  352. action ShowHint("You have purchased 100 Berries!");
  353. action SetState("GetReward");
  354. }
  355. state BuyMenu5
  356. {
  357. desc "Trade Menu (Daily Trading)"
  358. action ShowHint("You will be charged if you proceed with a trade...");
  359. action AddNpcText(30,"Ship: The Shanty - Buy");
  360. action AddNpcInput(30,1,"100 Stone [987c]");
  361. action AddNpcInput(30,2,"100 Clay [832c]");
  362. action AddNpcInput(30,3,"100 Wood [573c]");
  363. action AddNpcInput(30,4,"100 Metal [1330c]");
  364. action AddNpcInput(30,5,"100 Berries [267c]");
  365. action AddNpcInput(30,6,"Reject Trade");
  366. rule InputNpc(1) goto BuyMenu5Stone
  367. rule InputNpc(2) goto BuyMenu5Clay
  368. rule InputNpc(3) goto BuyMenu5Wood
  369. rule InputNpc(4) goto BuyMenu5Metal
  370. rule InputNpc(5) goto BuyMenu5Berries
  371. rule InputNpc(6) goto ResetNoExp
  372. }
  373. state BuyMenu5Stone
  374. {
  375. if GotItems(1,987) goto BuyMenu5Stone5
  376. else SetState("nofunds");
  377. }
  378. state BuyMenu5Clay
  379. {
  380. if GotItems(1,832) goto BuyMenu5Clay5
  381. else SetState("nofunds");
  382. }
  383. state BuyMenu5Wood
  384. {
  385. if GotItems(1,573) goto BuyMenu5Wood5
  386. else SetState("nofunds");
  387. }
  388. state BuyMenu5Metal
  389. {
  390. if GotItems(1,1330) goto BuyMenu5Metal5
  391. else SetState("nofunds");
  392. }
  393. state BuyMenu5Berries
  394. {
  395. if GotItems(1,267) goto BuyMenu5Berries5
  396. else SetState("nofunds");
  397. }
  398. state BuyMenu5Stone5
  399. {
  400. action RemoveItem(1,987);
  401. action GiveItem(193,100);
  402. action ShowHint("You have purchased 100 Stone!");
  403. action SetState("GetReward");
  404. }
  405. state BuyMenu5Clay5
  406. {
  407. action RemoveItem(1,832);
  408. action GiveItem(194,100);
  409. action ShowHint("You have purchased 100 Clay!");
  410. action SetState("GetReward");
  411. }
  412. state BuyMenu5Wood5
  413. {
  414. action RemoveItem(1,573);
  415. action GiveItem(195,100);
  416. action ShowHint("You have purchased 100 Wood!");
  417. action SetState("GetReward");
  418. }
  419. state BuyMenu5Metal5
  420. {
  421. action RemoveItem(1,1330);
  422. action GiveItem(196,100);
  423. action ShowHint("You have purchased 100 Metal!");
  424. action SetState("GetReward");
  425. }
  426. state BuyMenu5Berries5
  427. {
  428. action RemoveItem(1,267);
  429. action GiveItem(197,100);
  430. action ShowHint("You have purchased 100 Berries!");
  431. action SetState("GetReward");
  432. }
  433. state BuyMenu6
  434. {
  435. desc "Trade Menu (Daily Trading)"
  436. action ShowHint("You will be charged if you proceed with a trade...");
  437. action AddNpcText(30,"Ship: The Quicken - Buy");
  438. action AddNpcInput(30,1,"100 Stone [1085c]");
  439. action AddNpcInput(30,2,"100 Clay [915c]");
  440. action AddNpcInput(30,3,"100 Wood [630c]");
  441. action AddNpcInput(30,4,"100 Metal [1463c]");
  442. action AddNpcInput(30,5,"100 Berries [293c]");
  443. action AddNpcInput(30,6,"Reject Trade");
  444. rule InputNpc(1) goto BuyMenu6Stone
  445. rule InputNpc(2) goto BuyMenu6Clay
  446. rule InputNpc(3) goto BuyMenu6Wood
  447. rule InputNpc(4) goto BuyMenu6Metal
  448. rule InputNpc(5) goto BuyMenu6Berries
  449. rule InputNpc(6) goto ResetNoExp
  450. }
  451. state BuyMenu6Stone
  452. {
  453. if GotItems(1,1085) goto BuyMenu6Stone6
  454. else SetState("nofunds");
  455. }
  456. state BuyMenu6Clay
  457. {
  458. if GotItems(1,915) goto BuyMenu6Clay6
  459. else SetState("nofunds");
  460. }
  461. state BuyMenu6Wood
  462. {
  463. if GotItems(1,630) goto BuyMenu6Wood6
  464. else SetState("nofunds");
  465. }
  466. state BuyMenu6Metal
  467. {
  468. if GotItems(1,1463) goto BuyMenu6Metal6
  469. else SetState("nofunds");
  470. }
  471. state BuyMenu6Berries
  472. {
  473. if GotItems(1,293) goto BuyMenu6Berries6
  474. else SetState("nofunds");
  475. }
  476. state BuyMenu6Stone6
  477. {
  478. action RemoveItem(1,1085);
  479. action GiveItem(193,100);
  480. action ShowHint("You have purchased 100 Stone!");
  481. action SetState("GetReward");
  482. }
  483. state BuyMenu6Clay6
  484. {
  485. action RemoveItem(1,915);
  486. action GiveItem(194,100);
  487. action ShowHint("You have purchased 100 Clay!");
  488. action SetState("GetReward");
  489. }
  490. state BuyMenu6Wood6
  491. {
  492. action RemoveItem(1,630);
  493. action GiveItem(195,100);
  494. action ShowHint("You have purchased 100 Wood!");
  495. action SetState("GetReward");
  496. }
  497. state BuyMenu6Metal6
  498. {
  499. action RemoveItem(1,1463);
  500. action GiveItem(196,100);
  501. action ShowHint("You have purchased 100 Metal!");
  502. action SetState("GetReward");
  503. }
  504. state BuyMenu6Berries6
  505. {
  506. action RemoveItem(1,293);
  507. action GiveItem(197,100);
  508. action ShowHint("You have purchased 100 Berries!");
  509. action SetState("GetReward");
  510. }
  511. state BuyMenu7
  512. {
  513. desc "Trade Menu (Daily Trading)"
  514. action ShowHint("You will be charged if you proceed with a trade...");
  515. action AddNpcText(30,"Ship: The Argent - Buy");
  516. action AddNpcInput(30,1,"100 Stone [1085c]");
  517. action AddNpcInput(30,2,"100 Clay [915c]");
  518. action AddNpcInput(30,3,"100 Wood [630c]");
  519. action AddNpcInput(30,4,"100 Metal [1463c]");
  520. action AddNpcInput(30,5,"100 Berries [293c]");
  521. action AddNpcInput(30,6,"Reject Trade");
  522. rule InputNpc(1) goto BuyMenu7Stone
  523. rule InputNpc(2) goto BuyMenu7Clay
  524. rule InputNpc(3) goto BuyMenu7Wood
  525. rule InputNpc(4) goto BuyMenu7Metal
  526. rule InputNpc(5) goto BuyMenu7Berries
  527. rule InputNpc(6) goto ResetNoExp
  528. }
  529. state BuyMenu7Stone
  530. {
  531. if GotItems(1,1085) goto BuyMenu7Stone7
  532. else SetState("nofunds");
  533. }
  534. state BuyMenu7Clay
  535. {
  536. if GotItems(1,915) goto BuyMenu7Clay7
  537. else SetState("nofunds");
  538. }
  539. state BuyMenu7Wood
  540. {
  541. if GotItems(1,630) goto BuyMenu7Wood7
  542. else SetState("nofunds");
  543. }
  544. state BuyMenu7Metal
  545. {
  546. if GotItems(1,1463) goto BuyMenu7Metal7
  547. else SetState("nofunds");
  548. }
  549. state BuyMenu7Berries
  550. {
  551. if GotItems(1,293) goto BuyMenu7Berries7
  552. else SetState("nofunds");
  553. }
  554. state BuyMenu7Stone7
  555. {
  556. action RemoveItem(1,1085);
  557. action GiveItem(193,100);
  558. action ShowHint("You have purchased 100 Stone!");
  559. action SetState("GetReward");
  560. }
  561. state BuyMenu7Clay7
  562. {
  563. action RemoveItem(1,915);
  564. action GiveItem(194,100);
  565. action ShowHint("You have purchased 100 Clay!");
  566. action SetState("GetReward");
  567. }
  568. state BuyMenu7Wood7
  569. {
  570. action RemoveItem(1,630);
  571. action GiveItem(195,100);
  572. action ShowHint("You have purchased 100 Wood!");
  573. action SetState("GetReward");
  574. }
  575. state BuyMenu7Metal7
  576. {
  577. action RemoveItem(1,1463);
  578. action GiveItem(196,100);
  579. action ShowHint("You have purchased 100 Metal!");
  580. action SetState("GetReward");
  581. }
  582. state BuyMenu7Berries7
  583. {
  584. action RemoveItem(1,293);
  585. action GiveItem(197,100);
  586. action ShowHint("You have purchased 100 Berries!");
  587. action SetState("GetReward");
  588. }
  589. state SellMenu1
  590. {
  591. desc "Trade Menu (Daily Trading)"
  592. action ShowHint("You will be charged if you proceed with a trade...");
  593. action AddNpcText(30,"Ship: The Everglow - Sell");
  594. action AddNpcInput(30,1,"100 Stone [658c]");
  595. action AddNpcInput(30,2,"100 Clay [752c]");
  596. action AddNpcInput(30,3,"100 Wood [357c]");
  597. action AddNpcInput(30,4,"100 Metal [851c]");
  598. action AddNpcInput(30,5,"100 Berries [165c]");
  599. action AddNpcInput(30,6,"Reject Trade");
  600. rule InputNpc(1) goto SellMenu1Stone
  601. rule InputNpc(2) goto SellMenu1Clay
  602. rule InputNpc(3) goto SellMenu1Wood
  603. rule InputNpc(4) goto SellMenu1Metal
  604. rule InputNpc(5) goto SellMenu1Berries
  605. rule InputNpc(6) goto ResetNoExp
  606. }
  607. state SellMenu1Stone
  608. {
  609. if GotItems(193,100) goto SellMenu1Stone1
  610. else SetState("nofunds1");
  611. }
  612. state SellMenu1Clay
  613. {
  614. if GotItems(194,100) goto SellMenu1Clay1
  615. else SetState("nofunds1");
  616. }
  617. state SellMenu1Wood
  618. {
  619. if GotItems(195,100) goto SellMenu1Wood1
  620. else SetState("nofunds1");
  621. }
  622. state SellMenu1Metal
  623. {
  624. if GotItems(196,100) goto SellMenu1Metal1
  625. else SetState("nofunds1");
  626. }
  627. state SellMenu1Berries
  628. {
  629. if GotItems(197,100) goto SellMenu1Berries1
  630. else SetState("nofunds1");
  631. }
  632. state SellMenu1Stone1
  633. {
  634. action RemoveItem(193,100);
  635. action GiveItem(1,658);
  636. action ShowHint("You have sold 100 Stone!");
  637. action SetState("GetReward");
  638. }
  639. state SellMenu1Clay1
  640. {
  641. action RemoveItem(194,100);
  642. action GiveItem(1,752);
  643. action ShowHint("You have sold 100 Clay!");
  644. action SetState("GetReward");
  645. }
  646. state SellMenu1Wood1
  647. {
  648. action RemoveItem(195,100);
  649. action GiveItem(1,357);
  650. action ShowHint("You have sold 100 Wood!");
  651. action SetState("GetReward");
  652. }
  653. state SellMenu1Metal1
  654. {
  655. action RemoveItem(196,100);
  656. action GiveItem(1,851);
  657. action ShowHint("You have sold 100 Metal!");
  658. action SetState("GetReward");
  659. }
  660. state SellMenu1Berries1
  661. {
  662. action RemoveItem(197,100);
  663. action GiveItem(1,165);
  664. action ShowHint("You have sold 100 Berries!");
  665. action SetState("GetReward");
  666. }
  667. state SellMenu2
  668. {
  669. desc "Trade Menu (Daily Trading)"
  670. action ShowHint("You will be charged if you proceed with a trade...");
  671. action AddNpcText(30,"Ship: The Trident - Sell");
  672. action AddNpcInput(30,1,"100 Stone [743c]");
  673. action AddNpcInput(30,2,"100 Clay [627c]");
  674. action AddNpcInput(30,3,"100 Wood [431c]");
  675. action AddNpcInput(30,4,"100 Metal [1012c]");
  676. action AddNpcInput(30,5,"100 Berries [202c]");
  677. action AddNpcInput(30,6,"Reject Trade");
  678. rule InputNpc(1) goto SellMenu2Stone
  679. rule InputNpc(2) goto SellMenu2Clay
  680. rule InputNpc(3) goto SellMenu2Wood
  681. rule InputNpc(4) goto SellMenu2Metal
  682. rule InputNpc(5) goto SellMenu2Berries
  683. rule InputNpc(6) goto ResetNoExp
  684. }
  685. state SellMenu2Stone
  686. {
  687. if GotItems(193,100) goto SellMenu2Stone2
  688. else SetState("nofunds1");
  689. }
  690. state SellMenu2Clay
  691. {
  692. if GotItems(194,100) goto SellMenu2Clay2
  693. else SetState("nofunds1");
  694. }
  695. state SellMenu2Wood
  696. {
  697. if GotItems(195,100) goto SellMenu2Wood2
  698. else SetState("nofunds1");
  699. }
  700. state SellMenu2Metal
  701. {
  702. if GotItems(196,100) goto SellMenu2Metal2
  703. else SetState("nofunds1");
  704. }
  705. state SellMenu2Berries
  706. {
  707. if GotItems(197,100) goto SellMenu2Berries2
  708. else SetState("nofunds1");
  709. }
  710. state SellMenu2Stone2
  711. {
  712. action RemoveItem(193,100);
  713. action GiveItem(1,743);
  714. action ShowHint("You have sold 100 Stone!");
  715. action SetState("GetReward");
  716. }
  717. state SellMenu2Clay2
  718. {
  719. action RemoveItem(194,100);
  720. action GiveItem(1,627);
  721. action ShowHint("You have sold 100 Clay!");
  722. action SetState("GetReward");
  723. }
  724. state SellMenu2Wood2
  725. {
  726. action RemoveItem(195,100);
  727. action GiveItem(1,431);
  728. action ShowHint("You have sold 100 Wood!");
  729. action SetState("GetReward");
  730. }
  731. state SellMenu2Metal2
  732. {
  733. action RemoveItem(196,100);
  734. action GiveItem(1,1012);
  735. action ShowHint("You have sold 100 Metal!");
  736. action SetState("GetReward");
  737. }
  738. state SellMenu2Berries2
  739. {
  740. action RemoveItem(197,100);
  741. action GiveItem(1,202);
  742. action ShowHint("You have sold 100 Berries!");
  743. action SetState("GetReward");
  744. }
  745. state SellMenu3
  746. {
  747. desc "Trade Menu (Daily Trading)"
  748. action ShowHint("You will be charged if you proceed with a trade...");
  749. action AddNpcText(30,"Ship: The Gaunt - Sell");
  750. action AddNpcInput(30,1,"100 Stone [817c]");
  751. action AddNpcInput(30,2,"100 Clay [689c]");
  752. action AddNpcInput(30,3,"100 Wood [474c]");
  753. action AddNpcInput(30,4,"100 Metal [1102c]");
  754. action AddNpcInput(30,5,"100 Berries [221c]");
  755. action AddNpcInput(30,6,"Reject Trade");
  756. rule InputNpc(1) goto SellMenu3Stone
  757. rule InputNpc(2) goto SellMenu3Clay
  758. rule InputNpc(3) goto SellMenu3Wood
  759. rule InputNpc(4) goto SellMenu3Metal
  760. rule InputNpc(5) goto SellMenu3Berries
  761. rule InputNpc(6) goto ResetNoExp
  762. }
  763. state SellMenu3Stone
  764. {
  765. if GotItems(193,100) goto SellMenu3Stone3
  766. else SetState("nofunds1");
  767. }
  768. state SellMenu3Clay
  769. {
  770. if GotItems(194,100) goto SellMenu3Clay3
  771. else SetState("nofunds1");
  772. }
  773. state SellMenu3Wood
  774. {
  775. if GotItems(195,100) goto SellMenu3Wood3
  776. else SetState("nofunds1");
  777. }
  778. state SellMenu3Metal
  779. {
  780. if GotItems(196,100) goto SellMenu3Metal3
  781. else SetState("nofunds1");
  782. }
  783. state SellMenu3Berries
  784. {
  785. if GotItems(197,100) goto SellMenu3Berries3
  786. else SetState("nofunds1");
  787. }
  788. state SellMenu3Stone3
  789. {
  790. action RemoveItem(193,100);
  791. action GiveItem(1,817);
  792. action ShowHint("You have sold 100 Stone!");
  793. action SetState("GetReward");
  794. }
  795. state SellMenu3Clay3
  796. {
  797. action RemoveItem(194,100);
  798. action GiveItem(1,689);
  799. action ShowHint("You have sold 100 Clay!");
  800. action SetState("GetReward");
  801. }
  802. state SellMenu3Wood3
  803. {
  804. action RemoveItem(195,100);
  805. action GiveItem(1,474);
  806. action ShowHint("You have sold 100 Wood!");
  807. action SetState("GetReward");
  808. }
  809. state SellMenu3Metal3
  810. {
  811. action RemoveItem(196,100);
  812. action GiveItem(1,1102);
  813. action ShowHint("You have sold 100 Metal!");
  814. action SetState("GetReward");
  815. }
  816. state SellMenu3Berries3
  817. {
  818. action RemoveItem(197,100);
  819. action GiveItem(1,221);
  820. action ShowHint("You have sold 100 Berries!");
  821. action SetState("GetReward");
  822. }
  823. state SellMenu4
  824. {
  825. desc "Trade Menu (Daily Trading)"
  826. action ShowHint("You will be charged if you proceed with a trade...");
  827. action AddNpcText(30,"Ship: The Hallowed - Sell");
  828. action AddNpcInput(30,1,"100 Stone [898c]");
  829. action AddNpcInput(30,2,"100 Clay [757c]");
  830. action AddNpcInput(30,3,"100 Wood [521c]");
  831. action AddNpcInput(30,4,"100 Metal [1212c]");
  832. action AddNpcInput(30,5,"100 Berries [243c]");
  833. action AddNpcInput(30,6,"Reject Trade");
  834. rule InputNpc(1) goto SellMenu4Stone
  835. rule InputNpc(2) goto SellMenu4Clay
  836. rule InputNpc(3) goto SellMenu4Wood
  837. rule InputNpc(4) goto SellMenu4Metal
  838. rule InputNpc(5) goto SellMenu4Berries
  839. rule InputNpc(6) goto ResetNoExp
  840. }
  841. state SellMenu4Stone
  842. {
  843. if GotItems(193,100) goto SellMenu4Stone4
  844. else SetState("nofunds1");
  845. }
  846. state SellMenu4Clay
  847. {
  848. if GotItems(194,100) goto SellMenu4Clay4
  849. else SetState("nofunds1");
  850. }
  851. state SellMenu4Wood
  852. {
  853. if GotItems(195,100) goto SellMenu4Wood4
  854. else SetState("nofunds1");
  855. }
  856. state SellMenu4Metal
  857. {
  858. if GotItems(196,100) goto SellMenu4Metal4
  859. else SetState("nofunds1");
  860. }
  861. state SellMenu4Berries
  862. {
  863. if GotItems(197,100) goto SellMenu4Berries4
  864. else SetState("nofunds1");
  865. }
  866. state SellMenu4Stone4
  867. {
  868. action RemoveItem(193,100);
  869. action GiveItem(1,898);
  870. action ShowHint("You have sold 100 Stone!");
  871. action SetState("GetReward");
  872. }
  873. state SellMenu4Clay4
  874. {
  875. action RemoveItem(194,100);
  876. action GiveItem(1,757);
  877. action ShowHint("You have sold 100 Clay!");
  878. action SetState("GetReward");
  879. }
  880. state SellMenu4Wood4
  881. {
  882. action RemoveItem(195,100);
  883. action GiveItem(1,521);
  884. action ShowHint("You have sold 100 Wood!");
  885. action SetState("GetReward");
  886. }
  887. state SellMenu4Metal4
  888. {
  889. action RemoveItem(196,100);
  890. action GiveItem(1,1212);
  891. action ShowHint("You have sold 100 Metal!");
  892. action SetState("GetReward");
  893. }
  894. state SellMenu4Berries4
  895. {
  896. action RemoveItem(197,100);
  897. action GiveItem(1,243);
  898. action ShowHint("You have sold 100 Berries!");
  899. action SetState("GetReward");
  900. }
  901. state SellMenu5
  902. {
  903. desc "Trade Menu (Daily Trading)"
  904. action ShowHint("You will be charged if you proceed with a trade...");
  905. action AddNpcText(30,"Ship: The Shanty - Sell");
  906. action AddNpcInput(30,1,"100 Stone [987c]");
  907. action AddNpcInput(30,2,"100 Clay [832c]");
  908. action AddNpcInput(30,3,"100 Wood [573c]");
  909. action AddNpcInput(30,4,"100 Metal [1330c]");
  910. action AddNpcInput(30,5,"100 Berries [267c]");
  911. action AddNpcInput(30,6,"Reject Trade");
  912. rule InputNpc(1) goto SellMenu5Stone
  913. rule InputNpc(2) goto SellMenu5Clay
  914. rule InputNpc(3) goto SellMenu5Wood
  915. rule InputNpc(4) goto SellMenu5Metal
  916. rule InputNpc(5) goto SellMenu5Berries
  917. rule InputNpc(6) goto ResetNoExp
  918. }
  919. state SellMenu5Stone
  920. {
  921. if GotItems(193,100) goto SellMenu5Stone5
  922. else SetState("nofunds1");
  923. }
  924. state SellMenu5Clay
  925. {
  926. if GotItems(194,100) goto SellMenu5Clay5
  927. else SetState("nofunds1");
  928. }
  929. state SellMenu5Wood
  930. {
  931. if GotItems(195,100) goto SellMenu5Wood5
  932. else SetState("nofunds1");
  933. }
  934. state SellMenu5Metal
  935. {
  936. if GotItems(196,100) goto SellMenu5Metal5
  937. else SetState("nofunds1");
  938. }
  939. state SellMenu5Berries
  940. {
  941. if GotItems(197,100) goto SellMenu5Berries5
  942. else SetState("nofunds1");
  943. }
  944. state SellMenu5Stone5
  945. {
  946. action RemoveItem(193,100);
  947. action GiveItem(1,987);
  948. action ShowHint("You have sold 100 Stone!");
  949. action SetState("GetReward");
  950. }
  951. state SellMenu5Clay5
  952. {
  953. action RemoveItem(194,100);
  954. action GiveItem(1,832);
  955. action ShowHint("You have sold 100 Clay!");
  956. action SetState("GetReward");
  957. }
  958. state SellMenu5Wood5
  959. {
  960. action RemoveItem(195,100);
  961. action GiveItem(1,573);
  962. action ShowHint("You have sold 100 Wood!");
  963. action SetState("GetReward");
  964. }
  965. state SellMenu5Metal5
  966. {
  967. action RemoveItem(196,100);
  968. action GiveItem(1,1330);
  969. action ShowHint("You have sold 100 Metal!");
  970. action SetState("GetReward");
  971. }
  972. state SellMenu5Berries5
  973. {
  974. action RemoveItem(197,100);
  975. action GiveItem(1,267);
  976. action ShowHint("You have sold 100 Berries!");
  977. action SetState("GetReward");
  978. }
  979. state SellMenu6
  980. {
  981. desc "Trade Menu (Daily Trading)"
  982. action ShowHint("You will be charged if you proceed with a trade...");
  983. action AddNpcText(30,"Ship: The Quicken - Sell");
  984. action AddNpcInput(30,1,"100 Stone [1085c]");
  985. action AddNpcInput(30,2,"100 Clay [915c]");
  986. action AddNpcInput(30,3,"100 Wood [630c]");
  987. action AddNpcInput(30,4,"100 Metal [1463c]");
  988. action AddNpcInput(30,5,"100 Berries [293c]");
  989. action AddNpcInput(30,6,"Reject Trade");
  990. rule InputNpc(1) goto SellMenu6Stone
  991. rule InputNpc(2) goto SellMenu6Clay
  992. rule InputNpc(3) goto SellMenu6Wood
  993. rule InputNpc(4) goto SellMenu6Metal
  994. rule InputNpc(5) goto SellMenu6Berries
  995. rule InputNpc(6) goto ResetNoExp
  996. }
  997. state SellMenu6Stone
  998. {
  999. if GotItems(193,100) goto SellMenu6Stone6
  1000. else SetState("nofunds1");
  1001. }
  1002. state SellMenu6Clay
  1003. {
  1004. if GotItems(194,100) goto SellMenu6Clay6
  1005. else SetState("nofunds1");
  1006. }
  1007. state SellMenu6Wood
  1008. {
  1009. if GotItems(195,100) goto SellMenu6Wood6
  1010. else SetState("nofunds1");
  1011. }
  1012. state SellMenu6Metal
  1013. {
  1014. if GotItems(196,100) goto SellMenu6Metal6
  1015. else SetState("nofunds1");
  1016. }
  1017. state SellMenu6Berries
  1018. {
  1019. if GotItems(197,100) goto SellMenu6Berries6
  1020. else SetState("nofunds1");
  1021. }
  1022. state SellMenu6Stone6
  1023. {
  1024. action RemoveItem(193,100);
  1025. action GiveItem(1,1085);
  1026. action ShowHint("You have sold 100 Stone!");
  1027. action SetState("GetReward");
  1028. }
  1029. state SellMenu6Clay6
  1030. {
  1031. action RemoveItem(194,100);
  1032. action GiveItem(1,915);
  1033. action ShowHint("You have sold 100 Clay!");
  1034. action SetState("GetReward");
  1035. }
  1036. state SellMenu6Wood6
  1037. {
  1038. action RemoveItem(195,100);
  1039. action GiveItem(1,630);
  1040. action ShowHint("You have sold 100 Wood!");
  1041. action SetState("GetReward");
  1042. }
  1043. state SellMenu6Metal6
  1044. {
  1045. action RemoveItem(196,100);
  1046. action GiveItem(1,1463);
  1047. action ShowHint("You have sold 100 Metal!");
  1048. action SetState("GetReward");
  1049. }
  1050. state SellMenu6Berries6
  1051. {
  1052. action RemoveItem(197,100);
  1053. action GiveItem(1,293);
  1054. action ShowHint("You have sold 100 Berries!");
  1055. action SetState("GetReward");
  1056. }
  1057. state SellMenu7
  1058. {
  1059. desc "Trade Menu (Daily Trading)"
  1060. action ShowHint("You will be charged if you proceed with a trade...");
  1061. action AddNpcText(30,"Ship: The Argent - Sell");
  1062. action AddNpcInput(30,1,"100 Stone [1085c]");
  1063. action AddNpcInput(30,2,"100 Clay [915c]");
  1064. action AddNpcInput(30,3,"100 Wood [630c]");
  1065. action AddNpcInput(30,4,"100 Metal [1463c]");
  1066. action AddNpcInput(30,5,"100 Berries [293c]");
  1067. action AddNpcInput(30,6,"Reject Trade");
  1068. rule InputNpc(1) goto SellMenu7Stone
  1069. rule InputNpc(2) goto SellMenu7Clay
  1070. rule InputNpc(3) goto SellMenu7Wood
  1071. rule InputNpc(4) goto SellMenu7Metal
  1072. rule InputNpc(5) goto SellMenu7Berries
  1073. rule InputNpc(6) goto ResetNoExp
  1074. }
  1075. state SellMenu7Stone
  1076. {
  1077. if GotItems(193,100) goto SellMenu7Stone7
  1078. else SetState("nofunds1");
  1079. }
  1080. state SellMenu7Clay
  1081. {
  1082. if GotItems(194,100) goto SellMenu7Clay7
  1083. else SetState("nofunds1");
  1084. }
  1085. state SellMenu7Wood
  1086. {
  1087. if GotItems(195,100) goto SellMenu7Wood7
  1088. else SetState("nofunds1");
  1089. }
  1090. state SellMenu7Metal
  1091. {
  1092. if GotItems(196,100) goto SellMenu7Metal7
  1093. else SetState("nofunds1");
  1094. }
  1095. state SellMenu7Berries
  1096. {
  1097. if GotItems(197,100) goto SellMenu7Berries7
  1098. else SetState("nofunds1");
  1099. }
  1100. state SellMenu7Stone7
  1101. {
  1102. action RemoveItem(193,100);
  1103. action GiveItem(1,1085);
  1104. action ShowHint("You have sold 100 Stone!");
  1105. action SetState("GetReward");
  1106. }
  1107. state SellMenu7Clay7
  1108. {
  1109. action RemoveItem(194,100);
  1110. action GiveItem(1,915);
  1111. action ShowHint("You have sold 100 Clay!");
  1112. action SetState("GetReward");
  1113. }
  1114. state SellMenu7Wood7
  1115. {
  1116. action RemoveItem(195,100);
  1117. action GiveItem(1,630);
  1118. action ShowHint("You have sold 100 Wood!");
  1119. action SetState("GetReward");
  1120. }
  1121. state SellMenu7Metal7
  1122. {
  1123. action RemoveItem(196,100);
  1124. action GiveItem(1,1463);
  1125. action ShowHint("You have sold 100 Metal!");
  1126. action SetState("GetReward");
  1127. }
  1128. state SellMenu7Berries7
  1129. {
  1130. action RemoveItem(197,100);
  1131. action GiveItem(1,293);
  1132. action ShowHint("You have sold 100 Berries!");
  1133. action SetState("GetReward");
  1134. }
  1135. state GetReward
  1136. {
  1137. action ShowHint("Your trade was successful!");
  1138. action PlaySound(17);
  1139. action GiveExp(3990);
  1140. action ResetDaily();
  1141. }
  1142. state DailyResetDialogue
  1143. {
  1144. action ShowHint("There are no more ships available for trade today.");
  1145. action ShowHint("Trade limit has already been reached today. (x20)" );
  1146. action SetState("Reset");
  1147. }
  1148. state ResetNoExp
  1149. {
  1150. action ShowHint("The ship has sailed away.");
  1151. action ShowHint("Careful not to waste your daily limit!" );
  1152. action ResetDaily();
  1153. }
  1154. state Reset
  1155. {
  1156. action ShowHint("Trade (20x Daily) aborted...")
  1157. action Reset();
  1158. }
  1159. State nofunds
  1160. {
  1161. action ShowHint("The captain scoffs at your lack of money and sails away.");
  1162. action ShowHint("Next time check your balance before trying to buy!");
  1163. action ResetDaily();
  1164. }
  1165. State nofunds1
  1166. {
  1167. action ShowHint("The captain scoffs at your lack of resources and sails away.");
  1168. action ShowHint("Next time check your stocks before trying to buy!");
  1169. action ResetDaily();
  1170. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement