GMHelper.lua 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. --[[
  2. Script Name : SpawnScripts/CircleElders/GMHelper.lua
  3. Script Author : Vo1d
  4. Script Date : 2019.10.24 01:10:44
  5. Script Purpose :
  6. :
  7. --]]
  8. local DisruptionForDistraction = 366
  9. local TheFinalAssault = 367
  10. function hailed(NPC, Spawn)
  11. FaceTarget(NPC, Spawn)
  12. Conversation = CreateConversation()
  13. if IsFollowing(NPC) then
  14. AddConversationOption(Conversation, "Stop following me.", "StopFollowOption")
  15. elseif not IsFollowing(NPC) then
  16. AddConversationOption(Conversation, "Follow me.", "FollowOption")
  17. end
  18. AddConversationOption(Conversation, "Quests", "QuestOptions")
  19. AddConversationOption(Conversation, "Zones", "ZoneOptions")
  20. AddConversationOption(Conversation, "Back to the vo1d with you.", "BackToVoidOption")
  21. AddConversationOption(Conversation, "Shaddap!", "ShaddapOption")
  22. StartConversation(Conversation, NPC, Spawn, "Hi there, how can i help you?")
  23. end
  24. function FollowOption(NPC, Spawn)
  25. SetFollowTarget(NPC, Spawn)
  26. ToggleFollow(NPC)
  27. end
  28. function StopFollowOption(NPC, Spawn)
  29. ToggleFollow(NPC)
  30. end
  31. function QuestOptions(NPC, Spawn)
  32. FaceTarget(NPC, Spawn)
  33. Conversation = CreateConversation()
  34. if HasQuest(Spawn, TheFinalAssault) then
  35. AddConversationOption(Conversation, "The Final Assault", "TheFinalAssaultOptions")
  36. elseif HasQuest(Spawn, DisruptionForDistraction) then
  37. AddConversationOption(Conversation, "Disruption for Distraction", "DisruptionForDistractionOptions")
  38. else
  39. AddConversationOption(Conversation, "No quests available.")
  40. end
  41. StartConversation(Conversation, NPC, Spawn, "Select a quest: ")
  42. end
  43. function TheFinalAssaultOptions(NPC, Spawn)
  44. FaceTarget(NPC, Spawn)
  45. Conversation = CreateConversation()
  46. AddConversationOption(Conversation, "What step am i on?", "TheFinalAssaultQuestStep")
  47. StartConversation(Conversation, NPC, Spawn, "Select an option for this quest: ")
  48. end
  49. function TheFinalAssaultQuestStep(NPC, Spawn)
  50. Say(NPC, "You are currently on step " .. GetQuestStep(Spawn, TheFinalAssault))
  51. end
  52. function DisruptionForDistractionOptions(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. Conversation = CreateConversation()
  55. AddConversationOption(Conversation, "What step am i on?", "DisruptionForDistractionQuestStep")
  56. StartConversation(Conversation, NPC, Spawn, "Select an option for this quest: ")
  57. end
  58. function DisruptionForDistractionQuestStep(NPC, Spawn)
  59. Say(NPC, "You are currently on step " .. GetQuestStep(Spawn, DisruptionForDistraction))
  60. end
  61. function BackToVoidOption(NPC, Spawn)
  62. ApplySpellVisual(NPC, 2142)
  63. AddTimer(NPC, 4000, "delayed_despawn", 1)
  64. SendPopUpMessage(Spawn, "You briefly hear a tearing sound as the voidbeast leaves this dimension.", 255, 255, 255)
  65. end
  66. function ShaddapOption(NPC, Spawn)
  67. Despawn(NPC)
  68. Say(Spawn, "Uh oh!")
  69. SpawnMob(GetZone(Spawn), 2460001, false, GetX(Spawn), GetY(Spawn), GetZ(Spawn), GetHeading(Spawn)+180)
  70. end
  71. function delayed_despawn(NPC, Spawn)
  72. Despawn(NPC)
  73. end
  74. function ZoneOptions(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. Conversation = CreateConversation()
  77. AddConversationOption(Conversation, "Send me to my bind point.", "BindPointOption")
  78. AddConversationOption(Conversation, "Shattered Lands", "ShatteredLandsOption")
  79. StartConversation(Conversation, NPC, Spawn, "Select an option or zone by expansion: ")
  80. end
  81. function BindPointOption(NPC, Spawn)
  82. Despawn(NPC)
  83. Gate(Spawn)
  84. end
  85. function ShatteredLandsOption(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. Conversation = CreateConversation()
  88. AddConversationOption(Conversation, "The Far Journey: Qeynos", "TheFarJourneyQeynos")
  89. AddConversationOption(Conversation, "The Far Journey: Freeport", "TheFarJourneyFreeport")
  90. StartConversation(Conversation, NPC, Spawn, "Select a zone: ")
  91. end
  92. -- ZONES
  93. function TheFarJourneyQeynos(NPC, Spawn)
  94. Despawn(NPC)
  95. Zone(GetZone(26), Spawn)
  96. end
  97. function TheFarJourneyFreeport(NPC, Spawn)
  98. Despawn(NPC)
  99. Zone(GetZone(27), Spawn)
  100. end