Jump to content
  • 0
Sign in to follow this  
ZelosAvalon

Quest can only be done once per account!

Question

the NPC is working, however I like to do, the player can do this quest only once per account, you will choose the weapon you want, but you can only do one per account, after this when talking to the NPC again it displays a message saying that he already did this quest!

aldebaran,210,196,6	script	Icarus Doppelganger	739,{	mes "[Icarus Doppelganger]";	mes "Hello ^3355FF"+strcharinfo(0)+"^000000";	mes "Are you an owner of a pair of Icarus Wings?";	next;	if((countitem(8012) >= 1) == 2){		mes "[Icarus Doppelganger]";		mes "Which weapon would you like to make?";		mes "Each of them has the potential to give you powers that you can only dream of.";		next;		switch(select("Icarus Bow:Icarus Sword:Icarus Staff"))		{		case 1:			mes "[Icarus Doppelganger]";			mes "Here is what you need, take note of it.";			next;			mes "[Icarus Doppelganger]";					mes "1x "+getitemname(8001);			mes "1x "+getitemname(8002);			mes "1x " + getitemname(1711) + "[""3""]";			mes "20000000 Zenys";			next;			mes "[Icarus Doppelganger]";			mes "So, do you want me to make it now?";			next;			if( select("Sure,I got all the items!:No, I don't have all the items yet...") == 2 )			{				mes "[Icarus Doppelganger]";				mes "Come back another time.";				close;			}			if(countitem(8001) >= 1 && countitem(8002) >= 1 && countitem(1711) >= 1 && Zeny >= 10000000)			{				delitem 8001,1;				delitem 8002,1;				delitem 1711,1;				set Zeny,Zeny-10000000;				mes "[Icarus Doppelganger]";				getitem 8040,1;				mes "Imbue this Bow with Icaru's power!";				next;				mes "[Icarus Doppelganger]";				mes "Enjoy your prize.";				close;			}			break;		case 2:			mes "[Icarus Doppelganger]";			mes "Here is what you need, take note of it.";			next;			mes "[Icarus Doppelganger]";					mes "1x "+getitemname(8001);			mes "1x "+getitemname(8002);			mes "1x "+getitemname(1125);			mes "20000000 Zenys";			next;			mes "[Icarus Doppelganger]";			mes "So, do you want me to make it now?";			next;			if( select("Sure,I got all the items!:No, I don't have all the items yet...") == 2 )			{				mes "[Icarus Doppelganger]";				mes "Come back another time.";				close;			}			if(countitem(8001) >= 1 && countitem(8002) >= 1 && countitem(1125) >= 1 && Zeny >= 10000000)			{				delitem 8001,1;				delitem 8002,1;				delitem 1125,1;				set Zeny,Zeny-10000000;				mes "[Icarus Doppelganger]";				getitem 8041,1;				mes "Imbue this Sword with Icaru's power!";				next;				mes "[Icarus Doppelganger]";				mes "Enjoy your prize.";				close;			}			break;		case 3:			mes "[Icarus Doppelganger]";			mes "Here is what you need, take note of it.";			next;			mes "[Icarus Doppelganger]";					mes "1x "+getitemname(8001);			mes "1x "+getitemname(8002);			mes "1x "+getitemname(1608);			mes "20000000 Zenys";			next;			mes "[Icarus Doppelganger]";			mes "So, do you want me to make it now?";			next;			if( select("Sure,I got all the items!:No, I don't have all the items yet...") == 2 )			{				mes "[Icarus Doppelganger]";				mes "Come back another time.";				close;			}			if(countitem(8001) >= 1 && countitem(8002) >= 1 && countitem(1608) >= 1 && Zeny >= 10000000)			{				delitem 8001,1;				delitem 8002,1;				delitem 1608,1;				set Zeny,Zeny-10000000;				mes "[Icarus Doppelganger]";				getitem 8042,1;				mes "Imbue this Staff with Icaru's power!";				next;				mes "[Icarus Doppelganger]";				mes "Enjoy your prize.";				close;			}			break;		}	mes "[Icarus Doppelganger]";	mes "Mm, I'm sorry. It seems that some items are missing";	mes "Please, feel free to come again when you have everything.";	close;	}	mes "[Icarus Doppelganger]";	mes "Mm, I'm sorry. you don't have a pair of Icarus wings in yout inventory";	close;}

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

You need to work with "if - set - else" example:

 

 

menu "This is the case 1",case_1;

 

case_1:

if(#any_variable == 1){  // the any_variable u must be add a Variable (any variable what u want)
mes "Srry You already did the quest";
close;
}else{
 
mes "If u didnt did the quest enter into this";

mes "Then you gave a set for the player who the if#XXXX is going to read";

next;

mes "Now im going to set";

set #any_variable,1;

close;

 

That's all. If have Differents Quest in One npc, do the same... after any case 1: or what u use (switch or menu) set the variable... that's all. if the guy already did one quest, and he select the same option again is going to say: Srry you already did the quest

 

PD: but obviously, if the person talk with the NPC u dont need to Set it... set it after he deliver the items

Edited by exchisu

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

  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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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