viewing paste Unknown #52069 | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258
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
Viewed 412 times, submitted by Guest.