Hello guys, I just created a new quest in my server and I'm having a little problem, the chest gives me the item, but its also openning it!
take a look!

actions.xml
dsl_chest.lua
the chest
Any idea of what's wrong?
Thanks!
- - - Updated - - -
That problem happens only with that my new chest.. all other chests work perfectly.
take a look!
actions.xml
Code:
<action actionid="55663" event="script" value="quests/dsl_chest.lua" />
dsl_chest.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.actionid == 55663 then
if getPlayerStorageValue(cid, 55661) == -1 then
reward = doPlayerAddItem(cid,2469,1)
setPlayerStorageValue(cid,55661,1)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You have found a ' .. getItemName(getThing(reward).uid) .. '.')
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "The chest is empty.")
end
end
end
the chest
Code:
05:19 You see a chest (Vol:15).
ItemID: [1740], ActionID: [55663], UniqueID: [55663].
Position: [X: 32116] [Y: 32121] [Z: 15].
Any idea of what's wrong?
Thanks!
- - - Updated - - -
That problem happens only with that my new chest.. all other chests work perfectly.
Last edited: