juice_maker.txt 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. //===== eAthena Script =======================================
  2. //= Juice Maker Quest
  3. //===== By: ==================================================
  4. //= kobra_k88
  5. //===== Current Version: =====================================
  6. //= 1.6
  7. //===== Compatible With: =====================================
  8. //= eAthena 7.15 +
  9. //===== Description: =========================================
  10. //=
  11. //===== Additional Comments: =================================
  12. //= Fully working
  13. //= 1.1 fixed input number check [Lupus]
  14. //= 1.2 fixed misplaced Grape<->Carrot juices [Lupus]
  15. //= 1.3 added a loopless menu 'as many as possible' [Lupus]
  16. //= 1.3a Turned the juice making part of the Juicer npc into a
  17. //= subfunc. Changed fruit amount needed to 1.[kobra_k88]
  18. //= Fixed exploits [Lupus]
  19. //= 1.6 fixed typo (where did @ipnut came from?) [Lance]
  20. //============================================================
  21. // Morrison ------------------------------------------------
  22. prt_in.gat,47,173,2 script Morrison 97,{
  23. mes "[Little Morrison]";
  24. if(MEAT > 10) goto L_Candy;
  25. if(MARIANNE == 1) goto L_GoAway;
  26. mes "Wahhhhh!!! Wahh... NO more! NO more!";
  27. mes "I won't... eat anymore stupid ^0000ffFruit^000000 things!!";
  28. emotion e_sob;
  29. next;
  30. menu "Talk",M_Talk,"Cancel",M_End;
  31. M_Talk:
  32. if(countitem(517) > 0) goto L_Meat; //Meat
  33. mes "[Little Morrison]";
  34. mes "Arhhggg!! I'VE HAD ENOUGH!!! I can't eat anymore ^0000ffFruits^000000! They";
  35. mes "taste so SOUR..... I have to PEEL them before I can eat them.....";
  36. mes "they feel sticky and squishy...... it's really ANNOYING!!!!";
  37. emotion e_wah;
  38. next;
  39. mes "[LIttle Morrison]";
  40. mes "I just HATE FRUIT! I can't even get full off of the stuff.(~sigh~)";
  41. mes "Give me something more edible..... give me some...... ^ff0000MEAT^000000!!!";
  42. close;
  43. L_Meat:
  44. mes "[Little Morrison]";
  45. mes "...(sniff)....(sniff)(sniff).... Oh! Is that ^ff0000Meat^000000???";
  46. emotion e_ic;
  47. next;
  48. mes "[Little Morrison]";
  49. mes "Do you have some ^ff0000Meat^000000?!!!~(drools)~";
  50. mes "Umm... that yummy smell is making me SOOO HUNGRYYYY!!!l";
  51. emotion e_rice;
  52. next;
  53. mes "[Little Morrison]";
  54. mes "... Umm... excuse me..... could you give me some of that meat PLEEAASSSE?";
  55. emotion e_sob;
  56. next;
  57. menu "Give him some",sM_Give,"Ignore him",sM_Ignore;
  58. sM_Give:
  59. if(countitem(517) == 0) goto L_GoAway; //Meat
  60. delitem 517,1; //Meat
  61. set MORRISON,1;
  62. set MEAT,MEAT + 1;
  63. mes "[Little Morrison]";
  64. mes "Whoah~!!! It's real Meat, Meat!";
  65. mes "Mmmm! It makes my mouth water.";
  66. mes "Oh thank you. Now I feel happy. Yum Yum...";
  67. emotion e_awsm;
  68. close;
  69. sM_Ignore:
  70. set MORRISON,2;
  71. mes "[Little Morrison]";
  72. mes "Boo...";
  73. mes "Boo... Fine... Alright, Alright~!!! Selfish meanie!";
  74. emotion e_bzz;
  75. close;
  76. M_End:
  77. mes "[Little Morrison]";
  78. mes "Wahhhh!!! No matter how hard I try, I just can't eat Vegetables";
  79. mes "or ^0000ffFruit^000000! They're plain disgusting!!";
  80. emotion e_sob;
  81. close;
  82. L_GoAway:
  83. mes "Pffff... Leave me alone! You DON'T CARE about me! I'm gonna DIE";
  84. mes "because of these stupid Veggies and Fuits so MIND your own business!";
  85. emotion e_pif;
  86. close;
  87. L_Candy:
  88. mes "Ah..I am full now. You don't have to feed me any more. I think I";
  89. mes "am gonna BURST if I keep eating more.";
  90. next;
  91. mes "[Little Morrison]";
  92. mes "And... um... Take this.";
  93. next;
  94. getitem 529,3;
  95. getitem 530,1;
  96. set MEAT,0;
  97. mes "[Little Morrison]";
  98. mes "It is from my secret stash of Candy that I hide from my Mom. Since";
  99. mes "you gave me some Meat, I will give you some candy." ;
  100. close;
  101. }
  102. // Housewife Marianne ---------------------------------------------------
  103. prt_in.gat,49,172,2 script Housewife Marianne 53,{
  104. mes "[Housewife Marianne]";
  105. if(MORRISON == 1) goto L_GaveMeat;
  106. if(MORRISON == 2) goto L_Juice;
  107. mes "Morrison!! Please eat some fruit will ya? Fruit~!";
  108. mes "*Sob*~!! Like father like son...";
  109. emotion e_sob;
  110. next;
  111. menu "Talk",M_Talk,"Cancel",M_Cancel;
  112. close;
  113. M_Talk:
  114. mes "[Housewife Marianne]";
  115. mes "(~Sigh~)...This is Morrison... My one and only son. He's going";
  116. mes "through some kinda faze and doesn't want to eat any ^0000ffFruits^000000 or";
  117. mes "vegetables.";
  118. emotion e_shy;
  119. next;
  120. mes "[Housewife Marianne]";
  121. mes "Look at his face..., it turns sour just hearing about ^0000ffFruit^000000...";
  122. next;
  123. mes "[Housewife Marianne]";
  124. mes "All he wants to eat is but ^ff0000Meat^000000... (sigh)...he needs";
  125. mes "^0000ffFruits^000000 and vegetables for a proper diet.";
  126. next;
  127. M_Cancel:
  128. mes "[Housewife Marianne]";
  129. mes "Morrison!! I will get mad at you if you keep doing this!";
  130. emotion e_bzz;
  131. close;
  132. L_GaveMeat:
  133. set MORRISON,0;
  134. mes "Oh MY GOD!!... Oh lord...";
  135. emotion e_omg;
  136. next;
  137. mes "[Housewife Marianne]";
  138. mes "WHAT ARE YOU DOING!! HOW DARE YOU feed my son!! And ^ff0000MEAT^000000 of all things!!!";
  139. next;
  140. mes "[Housewife Marianne]";
  141. mes "Arrrgh~~!! Get Lost right now!!!!!!";
  142. emotion e_pif;
  143. close;
  144. L_Juice:
  145. set MORRISON,0;
  146. set MARIANNE,1;
  147. mes "Thank you for not giving my son any meat. I'm trying to feed him";
  148. mes "^0000ffFruits^000000 and vegetables, but this child doesn't want to eat";
  149. mes "anything except Meat...";
  150. next;
  151. mes "[Housewife Marianne]";
  152. mes "What if I could turn ^0000ffFruits^000000 into a ^0000ffJuice^000000... for example...Orange";
  153. mes "juice... Would my child like it?";
  154. emotion e_hmm;
  155. next;
  156. mes "[Housewife Marianne]";
  157. mes "Ah! Now I remember..There is a town where you can get a variety of";
  158. mes "^0000ffFruit^000000 turned into ^0000ffFruit Juices^000000.";
  159. emotion e_ic;
  160. next;
  161. mes "[Housewife Marianne]";
  162. mes "... Was is it...^ff0000Payon^000000...or ^ff0000Morroc^000000...?";
  163. emotion e_hmm;
  164. next;
  165. close;
  166. }
  167. // Juicer Marx Hansen ---------------------------------------------------------
  168. payon_in03.gat,188,146,5 script Juicer Marx Hansen 86,{
  169. mes "[Juicer Marx Hansen]";
  170. if(MARIANNE == 1) goto L_Juice;
  171. mes "Welcome to my shop. What brings you here?";
  172. next;
  173. menu "Conversation",-,"I am just looking around",M_End;
  174. mes "[Juicer Marx Hansen]";
  175. mes "In the earliest years of humanity, fruits were the only substanace availble for people to eat.";
  176. mes "Fruits were vital for survival and without them people faced certain death.";
  177. mes "During that time Mother Nature was worshiped for her generous offerering.";
  178. next;
  179. mes "[Juicer Marx Hansen]";
  180. mes "Nowadays food is plentifull and it comes in a variety of flavors and forms.";
  181. mes "With so many other things to eat, fruits aren't consumed as much as they used to be.";
  182. mes "This is especially true among kids who'd rather eat pizza and candy.";
  183. next;
  184. mes "[Juicer Marx Hansen]";
  185. mes "Because of this I wanted to find a way to make young people realize the importance of fuit.";
  186. mes "I found that when fruits were turned into juices, they became more digestive and even tasty enough for kids.";
  187. close;
  188. M_End:
  189. mes "[Juicer Marx Hansen]";
  190. mes "Ok then.";
  191. close;
  192. //--------------
  193. L_Juice:
  194. //---------
  195. mes "Welcome to my shop. Are you here to process Fruits like everyone else?";
  196. next;
  197. menu "Yes, I am.",M_1a, "How do you make fruit juice?",M_1b, "Nope.",M_1End;
  198. M_1a:
  199. mes "[Juicer Marx Hansen]";
  200. mes "So what kind of fruit juice would you like to process?";
  201. next;
  202. menu "Apple Juice",sM_1a,"Banana Juice",sM_1b,"Grape Juice",sM_1c,"Carrot Juice",sM_1d,"None.",M_1End;
  203. sM_1a:
  204. callsub sF_Make, 512, "apples", 531;
  205. goto M_1a;
  206. sM_1b:
  207. callsub sF_Make, 513, "bananas", 532;
  208. goto M_1a;
  209. sM_1c:
  210. callsub sF_Make, 514, "grapes", 533;
  211. goto M_1a;
  212. sM_1d:
  213. callsub sF_Make, 515, "carrots", 534;
  214. goto M_1a;
  215. M_1b:
  216. mes "[Juicer Marx Hansen]";
  217. mes "# Fruit Juice Info #";
  218. mes "- ^FF3355Apple^000000 Juice - Apple x 1 ea, Empty Bottle x 1 ea, 3 zeny.";
  219. mes "- ^D5A500Banana^000000 Juice - Banana x 1 ea, Empty Bottle x 1 ea, 3 zeny.";
  220. mes "- ^FF8800Carrot^000000 Juice - Carrot x 1 ea, Empty Bottle x 1 ea, 3 zeny.";
  221. mes "- ^AA00AAGrape^000000 Juice - Grape x 1 ea, Empty Bottle x 1 ea, 3 zeny.";
  222. close;
  223. M_1End:
  224. mes "[Juicer Marx Hansen]";
  225. mes "Oh well... see you next time.";
  226. close;
  227. // Subfunction for making juice
  228. //----------------------------------
  229. sF_Make:
  230. mes "[Juicer Marx Hansen]";
  231. mes "How many bottles would you like?";
  232. next;
  233. menu "I'll tell you.",M_Tell, "As many as possible",-, "I've changed my mind.",M_1End;
  234. set @amount,1000; //max possible amount of Juice
  235. //calc max possible # juices
  236. if(Zeny/3 < @amount) set @amount, Zeny/3;
  237. if(countitem(getarg(0)) < @amount) set @amount, countitem(getarg(0));
  238. if(countitem(713) < @amount) set @amount, countitem(713);
  239. if(@amount > 0) goto L_Make;
  240. mes "[Juicer Marx Hansen]";
  241. mes "Doh! You don't have enough ingredients for a single bottle of juice.";
  242. emotion e_gasp;
  243. close;
  244. M_Tell:
  245. mes "[Juicer Marx Hansen]";
  246. mes "Very well then. Enter 0 if you don't want any. Also you cannot";
  247. mes "buy more than 1000 at a time.";
  248. next;
  249. input @amount;
  250. if(@amount < 1 || @amount > 1000) return;
  251. if(countitem(getarg(0)) < @amount) goto sL_NoFruits;
  252. if(countitem(713) < @amount) goto sL_NoBottles;
  253. if(Zeny < @amount * 3) goto sL_NoZeny;
  254. L_Make:
  255. delitem getarg(0), @amount; //del Fruit
  256. delitem 713, @amount; //del Empty Bottle
  257. set Zeny, Zeny - @amount * 3;
  258. getitem getarg(2), @amount; //get Juice
  259. mes "[Juicer Marx Hansen]";
  260. mes "Here you are. Take it.";
  261. close;
  262. sL_NoFruits:
  263. mes "[Juicer Marx Hansen]";
  264. mes "You don't have enough fruit.";
  265. mes "You need " +@amount+ " " +getarg(1)+ " to make that much juice.";
  266. next;
  267. return;
  268. sL_NoBottles:
  269. mes "[Juicer Marx Hansen]";
  270. mes "You don't have enough bottles. You need "+@amount+" empty bottle(s) to make that many juice drinks.";
  271. next;
  272. return;
  273. sL_NoZeny:
  274. mes "[Juicer Marx Hansen]";
  275. mes "You don't have enough zeny. You need " +(@amount*3)+ " zeny, to make that many juice drinks.";
  276. next;
  277. return;
  278. }