9
3

dervorders.lua 694 B

123456789101112131415161718192021222324252627282930
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/dervorders.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.20 03:05:03
  5. Script Purpose :
  6. :
  7. --]]
  8. local ConfusionIsTheKey = 444
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 15, "SpawnAccess")
  11. end
  12. function SpawnAccess(NPC, Spawn)
  13. if GetQuestStep(Spawn, ConfusionIsTheKey) == 1 then
  14. SpawnSet(NPC, "display_hand_icon", 1)
  15. SpawnSet(NPC, "show_command_icon", 1)
  16. end
  17. end
  18. function casted_on(NPC, Spawn, SpellName)
  19. if SpellName == 'Switch the Orders' then
  20. SetStepComplete(Spawn, ConfusionIsTheKey, 1)
  21. end
  22. end
  23. function respawn(NPC)
  24. spawn(NPC)
  25. end