tractor
Posted: Wed Aug 08, 2012 2:27 pm
Hi I could us a little advice.
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
Like i said, it warps the player to the caster(player is still laying on the ground). Then almost immediately the player is warped to their homepoint, is there anyway to fix this?
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;