Hello friends, who i chage this script for actionid and add price for each type of bless? Tks.
Lua:
local items = {
[11260] = {text = "Spiritual Shielding", id = 1},
[11259] = {text = "Embrace of Tibia", id = 2},
[11261] = {text = "Fire of the Suns", id = 3},
[11262] = {text = "Wisdom of Solitude", id = 4},
[11258] = {text = "Spark of the Phoenix", id = 5}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local blessItem = items[item.itemid]
if blessItem then
if getPlayerBlessing(cid, blessItem.id) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You already have this bless!")
return true
end
doPlayerAddBlessing(cid, blessItem.id)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have recieved the bless: ".. blessItem.text .. "!")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
return true
end