Jump to content
  • 0
kevinyrchua

[SOLVED] H> costume exchanger NPC

Question

Hi,

I'm a newbie in scripting so please bear with me,
basically the concept is to exchange an ordinary item to a costume item.
Costing the player the ordinary item + 1,000,000 zeny
also with a chance of 50% to succeed.
Here's what I've come up with, but it doesn't go through, anyone please fix it?


Or maybe if you have a working costume exchanger npc laying around, please link it to me 
 

prontera,106,93,6	script	Costume Exchanger	49,{
mes "[ Costume Exchanger ]";
mes "Hello there!";
mes "I can help you exchange your item into a costume by chance";
mes "Do you want to continue?";
next;
switch(select("Costume Exchange:Maybe next time.")) {
case 1:
if((countitem(5389)>=1) && (Zeny < 1000000)) {
	progressbar "ffff00",7;
	delitem 5389,1;
	set Zeny, Zeny-1000000;
	mes "[ Costume Exchanger ]";
	if(rand(100)<10) {
	mes "Here you are!";
	getitem 20146,1;
	close;
	}
	}

case 2:
mes "[ Costume Exchanger ]";
mes "Come and see me again!";
close;
}
}

 

Edited by kevinyrchua
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
42 minutes ago, kevinyrchua said:

Hi,

I'm a newbie in scripting so please bear with me,
basically the concept is to exchange an ordinary item to a costume item.
Costing the player the ordinary item + 1,000,000 zeny
also with a chance of 50% to succeed.
Here's what I've come up with, but it doesn't go through, anyone please fix it?


Or maybe if you have a working costume exchanger npc laying around, please link it to me 
 

prontera,106,93,6	script	Costume Exchanger	49,{
mes "[ Costume Exchanger ]";
mes "Hello there!";
mes "I can help you exchange your item into a costume by chance";
mes "Do you want to continue?";
next;
switch(select("Costume Exchange:Maybe next time.")) {
case 1:
if((countitem(5389)>=1) && (Zeny < 1000000)) {
	progressbar "ffff00",7;
	delitem 5389,1;
	set Zeny, Zeny-1000000;
	mes "[ Costume Exchanger ]";
	if(rand(100)<10) {
	mes "Here you are!";
	getitem 20146,1;
	close;
	}
	}

case 2:
mes "[ Costume Exchanger ]";
mes "Come and see me again!";
close;
}
}

 

Hi @kevinyrchua

prontera,106,93,6	script	Costume Exchanger	49,{
mes "[ Costume Exchanger ]";
mes "Hello there!";
mes "I can help you exchange your item into a costume by chance";
mes "Do you want to continue?";
next;
switch(select("Costume Exchange:Maybe next time.")) {
case 1:
if((countitem(5389)>=1) && (Zeny > 999999)) {
	progressbar "ffff00",7;
	delitem 5389,1;
	set Zeny, Zeny-1000000;
	mes "[ Costume Exchanger ]";
	if(rand(100) < 50) {
	mes "Here you are!";
	getitem 20146,1;
	close;
	}
	}

case 2:
mes "[ Costume Exchanger ]";
mes "Come and see me again!";
close;
}
}

Have a try and please let me know if it still not working.

Link to comment
Share on other sites

  • 0
22 minutes ago, HaARiZz said:

Hi @kevinyrchua

prontera,106,93,6	script	Costume Exchanger	49,{
mes "[ Costume Exchanger ]";
mes "Hello there!";
mes "I can help you exchange your item into a costume by chance";
mes "Do you want to continue?";
next;
switch(select("Costume Exchange:Maybe next time.")) {
case 1:
if((countitem(5389)>=1) && (Zeny > 999999)) {
	progressbar "ffff00",7;
	delitem 5389,1;
	set Zeny, Zeny-1000000;
	mes "[ Costume Exchanger ]";
	if(rand(100) < 50) {
	mes "Here you are!";
	getitem 20146,1;
	close;
	}
	}

case 2:
mes "[ Costume Exchanger ]";
mes "Come and see me again!";
close;
}
}

Have a try and please let me know if it still not working.

Awesome worked! just gotta tidy up the text, thank you so much!

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.