Jump to content
  • 0
Sign in to follow this  
karazu

Quest NPC with Item check.

Question

How to make a quest NPC that will only Talk to you if u have this certain ITEM.


For Example:

If you dont have TCG

He will only say Welcome.


but if u have

HE will tell you about the quest.



 

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

try this :D Quest Generator

 

and I generate a sample script

/ / =============================================/ / == Cronus Tools :: Generator's Quest =======/ / == Version: ==================================/ / == 1.0/ / == Author: ===================================/ / == RoM/ / =============================================prontera, 153,160,4 script Quester 4_M_KHKYEL, {	mes "[Quester]";	mes "Hello" + strcharinfo (0) + "";	mes "I have some interesting items here, want to take a look?";	next;	if (select ("Sure: Maybe later ...") == 2)	{		mes "[Quester]";		mes "Alright, I'll be here if you change your mind.";		close;	}	mes "[Quester]";	mes "Well, these are the items that I have ...";	mes "About which of them will want to know more?";	next;	switch (select ("Weapon: None"))	{	case 1:		mes "[Weapon]";		mes "reward";		mes "1x" + getitemname (1201);		mes "";		mes "Required item";		mes "1x" + getitemname (512);		mes "1x" + getitemname (582);		mes "1x" + getitemname (514);		next;		mes "[Quester]";		mes "Would you do this quest?";		next;		if (select ("Yes: Not now ...") == 2)		{			mes "[Quester]";			mes "Okay ... So long!";			close;		}		if (countitem (512)> = 1 && countitem (582)> = 1 && countitem (514)> = 1)		{			delitem 512.1;			delitem 582.1;			delitem 514.1;			getitem 1201,1;			mes "[Quester]";			mes "Here's Congratulations!";			close;		}		break;	case 2:		mes "[Quester]";		mes "Alright, I'll be here if you change your mind.";		close;	}	mes "[Quester]";	mes "I'm sorry, but you do not have all items needed for this quest.";	mes "Come back when you have all the items";	close;}

Share this post


Link to post
Share on other sites
  • 0

you can do something like :

 

if ( countitem(7227) > 0 ) // if he have TCG{NPC Code here.}else{mes "Hi";}

Share this post


Link to post
Share on other sites
  • 0
prontera,150,150,0	script	Sample	123,{	// requirements	setarray .id[0],2729,2375;	.size = getarraysize(.id);	.prize = 7227;		mes "Hi, you have requirements?";	next;	if (select("Yes:No")-1) close;	for ( .@i = 0; .@i < .size; .@i++ ) {		if (!countitem(.id[.@i])) {			mes "I need the following : ";			for ( .@i = 0; .@i < .size; .@i++ )				mes "1x " +getitemname(.id[.@i]);			close;		}	}	for ( .@i = 0; .@i < .size; .@i++ )		delitem .id[.@i], 1;	getitem .prize, 1;	mes "Nice!";	close;}

Share this post


Link to post
Share on other sites
  • 0

 

prontera,150,150,0	script	Sample	123,{	// requirements	setarray .id[0],2729,2375;	.size = getarraysize(.id);	.prize = 7227;		mes "Hi, you have requirements?";	next;	if (select("Yes:No")-1) close;	for ( .@i = 0; .@i < .size; .@i++ ) {		if (!countitem(.id[.@i])) {			mes "I need the following : ";			for ( .@i = 0; .@i < .size; .@i++ )				mes "1x " +getitemname(.id[.@i]);			close;		}	}	for ( .@i = 0; .@i < .size; .@i++ )		delitem .id[.@i], 1;	getitem .prize, 1;	mes "Nice!";	close;}

Where can i PUT how many items is needed?

 

can you add this up please?

 

 

 

How to make a quest NPC that will only Talk to you if u have this certain ITEM.

 

For Example:

If you dont have TCG

 

He will only say Good day

Share this post


Link to post
Share on other sites
  • 0
if (!countitem(7227))		mes "Good day!";else	mes "You have " +countitem(7227)+ " " +getitemname(7227);

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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