juice_maker.txt 9.5 KB

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