9
3

VithLTar.lua 979 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --[[
  2. Script Name : SpawnScripts/SourceEvil/VithLTar.lua
  3. Script Purpose : Make Vith attackable and spawns adds
  4. Script Author : Jabantiz
  5. Script Date : 9/10/2016
  6. Script Notes : BeginAttack() is called from a timer function set in eviltotem.lua
  7. --]]
  8. local Priest1ID = 433225
  9. local Priest2ID = 433226
  10. local PetID = 2540008
  11. function BeginAttack(NPC, Spawn)
  12. local zone = GetZone(NPC)
  13. local Priest1 = SpawnByLocationID(zone, Priest1ID)
  14. local Priest2 = SpawnByLocationID(zone, Priest2ID)
  15. SpawnSet(NPC, "attackable", 1)
  16. SpawnSet(NPC, "show_level", 1)
  17. SpawnSet(NPC, "targetable", 1)
  18. SpawnSet(NPC, "visual_state", 0)
  19. SpawnSet(NPC, "faction", 1)
  20. PlayFlavor(NPC, "", "Now rot like your friends!", "", 1689589577, 4560189)
  21. Attack(NPC, Spawn)
  22. local Pet = GetSpawn(NPC, PetID)
  23. if Pet ~= nil then
  24. SpawnSet(Pet, "faction", 1)
  25. Attack(Pet, Spawn)
  26. end
  27. if Priest1 ~= nil then
  28. Attack(Priest1, Spawn)
  29. end
  30. if Priest2 ~= nil then
  31. Attack(Priest2, Spawn)
  32. end
  33. end