summaryrefslogblamecommitdiff
path: root/npc/merchants/ammo_dealer.txt
blob: c778542d0265e6c5f244ae9c801683cd89b00f38 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                           
                          
                                                           
              
                                                           
        
                                                           
                                                              
                                                           
                  
                                                           
                             
                              
                                                           
                                                            

                                      









                                                         
























                                                                                                                           
                     
                                                     

                     
                                                         
                         
                                                                                                                                                                      
             
                     

                                                       
                       
             
                                          
                             
                                      
                                    
                      
                                                                                                                       
                                     




                                                           
                              
                                                                 
                                     
                                                                                                                                      

                              
                             






                                                   
                      
 
//===== Athena Script =====================================
//= Bullet Merchant, Tony.
//===== By ================================================
//= Legionaire
//===== Version ===========================================
//= 1.01
//===== Compatible With ===================================
//= eAthena SVN with jAthena scripting engine and . variables.
//===== Description =======================================
//= Bullet trader.
//===== Comments ==========================================
//= Converted from Aegis 10.4
//= 1.01 Removed .GATs [Lupus]
//=========================================================
que_ng,187,156,3	script	Bullet Dealer Tony	86,{

	if(BaseJob != Job_Gunslinger){
		mes "[Tony]";
		mes "I'm a trader who supplies";
		mes "Gunslingers with trade items.";
		mes "I am called Bullet-tooth Tony.";
		next;
		mes "[Tony]";
		mes "I don't think you are a Gunslinger";
		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;
		}
	mes "[Tony]";
	mes "Input the amount you wish to purchase.";
	next;
	mes "[Tony]";
	mes "We trade 30 "+getitemname(.@btt[0])+"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])+"."; }
	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){
		mes "[Tony]";
		mes "Invalid amount!";
		mes "Enter again~!";
		close;
	}else if(countitem(1010) < .@btt[3] || countitem(1011) < .@btt[3] || countitem(.@btt[1]) <  .@btt[3]*.@btt[2]){
			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.";
			close;
		}else if(checkweight(.@btt[0],.@btt[3]*30) == 0){
			mes "[Tony]";
			mes "I cannot give it to you because your inventory is full. Come back after  your inventory has more space.";
			close;
		}
		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;
		close;
}