shivaria
Active Member
- Joined
- Sep 2, 2009
- Messages
- 158
- Reaction score
- 36
When I'm im floor 7, trying to go to floor 0, nothing happens, but when I go up higher to floor 6 or 5, it works. Tried changing '7 do' to '8 do' nothing happens
Code:
function onCastSpell(creature, var)
local position = creature:getPosition()
for i = 1, 7 do
position.z = position.z - i
local tile = Tile(position)
if tile then
local tileId = tile:getItemById(460)
if tileId then
creature:teleportTo(position)
return true
end
end
end
return false
end
Last edited: