• 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!

Lua What command should i use??

Gothric

New Member
Joined
Feb 6, 2010
Messages
264
Reaction score
1
What command should i use for check that sqm is stepable ..


I have script for teleport +20sqm x but i dont want to work it if on this sqm is for example tree.
 
Here you are (this is full script):
Code:
function onSay(cid, words, param, channel)
local pos, dir = getThingPos(cid), getPlayerLookDir(cid)
for i = 1, 5 do
 local cur = {x=pos.x+(dir==1 and i or dir==3 and -i or 0), y=pos.y+(dir==0 and -i or dir==2 and i or 0), z=pos.z}
 if queryTileAddThing(cid, cur) ~= 1 or getTilePzInfo(cur) or getTileHouseInfo(cur) then
  return doPlayerSendCancel(cid, 'Destination not reachable.')
 elseif i == [COLOR="Red"]2[/COLOR] then
  doTeleportThing(cid, cur)
  doSendMagicEffect(pos, CONST_ME_POFF)
  doSendMagicEffect(cur, CONST_ME_TELEPORT)
 end
end
return true
end

Red = this is how much tiles player will be teleported
 
Back
Top