AniusOakwind.lua 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --[[
  2. Script Name : SpawnScripts/OutpostoftheOverlord/AniusOakwind.lua
  3. Script Purpose : Anius Oakwind
  4. Script Author : Lemmeron (Previously Parser script inserted by Cynnar 2018.10.14)
  5. Script Date : 19.08.2020
  6. Script Notes : NPC Spawn called with function "AskWhy" by Evil Grave after player kicks it (2780153)
  7. : Respawn timer set to 300 seconds which re-enables kick grave again
  8. --]]
  9. local ZoneID = 278 --outpost of the overlord
  10. local GraveID = 2780153
  11. local GravelocID = 485806
  12. local AniusID = 2780031
  13. local AniuslocID = 398907
  14. function spawn(NPC)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function AskWhy(NPC, Spawn)
  20. FaceTarget(NPC, Spawn)
  21. PlayFlavor(NPC, "", "Why would you desecrate my gravestone ?! Have you no respect for the dead? Now face my wrath!", "", 1689589577, 4560189, Spawn)
  22. AddTimer(NPC, 5000, "Wrath", 1, Spawn)
  23. end
  24. function Wrath (NPC, Spawn)
  25. if IsAlive(Spawn) then
  26. SpawnSet(NPC, "targetable", 1)
  27. SpawnSet(NPC, "visual_state", 0)
  28. SpawnSet(NPC, "show_level", 1)
  29. SpawnSet(NPC, "faction", 1)
  30. SpawnSet(NPC, "attackable", 1)
  31. Attack(NPC, Spawn)
  32. else
  33. Say(NPC, "It seems you will join me in death")
  34. end
  35. end
  36. function death(NPC, Spawn)
  37. local zone2 = GetZone(Spawn)
  38. if zone2 ~= nil then
  39. local grave2 = GetSpawn(Spawn, GraveID)
  40. if grave2 ~= nil then
  41. AddTimer(grave2, 300000, "Respawntimer", 1) -- respawn timer 300 sec
  42. else
  43. Say(NPC, "cant find grave 2", Spawn)
  44. end
  45. else
  46. Say(NPC, "gravelocID not found", Spawn)
  47. end
  48. end