Jump to content
  • 0

Quick Snippets? Check if..


Currently

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.03
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

An NPC that checks if a player has any item in the inventory, if no then warp to "prontera". if yes, then cancel.

 

Last one,

An NPC that checks if playing is wearing specific equipment.

For example: Check if player is wearing 15000 ID armor, 15001 ID garment, so on. If yes, then warp to prontera. If no, then cancel.

 

Please help! Need for a project!  Thank you for those with kind hearts :)

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   241
  • Joined:  09/05/12
  • Last Seen:  

An NPC that checks if a player has any item in the inventory, if no then warp to "prontera". if yes, then cancel.

http://rathena.org/wiki/Getinventorylist

 



 

setarray .@restricted[0],15000,15001; <item id>
set .@size, getarraysize(.@restricted);


for ( .@i = 0; .@i < .@size; .@i++ ) {
    if ( getequipid(EQI_ARMOR) == .@restricted[.@i] || getequipid(EQI_GARMENT) == .@restricted[.@i] ) warp "prontera",150,150;
    else end;
}
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...