aqubjukr
Well-Known Member
I'm trying to get all monsters / players to be teleported to a floor below. (the current z =12 and I want them to be teleported to 11)
The script works, the only part that isn't working is the spec: teleportTo (newPosition).
Any base scripts or tips are welcome.
Omg, sorry.
I'm using -1.
Lua:
local function changeGroundDown()
local monsters = Game.getSpectators(Position(31724, 31556, 11), false, false, 20, 20, 20, 20)
for _, monster in ipairs(monsters) do
local oldPosition = monster:getPosition()
local newPosition = Position({x = oldPosition.x, y = oldPosition.y, z = oldPosition.z - 1})
monster:teleportTo(newPosition)
end
end
The script works, the only part that isn't working is the spec: teleportTo (newPosition).
Any base scripts or tips are welcome.
Post automatically merged:
Omg, sorry.
I'm using -1.