qstoutlandbrigadereportsrockswidget.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : SpawnScripts/ThunderingSteppes/qstoutlandbrigadereportsrockswidget.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.06.27 10:06:48
  5. Script Purpose :
  6. :
  7. --]]
  8. local OutlandBrigadeReports = 473
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange")
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function InRange(NPC, Spawn)
  16. if GetQuestStep(Spawn, OutlandBrigadeReports) == 3 then
  17. AddPrimaryEntityCommand(Spawn, NPC, "Look around the rocks.", 3, "Look around the rocks.", "", 100)
  18. SpawnSet(NPC, "show_command_icon", 1)
  19. SpawnSet(NPC, "display_hand_icon", 1)
  20. end
  21. end
  22. function casted_on(NPC, Spawn, SpellName)
  23. if SpellName == 'Look around the rocks.' then
  24. if not QuestStepIsComplete(Spawn, OutlandBrigadeReports, 3) then
  25. zone = GetZone(Spawn)
  26. SpawnByLocationID(zone, 133772380)
  27. SetAccessToEntityCommand(Spawn,NPC,"Look around the rocks.", 0)
  28. SpawnSet(NPC, "show_command_icon", 0)
  29. SpawnSet(NPC, "display_hand_icon", 0)
  30. end
  31. end
  32. end