A tag da spell ta errada, repare que voce nao colocou "</instant>" no final (sem aspas)
pra poder usar ela voce tem que ter um target (tem que estar mirando em alguem)
info
Grupo: Campones
Registrado: 12/08/12
Posts: 58
Reputação: +7
Char no Tibia: Kung san

A tag da spell ta errada, repare que voce nao colocou "</instant>" no final (sem aspas)
pra poder usar ela voce tem que ter um target (tem que estar mirando em alguem)
A tag esta certa, não coloquei certinha antes la por que não tinha nada a ver...
A spell funciona no servidor.. ela controla todos monsters perfeitamente, porem se usada em players não funciona direito, eu ando 1 SQM e o Player anda 4 sqm.
info
Grupo: Cavaleiro
Registrado: 27/05/12
Posts: 168
Reputação: +3

local function move(cid, target, playerpos, targetpos, times)
if playerdir ~= getCreatureLookDirection(cid) then
doCreatureSetLookDirection(target, getCreatureLookDirection(cid))
end
if playerpos ~= getCreaturePosition(cid) then
if playerpos.z == getCreaturePosition(cid).z then
local ntpos = getCreaturePosition(cid)
local x,y,z = ntpos.x-playerpos.x,ntpos.y-playerpos.y,ntpos.z-playerpos.z
ntpos = getCreaturePosition(target)
ntpos.x, ntpos.y, ntpos.z = ntpos.x+x,ntpos.y+y,ntpos.z+z
if queryTileAddThing(target, ntpos) == RETURNVALUE_NOERROR and getCreaturePosition(cid).z == getCreaturePosition(target).z then
doMoveCreature(target, getCreatureLookDirection(cid))
end
end
end
local playerpos, targetpos = getCreaturePosition(cid), getCreaturePosition(target)
local times = times+1
if times < 100 then
addEvent(move, 1, cid, target, playerpos, targetpos, times)
else
doCreatureSetNoMove(target, 0)
doSendDistanceShoot(targetpos, playerpos, 15)
doSendAnimatedText(targetpos, "LIVRE!", math.random(1,255))
doPlayerSendCancel(cid, "Você perdeu o controle de "..getCreatureName(target)..".")
if (isPlayer(target)) then
doPlayerSendCancel(cid, "Você está liberto from "..getPlayerName(cid).."'s Shadow Imitation Technique.")
setPlayerStorageValue(target, 14755, -1)
end
end
end
function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
if (isPlayer(target)) or (isMonster(target)) then
if getPlayerStorageValue(cid, 14755) == -1 then
doCreatureSetNoMove(target, 1)
doPlayerSendCancel(cid, "You have possessed "..getCreatureName(target)..".")
if (isPlayer(target)) then
doPlayerSendCancel(target, "Você foi possuido por "..getPlayerName(cid)..".")
setPlayerStorageValue(target, 14755, 1)
end
doSendAnimatedText(getCreaturePosition(target), "POSSUIDO!", math.random(1,255))
local playerpos,playerdir,targetpos = getCreaturePosition(cid), getPlayerLookDir(cid), getCreaturePosition(target)
doSendDistanceShoot(playerpos, targetpos, 15)
doSendMagicEffect(getCreaturePosition(target), 186)
local times = 1
addEvent(move, 1000, cid, target, playerpos, targetpos, times)
else
doPlayerSendCancel(cid, "Your Shadow Imitation Technique isn't worn out yet.")
end
end
end
Tenta asssim..
info
Grupo: Cavaleiro
Registrado: 04/12/09
Posts: 188
Reputação: +19
Olá.. estou com uma SPELL que o CRBM fes e postou em um outro Forum..
Se chama KAGEMANE, essa spell quando usada em um target fas ele seguir seus movimentos..
Ela funciona perfeitamente quando usada em MONSTERS... mas quando usada em PLAYERS não funciona.. os PLAYERS ao inves de andar apenas 1 sqm igual o Personagem que a Ativou.. anda uns 4 SQM =\
tag da spell:
spell:
em creaturescripts/login.lua:
Agredeço desde JA!!
Editado Agosto 22 por milbradt