Olá, rsrs olha só o script das keys aqui funcionando direitinho.
Vai la em data/actions/keys.lua e adiciona.
REVERSE_DOORS, CHILD_DOORS = {}, {}
for k, v in pairs(DOORS) do
REVERSE_DOORS[v] = k
local tmp = getItemInfo(v)
if(tmp.transformUseTo ~= 0) then
CHILD_DOORS[tmp.transformUseTo] = k
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.aid > 0 and itemEx.aid > 0) then
if(isPlayerPzLocked(cid) and getTileInfo(toPosition).protection) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE)
return true
end
local doors = DOORS[itemEx.itemid]
if(not doors) then
doors = REVERSE_DOORS[itemEx.itemid]
end
if(not doors) then
doors = CHILD_DOORS[itemEx.itemid]
end
if(doors) then
if(item.actionid ~= itemEx.actionid) then
doPlayerSendCancel(cid, "The key does not match.")
else
doTransformItem(itemEx.uid, doors)
end
return true
end
end
return false
end
Ai la em actions.xml vc add:
<!-- Keys -->
<action itemid="2086-2092;10032;10091" event="script" value="other/keys.lua"/>
Script da quest da key:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 3000 then
if getPlayerStorageValue(cid,3000) == -1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,'You have found a ' .. getItemNameById(2088) .. '.')
key_uid = doPlayerAddItem(cid,2088,1)
doItemSetActionId(key_uid,3000)
setPlayerStorageValue(cid,3000,1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You already have received your reward.")
end
end
return 1
end
Se não funcionar a quest troca:
doItemSetActionId(key_uid,3000)
por
doSetItemActionId(key_uid,3000)
Te ajudei? Rep + *-*