• 0
ScarrFace

Item Trader

Question

I'm looking for item trader/exchanger with success/failed rate and multiple item list

ex:

poring card 10 pcs trade to poporing card 1 pc with 50% success rate

poporing card 5 pcs trade to marin card 1 pc with 25% success rate

and so on.

Edited by ScarrFace

Share this post


Link to post
Share on other sites

12 answers to this question

Recommended Posts

  • 0

item_trader.txt

NOTE : Fixed some issues on 2nd item options being null

item_trader.txt

NOTE : Re-Fixed some issues on 2nd item options being null

22 hours ago, ScarrFace said:

I'm looking for item trader/exchanger with success/failed rate and multiple item list

ex:

poring card 10 pcs trade to poporing card 1 pc with 50% success rate

poporing card 5 pcs trade to marin card 1 pc with 25% success rate

and so on.

Enjoy.

 

 

I will be posting this soon. I really hope mods are active. I still have 2 pending free scripts to be approved.

Edited by Mabuhay

Share this post


Link to post
Share on other sites
  • -1
2 hours ago, Mabuhay said:

Enjoy.

item_trader.txt 1.19 kB · 2 downloads

 

I will be posting this soon. I really hope mods are active. I still have 2 pending free scripts to be approved.

hello thank you this is what im looking for. but there's a problem in the script

its null item when choosing the 2nd option and the 3rd one.

Edited by ScarrFace

Share this post


Link to post
Share on other sites
  • -1
37 minutes ago, Mabuhay said:

my bad.. here is the update :
 

find 
[email protected] = select([email protected]$)-1;
change to 
[email protected] = select([email protected]$)-1*5;

or redownload my previous post.

got an error

[Warning]: script:getelementofarray: index out of range (-3)
[Debug]: Data: variable name='[email protected]' index=0

after i click the menu nothing happen and got stuck.

Share this post


Link to post
Share on other sites
  • -1
2 hours ago, ScarrFace said:

got an error

[Warning]: script:getelementofarray: index out of range (-3)
[Debug]: Data: variable name='[email protected]' index=0

after i click the menu nothing happen and got stuck.

err here is how..

find

[email protected] = select([email protected]$)-1*5;

replace

	[email protected] = select([email protected]$)-1;
	[email protected] = [email protected] * 5;

 

Share this post


Link to post
Share on other sites
  • -2

I made a simple and practical version.
If you search there are better ways to do this.

 

//==================================================
//        _____ _           _ _                   
//       / ____| |         | (_)                  
//      | |  __| | __ _  __| |_ _   _ ___         
//      | | |_ | |/ _` |/ _` | | | | / __|        
//      | |__| | | (_| | (_| | | |_| \__ \        
//       \_____|_|\__,_|\__,_|_|\__,_|___/        
//                                                                                                
//===== rAthena Script ===============================
//= Exchange Poring Card for Faber Card
//===== Créditos: ====================================         
//= Gladius 
//===== NPC Version: =================================
//== 1.0
//====================================================


prontera,155,178,5	script	Item Changer	61,{

	set .ns$,"^00B2EE[Item Changer]^000000";		// Nome do NPC
	set [email protected], 4001;					// Poring Card
	
	mes .ns$;
	mes "Do you want to exchange a poring card for a faber card? Has 25% success.";
	switch(select("^3CB371[»]^000000 Exchange Poring Card","^ff0000[»]^000000 No")){
	
	case 1:
	next;
	if(countitem([email protected]) < 1){ 
	mes .ns$; 
	mes "You don't have "+getitemname([email protected])+" for exchange."; 
	close;
	}
	
	delitem [email protected],1;	
	
	switch( rand(1,4) ){
	
	case 1:
		getitem 4002,1;
		mes .ns$;
		mes "The exchange conversion was a success!";
		close;	
	
	case 2:
		getitem 4002,1;
		mes .ns$;
		mes "The exchange conversion was a success!";
		close;	
	
	case 3:
		getitem 4002,1;
		mes .ns$;
		mes "The exchange conversion was a success!";
		close;
	
	case 4:
		mes .ns$;
		mes "I'm sorry but I failed to exchange conversion.";
		close;
		
		}
	}
}

 

I hope it helped you.

Edited by Gladius

Share this post


Link to post
Share on other sites
  • -2
4 hours ago, Gladius said:

I made a simple and practical version.
If you search there are better ways to do this.

 

//==================================================
//        _____ _           _ _                   
//       / ____| |         | (_)                  
//      | |  __| | __ _  __| |_ _   _ ___         
//      | | |_ | |/ _` |/ _` | | | | / __|        
//      | |__| | | (_| | (_| | | |_| \__ \        
//       \_____|_|\__,_|\__,_|_|\__,_|___/        
//                                                                                                
//===== rAthena Script ===============================
//= Exchange Poring Card for Faber Card
//===== Créditos: ====================================         
//= Gladius 
//===== NPC Version: =================================
//== 1.0
//====================================================


prontera,155,178,5	script	Item Changer	61,{

	set .ns$,"^00B2EE[Item Changer]^000000";		// Nome do NPC
	set [email protected], 4001;					// Poring Card
	
	mes .ns$;
	mes "Do you want to exchange a poring card for a faber card? Has 25% success.";
	switch(select("^3CB371[»]^000000 Exchange Poring Card","^ff0000[»]^000000 No")){
	
	case 1:
	next;
	if(countitem([email protected]) < 1){ 
	mes .ns$; 
	mes "You don't have "+getitemname([email protected])+" for exchange."; 
	close;
	}
	
	delitem [email protected],1;	
	
	switch( rand(1,4) ){
	
	case 1:
		getitem 4002,1;
		mes .ns$;
		mes "The exchange conversion was a success!";
		close;	
	
	case 2:
		getitem 4002,1;
		mes .ns$;
		mes "The exchange conversion was a success!";
		close;	
	
	case 3:
		getitem 4002,1;
		mes .ns$;
		mes "The exchange conversion was a success!";
		close;
	
	case 4:
		mes .ns$;
		mes "I'm sorry but I failed to exchange conversion.";
		close;
		
		}
	}
}

 

I hope it helped you.

success rate not working.

Share this post


Link to post
Share on other sites
  • -2
12 minutes ago, ScarrFace said:

success rate not working.

Whats the problem?

Share this post


Link to post
Share on other sites
  • -2
2 minutes ago, Gladius said:

Whats the problem?

Always 100% success in trading

Share this post


Link to post
Share on other sites
  • -2

Also theres no rate config in the script. You just declare rand function for case 

Share this post


Link to post
Share on other sites
  • -2

Fix 🙂

 

//======================================
//        _____ _           _ _                   
//       / ____| |         | (_)                  
//      | |  __| | __ _  __| |_ _   _ ___         
//      | | |_ | |/ _` |/ _` | | | | / __|        
//      | |__| | | (_| | (_| | | |_| \__ \        
//       \_____|_|\__,_|\__,_|_|\__,_|___/        
//                                                                     
//===== rAthena Script =====================
//= Exchange Poring Card for Faber Card
//===== Créditos: =========================
//= Gladius 
//===== NPC Version: =======================
//== 1.0
//======================================

prontera,155,178,5	script	Item Changer	61,{

	set .ns$,"^00B2EE[Item Changer]^000000";
	set [email protected], 4001;
	set [email protected], 30;
	
	mes .ns$;
	mes "Do you want to exchange a poring card for a faber card? Has 25% success.";
	switch(select("^3CB371[»]^000000 Exchange Poring Card","^ff0000[»]^000000 No")){
	
	case 1:
	next;
	if(countitem([email protected]) < 1){ 
	mes .ns$; 
	mes "You don't have "+getitemname([email protected])+" for exchange."; 
	close;
	}
	
	delitem [email protected],1;	
	
	if([email protected] >= rand(100)){
			getitem 4002,1;
			mes .ns$;
			mes "The exchange conversion was a success!";
			close;
			}

	mes .ns$;
	mes "I'm sorry but I failed to exchange conversion.";
	close;
		
		case 2:
			close;
	}
}

 

enjoy

Edited by Gladius

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...