Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===== eAthena Script =======================================
- //= Magazine Dealer Kenny
- //===== By: ==================================================
- //= eAthena dev team
- //===== Current Version: =====================================
- //= 1.2b
- //===== Compatible With: =====================================
- //= eAthena 1.0+
- //===== Description: =========================================
- //= Turns bullets/spheres into packs/casings.
- //===== Additional Comments: =================================
- //= 1.0 First version. [SinSloth]
- //= 1.1 Optimized version - Reduced to only one function [SinSloth]
- //= 1.2 Optimized^2, corrected npc's name [ultramage]
- //= 1.2a Optimized. Please, ommit extra NPC names [Lupus]
- //= 1.2b Added "As many as possible" Option [Jacob]
- //============================================================
- que_ng,187,149,3 script Magazine Dealer Kenny 83,{
- mes "[Kenny]";
- mes "I am the Casing Dealer, Kenny!";
- if(BaseJob != Job_Gunslinger) {
- mes "I'm here to package the Shells";
- mes "and Bullets for Gunslingers.";
- next;
- mes "[Kenny]";
- mes "But you don't look like a";
- mes "Gunslinger to me. I'm afraid";
- mes "that I must ask you to leave";
- mes "after you're done looking around.";
- close;
- }
- mes "If your bullets are getting";
- mes "too heavy, come to me!";
- next;
- mes "[Kenny]";
- mes "I can make you Casings and Packs,";
- mes "which will let you carry the";
- mes "Spheres at a lower weight!";
- mes "Come on! Take a look!";
- next;
- switch(select("Lightning Sphere Pack","Blind Sphere Pack","Poison Sphere Pack","Freezing Sphere Pack","Flare Sphere Pack","Bullet Casing","Shell of Blood Casing","Silver Bullet Casing","Cancel")) {
- case 1: callfunc "Func_Casing",13204,12144; break;
- case 2: callfunc "Func_Casing",13206,12145; break;
- case 3: callfunc "Func_Casing",13205,12146; break;
- case 4: callfunc "Func_Casing",13207,12147; break;
- case 5: callfunc "Func_Casing",13203,12148; break;
- case 6: callfunc "Func_Casing",13200,12149; break;
- case 7: callfunc "Func_Casing",13202,12150; break;
- case 8: callfunc "Func_Casing",13201,12151; break;
- default:
- mes "[Kenny]";
- mes "Alright. If there's";
- mes "something else I can help";
- mes "you with, please tell me.";
- close;
- }
- close;
- }
- function script Func_Casing {
- if (countitem(getarg(0)) < 500) {
- mes "[Kenny]";
- mes "I'm sorry, but you dont have 500 of this bullet.";
- close;
- }
- mes "[Kenny]";
- mes "Please input the amount you want.";
- next;
- mes "[Kenny]";
- mes "" +getitemname(getarg(1))+ " will";
- if(getarg(0) == 13202)
- mes "cost 500 Shells of Blood";
- else
- mes "cost 500 " +getitemname(getarg(0))+ "s";
- mes "and 500 zeny each.";
- next;
- mes "[Kenny]";
- mes "How many would you like?";
- next;
- switch(select("Store as many Arrows in quivers as possible:Purchase 1 quiver:Cancel")) {
- case 1:
- set .@bullets,countitem(getarg(0));
- set .@boxes,.@bullets / 500;
- set .@bullets_used,.@boxes * 500;
- set .@zeny_req,.@boxes * 500;
- mes "Number of";
- if(getarg(0) == 13202)
- mes "Blood Bullets: ^3131FF"+.@bullets+" ^000000";
- else
- mes getitemname(getarg(0))+ " Bullets: ^3131FF"+.@bullets+" ^000000";
- mes "Maximum Number";
- mes "of Purchasable";
- mes "Boxes: ^3131FF"+.@boxes+" ^000000";
- mes "Zeny required: ^3131FF"+.@zeny_req+" Zeny^000000";
- next;
- mes "[Kenny]";
- mes "Would you like to";
- mes "buy as many boxes";
- mes "as you can for the Arrows";
- mes "you are currently carrying?";
- next;
- if (select("Yes:Cancel") == 1) {
- if (.@zeny_req < Zeny) {
- mes "[Inventor Jaax]";
- mes "There you go!";
- mes "Just remember, ^FF0000you won't be able to use the Box when your carried weight is 90% of your maximum weight limit^000000.";
- set zeny,zeny-.@zeny_req;
- delitem getarg(0),.@bullets_used;
- getitem getarg(1),.@boxes;
- next;
- mes "[Kenny]";
- mes "So...";
- mes "Just keep track";
- mes "of how much you're";
- mes "carrying from time";
- mes "to time and you should";
- mes "be alright.";
- close;
- }
- else {
- mes "[Kenny]";
- mes "I'm sorry, but you don't have enough Zeny. I can't just give these away after working years";
- mes "to develop this revolutionary technology!";
- close;
- }
- }
- mes "[Kenny]";
- mes "You changed your mind?";
- mes "When the glory of owning";
- mes "a quiver is so close?";
- close;
- case 2:
- if (zeny > 500) {
- mes "[Kenny]";
- mes "There you go!";
- mes "Just remember, ^FF0000you won't be able to use the Quiver when your carried weight is 90% of your maximum weight limit^000000.";
- set zeny,zeny-500;
- delitem getarg(0),500;
- getitem getarg(1),1;
- next;
- mes "[Kenny]";
- mes "So...";
- mes "Just keep track";
- mes "of how much you're";
- mes "carrying from time";
- mes "to time and you should";
- mes "be alright.";
- close;
- }
- else {
- mes "[Kenny]";
- mes "You don't even";
- mes "have 500 Zeny?";
- mes "I'm so sorry. I had no";
- mes "idea that you were so...";
- mes "^333333Poor^000000.";
- close;
- }
- case 3:
- mes "[Kenny]";
- mes "Kay, See you later.";
- close;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment