Mr Erimyth
Member
Code:
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if player:getStorageValue(configExf.stats) == 1 then
player:teleportTo(cid, configExf.randpos[math.random(1, #configExf.randpos)])
position:sendMagicEffect(CONST_ME_TELEPORT)
destination:sendMagicEffect(CONST_ME_TELEPORT)
else
player:teleportTo(configExf.teleportPla)
position:sendMagicEffect(CONST_ME_TELEPORT)
fromPosition:sendMagicEffect(CONST_ME_TELEPORT)
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need waith event start!.')
end
return true
end
Erroo in console..
Code:
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/eforest/magicTp.lua:onStepIn
attempt to index a number value
stack traceback:
[C]: in ?
[C]: in function 'teleportTo'
data/movements/scripts/eforest/magicTp.lua:12: in function <data/movements/scripts/eforest/magicTp.lua:1>