Jump to content
  • 0

Item to specific item exchanger


Quesooo

Question


  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

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.

Link to comment
Share on other sites

20 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  625
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

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 .@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;
}
Edited by llchrisll
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

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 .@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 for this.

i got an error

 

image.png.e938bb22396300c642dcac0ef53c8ea0.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

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

to

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

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

8 minutes ago, Hijirikawa said:

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

to


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

 

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

image.png.26c856a082296609a00877b03f6e688c.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

Why do you have 0s at the end?

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

10 minutes ago, Hijirikawa said:

Why do you have 0s at the end?

0s? i cant see it ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

image.png.26c856a082296609a00877b03f6e688c.png

Double check it. Line 12.

Edited by Hijirikawa
  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

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;
}

 

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

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 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  90
  • Reputation:   34
  • Joined:  10/01/18
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  625
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  625
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

You're welcome :).

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