juice_maker.txt 10 KB

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