questmachineinwater.lua 838 B

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : SpawnScripts/PeatBog/questmachineinwater.lua
  3. Script Author : Shatou
  4. Script Date : 2020.01.08 08:01:54
  5. Script Purpose :
  6. :
  7. --]]
  8. local MYSTERIOUS_MACHINE_QUEST_ID = 508
  9. local A_GNOLL_MACHINIST_ID = 1980062
  10. function spawn(NPC)
  11. end
  12. function hailed(NPC, Spawn)
  13. FaceTarget(NPC, Spawn)
  14. end
  15. function respawn(NPC)
  16. end
  17. function casted_on(NPC, Spawn, Message)
  18. if HasQuest(Spawn, MYSTERIOUS_MACHINE_QUEST_ID) then
  19. if GetQuestStep(Spawn, MYSTERIOUS_MACHINE_QUEST_ID) == 1 then
  20. if Message == "inspect" then
  21. SetStepComplete(Spawn, MYSTERIOUS_MACHINE_QUEST_ID, 1)
  22. local new_spawn = SpawnMob(GetZone(Spawn), A_GNOLL_MACHINIST_ID, false, GetX(Spawn), GetY(Spawn), GetZ(Spawn), 0)
  23. AddHate(Spawn, NPC, 100)
  24. end
  25. end
  26. end
  27. end