beginscript; label Wait: if (GetState() != 0 && UnitDead() != 1) { SetVar(1,Rnd()); SetVar(2,Rnd()); EndFrame(); goto WaitForPlayer; } EndFrame(); goto Wait; label WaitForPlayer: ExcTargetType(0xffffffff); if (GetGlobalVar(0) == 1) SetFollowWaypoint(23,GetVar(1),GetVar(2)); if (GetGlobalVar(1) >= 1) SetFollowWaypoint(61,GetVar(1),GetVar(2)); if (PlayerInRange(2000) && GetGlobalVar(0) == 1) { SetFollowWaypoint(1,GetVar(1),GetVar(2)); WaitForTime(50); if (GetGlobalVar(5) != 0) { TriggerMessage(1,0xffff,0xffff); SetGlobalVar(5,0); } EndFrame(); goto Despawn; } if (GetGlobalVar(1) >= 1) { if (UnitInArea (7255,6486,1000)) { SetFollowWaypoint(26,GetVar(1),GetVar(2)); EndFrame(); goto Despawn; } if (UnitInArea (8468,8340,1000)) { SetFollowWaypoint(27,GetVar(1),GetVar(2)); EndFrame(); goto Despawn; } } EndFrame(); goto WaitForPlayer; label Despawn: if (UnitInArea (7304,6472,50) && GetGlobalVar(1) != 1) { DespawnUnit(); TeleportUnit(TPort_01_Scr, 0, 0); EndFrame(); goto Wait; } if (UnitDead() && GetGlobalVar(1) != 1) { TeleportUnit(TPort_02_Scr, 0, 0); EndFrame(); goto Wait; } if (UnitInArea (7868,-6286,40) && GetGlobalVar(1) >= 1) { DespawnUnit(); EndFrame(); goto End; } EndFrame(); goto Despawn; label End: EndFrame(); goto End; endscript; $