Likes: 0
Results 1 to 1 of 1
Thread: Simple mob Script template
-
20-02-10, 05:25 AM #1
Simple mob Script template
Register to remove this adhaving trouble with scripting but u still want to have your private server content scripted?
this is the solution for u. its very simple to use just fill out the script and its done
Code:function NPCName_OnCombat(pUnit, Event) pUnit:SendChatMessage(14, 0, "What the npc will say when its pulled") pUnit:RegisterEvent("NPCName_SpellName", Time Elapsed before the spell is used, 0) 1000=1second pUnit:RegisterEvent("NPCName_SpellName", Time Elapsed before the spell is used, 0) pUnit:RegisterEvent("NPCName_SpellName", Time Elapsed before the spell is used, 0) pUnit:RegisterEvent("NPCName_SpellName", Time Elapsed before the spell is used, 0) end function NPCname_OnLeaveCombat(pUnit, Event) pUnit:RemoveEvents() end function NPCName_OnKillTarget(pUnit, Event) end function NPCname_OnDeath(pUnit, Event) pUnit:SendChatMessage(14, 0, "What the npc will say when its dead") pUnit:RemoveEvents() end RegisterUnitEvent(SpellID, 1, "NPCname_OnCombat") RegisterUnitEvent(SpellID, 2, "NPCname_OnLeaveCombat") RegisterUnitEvent(SpellID, 3, "NPCname_OnKillTarget") RegisterUnitEvent(SpellID, 4, "NPCname_OnDeath") function NPCName_SpellName(pUnit, Event) pUnit:FullCastSpellOnTarget(SpellID, pUnit:GetRandomPlayer or ClosestPlayer or Maintank(0)) end function NPCName_SpellName(pUnit, Event) pUnit:FullCastSpellOnTarget(SpellID, pUnit:GetRandomPlayer or ClosestPlayer or Maintank(0)) end function NPCName_SpellName(pUnit, Event) pUnit:CastSpell(SpellID) end function NPCName_SpellName(pUnit, Event) pUnit:FullCastSpellOnTarget(SpellID, pUnit:GetRandomPlayer or ClosestPlayer or Maintank(0)) end
› See More: Simple mob Script template