I got tractor to smi-work, but the player warps to hp after the initial warp to caster.
This is what I got do far
Code: Select all
-----------------------------------------
-- Spell: tractor
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnSpellCast
-----------------------------------------
function onSpellCast(caster,target,spell)
hp = target:getHP(); -- get targets hp
if(hp==0) then -- target is dead
zone = caster:getZone();
targetX = caster:getXPos();
targetY = caster:getYPos();
targetZ = caster:getZPos();
target:setPos(targetX,targetY,targetZ,0,zone);
else -- target is not dead
printf("Player named %s is not dead!",target);
end
end;