juice_maker.txt 9.5 KB

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