So I have spent hours surfing the forums and have tried many different ideas. I'm running forgotten 1.2 i think it is -.- what I need to do is add the actionid to the key that is looted from the chest box. I know the text should go after doplayeradditem but I can't figure out what it is. Any help would be greatful and sorry in advance i'm noob at this
Lua:
function onUse(cid, item, frompos, item2, topos)
elseif item.uid == 62356 then
if getPlayerStorageValue(cid,62356) == -1 then
doPlayerAddItem(cid, 2089, 1)
end
doPlayerSendTextMessage(cid,22,"You have found a copper key.")
setPlayerStorageValue(cid,62356,1)
else
doPlayerSendTextMessage(cid,22,"This chest is empty.")
end
return TRUE
end
Last edited: