View Single Post
  #4  
Old 10-19-2015, 01:07 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Pull down a new source you can now change spell list of an NPC with ModifyNPCStat

example...


Code:
sub EVENT_SPAWN {
	$npc->ModifyNPCStat("npc_spells_id", 3);  #Spawn with spellset 3
}

sub EVENT_SAY {
	#test swapping spell lists
	if($text =~/spells/i) {
		my $new_list = substr($text, 7);
		$npc->ModifyNPCStat("npc_spells_id", $new_list);
	}
}
Reply With Quote