poopsiedoodle
Gibe moni plos
I want to make a stone that you can use once every day to get free blessings, but, still being terrible at scripts, I have absolutely no idea how I would make that happen. Anyone wanna give me an example script? :3
function onUse(cid, item, frompos, item2, topos)
local b = 1,5
local storageValue = 9999
local exhaustTime = 86400
if(isExhausted(cid, storageValue, exhaustTime)) then
doPlayerSendDefaultCancel(cid, Sorry, you only can use this item after "24" hours.)
return TRUE
end
if not getPlayerBlessing(cid, b) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You already have all blessings.")
else
doCreatureSetDropLoot(cid, false)
doPlayerAddBlessing(cid, b)
setExhaust(cid, storageValue)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have been blessed by the gods!")
end
return true
end