você ta testando como GOD ?
info
Grupo: Herói
Registrado: 25/10/11
Posts: 2.2k
Reputação: +862
Gênero: Masculino
Char no Tibia: Sociopata

info
Grupo: Barão
Registrado: 05/10/12
Posts: 245
Reputação: +36

mesmo sem ser GOD passa em cima do target/creature
Editado Novembro 12 por craigmabbit
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

Ve se funciona:
local area = {
{0,0,0},
{0,3,0},
{0,0,0},
}
function onDash(cid)
local poslook = getCreatureLookPosition(cid)
poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
if isWalkable(poslook, false, false, false) then
if not isCreature(getThingfromPos(poslook).uid) then
doMoveCreature(cid, getPlayerLookDirection(cid))
doSendMagicEffect(getPlayerPosition(cid), 2)
return true
else
doMoveCreature(cid, getPlayerLookDirection(cid))
return true
end
end
end
function onCastSpell(cid, var)
local distance = 8
for i = 0, distance do
addEvent(onDash,90*i,cid)
end
return true
end
function isWalkable(pos, creature, proj, pz)
if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
if getTopCreature(pos).uid > 0 and creature then return false end
if getTileInfo(pos).protection and pz then return false, true end
local n = not proj and 3 or 2
for i = 0, 255 do
pos.stackpos = i
local tile = getTileThingByPos(pos)
if tile.itemid ~= 0 and not isCreature(tile.uid) then
if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
return false
end
end
end
return true
end
info
Grupo: Barão
Registrado: 05/10/12
Posts: 245
Reputação: +36

ainda ta a mesma coisa
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

Testa assim agora:
local area = {
{0,0,0},
{0,3,0},
{0,0,0},
}
function onDash(cid)
local poslook = getCreatureLookPosition(cid)
poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
if isWalkable(poslook, false, false, false) then
if not isCreature(getThingfromPos(poslook).uid) then
doMoveCreature(cid, getPlayerLookDirection(cid))
doSendMagicEffect(getPlayerPosition(cid), 2)
return true
else
doMoveCreature(cid, getPlayerLookDirection(cid))
return true
end
end
end
function onCastSpell(cid, var)
local distance = 8
for i = 0, distance do
addEvent(onDash,90*i,cid)
end
return true
end
function isWalkable(pos, creature, proj, pz)
if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
if getTopCreature(pos).uid > 0 and creature then return false end
if getTileInfo(pos).protection and pz then return false, true end
local n = not proj and 3 or 2
for i = 0, 255 do
pos.stackpos = i
local tile = getTileThingByPos(pos)
if tile.itemid ~= 0 and not isCreature(tile.uid) then
if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
return true
end
end
end
return false
end
info
Grupo: Barão
Registrado: 05/10/12
Posts: 245
Reputação: +36

a magia nem funciona com esse e não da erro no console
a deu um erro sim, dscp attempt to index locas 'poslook' < a boolean value>
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

Título irregular
reportado
Para a alteração
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

@craigmabbit
tenta assim:
local area = {
{0,0,0},
{0,3,0},
{0,0,0},
}
function onDash(cid)
local poslook = getCreatureLookPosition(cid)
poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
if isWalkable(poslook, false, false, false) then
if not isCreature(getThingfromPos(poslook).uid) then
doMoveCreature(cid, getPlayerLookDirection(cid))
doSendMagicEffect(getPlayerPosition(cid), 2)
return true
else
doMoveCreature(cid, getPlayerLookDirection(cid))
return true
end
end
end
function onCastSpell(cid, var)
local distance = 8
for i = 0, distance do
addEvent(onDash,90*i,cid)
end
return true
end
function isWalkable(pos, creature, proj, pz)
if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
if getTopCreature(pos).uid > 0 and creature then return false end
if getTileInfo(pos).protection and pz then return false, true end
local n = not proj and 3 or 2
for i = 0, 255 do
pos.stackpos = i
local tile = getTileThingByPos(pos)
if tile.itemid ~= 0 and not isCreature(tile.uid) then
if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
return true
end
end
end
return true
end
info
Grupo: Barão
Registrado: 05/10/12
Posts: 245
Reputação: +36

continua a mesma coisa só que agora ta indo até na agua, anda em tile de agua



info
Grupo: Barão
Registrado: 05/10/12
Posts: 245
Reputação: +36
essa magia esta passando por cima dos bichos, tem como fazer parar ao invez de passar por cima ?