Jump to content
  • 0

Check items before entering a Map


Limestone

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

i want to request a script that checks a item b4 entering a map.. if the player does not have this item.. he cannot warp on that map..

thank you..

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

thats not what i mean.. for example.. instance ticket.. if a player have this item.. can access a dungeon.. but if the player does not have this item.. he cant go that dungeon.. sorry for bad english..

if(!countitem(itemid)){
mes "you don't have ticket!"
close;

}

Edited by QQfoolsorellina
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

if(!countitem(itemid)) close;

Edited by QQfoolsorellina
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

thats not what i mean.. for example.. instance ticket.. if a player have this item.. can access a dungeon.. but if the player does not have this item.. he cant go that dungeon.. sorry for bad english..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  01/03/12
  • Last Seen:  

if (countitem(itemid)) {
	  mes "You can not go to this dungeon";
	  close;
}
warp "map_area",0,0;

Edited by exneval
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

thanks! :>

how about in warp npc.. if the player step down on warps.. the warp checks the item..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

The code snippet that QQfoolsorellina and exneval posted is what you put in your warper.

If you are not sure where in the script to add it, post your warper script here and we'll help.

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