afallenbranch.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --[[
  2. Script Name : SpawnScripts/ForestRuins/afallenbranch.lua
  3. Script Author : Shatou
  4. Script Date : 2020.01.24 09:01:12
  5. Script Purpose :
  6. :
  7. --]]
  8. local FAVORS_QUEST_ID = 521
  9. local A_FALLEN_BRANCH_SOUTH_OUTSIDE = 566787
  10. local A_FALLEN_BRANCH_NORTH_OUTSIDE = 1587456
  11. local A_FALLEN_BRANCH_SOUTH_INSIDE = 1587457
  12. local A_FALLEN_BRANCH_NORTH_INSIDE = 1587509
  13. function spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. end
  18. function respawn(NPC)
  19. end
  20. function casted_on(NPC, Spawn, Message)
  21. if HasQuest(Spawn, FAVORS_QUEST_ID) then
  22. if Message == "harvest" then
  23. if GetSpawnLocationID(NPC) == A_FALLEN_BRANCH_SOUTH_OUTSIDE then
  24. SetStepComplete(Spawn, FAVORS_QUEST_ID, 3)
  25. elseif GetSpawnLocationID(NPC) == A_FALLEN_BRANCH_NORTH_OUTSIDE then
  26. SetStepComplete(Spawn, FAVORS_QUEST_ID, 4)
  27. elseif GetSpawnLocationID(NPC) == A_FALLEN_BRANCH_SOUTH_INSIDE then
  28. SetStepComplete(Spawn, FAVORS_QUEST_ID, 5)
  29. elseif GetSpawnLocationID(NPC) == A_FALLEN_BRANCH_NORTH_INSIDE then
  30. SetStepComplete(Spawn, FAVORS_QUEST_ID, 6)
  31. end
  32. end
  33. end
  34. end