Jump to content
  • 0

Item Trader


ScarrFace

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   0
  • Joined:  10/23/19
  • Last Seen:  

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
Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.06
  • Content Count:  241
  • Reputation:   11
  • Joined:  08/12/20
  • Last Seen:  

On 11/10/2019 at 9:16 PM, Mabuhay said:

item_trader.txt 1.19 kB · 8 downloads

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

item_trader.txt 1.19 kB · 41 downloads

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

Enjoy.

 

 

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

can we add zeny as a requirement?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.15
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

On 11/10/2019 at 9:16 PM, Mabuhay said:

item_trader.txt 1.19 kB · 34 downloads

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

item_trader.txt 1.19 kB · 93 downloads

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

Enjoy.

 

 

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

is it possible to add zeny requirements in this script?

Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   0
  • Joined:  10/23/19
  • Last Seen:  

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
Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

5 minutes ago, ScarrFace said:

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

my bad.. here is the update :
 

find 
.@s = select(.@menu$)-1;
change to 
.@s = select(.@menu$)-1*5;

or redownload my previous post.

Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   0
  • Joined:  10/23/19
  • Last Seen:  

37 minutes ago, Mabuhay said:

my bad.. here is the update :
 


find 
.@s = select(.@menu$)-1;
change to 
.@s = select(.@menu$)-1*5;

or redownload my previous post.

got an error

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

after i click the menu nothing happen and got stuck.

Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

2 hours ago, ScarrFace said:

got an error

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

after i click the menu nothing happen and got stuck.

err here is how..

find

.@s = select(.@menu$)-1*5;

replace

	.@sel = select(.@menu$)-1;
	.@s = .@sel * 5;

 

Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   0
  • Joined:  10/23/19
  • Last Seen:  

5 hours ago, Mabuhay said:

err here is how..

find


.@s = select(.@menu$)-1*5;

replace


	.@sel = select(.@menu$)-1;
	.@s = .@sel * 5;

 

thank you so much.

Link to comment
Share on other sites

  • -2

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

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 .@poring, 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(.@poring) < 1){ 
	mes .ns$; 
	mes "You don't have "+getitemname(.@poring)+" for exchange."; 
	close;
	}
	
	delitem .@poring,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
Link to comment
Share on other sites

  • -2

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   0
  • Joined:  10/23/19
  • Last Seen:  

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 .@poring, 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(.@poring) < 1){ 
	mes .ns$; 
	mes "You don't have "+getitemname(.@poring)+" for exchange."; 
	close;
	}
	
	delitem .@poring,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.

Link to comment
Share on other sites

  • -2

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

12 minutes ago, ScarrFace said:

success rate not working.

Whats the problem?

Link to comment
Share on other sites

  • -2

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   0
  • Joined:  10/23/19
  • Last Seen:  

On 11/10/2019 at 12:31 PM, Gladius said:

Whats the problem?

Always 100% success in trading

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

Link to comment
Share on other sites

  • -2

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

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 .@poring, 4001;
	set .@chance, 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(.@poring) < 1){ 
	mes .ns$; 
	mes "You don't have "+getitemname(.@poring)+" for exchange."; 
	close;
	}
	
	delitem .@poring,1;	
	
	if(.@chance >= 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
Link to comment
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.

×
×
  • Create New...