[1] | 1 | //===== eAthena Script ======================================= |
---|
| 2 | //= Novice Goods Exchanger |
---|
| 3 | //===== By: ================================================== |
---|
| 4 | //= ???, eAthena Team |
---|
| 5 | //===== Current Version: ===================================== |
---|
| 6 | //= 1.4 |
---|
| 7 | //===== Compatible With: ===================================== |
---|
| 8 | //= eAthena SVN |
---|
| 9 | //===== Description: ========================================= |
---|
| 10 | //= [Aegis COnversion] |
---|
| 11 | //= Exchanges your Basic Monster drops for Red Potions. |
---|
| 12 | //===== Additional Comments: ================================= |
---|
| 13 | //= 1.2 Rescripted to Aegis 10.standards. [L0ne_W0lf[ |
---|
| 14 | //= Made it easier to add new items to exhange list |
---|
| 15 | //= meaning only the exchange is done in a function now. |
---|
| 16 | //= 1.3 Fixed dialog mix-up in function. [L0ne_W0lf] |
---|
| 17 | //= 1.4 Added checkweight, and input min/max values. [L0ne_W0lf] |
---|
| 18 | //============================================================ |
---|
| 19 | |
---|
| 20 | prontera,123,102,5 script Merchant#pron 85,{ |
---|
| 21 | set .@now_weight,MaxWeight-Weight; |
---|
| 22 | if (.@now_weight < 6301 || checkweight(1201,1) == 0) { |
---|
| 23 | mes "[Merchant]"; |
---|
| 24 | mes "Haha!"; |
---|
| 25 | mes "What are you, superhuman?"; |
---|
| 26 | mes "You're carrying so much stuff!"; |
---|
| 27 | mes "You better put some of that"; |
---|
| 28 | mes "into Kafra Storage~"; |
---|
| 29 | close; |
---|
| 30 | } |
---|
| 31 | mes "[Merchant]"; |
---|
| 32 | mes "Good day!"; |
---|
| 33 | mes "Have you collected any"; |
---|
| 34 | mes "items like Shells or Fluff?"; |
---|
| 35 | mes "What about Jellopies? Oh yeah,"; |
---|
| 36 | mes "I need those for something."; |
---|
| 37 | next; |
---|
| 38 | mes "[Merchant]"; |
---|
| 39 | mes "Of course, I won't ask you"; |
---|
| 40 | mes "to give me that stuff for free. What about if I trade a Red Potion for 5 Shells, 10 Fluff,"; |
---|
| 41 | mes "or 10 Jellopies?"; |
---|
| 42 | next; |
---|
| 43 | switch(select("Sure!:I think it's a rip-off!:No, thanks.")) { |
---|
| 44 | case 1: |
---|
| 45 | mes "[Merchant]"; |
---|
| 46 | mes "So which item do"; |
---|
| 47 | mes "you want to bring me?"; |
---|
| 48 | mes "Shells, Fluffs, or Jellopies?"; |
---|
| 49 | next; |
---|
| 50 | switch(select("Shells:Jellopies:Fluff:Cancel")) { |
---|
| 51 | case 1: callfunc "F_PotExchange",935,5; |
---|
| 52 | case 2: callfunc "F_PotExchange",909,10; |
---|
| 53 | case 3: callfunc "F_PotExchange",914,10; |
---|
| 54 | case 4: |
---|
| 55 | mes "[Merchant]"; |
---|
| 56 | mes "Sure~"; |
---|
| 57 | mes "No problem."; |
---|
| 58 | close; |
---|
| 59 | } |
---|
| 60 | case 2: |
---|
| 61 | mes "[Merchant]"; |
---|
| 62 | mes "A rip-off...?"; |
---|
| 63 | mes "If you check the market value"; |
---|
| 64 | mes "of the items being traded, I'm actually the one getting"; |
---|
| 65 | mes "ripped off here."; |
---|
| 66 | close; |
---|
| 67 | case 3: |
---|
| 68 | mes "[Merchant]"; |
---|
| 69 | mes "Alright,"; |
---|
| 70 | mes "no problem."; |
---|
| 71 | mes "But come back to me"; |
---|
| 72 | mes "if you change your mind."; |
---|
| 73 | close; |
---|
| 74 | } |
---|
| 75 | } |
---|
| 76 | |
---|
| 77 | morocc,180,259,3 script Merchant#morroc 85,{ |
---|
| 78 | set .@now_weight,MaxWeight-Weight; |
---|
| 79 | if (.@now_weight < 6301 || checkweight(1201,1) == 0) { |
---|
| 80 | mes "[Merchant]"; |
---|
| 81 | mes "Haha!"; |
---|
| 82 | mes "What are you, superhuman?"; |
---|
| 83 | mes "You're carrying so much stuff!"; |
---|
| 84 | mes "You better put some of that"; |
---|
| 85 | mes "into Kafra Storage~"; |
---|
| 86 | close; |
---|
| 87 | } |
---|
| 88 | mes "[Merchant]"; |
---|
| 89 | mes "Good day!"; |
---|
| 90 | mes "Have you collected any"; |
---|
| 91 | mes "Shells or Feathers of Bird?"; |
---|
| 92 | mes "What about Jellopies? Oh yeah,"; |
---|
| 93 | mes "I need those for something."; |
---|
| 94 | next; |
---|
| 95 | mes "[Merchant]"; |
---|
| 96 | mes "Of course, I won't ask you"; |
---|
| 97 | mes "to give me that stuff for free. What about if I trade a Red Potion for 5 Shells, 7 Feathers of Bird"; |
---|
| 98 | mes "or 10 Jellopies?"; |
---|
| 99 | next; |
---|
| 100 | switch(select("Sure!:I think it's a rip-off!:No, thanks.")) { |
---|
| 101 | case 1: |
---|
| 102 | mes "[Merchant]"; |
---|
| 103 | mes "So which item do"; |
---|
| 104 | mes "you want to bring me?"; |
---|
| 105 | mes "Shells, Feathers of Birds,"; |
---|
| 106 | mes "or Jellopies?"; |
---|
| 107 | next; |
---|
| 108 | switch(select("Shells:Feathers of Birds:Jellopies:Cancel")) { |
---|
| 109 | case 1: callfunc "F_PotExchange",935,5; |
---|
| 110 | case 2: callfunc "F_PotExchange",916,7; |
---|
| 111 | case 3: callfunc "F_PotExchange",909,10; |
---|
| 112 | case 4: |
---|
| 113 | mes "[Merchant]"; |
---|
| 114 | mes "Sure~"; |
---|
| 115 | mes "No problem."; |
---|
| 116 | close; |
---|
| 117 | } |
---|
| 118 | case 2: |
---|
| 119 | mes "[Merchant]"; |
---|
| 120 | mes "A rip-off...?"; |
---|
| 121 | mes "If you check the market value"; |
---|
| 122 | mes "of the items being traded, I'm actually the one getting"; |
---|
| 123 | mes "ripped off here."; |
---|
| 124 | close; |
---|
| 125 | case 3: |
---|
| 126 | mes "[Merchant]"; |
---|
| 127 | mes "Alright,"; |
---|
| 128 | mes "no problem."; |
---|
| 129 | mes "But come back to me"; |
---|
| 130 | mes "if you change your mind."; |
---|
| 131 | close; |
---|
| 132 | } |
---|
| 133 | } |
---|
| 134 | |
---|
| 135 | payon,200,134,5 script Merchant#pay 85,{ |
---|
| 136 | set .@now_weight,MaxWeight-Weight; |
---|
| 137 | if (.@now_weight < 6301 || checkweight(1201,1) == 0) { |
---|
| 138 | mes "[Merchant]"; |
---|
| 139 | mes "Haha!"; |
---|
| 140 | mes "What are you, superhuman?"; |
---|
| 141 | mes "You're carrying so much stuff!"; |
---|
| 142 | mes "You better put some of that"; |
---|
| 143 | mes "into Kafra Storage~"; |
---|
| 144 | close; |
---|
| 145 | } |
---|
| 146 | mes "[Merchant]"; |
---|
| 147 | mes "Good day!"; |
---|
| 148 | mes "Have you collected"; |
---|
| 149 | mes "items like Tree Roots?"; |
---|
| 150 | mes "What about Jellopies? Oh yeah,"; |
---|
| 151 | mes "I need those for something."; |
---|
| 152 | next; |
---|
| 153 | mes "[Merchant]"; |
---|
| 154 | mes "Of course, I won't ask you"; |
---|
| 155 | mes "to give me that stuff for free. What about if I trade a Red Potion for 6 Tree Roots or 10 Jellopies?"; |
---|
| 156 | next; |
---|
| 157 | switch(select("Sure!:I think it's a rip-off!:No, thanks.")) { |
---|
| 158 | case 1: |
---|
| 159 | mes "[Merchant]"; |
---|
| 160 | mes "So which item do"; |
---|
| 161 | mes "you want to bring me?"; |
---|
| 162 | mes "Tree Roots, or Jellopies?"; |
---|
| 163 | next; |
---|
| 164 | switch(select("Tree Roots:Jellopies:Cancel")) { |
---|
| 165 | case 1: callfunc "F_PotExchange",902,6; |
---|
| 166 | case 2: callfunc "F_PotExchange",909,10; |
---|
| 167 | case 3: |
---|
| 168 | mes "[Merchant]"; |
---|
| 169 | mes "Sure~"; |
---|
| 170 | mes "No problem."; |
---|
| 171 | close; |
---|
| 172 | } |
---|
| 173 | case 2: |
---|
| 174 | mes "[Merchant]"; |
---|
| 175 | mes "A rip-off...?"; |
---|
| 176 | mes "If you check the market value"; |
---|
| 177 | mes "of the items being traded, I'm actually the one getting"; |
---|
| 178 | mes "ripped off here."; |
---|
| 179 | close; |
---|
| 180 | case 3: |
---|
| 181 | mes "[Merchant]"; |
---|
| 182 | mes "Alright,"; |
---|
| 183 | mes "no problem."; |
---|
| 184 | mes "But come back to me"; |
---|
| 185 | mes "if you change your mind."; |
---|
| 186 | close; |
---|
| 187 | } |
---|
| 188 | } |
---|
| 189 | |
---|
| 190 | aldebaran,152,63,5 script Merchant#alde 85,{ |
---|
| 191 | set .@now_weight,MaxWeight-Weight; |
---|
| 192 | if (.@now_weight < 6301 || checkweight(1201,1) == 0) { |
---|
| 193 | mes "[Merchant]"; |
---|
| 194 | mes "Haha!"; |
---|
| 195 | mes "What are you, superhuman?"; |
---|
| 196 | mes "You're carrying so much stuff!"; |
---|
| 197 | mes "You better put some of that"; |
---|
| 198 | mes "into Kafra Storage~"; |
---|
| 199 | close; |
---|
| 200 | } |
---|
| 201 | mes "[Merchant]"; |
---|
| 202 | mes "Good day!"; |
---|
| 203 | mes "Have you collected any"; |
---|
| 204 | mes "Worm Peelings or Feather of Birds?"; |
---|
| 205 | mes "How about Jellopies? Oh yeah,"; |
---|
| 206 | mes "I need those for something."; |
---|
| 207 | next; |
---|
| 208 | mes "[Merchant]"; |
---|
| 209 | mes "Of course, I won't ask you"; |
---|
| 210 | mes "to give me that stuff for free. What about if I trade a Red Potion for 1 Worm Peeling, 7 Feather of Birds, or 10 Jellopies?"; |
---|
| 211 | next; |
---|
| 212 | switch(select("Sure!:I think it's a rip-off!:No, thanks.")) { |
---|
| 213 | case 1: |
---|
| 214 | mes "[Merchant]"; |
---|
| 215 | mes "So which item do"; |
---|
| 216 | mes "you want to bring me?"; |
---|
| 217 | mes "Feathers of Birds?"; |
---|
| 218 | mes "Worm Peelings?"; |
---|
| 219 | mes "Or Jellopies?"; |
---|
| 220 | next; |
---|
| 221 | switch(select("Worm Peelings:Feathers of Birds:Jellopies:Cancel")) { |
---|
| 222 | case 1: callfunc "F_PotExchange",955,1; |
---|
| 223 | case 2: callfunc "F_PotExchange",916,7; |
---|
| 224 | case 3: callfunc "F_PotExchange",909,10; |
---|
| 225 | case 4: |
---|
| 226 | mes "[Merchant]"; |
---|
| 227 | mes "Sure~"; |
---|
| 228 | mes "No problem."; |
---|
| 229 | close; |
---|
| 230 | } |
---|
| 231 | case 2: |
---|
| 232 | mes "[Merchant]"; |
---|
| 233 | mes "A rip-off...?"; |
---|
| 234 | mes "If you check the market value"; |
---|
| 235 | mes "of the items being traded, I'm actually the one getting"; |
---|
| 236 | mes "ripped off here."; |
---|
| 237 | close; |
---|
| 238 | case 3: |
---|
| 239 | mes "[Merchant]"; |
---|
| 240 | mes "Alright,"; |
---|
| 241 | mes "no problem."; |
---|
| 242 | mes "But come back to me"; |
---|
| 243 | mes "if you change your mind."; |
---|
| 244 | close; |
---|
| 245 | } |
---|
| 246 | } |
---|
| 247 | |
---|
| 248 | geffen,173,88,5 script Merchant#geff 85,{ |
---|
| 249 | set .@now_weight,MaxWeight-Weight; |
---|
| 250 | if (.@now_weight < 6301 || checkweight(1201,1) == 0) { |
---|
| 251 | mes "[Merchant]"; |
---|
| 252 | mes "Haha!"; |
---|
| 253 | mes "What are you, superhuman?"; |
---|
| 254 | mes "You're carrying so much stuff!"; |
---|
| 255 | mes "You better put some of that"; |
---|
| 256 | mes "into Kafra Storage~"; |
---|
| 257 | close; |
---|
| 258 | } |
---|
| 259 | mes "[Merchant]"; |
---|
| 260 | mes "Good day!"; |
---|
| 261 | mes "Have you collected any"; |
---|
| 262 | mes "items like Shells or Chrysalises?"; |
---|
| 263 | mes "What about Jellopies? Oh yeah,"; |
---|
| 264 | mes "I need those for something."; |
---|
| 265 | next; |
---|
| 266 | mes "[Merchant]"; |
---|
| 267 | mes "Of course, I won't ask you"; |
---|
| 268 | mes "to give me that stuff for free. What about if I trade a Red Potion for 5 Shells or 6 Chrysalises, or 10 Jellopies?"; |
---|
| 269 | next; |
---|
| 270 | switch(select("Sure!:I think it's a rip-off!:No, thanks.")) { |
---|
| 271 | case 1: |
---|
| 272 | mes "[Merchant]"; |
---|
| 273 | mes "So which item do"; |
---|
| 274 | mes "you want to bring me?"; |
---|
| 275 | mes "Shells, Chrysalises, or Jellopies?"; |
---|
| 276 | next; |
---|
| 277 | switch(select("Shells:Chrysalises:Jellopies:Cancel")) { |
---|
| 278 | case 1: callfunc "F_PotExchange",935,5; |
---|
| 279 | case 2: callfunc "F_PotExchange",915,6; |
---|
| 280 | case 3: callfunc "F_PotExchange",909,10; |
---|
| 281 | case 4: |
---|
| 282 | mes "[Merchant]"; |
---|
| 283 | mes "Sure~"; |
---|
| 284 | mes "No problem."; |
---|
| 285 | close; |
---|
| 286 | } |
---|
| 287 | case 2: |
---|
| 288 | mes "[Merchant]"; |
---|
| 289 | mes "A rip-off...?"; |
---|
| 290 | mes "If you check the market value"; |
---|
| 291 | mes "of the items being traded, I'm actually the one getting"; |
---|
| 292 | mes "ripped off here."; |
---|
| 293 | close; |
---|
| 294 | case 3: |
---|
| 295 | mes "[Merchant]"; |
---|
| 296 | mes "Alright,"; |
---|
| 297 | mes "no problem."; |
---|
| 298 | mes "But come back to me"; |
---|
| 299 | mes "if you change your mind."; |
---|
| 300 | close; |
---|
| 301 | } |
---|
| 302 | } |
---|
| 303 | |
---|
| 304 | function script F_PotExchange { |
---|
| 305 | if (countitem(getarg(0)) < getarg(1)) { |
---|
| 306 | mes "[Merchant]"; |
---|
| 307 | mes "Hey, where are"; |
---|
| 308 | mes "all those "+getitemname(getarg(0))+""; |
---|
| 309 | mes "that you promised?"; |
---|
| 310 | mes "Give me "+getitemname(getarg(0))+"!"; |
---|
| 311 | close; |
---|
| 312 | } |
---|
| 313 | else { |
---|
| 314 | mes "[Merchant]"; |
---|
| 315 | mes "Okay, let me check"; |
---|
| 316 | mes "how many "+getitemname(getarg(0))+" you"; |
---|
| 317 | mes "have on you. Hmm..."; |
---|
| 318 | next; |
---|
| 319 | mes "[Merchant]"; |
---|
| 320 | mes "You have"; |
---|
| 321 | mes "a total of " + countitem(getarg(0)) + " "+getitemname(getarg(0))+"."; |
---|
| 322 | mes "I can give you a total"; |
---|
| 323 | mes "of " + (countitem(getarg(0))/getarg(1)) + " Red Potions for those."; |
---|
| 324 | next; |
---|
| 325 | mes "[Merchant]"; |
---|
| 326 | mes "What do you say?"; |
---|
| 327 | mes "Do we have a deal?"; |
---|
| 328 | next; |
---|
| 329 | if (select("Deal.:No deal.") == 1) { |
---|
| 330 | mes "[Merchant]"; |
---|
| 331 | mes "You know the exact"; |
---|
| 332 | mes "number of Red Potions"; |
---|
| 333 | mes "you want to receive for"; |
---|
| 334 | mes "those "+getitemname(getarg(0))+", don't you?"; |
---|
| 335 | next; |
---|
| 336 | mes "[Merchant]"; |
---|
| 337 | mes "Now, I can trade you"; |
---|
| 338 | mes "a minimum of 1 Red Potion"; |
---|
| 339 | mes "and a maximum of 100 Red Potions"; |
---|
| 340 | mes "at one time. If you change your"; |
---|
| 341 | mes "mind, just enter '0' to cancel."; |
---|
| 342 | next; |
---|
| 343 | while(1) { |
---|
| 344 | input .@input,0,101; |
---|
| 345 | if (.@input == 0) { |
---|
| 346 | mes "[Merchant]"; |
---|
| 347 | mes "What...?"; |
---|
| 348 | mes "Why the hell do you"; |
---|
| 349 | mes "even bother to talk to me?"; |
---|
| 350 | mes "Pretty indecisive, aren't you?"; |
---|
| 351 | close; |
---|
| 352 | } |
---|
| 353 | else if (.@input > 100) { |
---|
| 354 | mes "[Merchant]"; |
---|
| 355 | mes "I can't give you more"; |
---|
| 356 | mes "than 100 Red Potions"; |
---|
| 357 | mes "at once. Let's try"; |
---|
| 358 | mes "this again."; |
---|
| 359 | next; |
---|
| 360 | } |
---|
| 361 | else { |
---|
| 362 | break; |
---|
| 363 | } |
---|
| 364 | } |
---|
| 365 | set .@put_out_item,.@input * getarg(1); |
---|
| 366 | if (countitem(getarg(0)) < .@put_out_item) { |
---|
| 367 | mes "[Merchant]"; |
---|
| 368 | mes "Uh oh, the number you entered doesn't seem right. You better check the number of Red Potions that you can trade for again."; |
---|
| 369 | close; |
---|
| 370 | } |
---|
| 371 | mes "[Merchant]"; |
---|
| 372 | mes "There you go!"; |
---|
| 373 | mes "Check how many Red Potions"; |
---|
| 374 | mes "I've given you, it should be good. Thanks, that was a good deal~"; |
---|
| 375 | delitem getarg(0),.@put_out_item; //Shell |
---|
| 376 | getitem 501,.@input; //Red_Potion |
---|
| 377 | close; |
---|
| 378 | } |
---|
| 379 | mes "[Merchant]"; |
---|
| 380 | mes "Huh~"; |
---|
| 381 | mes "Alright."; |
---|
| 382 | mes "Though aren't"; |
---|
| 383 | mes "Red Potions more useful"; |
---|
| 384 | mes "to an adventurer like you?"; |
---|
| 385 | close; |
---|
| 386 | } |
---|
| 387 | } |
---|
| 388 | |
---|
| 389 | //============================================================ |
---|
| 390 | // Old changelog |
---|
| 391 | //============================================================ |
---|
| 392 | //= 1.1 Made it as a function. U can add your own Merchs [Lupus] |
---|
| 393 | //= 1.1a Fixed item select [KarLaeda] |
---|
| 394 | //============================================================ |
---|