Thread: script help?
View Single Post
  #16  
Old 01-24-2014, 01:26 AM
Township EQ
Hill Giant
 
Join Date: Sep 2013
Posts: 118
Default

Code:
sub EVENT_SPAWN	{ 
		$npc->SetAppearance(3);
		$npc->SetBodyType(11);
		$npc->TempName("");
}

sub EVENT_COMBAT {
	if($combat_state == 1) {
		$npc->TempName("a_crypt_skeleton");
		$npc->SetBodyType(3);
		quest::me("a pile of bones springs to life.");
	}
}
This is the entire script that I wrote for an NPC with a skeleton model. The actual name of the NPC is pileofbones. It tempnames to nothing and shows the skeleton "sitting" or as a pile of bones.. and it's on an aggressive faction. As soon as it goes into combat it stands up.. sets its bodytype to undead and tempnames to the name you see there.

I've never used special attack flags to make anything untargetable. I've just always used bodytype 11. Perhaps you can copy an paste this whole thing and see if it works? I recommend putting it on faction 623. As far as the SetTargetable thing.. try 0 for false.. 1 for true.
Reply With Quote