npc "payon_in03" "Marx Hansen" 4_M_04 188 146 5 0 0 OnClick: // Check if the user carries 100 items. var max_max_c = CheckMaxCount 1201 1 if max_max_c == 1 dialog "- Wait a moment! -" dialog "- Currently you're carrying -" dialog "- too many items with you. -" dialog "- Please come back later -" dialog "- after you put some items into kafra storage. -" close return endif // end check if v[mother_marienu] == 2 dialog "[Merchant Marx Hansen]" dialog "Welcome." dialog "Did you come to" dialog "process fruits as well?" wait choose menu "Make Juice." "Talk and get information about fruit processing." "Cancel." case 1 var juice var fruit var bottle = v[Empty_Bottle] var money = v[VAR_MONEY] var fruit_send var bottle_send var money_send var gap var total_gap dialog "[Merchant Marx Hansen]" dialog "What kind of fruit juice would you like to make?" wait choose menu "Apple Juice" "Banana Juice" "Carrot Juice" "Grape Juice" "Cancel" case 1 juice = 1 fruit = v[Apple] if (((v[Apple] == 0) | (v[Empty_Bottle] == 0)) | (v[VAR_MONEY] < 3)) dialog "[Merchant Marx Hansen]" dialog "Oh no..." dialog "You don't have all the necessary materials. To make Apple Juice, I need 1 Apple and 1 Empty Bottle. I also need a 3 zeny fee." wait dialog "[Merchant Marx Hansen]" dialog "When you have prepared everything, I will blend the fruit to give you delicious juice." close return endif break case 2 juice = 2 fruit = v[Banana] if (((v[Banana] == 0) | (v[Empty_Bottle] == 0)) | (v[VAR_MONEY] < 3)) dialog "[Merchant Marx Hansen]" dialog "Oh no..." dialog "You don't have all the necessary materials. To make Banana Juice, 1 Banana and 1 Empty Bottle. I will also need a 3 zeny fee." wait dialog "[Merchant Marx Hansen]" dialog "When you have prepared everything, I will blend the fruit to give you delicious juice." close return endif break case 3 juice = 3 fruit = v[Carrot] if (((v[Carrot] == 0) | (v[Empty_Bottle] == 0)) | (v[VAR_MONEY] < 3)) dialog "[Merchant Marx Hansen]" dialog "Oh no..." dialog "You don't have all the necessary materials. To make Carrot Juice, I need 1 Carrot and 1 Empty Bottle. I will also need a 3 zeny fee." wait dialog "[Merchant Marx Hansen]" dialog "When you have prepared everything, I will blend the fruit to give you delicious juice." close return endif break case 4 juice = 4 fruit = v[Grape] if (((v[Grape] == 0) | (v[Empty_Bottle] == 0)) | (v[VAR_MONEY] < 3)) dialog "[Merchant Marx Hansen]" dialog "Oh no..." dialog "You don't have all the necessary materials. To make Grape Juice, I need 1 Grape and 1 Empty Bottle. I will also need a 3 zeny fee." wait dialog "[Merchant Marx Hansen]" dialog "When you have prepared everything, I will blend the fruit to give you delicious juice." close return endif break case 5 dialog "[Merchant Marx Hansen]" dialog "Well then..." dialog "See you next time." close return break endchoose while(1) if ((fruit == 0) | (bottle == 0) | (money < 3)) exitwhile else gap = gap + 1 fruit = fruit - 1 fruit_send = fruit_send + 1 bottle = bottle - 1 bottle_send = bottle_send + 1 money = money - 3 money_send = money_send + 3 endif endwhile dialog "[Merchant Marx Hansen]" dialog "How many would you like?" wait choose menu "As many as I can." "I want a certain amount." "Cancel." case 1 total_gap = gap break case 2 dialog "[Merchant Marx Hansen]" dialog "Choose a number less than 100. If you don't want to, put '0'. You can make up to " + gap + " bottles of juice." wait while(1) dlgwrite 1 100 if input == 0 dialog "[Merchant Marx Hansen]" dialog "Well then..." dialog "Come again." close return elseif error dialog "[Merchant Marx Hansen]" dialog "More than 100 bottles is impossible. Choose a different amount." wait else exitwhile endif endwhile fruit_send = input bottle_send = input money_send = input * 3 total_gap = input break case 3 dialog "[Merchant Marx Hansen]" dialog "Well then..." dialog "Come again." close return break endchoose if juice == 1 fruit = v[Apple] elseif juice == 2 fruit = v[Banana] elseif juice == 3 fruit = v[Carrot] else fruit = v[Grape] endif bottle = v[Empty_Bottle] money = v[VAR_MONEY] if ((fruit < fruit_send) | (bottle < bottle_send) | (money < money_send)) dialog "[Merchant Marx Hansen]" dialog "Oh no..." dialog "You don't have all the necessary materials. I can't help a situation like this. I guess you collect what you need." close return endif if juice == 1 dropitem Apple fruit_send dropitem Empty_Bottle bottle_send dropgold money_send getitem Apple_Juice total_gap elseif juice == 2 dropitem Banana fruit_send dropitem Empty_Bottle bottle_send dropgold money_send getitem Banana_Juice total_gap elseif juice == 3 dropitem Carrot fruit_send dropitem Empty_Bottle bottle_send dropgold money_send getitem Carrot_Juice total_gap else dropitem Grape fruit_send dropitem Empty_Bottle bottle_send dropgold money_send getitem Grape_Juice total_gap endif dialog "[Merchant Marx Hansen]" dialog "Here you go! Fresh and delicious juice as promised. It should be very refreshing and palatable." wait dialog "[Merchant Marx Hansen]" dialog "Well then..." dialog "Come again." close break case 2 dialog "[Merchant Marx Hansen]" dialog "Before humans were able to develop such vast societies, they gathered fruit from trees to survive. Fruits may have been nature's blessing that allowed us to exist in the world." wait dialog "[Merchant Marx Hansen]" dialog "Since life became so prosperous, the younger generation seems not to eat fruit any more. So, I started thinking of ways to make fruit easier to eat." wait dialog "[Merchant Marx Hansen]" dialog "I realized that when you make fruit juice, it's more convenient to eat and has a much better taste." wait dialog "# Fruit Juice Information #" dialog "^CC4E5C- Apple Juice -^000000" dialog "Apple x 1 ea, Empty Bottle x 1 ea, 3 zeny." dialog "" dialog "^E3CF57- Banana Juice -^000000" dialog "Banana x 1 ea, Empty Bottle x 1 ea, 3 zeny." dialog "" dialog "^ED9121- Carrot Juice -^000000" dialog "Carrot x 1 ea, Empty Bottle x 1 ea, 3 zeny." dialog "" dialog "^CC00FF- Grape Juice -^000000" dialog "Grape x 1 ea, Empty Bottle x 1 ea, 3 zeny." close break case 3 dialog "[Merchant Marx Hansen]" dialog "Hey!" dialog "If you visit" dialog "somebody, talk to them!" close break endchoose else dialog "[Merchant Marx Hansen]" dialog "Welcome." dialog "How may I help you?" wait choose menu "Talk" "Cancel" case 1 dialog "[Merchant Marx Hansen]" dialog "Before humans were able to develop such vast societies, they gathered fruit from trees to survive. Fruits may have been nature's blessing that allowed us to exist in the world." wait dialog "[Merchant Marx Hansen]" dialog "Since life became so prosperous, the younger generation seems not to eat fruit any more. So, I started thinking of ways to make fruit easier to eat." wait dialog "[Merchant Marx Hansen]" dialog "I realized that when you make fruit juice, it's more convenient to eat and has a much better taste." close break case 2 dialog "[Merchant Marx Hansen]" dialog "Hey!" dialog "If you vist" dialog "somebody, talk to them!" close break endchoose endif return