View Single Post
  #1  
Old 01-13-2015, 12:11 PM
Bohbo
Hill Giant
 
Join Date: Dec 2012
Posts: 116
Default quest::attack($name) on signaled mob (passing target)

I can start an encounter and the primary NPC (boss) can use $name just fine.

at say 90% HP I have him signal other NPCs (minions) to change bodytype to 1 from 11 and then

Code:
quest::emote("die $name");
quest::attack($name);
I seem to always get a response from the NPCs that they cant attack and they leave the emote blank. So they obviously aren't pulling $name (associated with player that started event). Since another NPC is really starting event.

Here is what an NPC sees on the Signal side

Code:
sub EVENT_SIGNAL{

if ($signal == 99) {

quest::emote("Let's go this is what we get paid for, all hands attack $name!");

#$mob -> SetTarget($name);
quest::emote($name); #I also tried using $name
quest::attack($name); #I also tried using $name

$npc->ModifyNPCStat("runspeed",2);
$npc->SetBodyType(1);
$npc->ModifyNPCStat("special_abilities","21,1^5,1^6,1");


}
}
And here is what the Boss Does

Code:
sub EVENT_HP {
 if ($hpevent == 80) {
	quest::emote("Guardsman, your master calls!");
	quest::signalwith(9900031,99);
	quest::setnexthpevent(50);
}

I am not sure how to pass the player variable on to another NPC. Would entity list solve this? I have yet to be successful with entity list so far.
Reply With Quote