Просмотр исходного кода

* Reverted Bullet Dealer Tony to Stable
- current version was bugged and no one fixed it

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10677 54d463be-8e91-2dee-dedb-b68131a5f0ec

Playtester 18 лет назад
Родитель
Сommit
1b42ba88d7
2 измененных файлов с 67 добавлено и 51 удалено
  1. 2 0
      npc/Changelog.txt
  2. 65 51
      npc/merchants/ammo_dealer.txt

+ 2 - 0
npc/Changelog.txt

@@ -1,6 +1,8 @@
 Date		Added
 ======
 2007/06/04
+	* Reverted Bullet Dealer Tony to Stable [Playtester]
+	- current version was bugged and no one fixed it
 	* Added missing OnTouch to Prontera "Guild Treasure room guard" [Lupus]
 2007/06/03
 	* Rev. 10669 Updated 2006 headgear quests to semi-official dialog. [L0ne_W0lf]

+ 65 - 51
npc/merchants/ammo_dealer.txt

@@ -1,9 +1,9 @@
 //===== Athena Script ========================================
 //= Bullet Dealer, Tony
 //===== By ===================================================
-//= Playtester, Paradox924X, Legionaire
+//= Playtester, Paradox924X
 //===== Version ==============================================
-//= 1.2a
+//= 1.1
 //===== Compatible With ======================================
 //= eAthena SVN with jAthena scripting engine and . variables
 //===== Description ==========================================
@@ -11,13 +11,41 @@
 //===== Comments =============================================
 //= 1.0 First version [Playtester]
 //= 1.1 Converted from Aegis [Paradox924X]
-//= 1.2 More optimized conversion [Legionaire]
-//= 1.2a Removed .GATs [Lupus]
 //============================================================
 
 que_ng,187,156,3	script	Bullet Dealer Tony	86,{
-
-	if(BaseJob != Job_Gunslinger){
+	if (BaseJob == JOB_GUNSLINGER) {
+		mes "[Tony]";
+		mes "I'm Bullet-tooth Tony!";
+		mes "Whenever your out of bullets,";
+		mes "Visit me!!!";
+		next;
+		mes "[Tony]";
+		mes "Now~! Friend~Companion~ Buddy~";
+		mes "What do you need?!";
+		mes "Choose anything~!";
+		mes "And pay money~!";
+		next;
+		switch(select("Poison Sphere:Flare Sphere:Lighting Sphere:Blind Sphere:Freezing Sphere:Cancel")) {
+			case 1:
+				callfunc "Bullet_Trade",937,10,13205;
+			case 2:
+				callfunc "Bullet_Trade",7097,2,13203;
+			case 3:
+				callfunc "Bullet_Trade",7053,3,13204;
+			case 4:
+				callfunc "Bullet_Trade",1024,5,13206;
+			case 5:
+				callfunc "Bullet_Trade",7054,2,13207;
+			case 6:
+				mes "[Tony]";
+				mes "Mmm~ Okay~";
+				mes "Please visit again~";
+				mes "I, Bullet-tooth Tony,";
+				mes "Will always be here~!!!";
+				close;
+		}
+	} else {
 		mes "[Tony]";
 		mes "I'm a trader who supplies";
 		mes "Gunslingers with trade items.";
@@ -28,69 +56,55 @@ que_ng,187,156,3	script	Bullet Dealer Tony	86,{
 		mes "So just look around";
 		mes "and go.";
 		close;
-		}
-	mes "[Tony]";
-	mes "I'm Bullet-tooth Tony!";
-	mes "Whenever you're out of bullets,";
-	mes "Visit me!!!";
-	next;
-	mes "[Tony]";
-	mes "Now~! Friend~Companion~ Buddy~";
-	mes "What do you need?!";
-	mes "Choose anything~!";
-	mes "And pay money~!";
-	menu "Poison Sphere",-, "Flare Sphere",-, "Lightning Sphere",-, "Blind Sphere",-, "Freezing  Sphere",-, "Cancel",-;
-	next;
-		if(@menu == 1) setarray .@btt[0],13205,937,10;
-		if(@menu == 2) setarray .@btt[0],13203,7097,2;
-		if(@menu == 3) setarray .@btt[0],13204,7053,3;
-		if(@menu == 4) setarray .@btt[0],13206,1024,5;
-		if(@menu == 5) setarray .@btt[0],13207,7054,2;
-		if(@menu == 6){ mes "[Tony]";
-			mes "Mmm~ Okay~";
-			mes "Please visit again~";
-			mes "I, Bullet-tooth Tony,";
-			mes "Will always be here~!!!";
-			close;
-		}
+	}
+}
+
+function	script	Bullet_Trade	{
 	mes "[Tony]";
 	mes "Input the amount you wish to purchase.";
 	next;
 	mes "[Tony]";
-	mes "We trade 30 "+getitemname(.@btt[0])+"s for";
+	mes "We trade 30 "+getitemname(getarg(2))+"s for";
 	mes "1 Phracon,";
-	if(.@btt[0] == 13205){ mes "10 Venom Canines,"; mes "And 1 Emveretarcon."; }else{ mes "1  Emveretarcon,"; mes "and "+.@btt[2]+" "+getitemname(.@btt[1])+"."; }
+	mes "1 Emveretarcon,";
+	mes "and "+getarg(1)+" "+getitemname(getarg(0))+".";
 	next;
 	mes "[Tony]";
 	mes "The maximum number you can trade is 500.";
 	mes "If you want to cancel, input 0.";
-	input .@btt[3];
 	next;
-	if(.@btt[3] == 0 && .@btt >= 501){
+	input .@input;
+	set @tony,.@input;
+	set @tony1,.@input;
+	set @tony2,.@input * getarg(1);
+	if (.@input < 1 || .@input > 500) {
 		mes "[Tony]";
-		mes "Invalid amount!";
+		mes "Invalid Amount!";
 		mes "Enter again~!";
 		close;
-	}else if(countitem(1010) < .@btt[3] || countitem(1011) < .@btt[3] || countitem(.@btt[1]) <  .@btt[3]*.@btt[2]){
+	} else if ((countitem(1010) >= @tony) && (countitem(1011) >= @tony1) && (countitem(getarg(0)) >= @tony2)) {
+		if (checkweight(getarg(2),.@input * 30) == 0) {
 			mes "[Tony]";
-			mes "Tsk tsk~";
-			mes "You do not have";
-			mes "enough items for the";
-			mes "items you want to trade.";
-			mes "Prepare again and come back.";
+			mes "I cannot give it to you because your inventory is full. Come back after your inventory has more space.";
 			close;
-		}else if(checkweight(.@btt[0],.@btt[3]*30) == 0){
+		} else {
 			mes "[Tony]";
-			mes "I cannot give it to you because your inventory is full. Come back after  your inventory has more space.";
+			mes "Oh~ Good!";
+			mes "Trade number checked!";
+			mes "I'll trade immediately.";
+			delitem 1010,@tony;
+			delitem 1011,@tony1;
+			delitem getarg(0),@tony2;
+			getitem getarg(2),.@input * 30;
 			close;
 		}
+	} else {
 		mes "[Tony]";
-		mes "Oh~ Good!";
-		mes "Trade number checked!";
-		mes "I'll trade immediately.";
-		delitem 1010,.@btt[3];
-		delitem 1011,.@btt[3];
-		delitem .@btt[1],.@btt[3]*.@btt[2];
-		getitem .@btt[0],.@btt[3]*30;
+		mes "Tsk Tsk~";
+		mes "You do not have";
+		mes "enough items for the";
+		mes "items you want to trade.";
+		mes "Prepare again and come back.";
 		close;
+	}
 }