Magictibiaman
New Member
- Joined
- May 25, 2009
- Messages
- 371
- Reaction score
- 0
How do i create chests so players can get a reward once, like so you can't do bright sword quest multiple time for instance
Last edited:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 12345) < 0 then
if item.uid == 5000 then
local container = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(container, 2160, 10)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a bag.')
elseif item.uid == 5001 then
doPlayerAddItem(cid, 2195, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a boots of haste.')
end
setPlayerStorageValue(cid, 12345, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
end
return TRUE
end