|
@@ -3,7 +3,7 @@
|
|
//===== By: ==================================================
|
|
//===== By: ==================================================
|
|
//= eAthena dev team
|
|
//= eAthena dev team
|
|
//===== Current Version: =====================================
|
|
//===== Current Version: =====================================
|
|
-//= 1.2
|
|
|
|
|
|
+//= 1.2a
|
|
//===== Compatible With: =====================================
|
|
//===== Compatible With: =====================================
|
|
//= eAthena 1.0
|
|
//= eAthena 1.0
|
|
//===== Description: =========================================
|
|
//===== Description: =========================================
|
|
@@ -14,22 +14,19 @@
|
|
//= id of the 2 required items plus the amount. Can trade
|
|
//= id of the 2 required items plus the amount. Can trade
|
|
//= up to 500 units (5,000 kunais) at once. [erKURITA]
|
|
//= up to 500 units (5,000 kunais) at once. [erKURITA]
|
|
//= 1.1 Officialized script [Playtester]
|
|
//= 1.1 Officialized script [Playtester]
|
|
-//= 1.2 Optimized/cleaned up a bit [ultramage]
|
|
|
|
|
|
+//= 1.2a Optimized/cleaned up a bit [ultramage]
|
|
//============================================================
|
|
//============================================================
|
|
|
|
|
|
que_ng,72,29,3 script Kunai Merchant Kashin 83,{
|
|
que_ng,72,29,3 script Kunai Merchant Kashin 83,{
|
|
-
|
|
|
|
- if(BaseJob != Job_Ninja)
|
|
|
|
- {
|
|
|
|
- mes "[Kashin]";
|
|
|
|
|
|
+
|
|
|
|
+ mes "[Kashin]";
|
|
|
|
+ if(BaseJob != Job_Ninja) {
|
|
mes "I am Kashin of the Wind. I distribute trade items to the shadows.";
|
|
mes "I am Kashin of the Wind. I distribute trade items to the shadows.";
|
|
next;
|
|
next;
|
|
mes "[Kashin]";
|
|
mes "[Kashin]";
|
|
mes "It doesn't seem like you are a Ninja... Just take a good look around and be on your way.";
|
|
mes "It doesn't seem like you are a Ninja... Just take a good look around and be on your way.";
|
|
close;
|
|
close;
|
|
}
|
|
}
|
|
-
|
|
|
|
- mes "[Kashin]";
|
|
|
|
mes "I'm Kashin!";
|
|
mes "I'm Kashin!";
|
|
mes "If you're ever short on Shurikens, come and see me.";
|
|
mes "If you're ever short on Shurikens, come and see me.";
|
|
next;
|
|
next;
|
|
@@ -38,15 +35,13 @@ que_ng,72,29,3 script Kunai Merchant Kashin 83,{
|
|
mes "Choose what you want.";
|
|
mes "Choose what you want.";
|
|
next;
|
|
next;
|
|
|
|
|
|
- switch(select("Poison Kunais:Frost Kunais:Wind Kunais:Earth Kunais:Fire Kunais:Cancel"))
|
|
|
|
- {
|
|
|
|
|
|
+ switch(select("Poison Kunais:Frost Kunais:Wind Kunais:Earth Kunais:Fire Kunais:Cancel")) {
|
|
//usage: callfunc "Kunai_Trade",itemreqid1,itemreqct1,itemreqid2,itemreqct2,itemidtrade;
|
|
//usage: callfunc "Kunai_Trade",itemreqid1,itemreqct1,itemreqid2,itemreqct2,itemidtrade;
|
|
case 1: callfunc "Kunai_Trade",13250,20,7524,1,13259; break;
|
|
case 1: callfunc "Kunai_Trade",13250,20,7524,1,13259; break;
|
|
case 2: callfunc "Kunai_Trade",13251,8,7522,2,13255; break;
|
|
case 2: callfunc "Kunai_Trade",13251,8,7522,2,13255; break;
|
|
case 3: callfunc "Kunai_Trade",13252,4,7523,2,13257; break;
|
|
case 3: callfunc "Kunai_Trade",13252,4,7523,2,13257; break;
|
|
case 4: callfunc "Kunai_Trade",13253,2,7524,1,13256; break;
|
|
case 4: callfunc "Kunai_Trade",13253,2,7524,1,13256; break;
|
|
case 5: callfunc "Kunai_Trade",13254,1,7521,2,13258; break;
|
|
case 5: callfunc "Kunai_Trade",13254,1,7521,2,13258; break;
|
|
- case 6:
|
|
|
|
default:
|
|
default:
|
|
mes "[Kashin]";
|
|
mes "[Kashin]";
|
|
mes "Hmm~ Ok~";
|
|
mes "Hmm~ Ok~";
|
|
@@ -66,44 +61,35 @@ function script Kunai_Trade {
|
|
mes "You can trade up to 500 packs at a time.";
|
|
mes "You can trade up to 500 packs at a time.";
|
|
mes "If you don't want to trade, just enter 0 as the amount.";
|
|
mes "If you don't want to trade, just enter 0 as the amount.";
|
|
next;
|
|
next;
|
|
|
|
+ input .@amount;
|
|
|
|
|
|
- input .@trade;
|
|
|
|
-
|
|
|
|
- if(.@trade < 1)
|
|
|
|
- {
|
|
|
|
- mes "[Kashin]";
|
|
|
|
|
|
+ mes "[Kashin]";
|
|
|
|
+ if(.@amount < 1) {
|
|
mes "Hmm~ Ok~";
|
|
mes "Hmm~ Ok~";
|
|
mes "Come again~";
|
|
mes "Come again~";
|
|
mes "I, Kashin of the Wind, will always be at this place.";
|
|
mes "I, Kashin of the Wind, will always be at this place.";
|
|
close;
|
|
close;
|
|
}
|
|
}
|
|
- if(.@trade > 500)
|
|
|
|
- {
|
|
|
|
- mes "[Kashin]";
|
|
|
|
|
|
+ if(.@amount > 500) {
|
|
mes "You've exceeded the input amount!";
|
|
mes "You've exceeded the input amount!";
|
|
mes "Enter a valid number next time~!";
|
|
mes "Enter a valid number next time~!";
|
|
close;
|
|
close;
|
|
}
|
|
}
|
|
- if(countitem(getarg(0)) < .@trade*getarg(1) || countitem(getarg(2)) < .@trade*getarg(3))
|
|
|
|
- {
|
|
|
|
- mes "[Kashin]";
|
|
|
|
|
|
+ if(countitem(getarg(0)) < .@amount*getarg(1) || countitem(getarg(2)) < .@amount*getarg(3)) {
|
|
mes "Hmm... this is no good~";
|
|
mes "Hmm... this is no good~";
|
|
mes "You don't have enough materials to trade in for the amount of Kunai's that you want.";
|
|
mes "You don't have enough materials to trade in for the amount of Kunai's that you want.";
|
|
mes "Bring some more if you want this amount.";
|
|
mes "Bring some more if you want this amount.";
|
|
close;
|
|
close;
|
|
}
|
|
}
|
|
- if(checkweight(getarg(4), .@trade*10) == 0)
|
|
|
|
- {
|
|
|
|
- mes "[Kashin]";
|
|
|
|
|
|
+ if(checkweight(getarg(4), .@amount*10) == 0) {
|
|
mes "Your bag is too full to carry the trade items. Come back after you made room for the traded items.";
|
|
mes "Your bag is too full to carry the trade items. Come back after you made room for the traded items.";
|
|
close;
|
|
close;
|
|
}
|
|
}
|
|
- mes "[Kashin]";
|
|
|
|
mes "Ok~ Very well!";
|
|
mes "Ok~ Very well!";
|
|
mes "Amount verified!";
|
|
mes "Amount verified!";
|
|
mes "Here are your traded items.";
|
|
mes "Here are your traded items.";
|
|
- delitem getarg(0),getarg(1)*.@trade;
|
|
|
|
- delitem getarg(2),getarg(3)*.@trade;
|
|
|
|
- getitem getarg(4),10*.@trade;
|
|
|
|
|
|
+ delitem getarg(0),getarg(1)*.@amount;
|
|
|
|
+ delitem getarg(2),getarg(3)*.@amount;
|
|
|
|
+ getitem getarg(4),10*.@amount;
|
|
close;
|
|
close;
|
|
-}
|
|
|
|
|
|
+}
|