• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved OTX 3.7 [/a talkaction]

Status
Not open for further replies.

dartedd450

Member
Joined
Dec 21, 2016
Messages
51
Reaction score
9
Currently using otx 3.7 (10.98). Why is it that my /a command doesn't allow me on water or unwalkable tiles

/a:

function onSay(player, words, param)
if not player:getGroup():getAccess() then
return true
end

local steps = tonumber(param)
if not steps then
return false
end

local position = player:getPosition()
position:getNextPosition(player:getDirection(), steps)

position = player:getClosestFreePosition(position, false)
if position.x == 0 then
player:sendCancelMessage("You cannot teleport there.")
return false
end

player:teleportTo(position)
return false
end
 
Code:
position = player:getClosestFreePosition(position, false)
if position.x == 0 then
player:sendCancelMessage("You cannot teleport there.")
return false
end

remove this and it should work
 
Status
Not open for further replies.
Back
Top