summaryrefslogtreecommitdiff
path: root/npc/merchants/ammo_boxes.txt
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-22 14:32:48 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-22 14:32:48 +0000
commit3f4fabd7bc511c76485db153ae9b58468e6a5c00 (patch)
tree2ae03c51298eaed8eb52fe76c7347ec77fb906d9 /npc/merchants/ammo_boxes.txt
parenta7c3ca96ad0ee7179584b90b8135ff510d9ed03f (diff)
downloadhercules-3f4fabd7bc511c76485db153ae9b58468e6a5c00.tar.gz
hercules-3f4fabd7bc511c76485db153ae9b58468e6a5c00.tar.bz2
hercules-3f4fabd7bc511c76485db153ae9b58468e6a5c00.tar.xz
hercules-3f4fabd7bc511c76485db153ae9b58468e6a5c00.zip
Tweaked some recent npcs (untested)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10608 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/merchants/ammo_boxes.txt')
-rw-r--r--npc/merchants/ammo_boxes.txt185
1 files changed, 85 insertions, 100 deletions
diff --git a/npc/merchants/ammo_boxes.txt b/npc/merchants/ammo_boxes.txt
index 8ca5554e3..ba136f0e2 100644
--- a/npc/merchants/ammo_boxes.txt
+++ b/npc/merchants/ammo_boxes.txt
@@ -1,9 +1,9 @@
//===== eAthena Script ========================================
//= Casing Pack Dealer Kenny
//===== By: ==================================================
-//= SinSloth
+//= eAthena dev team
//===== Current Version: =====================================
-//= 1.1
+//= 1.2
//===== Compatible With: =====================================
//= eAthena 1.0+
//===== Description: =========================================
@@ -11,71 +11,55 @@
//===== Additional Comments: =================================
//= 1.0 First version. [SinSloth]
//= 1.1 Optimized version - Reduced to only one function [SinSloth]
+//= 1.2 Optimized^2 [ultramage]
//============================================================
que_ng,187,149,3 script Casing Pack Dealer Kenny 83,{
-
- if(BaseJob == Job_Gunslinger)
+
+ if(BaseJob != Job_Gunslinger)
{
mes "[Kenny]";
mes "I am the Casing Dealer, Kenny!";
- mes "If your bullets are getting";
- mes "too heavy, come to me!";
+ mes "I'm here to package the Shells";
+ mes "and Bullets for Gunslingers.";
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;
- case 9:
- goto L_Cancel;
- break;
- }
+ 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 "[Kenny]";
mes "I am the Casing Dealer, Kenny!";
- mes "I'm here to package the Shells";
- mes "and Bullets for Gunslingers.";
+ mes "If your bullets are getting";
+ mes "too heavy, come to me!";
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;
-
-L_Cancel:
- mes "[Kenny]";
- mes "Alright. If there's";
- mes "something else I can help";
- mes "you with, please tell me.";
+ 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;
+ case 9:
+ default:
+ mes "[Kenny]";
+ mes "Alright. If there's";
+ mes "something else I can help";
+ mes "you with, please tell me.";
+ close;
+ }
close;
}
@@ -93,62 +77,63 @@ function script Func_Casing {
mes "You can trade a maximum of 50.";
mes "Input 0 if you want to cancel.";
next;
- input @caser_amount;
- if(@caser_amount < 1) goto L_Cancel;
- else if(@caser_amount > 50)
+ input .@caser_amount;
+ if(.@caser_amount < 1)
+ {
+ mes "[Kenny]";
+ mes "Alright. If there's";
+ mes "something else I can help";
+ mes "you with, please tell me.";
+ close;
+ }
+ if(.@caser_amount > 50)
{
mes "[Kenny]";
mes "You've exceeded the limit!";
mes "Try again next time?";
close;
}
- set @caser_bullet,@caser_amount * 500;
-
-//Weight checking
- if(checkweight(getarg(1),@caser_amount) != 1) goto L_Weight;
-
-//Materials checking
- else if(countitem(getarg(0)) < @caser_bullet) goto L_NoBullet;
-
-//Zeny checking
- else if(Zeny < @caser_bullet) goto L_NoMoney;
+ set .@caser_bullet, .@caser_amount * 500;
+
+ //Weight checking
+ if(checkweight(getarg(1), .@caser_amount) != 1)
+ {
+ mes "[Kenny]";
+ mes "You are overweight.";
+ mes "Please clear your inventory.";
+ close;
+ }
+
+ //Materials checking
+ if(countitem(getarg(0)) < .@caser_bullet)
+ {
+ mes "[Kenny]";
+ mes "Huh......";
+ mes "You don't have enough";
+ mes "materials to trade for";
+ mes "the number of items you";
+ mes "want. Please come with the";
+ mes "correct amount of items.";
+ close;
+ }
+
+ //Zeny checking
+ if(Zeny < .@caser_bullet)
+ {
+ mes "[Kenny]";
+ mes "Erm... You don't have enough money.";
+ mes "The fee is 500 zeny";
+ mes "Check your zeny and come again.";
+ close;
+ }
+
mes "[Kenny]";
mes "Ah very well!";
mes "The number is confirmed!";
if(getarg(1) < 12149) mes "I'll get you the Packs right away.";
else mes "I'll get you the Casings right away.";
- set Zeny, Zeny - @caser_bullet;
- delitem getarg(0),@caser_bullet;
- getitem getarg(1),@caser_amount;
- close;
-
-L_Weight:
- mes "[Kenny]";
- mes "You are overweight.";
- mes "Please clear your inventory.";
- close;
-
-L_NoBullet:
- mes "[Kenny]";
- mes "Huh......";
- mes "You don't have enough";
- mes "materials to trade for";
- mes "the number of items you";
- mes "want. Please come with the";
- mes "correct amount of items.";
- close;
-
-L_NoMoney:
- mes "[Kenny]";
- mes "Erm... You don't have enough money.";
- mes "The fee is 500 zeny";
- mes "Check your zeny and come again.";
- close;
-
-L_Cancel:
- mes "[Kenny]";
- mes "Alright. If there's";
- mes "something else I can help";
- mes "you with, please tell me.";
+ set Zeny, Zeny - .@caser_bullet;
+ delitem getarg(0), .@caser_bullet;
+ getitem getarg(1), .@caser_amount;
close;
}