Jump to content
  • 0

Teleport NPC


DevilSupremeRO

Question


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.02
  • Content Count:  55
  • Reputation:   0
  • Joined:  08/21/20
  • Last Seen:  

can anyone help me with teleport npc that requires like 3items with quantity of 500 or something? thanks in advance

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

Just add this before warp

On this code . It will required player to have 1 Apple in he/her inventory to

	mes "[Quest Person]";
	if (countitem(512) < 1) {  // 512 is the item ID for Apple, found in db/item_db.yml
		mes "This is what NPC do if he/she dont have apple";
		mes "Can you please bring me an apple?";
		close;
	}
	mes "Oh, you brought an Apple!";
	mes "I will warp you now since you have what i need.";
	warp "mapname",x,y;
	close;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.02
  • Content Count:  55
  • Reputation:   0
  • Joined:  08/21/20
  • Last Seen:  

On 12/8/2020 at 2:09 AM, Poring King said:

Just add this before warp

On this code . It will required player to have 1 Apple in he/her inventory to


	mes "[Quest Person]";
	if (countitem(512) < 1) {  // 512 is the item ID for Apple, found in db/item_db.yml
		mes "This is what NPC do if he/she dont have apple";
		mes "Can you please bring me an apple?";
		close;
	}
	mes "Oh, you brought an Apple!";
	mes "I will warp you now since you have what i need.";
	warp "mapname",x,y;
	close;

 

how to add more items?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  90
  • Reputation:   34
  • Joined:  10/01/18
  • Last Seen:  

On 12/5/2020 at 3:59 PM, DevilSupremeRO said:

can anyone help me with teleport npc that requires like 3items with quantity of 500 or something? thanks in advance

Try this added with Link Item /ic

 

Edited by Royr
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  90
  • Reputation:   34
  • Joined:  10/01/18
  • Last Seen:  

On 12/7/2020 at 12:09 PM, Poring King said:

Just add this before warp

On this code . It will required player to have 1 Apple in he/her inventory to


	mes "[Quest Person]";
	if (countitem(512) < 1) {  // 512 is the item ID for Apple, found in db/item_db.yml
		mes "This is what NPC do if he/she dont have apple";
		mes "Can you please bring me an apple?";
		close;
	}
	mes "Oh, you brought an Apple!";
	mes "I will warp you now since you have what i need.";
	warp "mapname",x,y;
	close;

 

Doesn't make any sense. the person asking for /hmm

Quote

Teleport npc that requires like 3items with quantity of 500

 

Edited by Royr
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

14 hours ago, DevilSupremeRO said:

how to add more items?

if (countitem(itemID1) < 1 | countitem(ItemID2) < 1 | countitem(ItemID3) < 1 | so on so fort ){
	mes "You dont have what i need";
	end;
}
mes "I see you have all what i need i will warp you now";
warp "mapname",x,y;
end;

 

11 hours ago, Royr said:

Doesn't make any sense. the person asking for /hmm

He just ask for item requirement before to warp i meet what he need . I give him the basic example of scripting to learn i don't give so much freebies and make this person asking always relay on freebies . He/she should learn by his self .. As you can see he don't even know how to do some condition statement its the basic one then you give him more complicated scripting . You are right he can use your script well but did he learn ? I give him more informative scripting on the NPC script dialog so he knew how the script process .

Edited by Poring King
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...