fyalhed
Member
- Joined
- Nov 18, 2017
- Messages
- 156
- Reaction score
- 20
I wanna make a bless using by items, i tried it:
But not is working...
No errors, no work.
Code:
<action itemid="11260;11259;11261;11262;11258" event="script" value="items_blesses.lua"/>
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item == 11260) then
if getPlayerBlessing(cid, 1) == true then
doPlayerSendTextMessage (cid, MESSAGE_INFO_DESCR, "You already have this bless!")
return 1
end
doPlayerAddBlessing(cid, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have recived the bless: The Spiritual Shielding!")
doSendMagicEffect(getCreaturePosition (cid), 2)
elseif(item == 11259) then
if getPlayerBlessing(cid, 2) == true then
doPlayerSendTextMessage (cid, MESSAGE_INFO_DESCR, "You already have this bless!")
return 1
end
doPlayerAddBlessing(cid, 2)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have recived the bless: The Embrace of Tibia!")
doSendMagicEffect(getCreaturePosition (cid), 2)
elseif(item == 11261) then
if getPlayerBlessing(cid, 3) == true then
doPlayerSendTextMessage (cid, MESSAGE_INFO_DESCR, "You already have this bless!")
return 1
end
doPlayerAddBlessing(cid, 3)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have recived the bless: The Fire of the Suns!")
doSendMagicEffect(getCreaturePosition (cid), 2)
elseif(item == 11262) then
if getPlayerBlessing(cid, 4) == true then
doPlayerSendTextMessage (cid, MESSAGE_INFO_DESCR, "You already have this bless!")
return 1
end
doPlayerAddBlessing(cid, 4)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have recived the bless: The Wisdom of Solitude!")
doSendMagicEffect(getCreaturePosition (cid), 2)
elseif(item == 11258) then
if getPlayerBlessing(cid, 5) == true then
doPlayerSendTextMessage (cid, MESSAGE_INFO_DESCR, "You already have this bless!")
return 1
end
doPlayerAddBlessing(cid, 5)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have recived the bless: The Spark of the Phoenix!")
doSendMagicEffect(getCreaturePosition (cid), 2)
end
return true
end
But not is working...
No errors, no work.