Using Perl to randomize npc_spell list.
I like to use scripts to randomize npcs so I can use less spots in the npc_types tree. I was combing through the perl reference page looking for how to assign a spell set to an npc. What I was hoping to do is create a generic npc, assign a random race, then depending on the race that is generated to then have the script select a class and the corresponding spell set that goes along with that particular class.
I know how to select a random race and even a npc_faction ID but not how to assign a class or a spell set. I can't seem to find how to do so on the reference page. I was hoping someone could shine some light on this issue. Much appreciated. =) |
Code:
$npc->AddAISpell(); |
I saw that on the reference page but I decided it wouldn't work because that would only add one spell instead of assigning an npc_spells id.
I was hoping to find a command that would assign a random spell set to the npc. Thanks for the input, though. |
Pull down a new source you can now change spell list of an NPC with ModifyNPCStat
example... Code:
sub EVENT_SPAWN { |
All times are GMT -4. The time now is 07:11 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.