Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local spoofArea = {
- fromPosition = Position(31741, 31795, 7),
- toPosition = Position(31881, 31850, 7)
- }
- local function checkSQM()
- local r_x = math.random(spoofArea.fromPosition.x, spoofArea.toPosition.x)
- local r_y = math.random(spoofArea.fromPosition.y, spoofArea.toPosition.y)
- local r_z = math.random(spoofArea.fromPosition.z, spoofArea.toPosition.z)
- local position = Position(r_x, r_y, r_z)
- if Tile(position):hasFlag(TILESTATE_BLOCKPATH) or Tile(position):hasFlag(TILESTATE_BLOCKSOLID)
- or Tile(position):getTopCreature() then
- return self:checkSQM()
- else
- return position
- end
- end
- -- no código:
- local position = checkSQM()
- if position then
- player:teleportTo(position)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement