New Lua Function: SetSpellList(Spawn, int32, int32)

Discussions on development of both the EQ2Emulator LUA Script Engine and Script specifications

Moderator: Team Members

Post Reply
Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

New Lua Function: SetSpellList(Spawn, int32, int32)

Post by Jabantiz » Sun Sep 30, 2012 5:32 pm

This will override the spell list the npc currently has, it will only work for spawns that are NPC's. Spawn is the NPC whos list you want to override, the first int32 is the primary spell list, the second int32 is the secondary spell list. Both int32's default to 0 so they are optional, can call SetSpellList(Spawn) to clear the spell list of the npc.

Code: Select all

function cast(Caster, Target, PetID)
	SummonPet(Caster, PetID)
	pet = GetPet(Caster)
	SetSpellList(pet, 1)
end
I am currently using this to give pet spells, it could be used for other purposes like to give a boss mob more powerful spells when it is low on health, or heal spells. Sure there could be many other uses for it too.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests