samuelsami
New Member
- Joined
- Oct 27, 2010
- Messages
- 77
- Reaction score
- 1
Sup Otland, i'm here asking for help, i want a Script to learn a spell by chest (by quest), thx all
function onUse(cid, item, frompos, item2, topos)
if item.uid == 8012 then
queststatus = getPlayerStorageValue(cid,303)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Learn Spell.")
playerLearnInstantSpell(cid, 'name_spell')
setPlayerStorageValue(cid,303,1)
else
doPlayerSendTextMessage(cid,22,"You have this spell .")
end
else
return 0
end
return 1
end
<action uniqueid="8012" script="name_spell.lua" />
Code:function onUse(cid, item, frompos, item2, topos) if item.uid == 8012 then queststatus = getPlayerStorageValue(cid,303) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"Learn Spell.") playerLearnInstantSpell(cid, 'name_spell') setPlayerStorageValue(cid,303,1) else doPlayerSendTextMessage(cid,22,"You have this spell .") end else return 0 end return 1 end
Code:<action uniqueid="8012" script="name_spell.lua" />