Jump to content
  • 0

Quick Snippets? Check if..


Question

Posted

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 :)

1 answer to this question

Recommended Posts

Posted

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;
}

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...