cooking_quest.txt 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. //===== eAthena Script =======================================
  2. //= Cooking Quest
  3. //===== By: ==================================================
  4. //= Reddozen
  5. //===== Current Version: =====================================
  6. //= 1.5a
  7. //===== Compatible With: =====================================
  8. //= eAthena 1.0+
  9. //===== Description: =========================================
  10. //= Official Cooking Quest
  11. //===== Additional Comments: =================================
  12. //= 1.1 Fixed wrong item ID, added missing ";, optimized [Lupus]
  13. //= 1.1a minor bugfix, thx 2 Irmin [Lupus]
  14. //= 1.2 Fixed exploit, some typos [Lupus]
  15. //= 1.3 Fixed wrong label [Lupus] 1.3a updated to Reddozen's changes
  16. //= 1.3b Fixed wrong id, fixed Puch quest, added more Pouch Quest
  17. //= dialogues [Lupus]
  18. //= 1.4 Fixed spelling, added some dialoguesm optimized
  19. //= fixed bugs. Tested, fully working [Lupus]
  20. //= 1.5 More fixes [Lupus]
  21. //============================================================
  22. prt_castle.gat,43,30,6 script Chef Apprentice 878,{
  23. mes "[Chef's Apprentice]";
  24. if(cooking == 1) goto L_Remind;
  25. if(cooking == 2){
  26. mes "I see you passed the test.";
  27. mes "Good job!";
  28. next;
  29. mes "[Chef's Apprentice]";
  30. mes "This book would be quite helpful for a novice chef.";
  31. getitem 7472, 1;//Items: Lv1 Cookbook,
  32. set cook_book, 7472;
  33. set cooking, 3;
  34. close;
  35. }
  36. if(cooking == 3){
  37. mes "Hi there. Is there something";
  38. mes "that I can help you with?";
  39. next;
  40. menu "Buy Supplies",M_BuySupply, "Talk about cooking",L_Cook_Talk, "Leave",L_No_Talk;
  41. M_BuySupply:
  42. mes "[Chef's Apprentice]";
  43. mes "Outdoor Cooking Set - 500z each";
  44. mes " How many?";
  45. input @amount;
  46. if(@amount < 1) goto ER_Invalid;
  47. if(@amount > 100) goto ER_TooMuch;
  48. if(@amount*500 > Zeny) goto ER_Zeny;
  49. set Zeny, Zeny-(@amount*500);
  50. getitem 12125, @amount;//Items: Outdoor Cooker,
  51. next;
  52. mes "[Chef's Apprentice]";
  53. mes "Enjoy!";
  54. close;
  55. L_Cook_Talk:
  56. mes "[Chef's Apprentice]";
  57. mes "You passed the test,";
  58. mes "but were your results";
  59. mes "worth while?";
  60. next;
  61. menu "Taste my food",-, "No, it was horrible",L_Taste_End;
  62. mes "[Chef's Apprentice]";
  63. mes "I don't know about that.";
  64. mes "It may not be safe...";
  65. next;
  66. menu "Please taste it",-, "You're probably right",L_Taste_End;
  67. mes "[Chef's Apprentice]";
  68. mes "Why would I want to try";
  69. mes "the food of a novice chef?";
  70. next;
  71. menu "Please try",-, "Yeah, I'm too new at this",L_Taste_End;
  72. mes "[Chef's Apprentice]";
  73. mes "I'll make a deal with you.";
  74. mes "if you cook me one of every";
  75. mes "Lv 1 food, then I'll try";
  76. mes "your Cooking...";
  77. next;
  78. menu "Agree",-, "Refuse",L_Taste_End;
  79. mes "[Chef's Apprentice]";
  80. mes "You'll need to make all";
  81. mes "six foods. Let me know";
  82. mes "when you're finished.";
  83. set cooking, 4;
  84. close;
  85. L_Taste_End:
  86. mes "[Chef's Apprentice]";
  87. mes "Come back when you feel";
  88. mes "more confident.";
  89. close;
  90. L_No_Talk:
  91. mes "[Chef's Apprentice]";
  92. mes "Come back to vist anytime!";
  93. mes "Have a good day.";
  94. close;
  95. }
  96. if(cooking == 4){
  97. if(countitem(12056)
  98. && countitem(12061)
  99. && countitem(12046)
  100. && countitem(12066)
  101. && countitem(12041)
  102. && countitem(12051)) {//Items: Frog Spawn Soup, Grape Juice with Honey, Grape Juice and Tea, Fried Monkey Tail, Boiled Locust, Steamed Crab Pincer,
  103. delitem 12056, 1;//Items: Frog Spawn Soup,
  104. delitem 12061, 1;//Items: Grape Juice with Honey,
  105. delitem 12046, 1;//Items: Grape Juice and Tea,
  106. delitem 12066, 1;//Items: Fried Monkey Tail,
  107. delitem 12041, 1;//Items: Boiled Locust,
  108. delitem 12051, 1;//Items: Steamed Crab Pincer,
  109. mes "What!? Through already?";
  110. mes "Let me see what you've made";
  111. next;
  112. mes "[Chef's Apprentice]";
  113. mes "Great job, but there's";
  114. mes "still one thing that I need";
  115. mes "you to do. Talk to a friend";
  116. mes "of mine in Payon. We used";
  117. mes "to study together.";
  118. next;
  119. mes "[Chef's Apprentice]";
  120. mes "Take him this ^000080Leather Pouch^000000,";
  121. mes "and I'll put in a good word";
  122. mes "for you with my teacher.";
  123. getitem 7432, 1;//Items: Leather Pouch,
  124. set cooking, 5;
  125. } else {
  126. mes "Please come back when you've cooked";
  127. mes "all the Lv 1 foods.";
  128. next;
  129. menu "Buy Supplies",M_BuySupply, "Leave",L_No_Talk;
  130. }
  131. close;
  132. }
  133. if(cooking == 5){
  134. mes "Please, don't forget to";
  135. mes "hand my ^000080Leather Pouch^000000";
  136. mes "to my friend in Payon.";
  137. next;
  138. mes "[Chef's Apprentice]";
  139. mes "Well... Is there something";
  140. mes "that I can help you with?";
  141. next;
  142. menu "Buy Supplies",-, "Leave",L_No_Talk2;
  143. mes "[Chef's Apprentice]";
  144. mes "Outdoor Cooking Set - 500z each.";
  145. mes " How many?";
  146. input @amount;
  147. if(@amount < 1) goto ER_Invalid;
  148. if(@amount > 100) goto ER_TooMuch;
  149. if(@amount*500 > Zeny) goto ER_Zeny;
  150. set Zeny, Zeny-(@amount*500);
  151. getitem 12125, @amount;//Items: Outdoor Cooker,
  152. next;
  153. mes "[Chef's Apprentice]";
  154. mes "Enjoy!";
  155. close;
  156. L_No_Talk2:
  157. mes "[Chef's Apprentice]";
  158. mes "Come back to vist anytime!";
  159. mes "Have a good day.";
  160. close;
  161. }
  162. if(cooking == 6){
  163. mes "Thank you for taking that";
  164. mes "pouch to my friend! Take";
  165. mes "this as a gift.";
  166. set cooking, 7;
  167. getitem 12126, 10;//Items: Home Cooking Set,
  168. next;
  169. mes "[Chef's Apprentice]";
  170. mes "Come back later if you";
  171. mes "need anything else!";
  172. close;
  173. }
  174. if(cooking == 7){
  175. mes "Welcome back. What";
  176. mes "would you like to do?";
  177. next;
  178. menu "Buy Supplies",-, "Just visiting",L_Leave3;
  179. mes "[Chef's Apprentice]";
  180. mes "What would you like?";
  181. next;
  182. menu "Outdoor Cooking Set - 500z each",-, "Home Cooking Set - 1,000z",L_HomeCooking, "Never Mind",L_Leave3;
  183. set @price, 500;
  184. set @tool, 12125;
  185. goto L_Cooking_Tools4;
  186. L_HomeCooking:
  187. set @price, 1000;
  188. set @tool, 12126;
  189. L_Cooking_Tools4:
  190. mes "[Chef's Apprentice]";
  191. mes " How many?";
  192. input @amount;
  193. if(@amount < 1) goto ER_Invalid;
  194. if(@amount > 100) goto ER_TooMuch;
  195. if(@amount*@price > Zeny) goto ER_Zeny;
  196. set Zeny, Zeny-(@amount*@price);
  197. getitem @tool, @amount;
  198. next;
  199. mes "[Chef's Apprentice]";
  200. mes "Enjoy!";
  201. close;
  202. L_Leave3:
  203. mes "[Chef's Apprentice]";
  204. mes "Come back to vist anytime!";
  205. mes "Have a good day.";
  206. close;
  207. }
  208. mes "Hi there. What can I";
  209. mes "do for you?";
  210. next;
  211. menu "Just looking around",-, "I want to learn to cook",ap_2;
  212. mes "[Chef's Apprentice]";
  213. mes "Feel free to look around";
  214. mes "as much as you like.";
  215. mes "Just don't disturb my";
  216. mes "teacher.";
  217. close;
  218. ap_2:
  219. if(baseLevel < 50){
  220. mes "[Chef's Apprentice]";
  221. mes "You should train a little";
  222. mes "more before trying something";
  223. mes "as hard as cooking";
  224. close;
  225. }
  226. set cooking, 1;
  227. mes "[Chef's Apprentice]";
  228. L_Remind:
  229. mes "So you want to learn to";
  230. mes "cook huh? Well, if you";
  231. mes "think you can handle it,";
  232. mes "just talk to my teacher.";
  233. next;
  234. mes "[Chef's Apprentice]";
  235. mes "Just don't forget your";
  236. mes "^000080Chef's Hat^000000 or Sharle";
  237. mes "will yell at you.";
  238. close;
  239. ER_Zeny:
  240. next;
  241. mes "[Chef's Apprentice]";
  242. mes "You don't have enough zeny.";
  243. close;
  244. ER_TooMuch:
  245. next;
  246. mes "[Chef's Apprentice]";
  247. mes "You can't by that much at a time!.";
  248. mes "You don't have to buy it all at once.";
  249. close;
  250. ER_Invalid:
  251. next;
  252. mes "[Chef's Apprentice]";
  253. mes "You can't buy negative amounts of cooking";
  254. mes "equipment. Please buy a valid amount.";
  255. close;
  256. }
  257. payon.gat,209,127,4 script Cooking Friend 88,{
  258. mes "[Cooking Friend]";
  259. if(cooking == 5){
  260. if(countitem(7432)) {
  261. delitem 7432, 1;//Items: Leather Pouch,
  262. mes "I see my friend sent you";
  263. mes "to give me something.";
  264. set cooking, 6;
  265. emotion e_thx;
  266. } else {
  267. mes "What? My friend sent you";
  268. mes "just to say Hello?";
  269. emotion e_hmm;
  270. }
  271. mes "Thank you for your";
  272. mes "trouble. Tell him I said,";
  273. mes "Hello.";
  274. close;
  275. }
  276. mes "Hello, how are you?";
  277. close;
  278. }
  279. prt_castle.gat,45,35,4 script Sharle 886,{
  280. mes "[Sharle]";
  281. if(cooking && getequipid(1) != 5026) goto L_No_Uniform; //Item: Chef's Hat
  282. if(cooking == 7)goto L_Cooking_7;
  283. if(first_cooking)goto L_First_Cooking;
  284. if(cooking == 1){
  285. mes "So you want to learn how to cook?";
  286. next;
  287. menu "Yes",M_GetQuest, "No",M_End;
  288. }
  289. mes "What a great day to bake some";
  290. mes "wonderfull treats!";
  291. close;
  292. M_GetQuest:
  293. mes "[Sharle]";
  294. mes "Ok. Let's try to cook something together.";
  295. set first_cooking,rand(1,6);
  296. L_First_Cooking:
  297. mes "I'm lack of special ingredients,";
  298. mes "bring me:";
  299. if(first_cooking == 1){
  300. set @item1, 577;
  301. set @item1a, 1;
  302. set @item2, 908;
  303. set @item2a, 10;
  304. set @item3, 1024;
  305. set @item3a, 1;
  306. set @food1, 12056;
  307. mes "1 Grain, 10 Spawn, and";
  308. mes "1 Squid Ink.";
  309. }
  310. if(first_cooking == 2){
  311. set @item1, 518;
  312. set @item1a, 1;
  313. set @item2, 514;
  314. set @item2a, 2;
  315. set @item3, 501;
  316. set @item3a, 1;
  317. set @food1, 12061;
  318. mes "1 Honey, 2 Grapes, and";
  319. mes "1 Red Potion.";
  320. }
  321. if(first_cooking == 3){
  322. set @item1, 514;
  323. set @item1a, 3;
  324. set @item2, 501;
  325. set @item2a, 2;
  326. set @item3, 0;
  327. set @item3a, 0;
  328. set @food1, 12046;
  329. mes "3 Grapes and 2 Red Potions.";
  330. }
  331. if(first_cooking == 4){
  332. set @item1, 942;
  333. set @item1a, 5;
  334. set @item2, 7031;
  335. set @item2a, 1;
  336. set @item3, 7457;
  337. set @item3a, 1;
  338. set @food1, 12066;
  339. mes "5 Yoyo Tails, 1 Old Frying Pan, and";
  340. mes "1 Cooking Oil.";
  341. }
  342. if(first_cooking == 5){
  343. set @item1, 940;
  344. set @item1a, 5;
  345. set @item2, 7031;
  346. set @item2a, 1;
  347. set @item3, 7457;
  348. set @item3a, 1;
  349. set @food1, 12041;
  350. mes "5 Grasshopper Legs, 1 Old Frying Pan, and";
  351. mes "1 Cooking Oil.";
  352. }
  353. if(first_cooking == 6){
  354. set @item1, 960;
  355. set @item1a, 10;
  356. set @item2, 511;
  357. set @item2a, 10;
  358. set @item3, 503;
  359. set @item3a, 1;
  360. set @food1, 12051;
  361. mes "10 Nippers, 10 Green Herbs, and";
  362. mes "1 Yellow Potion.";
  363. }
  364. if(countitem(@item1) < @item1a || countitem(@item2) < @item2a || countitem(@item3) < @item3a) close;
  365. delitem @item1, @item1a;
  366. delitem @item2, @item2a;
  367. delitem @item3, @item3a;
  368. next;
  369. set cooking, 2;
  370. mes "[Sharle]";
  371. mes "Great Job!";
  372. mes "You can now purchase";
  373. mes "Outdoor Cooking Sets.";
  374. getitem @food1, 1;
  375. set first_cooking, 0;
  376. close;
  377. L_Cooking_7:
  378. mes "Would you like to check";
  379. mes "out my ^800000Cookbooks^000000?";
  380. next;
  381. menu "Yes",-, "No", M_End2, "Return Book", M_ReturnBook;
  382. mes "[Sharle]";
  383. if(cook_book){
  384. mes "You'll have to give me back the";
  385. mes "first book I loaned you if you";
  386. mes "would like to check out a new book.";
  387. mes "Would you like to trade books?";
  388. next;
  389. menu "Yes",-, "No",M_End2;
  390. if(countitem(cook_book)==0){
  391. mes "What? You don't have the book I loaned you?";
  392. mes "It was a ^800000"+getitemname(cook_book)+"^000000.";
  393. emotion e_sry;
  394. close;
  395. }
  396. }
  397. mes "[Sharle]";
  398. mes "Which book would you like?";
  399. next;
  400. menu "^800000Lv 1 Cookbook",b_1, "Lv 2 Cookbook",b_2, "Lv 3 Cookbook",b_3, "Lv 4 Cookbook",b_4, "Lv 5 Cookbook",b_5, "^000000Leave",M_End2;
  401. b_1:
  402. mes "[Sharle]";
  403. mes "You will need:";
  404. mes "10 Pumpkins";
  405. next;
  406. if(countitem(535) < 10) goto L_No_Items;//Items: Pumpkin,
  407. delitem 535, 10;//Items: Pumpkin,
  408. set @checkout, 7472;
  409. mes "And I see you have";
  410. mes "what you need!";
  411. next;
  412. goto b_trade;
  413. b_2:
  414. mes "[Sharle]";
  415. mes "You will need:";
  416. mes "5 well-baked cookies";
  417. next;
  418. if(countitem(538) < 5) goto L_No_Items;//Items: Well-baked Cookie,
  419. delitem 538, 5;//Items: Well-baked Cookie,
  420. set @checkout, 7473;
  421. mes "And I see you have";
  422. mes "what you need!";
  423. next;
  424. goto b_trade;
  425. b_3:
  426. mes "[Sharle]";
  427. mes "You will need:";
  428. mes "5 Sushi";
  429. next;
  430. if(countitem(551) < 5) goto L_No_Items;//Items: Sushi,
  431. delitem 551, 5;//Items: Sushi,
  432. set @checkout, 7474;
  433. mes "And I see you have";
  434. mes "what you need!";
  435. next;
  436. goto b_trade;
  437. b_4:
  438. mes "[Sharle]";
  439. mes "You will need:";
  440. mes "5 Baos";
  441. next;
  442. if(countitem(553) < 5) goto L_No_Items;//Items: Bao,
  443. delitem 553, 5;//Items: Bao,
  444. set @checkout, 7475;
  445. mes "And I see you have";
  446. mes "what you need!";
  447. next;
  448. goto b_trade;
  449. b_5:
  450. mes "[Sharle]";
  451. mes "You will need:";
  452. mes "10 shoots";
  453. next;
  454. if(countitem(711) < 10) goto L_No_Items;//Items: Shoot,
  455. delitem 711, 10;//Items: Shoot,
  456. set @checkout, 7476;
  457. mes "And I see you have";
  458. mes "what you need!";
  459. next;
  460. goto b_trade;
  461. b_trade:
  462. mes "[Sharle]";
  463. mes "If you find you need a new book,";
  464. mes "you're welcome to come back and";
  465. mes "trade.";
  466. if(cook_book){
  467. if(countitem(cook_book)==0){
  468. mes "What? You don't have the book I loaned you?";
  469. mes "It was a ^800000"+getitemname(cook_book)+"^000000.";
  470. emotion e_sry;
  471. close;
  472. }
  473. delitem cook_book,1;
  474. mes "Have fun, and good luck!";
  475. } else {
  476. mes "Good luck! I hope you learn a lot!";
  477. }
  478. getitem @checkout,1;
  479. set cook_book, @checkout;
  480. close;
  481. M_End:
  482. mes "[Sharle]";
  483. mes "That's fine with me, come back";
  484. mes "when you want to cook.";
  485. close;
  486. M_End2:
  487. mes "[Sharle]";
  488. mes "Well, I'm here whenever you'd like";
  489. mes "to learn. Just make sure you're";
  490. mes "ready.";
  491. close;
  492. M_ReturnBook:
  493. if(cook_book == 0){
  494. mes "[Sharle]";
  495. mes "You haven't borrowed any books.";
  496. emotion e_hmm;
  497. close;
  498. }
  499. if(countitem(cook_book)==0){
  500. mes "What? You don't have the book I loaned you?";
  501. mes "It was a ^800000"+getitemname(cook_book)+"^000000.";
  502. emotion e_sry;
  503. close;
  504. }
  505. delitem cook_book,1;
  506. set cook_book, 0;
  507. mes "[Sharle]";
  508. mes "Returning the book already?";
  509. mes "did you learn what you wanted";
  510. mes "to know?";
  511. emotion e_what;
  512. close;
  513. L_No_Items:
  514. mes "[Sharle]";
  515. mes "So come back when";
  516. mes "you have the items";
  517. mes "that you need.";
  518. close;
  519. L_No_Uniform:
  520. mes "How dare you disrespect me";
  521. mes "by showing up out of uniform.";
  522. mes "Come back when you have your";
  523. mes "uniform on.";
  524. emotion e_bzz;
  525. close;
  526. }