But how do i make a key whit actionID 9998 and the key are in a box/ quest box
function onUse(cid, item, fromPosition, toPosition)
if getPlayerStorageValue(cid,1337) < 1 then
local key = doPlayerAddItem(cid,KEYID,1)
setItemActionId(key,1337)
setPlayerStorageValue(cid,1337,1)
doPlayerSendTextMessage(cid,24,"You have found a key.")
else
doPlayerSendTextMessage(cid,24,"It is empty.")
end
end
function onUse(cid, item, fromPosition, toPosition)
if getPlayerStorageValue(cid,1337) < 1 then
local key = doPlayerAddItem(cid,KEY ID,1)
setItemActionId(key,ACTIONID)
setPlayerStorageValue(cid,ACTIONID,1)
doPlayerSendTextMessage(cid,24,"THE TEXT WHEN YOU LOOT THE QUEST BOX")
else
doPlayerSendTextMessage(cid,24,"THE TEXT IF YOU ALREDY LOOTED THIS BOX")
end
end
Using the new quest system you have an easier way ^^