PDA

View Full Version : How do I send SignalAllClients in LUA


Nibiuno
12-12-2014, 11:38 PM
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:


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.

eq.get_entity_list()

That will get the entity list in lua.

Nibiuno
12-13-2014, 12:12 AM
SignalAllClients is a function of entity lists, other isn't an entity list.

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.