Jump to content
  • 0
Thyr

Creating custom item triggers NPC

Question

How can I make a Item Box that triggers NPC.

 

Example:

Freebies Box, this box give 100 ygg,100 box of thunder, valkyrie set, and Stat Accessory [this thing will trigger npc to choice which type of accessory STR,AGI,VIT,INT,DEX,LUK.

 

(The box still distribute items and then triggers NPC talk, to choose what kind of accessory.)

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Well of course it didn't continue: you used close; instead of break;

Share this post


Link to post
Share on other sites
  • 0

For this simply make a new item and in the script<> section use getitem() for each item you want to give, then use doevent() to call your npc script and in this npc before any dialog use delitem() to remove the box, then put your dialog that asks which item you want

Share this post


Link to post
Share on other sites
  • 0

For this simply make a new item and in the script<> section use getitem() for each item you want to give, then use doevent() to call your npc script and in this npc before any dialog use delitem() to remove the box, then put your dialog that asks which item you want

Hello made function, 

 

How can i make this continue to the next package after the accessory given the npc didn't continues.


//== GPACK ======================================
function	script	M_Gpack	{
	switch(getarg(0)) {
	case 1:
	mes "[ Guild Package Manager ]";
	mes "So you are a guild member,";
	mes "please choose your accessory.";
		switch(select("Strength", "Agility", "Vitality", "Intelligence", "Dexterity", "Luk")) {
			case 1:
			getitembound 2771,2,2;
			close;
			case 2:
			getitembound 2770,2,2;
			close;
			case 3:
			getitembound 2766,2,2;
			close;
			case 4:
			getitembound 2768,2,2;
			close;
			case 5:
			getitembound 2769,2,2;
			close;
			case 6:
			getitembound 2767,2,2;
			close;
			}
	next;
	mes "[ Guild Package Manager ]";
	mes "Please choose  your set..";
		switch(select("STR", "AGI", "VIT", "INT", "DEX", "LUK")) {
			case 1: //STR
			getitembound 20002,1,2;
			getitembound 20002,1,2;
			close;
			case 2: //AGI
			getitembound 20011,1,2;
			getitembound 20020,1,2;
			close;
			case 3: //VIT
			getitembound 20001,1,2;
			getitembound 20016	,1,2;
			close;
			case 4: //INT
			getitembound 20004,1,2;
			getitembound 20019,1,2;
			close;
			case 5: //DEX
			getitembound 20003,1,2;
			getitembound 20018,1,2;
			close;
			case 6: //LUK
			getitembound 20013,1,2;
			getitembound 20017,1,2;
			close;
		}
	case 2: 
		mes "Nothing";
		close;
	}
	return;
}

Share this post


Link to post
Share on other sites
  • 0

Well of course it didn't continue: you used close; instead of break;

Sorry, used close; and end; didn't tried break; sorry again. Thank you.

Edited by CraftNCheez

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

×
×
  • Create New...

Important Information

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