Jump to content
  • 0

[SOLVED] H> costume exchanger NPC


kevinyrchua

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   0
  • Joined:  07/14/17
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  76
  • Reputation:   12
  • Joined:  01/13/12
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   0
  • Joined:  07/14/17
  • Last Seen:  

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