summaryrefslogtreecommitdiff
path: root/npc/re/merchants/ammo_dealer.txt
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-08 19:30:07 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-08 19:30:07 +0000
commit31825ccc2dde034a218d9ad466dd721c40b5651d (patch)
tree961b976e45988f7f7158d33b3f11a18688f34b1f /npc/re/merchants/ammo_dealer.txt
parent22c75b070526de8b103032f5bf13504af81e0095 (diff)
downloadhercules-31825ccc2dde034a218d9ad466dd721c40b5651d.tar.gz
hercules-31825ccc2dde034a218d9ad466dd721c40b5651d.tar.bz2
hercules-31825ccc2dde034a218d9ad466dd721c40b5651d.tar.xz
hercules-31825ccc2dde034a218d9ad466dd721c40b5651d.zip
Okie ladies and gentleman if this commit breaks anything it's jman's and maki's fault, yes, blame them.
Fixing pre-re / re npc support, moving /config/ folder to src root so other servers may also make use of the #define renewal dir and other stuff. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16382 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/re/merchants/ammo_dealer.txt')
-rw-r--r--npc/re/merchants/ammo_dealer.txt126
1 files changed, 126 insertions, 0 deletions
diff --git a/npc/re/merchants/ammo_dealer.txt b/npc/re/merchants/ammo_dealer.txt
new file mode 100644
index 000000000..ea5f9a803
--- /dev/null
+++ b/npc/re/merchants/ammo_dealer.txt
@@ -0,0 +1,126 @@
+//===== rAthena Script =======================================
+//= Bullet Dealer Tony
+//===== By ===================================================
+//= Playtester, Paradox924X
+//===== Version ==============================================
+//= 1.5
+//===== Compatible With ======================================
+//= rAthena SVN
+//===== Description ==========================================
+//= Bullet trader.
+//===== Comments =============================================
+//= 1.0 First version [Playtester]
+//= 1.1 Converted from Aegis [Paradox924X]
+//= 1.2 More optimized conversion [Legionaire]
+//= 1.2a Removed .GATs [Lupus]
+//= 1.3 Fixed [Playtester] Optimized. Got rid of @vars [Lupus]
+//= 1.4 Updated to match AEGIS script. [Kisuka]
+//= 1.5 Updated to match AEGIS script again. [Masao]
+//============================================================
+
+alberta,118,160,3 script Bullet Dealer Tony#alb::bdt 86,{
+ if (BaseJob == Job_Gunslinger) {
+ mes "[Tony]";
+ mes "I'm Tony, the Bullet Dealer.";
+ mes "Come to me whenever you're";
+ mes "short on ammo. Just bring me";
+ mes "the materials, and I'll make";
+ mes "you the bullets you need.";
+ next;
+ switch(select("Poison Sphere:Flare Sphere:Lighting Sphere:Blind Sphere:Freezing Sphere:Cancel")) {
+ case 1: callfunc "Bullet_Trade",937,10,13205; break;
+ case 2: callfunc "Bullet_Trade",7097,2,13203; break;
+ case 3: callfunc "Bullet_Trade",7053,3,13204; break;
+ case 4: callfunc "Bullet_Trade",1024,5,13206; break;
+ case 5: callfunc "Bullet_Trade",7054,2,13207; break;
+ case 6:
+ mes "[Tony]";
+ mes "Changed your mind?";
+ mes "Well, if you ever need";
+ mes "any bullets, I'll be right";
+ mes "here. Come back whenever";
+ mes "you think you'll need more";
+ mes "ammunition, Gunslinger.";
+ close;
+ }
+ }
+ mes "[Tony]";
+ mes "Hey, I'm Tony. I'm in";
+ mes "charge of distributing";
+ mes "and making bullets for";
+ mes "Gunslingers. It's just";
+ mes "how our guild likes";
+ mes "to do things.";
+ next;
+ mes "[Tony]";
+ mes "I'm sorry if you came";
+ mes "here to buy some bullets.";
+ mes "I can only do business with";
+ mes "fully fledged Gunslingers.";
+ close;
+}
+
+function script Bullet_Trade {
+ mes "[Tony]";
+ mes "For every set of";
+ mes "30 "+getitemname(getarg(2))+"s,";
+ mes "you must give me";
+ mes "1 Emveretarcon,";
+ mes "1 Phracon, and";
+ mes ""+getarg(1)+" "+getitemname(getarg(0))+".";
+ next;
+ mes "[Tony]";
+ mes "Remember that I can give";
+ mes "a maximum of 500 sets of";
+ mes "30 bullets at a time. Please";
+ mes "enter the number of bullet sets";
+ mes "that you'd like. If you want to";
+ mes "cancel, then just enter ''0.''";
+ next;
+ input .@amount;
+ if (.@amount < 1 || .@amount > 500) {
+ mes "[Tony]";
+ mes "Hey, I can't give you";
+ mes "that many bullets. Don't";
+ mes "forget to enter a number";
+ mes "that's no higher than 500";
+ mes "if you want to trade your";
+ mes "items for some bullets.";
+ close;
+ }
+ if (countitem(1010) >= .@amount && countitem(1011) >= .@amount && countitem(getarg(0)) >= (.@amount*getarg(1))) {
+ if (checkweight(getarg(2),.@amount * 30) == 0) {
+ mes "[Tony]";
+ mes "Eh? Your Inventory doesn't";
+ mes "have enough space for this";
+ mes "many bullets. Come back later";
+ mes "after you make more space";
+ mes "available. Try putting some of";
+ mes "your things into Kafra Storage.";
+ close;
+ }else{
+ mes "[Tony]";
+ mes "Great, everything seems";
+ mes "to be in order. Let me take";
+ mes "these materials, and here are";
+ mes "your bullets. It's a pleasure";
+ mes "to do business with you~";
+ delitem 1010,.@amount;
+ delitem 1011,.@amount;
+ delitem getarg(0),.@amount * getarg(1);
+ getitem getarg(2),.@amount * 30;
+ close;
+ }
+ }else{
+ mes "[Tony]";
+ mes "Huh. It looks like you";
+ mes "don't have enough materials";
+ mes "for that many bullets. Well,";
+ mes "it's no problem. Just come";
+ mes "back after gathering everything";
+ mes "that you need, okay?";
+ close;
+ }
+}
+
+izlude,171,133,3 duplicate(bdt) Bullet Dealer Tony#iz 86