Code:
[22:0:25.550] [Error - MoveEvents Interface]
[22:0:25.551] data/movements/scripts/Poi/thrones.lua:onStepIn
[22:0:25.554] Description:
[22:0:25.555] data/movements/scripts/Poi/thrones.lua:16: attempt to index local
'f' (a nil value)
[22:0:25.558] stack traceback:
[22:0:25.559] data/movements/scripts/Poi/thrones.lua:16: in function <data/mov
ements/scripts/Poi/thrones.lua:11>
Whats wrong ?
Lua:
local t = {
[10274] = {'Verminor', CONST_ME_ENERGYHIT, 40},
[10275] = {'Infernatil', CONST_ME_ENERGYHIT, 40},
[10276] = {'Tafariel', CONST_ME_ENERGYHIT, 40},
[10277] = {'Apocalypse', CONST_ME_ENERGYHIT, 40},
[10278] = {'Pumin', CONST_ME_ENERGYHIT, 40},
[10279] = {'Bazir', CONST_ME_ENERGYHIT, 40},
[10280] = {'Ashfalor', CONST_ME_ENERGYHIT, 40}
}
function onStepIn(cid, item, pos, fromPos)
if isPlayer(cid) == TRUE then
local f = t[item.uid]
if getPlayerStorageValue(cid, item.uid) == -1 then
setPlayerStorageValue(cid, item.uid, 1)
doSendMagicEffect(pos, f[2])
doCreatureSay(cid, 'You have touched '..f[1]..'\'s throne and absorbed some of his spirit.', TALKTYPE_ORANGE_1)
else
if item.itemid == 1654 then
pos.y = pos.y + f[3]
elseif item.itemid == 1656 then
pos.x = pos.x + f[3]
end
doTeleportThing(cid, pos)
doSendMagicEffect(pos, CONST_ME_MORTAREA)
doCreatureSay(cid, 'Begone!', TALKTYPE_ORANGE_1)
end
end
end