Tente com esse aqui, se der erro só dizer ![]()
function onCastSpell(cid, var) local playerpos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local trapos = getCreaturePosition(target, getPlayerLookDir(cid), 4) -- 4 é o SQM local level = getPlayerLevel(cid) local levelz = (level*0.1) for teleport = 1,3 do if target == isMonster or isCreature then doTeleportThing(cid,trapos) doCreatureAddHealth(target, -levelz) doSendMagicEffect(trapos, 39) doSendAnimatedText(trapos, "Blink", math.random(1,255)) else doPlayerSendTextMessage(cid,22,'Seu alvo não é um monstro nem player') end return true end end








info
Grupo: Campones
Registrado: 13/12/12
Posts: 48
Reputação: +4
Char no Tibia: nao jogo mais
Olá galera do Xtibia, estou com essa spell de attack, ela faz o seguinte, teleporta até o target combando hits na criatura que está atacando, mas queria que ela teleporta-se o player nos 4 SQM, ao lado do target combando.
tentei mudar por isso
local target = getCreaturePosition({x=x,y=y,z=target.z}) local x = math.random(pos.x-1,target.x+1) local y = math.random(pos.y-1,target.y+1)substituindo no script, mas não tive resultados pq nao sou scripter