9
3

qstscpreeorders.lua 852 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/qstscpreeorders.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.04.15 09:04:30
  5. Script Purpose :
  6. :
  7. --]]
  8. QUEST = 408
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "SpawnAccess", "SpawnAccess")
  11. end
  12. function SpawnAccess(NPC, Spawn)
  13. if GetQuestStep(Spawn, QUEST) == 2 then
  14. SpawnSet(NPC, "show_command_icon", 1)
  15. SpawnSet(NPC, "display_hand_icon", 1)
  16. elseif GetQuestStep(Spawn, QUEST) == 1 then
  17. SpawnSet(NPC, "show_command_icon", 0)
  18. SpawnSet(NPC, "display_hand_icon", 0)
  19. end
  20. end
  21. function respawn(NPC)
  22. spawn(NPC)
  23. end
  24. function casted_on(NPC, Spawn, SpellName)
  25. if SpellName == 'Search' then
  26. if GetQuestStep(Spawn, QUEST) == 2 then
  27. SummonItem(Spawn, 11357, 1)
  28. end
  29. end
  30. end