My lamp quest don't are working:
Code:
local timeSec = 5
function onUse(cid, item, fromPosition, itemEx, toPosition)
if ((getPlayerAccess(cid) == 0) or (getPlayerAccess(cid) == 1)) then
if getPlayerStorageValue(cid, 2044) == FALSE then
doPlayerAddItem(cid, 2044, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have found a Lamp.")
addEvent(autoMsg, timeSec*1000, cid)
setPlayerStorageValue(cid, 2044, TRUE)
elseif getPlayerStorageValue(cid, 2044) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "It is empty.")
end
end
return TRUE
end
function autoMsg(cid)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You now have a lamp. Try leaving your house again.")
return TRUE
end
Last edited: