kimokimo
Kimo
can someone make this scripts??
when player click the chest he recive a spell.
when player click the chest he recive a spell.
local spell = 'xxx' -- Set the spell name here.
local storage = 9999 -- set any storage value u want to use here.
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid, storage) <= 0 then
doPlayerLearnInstantSpell(cid, spell)
setPlayerStorageValue(cid, storage, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have learned the spell "..spell..".")
else
doPlayerSendCancel(cid, "You have already done this quest and aquired the reward.")
end
end
<action uniqueid="5555" event="script" value="spellreward.lua"/>
doPlayerSendCancel(cid, "You have already done this quest and aquired the reward.")