I want to make a npc detect a item and not allow the player to do a action, but I don't know how to do it...
Here's what I did so far:
UPDATE:
I read some codes and learned how to do it:
Here it is for anyone who needs it.
Here's what I did so far:
Lua:
... if getPlayerItemById(cid, 0000) == true then
npcHandler:say("What? You want me to do that? No way!", cid)
else ...
UPDATE:
I read some codes and learned how to do it:
Lua:
...if getPlayerItemById(cid, true, 0000).itemid == 0000 then
npcHandler:say("What? You want me to do that? No way!", cid)
else...
Here it is for anyone who needs it.
Last edited: