questshipment1.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/PeatBog/questshipment1.lua
  3. Script Author : Shatou
  4. Script Date : 2020.01.08 09:01:53
  5. Script Purpose :
  6. :
  7. --]]
  8. local ON_THE_MOVE_QUEST_ID = 510
  9. local A_GNOLL_MACHINIST_ID = 1980065
  10. local A_GNOLL_GUARD_ID = 1980064
  11. local A_MACHINIST_ASSISTANT_ID = 1980066
  12. function spawn(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. end
  17. function respawn(NPC)
  18. end
  19. function casted_on(NPC, Spawn, Message)
  20. if HasQuest(Spawn, ON_THE_MOVE_QUEST_ID) then
  21. if GetQuestStep(Spawn, ON_THE_MOVE_QUEST_ID) == 1 then
  22. if Message == "inspect" then
  23. SetStepComplete(Spawn, ON_THE_MOVE_QUEST_ID, 1)
  24. end
  25. elseif GetQuestStep(Spawn, ON_THE_MOVE_QUEST_ID) == 2 then
  26. if Message == "inspect" then
  27. SetStepComplete(Spawn, ON_THE_MOVE_QUEST_ID, 2)
  28. end
  29. elseif GetQuestStep(Spawn, ON_THE_MOVE_QUEST_ID) == 3 then
  30. if Message == "inspect" then
  31. SetStepComplete(Spawn, ON_THE_MOVE_QUEST_ID, 3)
  32. end
  33. end
  34. local new_spawn_1 = SpawnMob(GetZone(Spawn), A_GNOLL_MACHINIST_ID, false, GetX(NPC) + 2.5, GetY(NPC), GetZ(NPC) - 3, 0)
  35. local new_spawn_2 = SpawnMob(GetZone(Spawn), A_GNOLL_GUARD_ID, false, GetX(NPC) + 2.5, GetY(NPC), GetZ(NPC) + 2.5, 0)
  36. local new_spawn_3 = SpawnMob(GetZone(Spawn), A_MACHINIST_ASSISTANT_ID, false, GetX(NPC) - 2.5, GetY(NPC), GetZ(NPC) + 2.5, 0)
  37. AddHate(Spawn, new_spawn_1, 100)
  38. AddHate(Spawn, new_spawn_2, 100)
  39. AddHate(Spawn, new_spawn_3, 100)
  40. end
  41. end