summaryrefslogtreecommitdiff
path: root/npc/merchants/ammo_boxes.txt
diff options
context:
space:
mode:
authorTrojal <trojal@gmail.com>2013-01-10 20:09:39 -0800
committerTrojal <trojal@gmail.com>2013-01-10 20:32:02 -0800
commit83e7a4954437c13aec639b0b512252cc20a8f36c (patch)
treeb7f6d11b2058248d026f2d9944e8f4b6ac288d50 /npc/merchants/ammo_boxes.txt
parent51bfeb38eb139e97e0e1c096c85c15fba234f35b (diff)
parent38e583df21eccd9e4f31d38acaae32579c6f0d27 (diff)
downloadhercules-83e7a4954437c13aec639b0b512252cc20a8f36c.tar.gz
hercules-83e7a4954437c13aec639b0b512252cc20a8f36c.tar.bz2
hercules-83e7a4954437c13aec639b0b512252cc20a8f36c.tar.xz
hercules-83e7a4954437c13aec639b0b512252cc20a8f36c.zip
Merge rathena repository to form Hercules initial commit.
Diffstat (limited to 'npc/merchants/ammo_boxes.txt')
-rw-r--r--npc/merchants/ammo_boxes.txt138
1 files changed, 138 insertions, 0 deletions
diff --git a/npc/merchants/ammo_boxes.txt b/npc/merchants/ammo_boxes.txt
new file mode 100644
index 000000000..fadf8b03f
--- /dev/null
+++ b/npc/merchants/ammo_boxes.txt
@@ -0,0 +1,138 @@
+//===== rAthena Script =======================================
+//= Magazine Dealer Kenny
+//===== By: ==================================================
+//= rAthena dev team
+//===== Current Version: =====================================
+//= 1.5
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= Turns bullets into magazines/packs.
+//===== 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.3 Updated to match AEGIS script. [Kisuka]
+//= 1.4 Updated to match AEGIS script again. [Masao]
+//= 1.5 Moved Izlude duplicate to pre-re/re paths. [Euphy]
+//============================================================
+
+alberta,118,157,3 script Magazine Dealer Tonny::mdk 83,{
+ set .n$, compare(strnpcinfo(1),"Tonny")?"[Tonny]":"[Kenny]";
+ if(BaseJob == Job_Gunslinger) {
+ mes .n$;
+ mes "Welcome to my Magazine Shop.";
+ mes "As you may know, large numbers";
+ mes "of bullets can be carried more";
+ mes "easily when they're in Magazines. Now, can I interest you in";
+ mes "anything in particular?";
+ next;
+ switch(select("Wind Sphere Pack:Shadow Sphere Pack:Poison Sphere Pack:Water Sphere Pack:Fire Sphere Pack:Cartridge:Blood Cartridge:Silver Cartridge: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:
+ mes .n$;
+ mes "Well, if you ever find";
+ mes "that you have too many";
+ mes "bullets, come and see me.";
+ mes "It's a smart idea to store";
+ mes "bullets with my Magazines.";
+ close;
+ }
+ }
+ mes .n$;
+ mes "Welcome to my shop.";
+ mes "Here, I provide Magazines";
+ mes "and Cartridges for Gunslingers.";
+ mes "Sorry, but it doesn't look like";
+ mes "my services would be of any";
+ mes "use to you, adventurer.";
+ next;
+ mes .n$;
+ mes "Eh, but if you happen to";
+ mes "know any Gunslingers, send";
+ mes "them my way. You can never";
+ mes "have too many bullets.";
+ close;
+}
+
+function script Func_Casing {
+ mes .n$;
+ mes "Now, you can trade";
+ mes "500 "+getitemname(getarg(0))+"s";
+ mes "and 500 zeny for 1 "+getitemname(getarg(1))+", so make sure";
+ mes "you have sufficient bullets";
+ mes "and zeny for this exchange.";
+ next;
+ mes .n$;
+ mes "You can exchange 500 "+getitemname(getarg(0))+"s and 500 zeny";
+ mes "with 1 "+getitemname(getarg(1))+".";
+ next;
+ mes .n$;
+ mes "Remember that I can't give";
+ mes "you more than 50 Magazines";
+ mes "at a time. Now please enter";
+ mes "the number of Magazines you";
+ mes "want to receive. If you want to cancel, then just enter ''0.''";
+ next;
+ input .@amount;
+ if(.@amount > 50 || .@amount == 0) {
+ mes .n$;
+ mes "Hey, I can't give you";
+ mes "that many Magazines.";
+ mes "Please try again, and";
+ mes "enter a number no";
+ mes "greater than 50.";
+ close;
+ }
+ if (countitem(getarg(0)) >= (500*.@amount)) {
+ if (Zeny >= (500*.@amount)) {
+ if (checkweight(getarg(1),.@amount) == 0) {
+ mes .n$;
+ mes "Hey, you've got a lot";
+ mes "of junk crammed in your";
+ mes "Inventory. Free up some";
+ mes "space, and then come back";
+ mes "and trade your bullets for";
+ mes "some Magazines later, okay?";
+ close;
+ }else{
+ mes .n$;
+ mes "Alright, here are";
+ mes "your Magazines. Thanks";
+ mes "for visiting my shop, and";
+ mes "I hope that you use all";
+ mes "of your ammo wisely.";
+ set Zeny,Zeny-500*.@amount;
+ delitem getarg(0),500*.@amount;
+ getitem getarg(1),.@amount;
+ close;
+ }
+ }else{
+ mes .n$;
+ mes "Sorry, but you don't";
+ mes "have enough zeny for";
+ mes "this Magazine exchange.";
+ mes "Come back to my shop";
+ mes "after you've saved up";
+ mes "some more money.";
+ close;
+ }
+ }else{
+ mes .n$;
+ mes "Sorry, but you don't";
+ mes "have enough bullets for";
+ mes "this Magazine exchange.";
+ mes "Maybe you should double";
+ mes "check your Inventory, and";
+ mes "then come back to me later.";
+ close;
+ }
+}