View Single Post
  #1  
Old 12-12-2014, 11:38 PM
Nibiuno
Hill Giant
 
Join Date: Mar 2010
Posts: 101
Default 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
Reply With Quote