9
3

questmachineinwater.lua 905 B

123456789101112131415161718192021222324252627282930313233343536
  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. SetRequiredQuest(NPC, MYSTERIOUS_MACHINE_QUEST_ID, 1, 1,0,1)
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. end
  16. function respawn(NPC)
  17. end
  18. function casted_on(NPC, Spawn, Message)
  19. if HasQuest(Spawn, MYSTERIOUS_MACHINE_QUEST_ID) then
  20. if GetQuestStep(Spawn, MYSTERIOUS_MACHINE_QUEST_ID) == 1 then
  21. if Message == "inspect" then
  22. SetStepComplete(Spawn, MYSTERIOUS_MACHINE_QUEST_ID, 1)
  23. local new_spawn = SpawnMob(GetZone(Spawn), A_GNOLL_MACHINIST_ID, false,GetX(NPC) + 2.5, GetY(NPC), GetZ(NPC) + 2.5, 0)
  24. AddHate(Spawn, NPC, 100)
  25. end
  26. end
  27. end
  28. end