9
3

BreenoMesspie.lua 984 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/BreenoMesspie.lua
  3. Script Author : Rylec
  4. Script Date : 2021.09.08 10:09:59
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SpawnSet(NPC, "visual_state", "2120")
  10. SpawnSet(NPC, "action_state", "11420")
  11. end
  12. function hailed(NPC, Spawn)
  13. -- FaceTarget(NPC, Spawn)
  14. SpawnSet(NPC, "visual_state", "0")
  15. PlayAnimation(NPC, 10893)
  16. local zone = GetZone(Spawn)
  17. local TargetSpawn = GetSpawnByLocationID(zone, 133772587)
  18. CastSpell(TargetSpawn, 993, 1, NPC)
  19. AddTimer(NPC, 3000, "stop_combat", 1, TargetSpawn)
  20. end
  21. function stop_combat(NPC, TargetSpawn)
  22. if IsInCombat(NPC) then
  23. ClearHate(TargetSpawn, NPC)
  24. ClearHate(NPC, TargetSpawn)
  25. SetInCombat(TargetSpawn, false)
  26. SetInCombat(NPC, false)
  27. ClearEncounter(TargetSpawn)
  28. ClearEncounter(NPC)
  29. end
  30. end
  31. function respawn(NPC)
  32. spawn(NPC)
  33. end