LordTonmerk.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --[[
  2. Script Name : SpawnScripts/The Sepulcher of Jahnda/LordTonmerk.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.10.22 08:10:52
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. PlayFlavor(NPC, "", "How dare you enter this holy place and defile the resting place of Jahnda.", "", 1689589577, 4560189, Spawn)
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. if GetTempVariable(Spawn, "turn_tonmerk_friendly") == "true" then
  14. PlayFlavor(NPC, "", "Once again, I thank you for your assistance.", "", 1689589577, 4560189, Spawn)
  15. AddTimer(NPC, 3000, "give_item", 1, Spawn)
  16. end
  17. end
  18. function give_item(NPC, Spawn)
  19. if not HasItem(Spawn, 52690) then
  20. SummonItem(Spawn, 52690, 1)
  21. PlayAnimation(NPC, 1559)
  22. AddTimer(NPC, 4000, "despawn", 1, Spawn)
  23. end
  24. end
  25. function despawn(NPC, Spawn)
  26. Despawn(NPC)
  27. end
  28. function death(NPC, Spawn)
  29. AddLootItem(NPC, 52697, 1)
  30. if GetTempVariable(Spawn, "turn_tonmerk_hostile") == "true" then
  31. SetTempVariable(Spawn, "turn_tonmerk_hostile", nil)
  32. end
  33. end
  34. function respawn(NPC)
  35. spawn(NPC)
  36. end