Se precisar de outro script tente este:
function isWalkable(position, cid)
position.stackpos = 0
if getTileThingByPos(position).uid ~= 0 then
local tile = getTileInfo(position)
if tile.protection == false and tile.house == false and getTopCreature(position).uid == 0 and doTileQueryAdd(cid, position) == RETURNVALUE_NOERROR then
return true
end
end
return false
end
function doDash(cid, distance)
local dir, fromPos, toPos = getCreatureLookDirection(cid), getThingPos(cid), getPosByDir(fromPos, dir)
if isWalkable(toPos) then
doTeleportThing(cid, toPos, true)
doSendMagicEffect(toPos, CONST_ME_TELEPORT)
end
if distance > 0 then
return doDash(cid, distance-1)
end
return true
end
local distance = 3
function onCastSpell(cid, var)
if doDash(cid, distance) then return true end
end






info
Grupo: Herói
Registrado: 05/11/07
Posts: 544
Reputação: +70
Duvida sanada; tópico movido.
Atenciosamente, Critical.