Alguém sabe me dizer onde estou errando?
local c = {
actionId = 18898,
storage = 1889,
storageValueToCheckFor = 19,
["itemToRemove"] = {id = 7488, amount = 1}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.actionid == c.actionId then
if getPlayerStorageValue(cid, c.storage) == c.storageValueToCheckFor then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_EXPLOSIONHIT)
doPlayerRemoveItem(cid, c["itemToRemove"].id, c["itemToRemove"].amount)
setPlayerStorageValue(cid, c.storage, c.storageValueToCheckFor + 1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You arent a inquisition member")
end
end
return true
end
Peço desculpas a moderação, esqueci de por o título e não consigo editar.