9
3

dragoonvlasksign.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : SpawnScripts/The Vault of the Fallen/dragoonvlasksign.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.07.18 08:07:47
  5. Script Purpose :
  6. :
  7. --]]
  8. local TseralithDoorQuest = 5325
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange")
  11. end
  12. function InRange(NPC, Spawn)
  13. if HasQuest(Spawn, TseralithDoorQuest) then
  14. AddPrimaryEntityCommand(Spawn, NPC, "inspect", 5, "inspect", "", 100)
  15. SpawnSet(NPC, "show_command_icon", 1)
  16. SpawnSet(NPC, "display_hand_icon", 1)
  17. end
  18. end
  19. function casted_on(NPC, Spawn, SpellName)
  20. if SpellName == "inspect" then
  21. local zone = GetZone(Spawn)
  22. local Dragoon = GetSpawnByLocationID(zone, 133772409)
  23. if Dragoon == nil then
  24. SpawnByLocationID(zone, 133772409)-- Dragoon V'Lask
  25. SetAccessToEntityCommand(Spawn,NPC,"inspect", 0)
  26. SpawnSet(NPC, "show_command_icon", 0)
  27. SpawnSet(NPC, "display_hand_icon", 0)
  28. end
  29. end
  30. end
  31. function respawn(NPC)
  32. spawn(NPC)
  33. end