peq-quests/potactics/A_Chaos_Wraith.lua

40 lines
1 KiB
Lua
Raw Permalink Normal View History

-- A_Chaos_Wraith (214114)) part of rztwl script
function event_spawn(e)
2020-03-21 16:21:00 -05:00
eq.set_timer('timetomove', 2 * 1000);
eq.set_timer('depop', 900 * 1000);
end
function event_combat(e)
2023-08-15 11:39:43 -04:00
if e.joined then
2020-03-21 14:39:29 -05:00
if(not eq.is_paused_timer('depop')) then
eq.pause_timer('depop');
end
2020-03-21 14:39:29 -05:00
eq.set_timer("OOBcheck", 6 * 1000);
else
eq.resume_timer('depop');
e.self:SaveGuardSpot(e.self:GetX(),e.self:GetY(), e.self:GetZ(), e.self:GetHeading());
2020-03-21 14:39:29 -05:00
eq.stop_timer("OOBcheck");
end
end
function event_timer(e)
2020-03-21 14:39:29 -05:00
if (e.timer == 'depop') then
eq.depop();
elseif(e.timer=="OOBcheck") then
eq.stop_timer("OOBcheck");
if (e.self:GetX() > 950) then
e.self:GotoBind();
e.self:WipeHateList();
2020-03-21 16:21:00 -05:00
eq.set_timer('timetomove', 2 * 1000);
2020-03-21 14:39:29 -05:00
else
eq.set_timer("OOBcheck", 6 * 1000);
end
2020-03-21 16:21:00 -05:00
elseif (e.timer == 'timetomove') then
eq.stop_timer('timetomove');
local rallos = eq.get_entity_list():GetMobByNpcTypeID(214113); --#Rallos_Zek_the_Warlord (214113)
eq.move_to(rallos:GetX(),rallos:GetY(),rallos:GetZ(),rallos:GetHeading(),true);
e.self:SetRunning(true);
2020-03-21 14:39:29 -05:00
end
end