EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   How do I send SignalAllClients in LUA (https://www.eqemulator.org/forums/showthread.php?t=39106)

Nibiuno 12-12-2014 11:38 PM

How do I send SignalAllClients in LUA
 
I am trying to have an NPC send a signal to all clients in the zone, and have player.pl take an action, and send a signal back to this NPC. player.pl is sending the signal back when I send with perl.

In the script I wrote, the signal isnt making it to player.pl, or even processing.

Any suggestions?

This is what I have:

Code:

function event_spawn(e)
        eq.set_next_hp_event(90);
end

function event_signal(e)
        if (e.signal == 1) then
                eq.set_timer("ae_stun",2000);               
        end
end

function event_timer(e)
        if (e.timer == "ae_stun") then       
                e.self:CastSpell(7709,e.self:GetID());
                eq.stop_timer("ae_stun");
        end
end

function event_hp(e)       
        if (e.hp_event == 90) then
                e.self:Emote(" begins to flap her wings");
                e.other:SignalAllClients(1);
                eq.set_next_hp_event(75);
                e.self:Emote(" 90 done!");
        elseif (e.hp_event == 75) then
                e.self:Emote(" begins to flap her wings");
                e.other:SignalAllClients(1);
                eq.set_next_hp_event(40);
        elseif (e.hp_event == 40) then
                e.self:Emote(" begins to flap her wings");
                e.other:SignalAllClients(1);
                eq.set_next_hp_event(10);
        elseif (e.hp_event == 10) then
                e.self:Emote(" begins to flap her wings");
                e.other:SignalAllClients(1);
        end
end


demonstar55 12-13-2014 12:03 AM

SignalAllClients is a function of entity lists, other isn't an entity list.

Code:

eq.get_entity_list()
That will get the entity list in lua.

Nibiuno 12-13-2014 12:12 AM

Quote:

Originally Posted by demonstar55 (Post 236101)
SignalAllClients is a function of entity lists, other isn't an entity list.

Code:

eq.get_entity_list()
That will get the entity list in lua.

Thanks, got it working now. I had tried that before but had missed a ;, so tried the other after and never went back to it =/

demonstar55 12-13-2014 12:42 AM

; are optional in lua.


All times are GMT -4. The time now is 11:06 PM.

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