Roni123
Hardstyle Never Die < 3 !!!
- Joined
- Aug 31, 2010
- Messages
- 152
- Solutions
- 1
- Reaction score
- 18
Hello,
Dears, I have problem with Ceremonial/ornamented ankh, I have implemented script from 8.0 distro and got this error
This is my script
Dears, I have problem with Ceremonial/ornamented ankh, I have implemented script from 8.0 distro and got this error
Lua:
Lua Script Error: [Action Interface]
data/actions/scripts/checkbless.lua:onUse
data/actions/scripts/checkbless.lua:14: attempt to index local 'player' (a number value)
stack traceback:
data/actions/scripts/checkbless.lua:14: in function <data/actions/scripts/checkbless.lua:10>
This is my script
Lua:
local blessings = {
{id = 5, name = 'Wisdom of Solitude'},
{id = 4, name = 'Spark of the Phoenix'},
{id = 3, name = 'Fire of the Suns'},
{id = 1, name = 'Spiritual Shielding'},
{id = 2, name = 'Embrace of Tibia'},
{id = 6, name = 'Twist of Fate'}
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local result, bless = 'Received blessings:'
for i = 1, #blessings do
bless = blessings[i]
result = player:hasBlessing(bless.id) and result .. '\n' .. bless.name or result
end
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 20 > result:len() and 'No blessings received.' or result)
return true
end