• 0
Quesooo

Item to specific item exchanger

Question

Hi i would like to request a npc that can exchange an item to another item with specific amount, for example 
- 250 GC = Old Blue Box 
- 500 GC = Box of 10 Oridecon or Box of 10 Elunium 
- 750 GC= Old Purple Box and 2,500 GC = Old Card Album

hopefully someone can make this

thank you in advance.

Share this post


Link to post
Share on other sites

20 answers to this question

Recommended Posts

  • 0

You can just use Euphy's Quest shop and add those items with required item as GC.

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, Hijirikawa said:

You can just use Euphy's Quest shop and add those items with required item as GC.

thank you for that but i don't need a quest npc just a normal npc that can exchange those items with GC

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)
1 hour ago, Quesooo said:

thank you for that but i don't need a quest npc just a normal npc that can exchange those items with GC

 

5 Minutes scripting....

Untested tho:

prontera,150,180,4	script	GC Exchanger	100,{

mes .n$;
mes "I can exchange your "+getitemname(.exc_id)+"s for other items.";
mes "Please select from the list what you want.";
mes "( ) = Price per Exchange";
next;
for ( set [email protected],0; [email protected] < getarraysize(.item); set [email protected],[email protected] + 1)
	set [email protected]_menu$,[email protected]_menu$ + "- "+getitemname(.item[[email protected]])+" ("+.cost[[email protected]]+")" + ( (.item[[email protected]+1] != 0)?":":"");
set [email protected],select([email protected]_menu$) - 1;
mes .n$;
mes "You have chosen "+getitemname(.item[[email protected]])+" for the price of "+.cost[[email protected]]+" "+getitemname(.exc_id)+"s".";
mes "Is that correct?";
if(select("- Yes:- No") - 1) close;
next;
mes .n$;
if(countitem(.exc_id) < .cost[[email protected]]) {
	mes "I'm sorry, but you don't have enough "+getitemname(.exc_id)+", please come back when you have enough.";
	close;
}
getitem .item[[email protected]],1;
delitem .exc_id,.cost[[email protected]];
mes "Exchange complete.";
close;

OnInit:
set .n$,"["+strnpcinfo(0)+"]";
//= Items: Old Blue Box, Oridecon Box (10pcs), Elunium Box (10pcs), Old Purple Box, Old Card Album
setarray .item[0],603,13890,13889,618,616;
setarray .cost[0],250,500,500,750,2500;
set .exc_id,7517; // Gold Coin
end;
}
Edited by llchrisll
  • Love 1

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)
-	itemshop	-1,7517,603:250,13890:500,13889:500,618:750,616:2500

Utilizes the itemshop and does the same thing that you want it to do, exchange gold coins for certain items.

Edited by Hijirikawa

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, llchrisll said:

 

5 Minutes scripting....

Untested tho:

prontera,150,180,4	script	GC Exchanger	100,{

mes .n$;
mes "I can exchange your "+getitemname(.exc_id)+"s for other items.";
mes "Please select from the list what you want.";
mes "( ) = Price per Exchange";
next;
for ( set [email protected],0; [email protected] < getarraysize(.item); set [email protected],[email protected] + 1)
	set [email protected]_menu$,[email protected]_menu$ + "- "+getitemname(.item[[email protected]])+" ("+.cost[[email protected]]+")" + ( (.item[[email protected]+1] != 0)?":":"");
set [email protected],select([email protected]_menu$) - 1;
mes .n$;
mes "You have chosen "+getitemname(.item[[email protected]])+" for the price of "+.cost[[email protected]]+" "+getitemname(.exc_id)+"s".";
mes "Is that correct?";
if(select("- Yes:- No") - 1) close;
next;
mes .n$;
if(countitem(.exc_id) < .cost[[email protected]]) {
	mes "I'm sorry, but you don't have enough "+getitemname(.exc_id)+", please come back when you have enough.";
	close;
}
getitem .item[[email protected]],1;
delitem .exc_id,.cost[[email protected]];
mes "Exchange complete.";
close;

OnInit:
set .n$,"["+strnpcinfo(0)+"]";
//= Items: Old Blue Box, Oridecon Box (10pcs), Elunium Box (10pcs), Old Purple Box, Old Card Album
setarray .item[0],603,13890,13889,618,616;
setarray .cost[0],250,500,500,750,2500;
set .exc_id,7517; // Gold Coin
end;
}

Thank you  so much for this.

i got an error

 

image.png.e938bb22396300c642dcac0ef53c8ea0.png

Share this post


Link to post
Share on other sites
  • 0
8 minutes ago, Hijirikawa said:
mes "You have chosen "+getitemname(.item[[email protected]])+" for the price of "+.cost[[email protected]]+" "+getitemname(.exc_id)+"s".";

to

mes "You have chosen "+getitemname(.item[[email protected]])+" for the price of "+.cost[[email protected]]+" "+getitemname(.exc_id)+"s.";

 

Thank you for this. the npc is now showing but i got an error again

image.png.26c856a082296609a00877b03f6e688c.png

Share this post


Link to post
Share on other sites
  • 0
10 minutes ago, Hijirikawa said:

Why do you have 0s at the end?

0s? i cant see it 😞

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

image.png.26c856a082296609a00877b03f6e688c.png

Double check it. Line 12.

Edited by Hijirikawa
  • MVP 1

Share this post


Link to post
Share on other sites
  • 0
15 minutes ago, Hijirikawa said:

image.png.26c856a082296609a00877b03f6e688c.png

Double check it. Line 12.

Weird, but on notepad++ don't have that 0s on line 12.
image.thumb.png.0da4ce97c0615407ea3078eb3f7bd0f9.pngbut on the console that appears

Share this post


Link to post
Share on other sites
  • 0
prontera,150,180,4	script	GC Exchanger	100,{

mes .n$;
mes "I can exchange your "+getitemname(.exc_id)+"s for other items.";
mes "Please select from the list what you want.";
mes "( ) = Price per Exchange";
next;
for ( set [email protected],0; [email protected] < getarraysize(.item); set [email protected],[email protected] + 1)
	set [email protected]_menu$,[email protected]_menu$ + "- "+getitemname(.item[[email protected]])+" ("+.cost[[email protected]]+")" + ( (.item[[email protected]+1] != 0)?":":"");
set [email protected],select([email protected]_menu$) - 1;
mes .n$;
mes "You have chosen "+getitemname(.item[[email protected]])+" for the price of "+.cost[[email protected]]+" "+getitemname(.exc_id)+"s.";
mes "Is that correct?";
if(select("- Yes:- No") - 1) close;
next;
mes .n$;
if(countitem(.exc_id) < .cost[[email protected]]) {
	mes "I'm sorry, but you don't have enough "+getitemname(.exc_id)+", please come back when you have enough.";
	close;
}
getitem .item[[email protected]],1;
delitem .exc_id,.cost[[email protected]];
mes "Exchange complete.";
close;

OnInit:
set .n$,"["+strnpcinfo(0)+"]";
//= Items: Old Blue Box, Oridecon Box (10pcs), Elunium Box (10pcs), Old Purple Box, Old Card Album
setarray .item[0],603,13890,13889,618,616;
setarray .cost[0],250,500,500,750,2500;
set .exc_id,7517; // Gold Coin
end;
}

 

  • MVP 1

Share this post


Link to post
Share on other sites
  • 0
18 minutes ago, Hijirikawa said:

image.png.26c856a082296609a00877b03f6e688c.png

Double check it. Line 12.

i think i fixed it, the error change.image.png.1967f25728b0839d7ec85bd2604cc842.png

Share this post


Link to post
Share on other sites
  • 0
4 minutes ago, Hijirikawa said:
prontera,150,180,4	script	GC Exchanger	100,{

mes .n$;
mes "I can exchange your "+getitemname(.exc_id)+"s for other items.";
mes "Please select from the list what you want.";
mes "( ) = Price per Exchange";
next;
for ( set .@m,0; .@m < getarraysize(.item); set .@m,.@m + 1)
	set .@g_menu$,.@g_menu$ + "- "+getitemname(.item[.@m])+" ("+.cost[.@m]+")" + ( (.item[.@m+1] != 0)?":":"");
set .@g,select(.@g_menu$) - 1;
mes .n$;
mes "You have chosen "+getitemname(.item[.@g])+" for the price of "+.cost[.@m]+" "+getitemname(.exc_id)+"s.";
mes "Is that correct?";
if(select("- Yes:- No") - 1) close;
next;
mes .n$;
if(countitem(.exc_id) < .cost[.@g]) {
	mes "I'm sorry, but you don't have enough "+getitemname(.exc_id)+", please come back when you have enough.";
	close;
}
getitem .item[.@g],1;
delitem .exc_id,.cost[.@g];
mes "Exchange complete.";
close;

OnInit:
set .n$,"["+strnpcinfo(0)+"]";
//= Items: Old Blue Box, Oridecon Box (10pcs), Elunium Box (10pcs), Old Purple Box, Old Card Album
setarray .item[0],603,13890,13889,618,616;
setarray .cost[0],250,500,500,750,2500;
set .exc_id,7517; // Gold Coin
end;
}

 

Thank you so much its working like a charm awesome 

Share this post


Link to post
Share on other sites
  • 0

last thing when i talk to npc and exchange the GC to 250 old blue box. the npc didn't show how many GC you have on the first menu and how many GC will be exchange for those OBB

image.png.3a0619ee3dad2952c49a959b226f11a0.png

i have a total of 1000 GC on my bag

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)
6 minutes ago, Quesooo said:

last thing when i talk to npc and exchange the GC to 250 old blue box. the npc didn't show how many GC you have on the first menu and how many GC will be exchange for those OBB

image.png.3a0619ee3dad2952c49a959b226f11a0.png

i have a total of 1000 GC on my bag

Try this:

prontera,150,180,4	script	Exchanger	4_F_BRZ_WOMAN,{

	mes .n$;
	mes "I can exchange your "+getitemname(.exc_id)+"s for other items.";
	mes "Please select from the list what you want.";
	mes " ";
	mes "Currency: "+ getitemname(.exc_id);
	next;
	for( .@m = 0; .@m < getarraysize(.item); .@m ++ )
		.@g_menu$ = .@g_menu$ + "- "+ getitemname(.item[.@m]) +" ("+ .cost[.@m] +") "+ ( (.item[.@m+1] != 0)?":":"");
		.@g = select(.@g_menu$) - 1;
	mes .n$;
	mes "You have chosen "+ getitemname(.item[.@g]) +" for the price of "+ .cost[.@g] +" "+ getitemname(.exc_id) +"s";
	mes "Is that correct?";
	next;
	if( select("- Yes:- No" ) - 1) close;
		mes .n$;
	if( countitem(.exc_id) < .cost[.@g] ) {
		mes "I'm sorry, but you don't have enough "+getitemname(.exc_id)+", please come back when you have enough.";
		close;
	}
	getitem .item[.@g],1;
	delitem .exc_id,.cost[.@g];
	mes "Exchange complete.";
	close;

OnInit:
	.n$ = "[ "+ strnpcinfo(0) +" ]";
	.exc_id = 501;
	setarray .item[0],603,13890,13889,618,616;
	setarray .cost[0],1,1,1,1,1;
	end;
}

 

Edited by Royr
  • MVP 1

Share this post


Link to post
Share on other sites
  • 0
11 minutes ago, Royr said:

Try this:

prontera,150,180,4	script	Exchanger	4_F_BRZ_WOMAN,{

	mes .n$;
	mes "I can exchange your "+getitemname(.exc_id)+"s for other items.";
	mes "Please select from the list what you want.";
	mes " ";
	mes "Currency: "+ getitemname(.exc_id);
	next;
	for( .@m = 0; .@m < getarraysize(.item); .@m ++ )
		.@g_menu$ = .@g_menu$ + "- "+ getitemname(.item[.@m]) +" ("+ .cost[.@m] +") "+ ( (.item[.@m+1] != 0)?":":"");
		.@g = select(.@g_menu$) - 1;
	mes .n$;
	mes "You have chosen "+ getitemname(.item[.@g]) +" for the price of "+ .cost[.@g] +" "+ getitemname(.exc_id) +"s";
	mes "Is that correct?";
	next;
	if( select("- Yes:- No" ) - 1) close;
		mes .n$;
	if( countitem(.exc_id) < .cost[.@g] ) {
		mes "I'm sorry, but you don't have enough "+getitemname(.exc_id)+", please come back when you have enough.";
		close;
	}
	getitem .item[.@g],1;
	delitem .exc_id,.cost[.@g];
	mes "Exchange complete.";
	close;

OnInit:
	.n$ = "[ "+ strnpcinfo(0) +" ]";
	.exc_id = 501;
	setarray .item[0],603,13890,13889,618,616;
	setarray .cost[0],1,1,1,1,1;
	end;
}

 

awesome thank you its working perfectly

Share this post


Link to post
Share on other sites
  • 0

What small typos can cause issues xD. Sorry about that. Was tired also when I quickly wrote it.
Thanks guys for fixing it.
Regards,
Chris

  • MVP 1

Share this post


Link to post
Share on other sites
  • 0
21 minutes ago, llchrisll said:

What small typos can cause issues xD. Sorry about that. Was tired also when I quickly wrote it.
Thanks guys for fixing it.
Regards,
Chris

thank you so much too

Share this post


Link to post
Share on other sites
  • 0

You're welcome :).

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...