EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   How to have the mob recognize your position. (https://www.eqemulator.org/forums/showthread.php?t=42064)

deciferous7 08-24-2018 10:12 PM

How to have the mob recognize your position.
 
This is a Dragon of Norrath raid mob.


Looking for information on how to make this mob cast its spell "Blinding Light" only when the client is facing towards him. My example here does not work. Does anyone know the correct method of achieving this?

Blind_Cast is what I'm looking for.

Code:


function event_timer(e)
    if (e.timer == "Emote") then
        index = math.random(1, table.getn(rikkukin_emote));
        e.self:Emote(rikkukin_emote[index][1]);
    elseif (e.timer == "Casting") then
                e.self:Emote(rikkukin_emote[index][2]);
                e.self:CastSpell(rikkukin_emote[index][3], e.self:GetTarget():GetID());
                eq.set_timer("Casting", 30000);
        elseif (e.timer == "Locked_HP") then
                eq.stop_timer('Locked_HP');
                eq.set_timer("Blind", blind_timer * 1000);
                eq.set_timer("Blind_Cast", blind_cast * 1000);
                e.self:TempName("Rikkukin the Defender");
                hp=false;
                eq.set_next_hp_event(30);
        elseif (e.timer == "Locked_HPtwo") then
                eq.stop_timer('Locked_HPtwo');
                e.self:TempName("Rikkukin the Defender");
                hptwo=false;
        elseif (e.timer == "Blind") then
                e.self:Emote("twists his body so that the ambient light starts to reflect from his slivery scales.");
        elseif (e.timer == "Blind_Cast") then
                local cl = eq.get_entity_list():GetClientList();
                for client in cl.entries do
                        if (client.valid and not client:BehindMob(e.self, client:GetX(), client:GetY())) then
                        e.self:CastSpell(6556, client:GetID());
                        end
                end
                eq.set_timer("Blind_Cast", 40000);
        end
end

Thanks!

deciferous7 08-24-2018 11:42 PM

This has been figured out, Thanks!


All times are GMT -4. The time now is 12:30 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.