LoganBelchbottom.lua 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. --[[
  2. Script Name : SpawnScripts/FallenGate/LoganBelchbottom.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.07.07 08:07:54
  5. Script Purpose :
  6. :
  7. --]]
  8. local LostFriendInFallenGate = 5305
  9. local KillEmAll = 5306
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange")
  12. ProvidesQuest(NPC, LostFriendInFallenGate)
  13. end
  14. function InRange(NPC, Spawn)
  15. if not HasCompletedQuest(Spawn, LostFriendInFallenGate) and not HasQuest(Spawn, LostFriendInFallenGate) then
  16. ProvidesQuest(NPC, LostFriendInFallenGate)
  17. SetInfoFlag(NPC)
  18. SetVisualFlag(NPC)
  19. elseif HasCompletedQuest(Spawn, LostFriendInFallenGate) then
  20. ProvidesQuest(NPC, KillEmAll)
  21. SetInfoFlag(NPC)
  22. SetVisualFlag(NPC)
  23. end
  24. end
  25. function hailed(NPC, Spawn)
  26. FaceTarget(NPC, Spawn)
  27. if not HasQuest(Spawn, LostFriendInFallenGate) and not HasCompletedQuest(Spawn, LostFriendInFallenGate) then
  28. local conversation = CreateConversation()
  29. PlayFlavor(NPC, "voiceover/english/logan_belchbottom/fallengate/logan_belchbottom/logan_belchbottom001.mp3", "", "", 955845055, 2929839521, Spawn)
  30. AddConversationOption(conversation, "Yeah and ... ?", "Option1")
  31. AddConversationOption(conversation, "Sorry to hear that. ")
  32. StartConversation(conversation, NPC, Spawn, "Oh, thank you for heeding my plea! My companion and I were separated, and I've not seen him for days.")
  33. elseif GetQuestStep(Spawn, LostFriendInFallenGate) == 1 then
  34. QuestProgress(NPC, Spawn)
  35. elseif GetQuestStep(Spawn, LostFriendInFallenGate) == 2 then
  36. Option2(NPC, Spawn)
  37. elseif HasCompletedQuest(Spawn, LostFriendInFallenGate) then
  38. Option4(NPC, Spawn)
  39. end
  40. end
  41. function Option1(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. local conversation = CreateConversation()
  44. PlayFlavor(NPC, "voiceover/english/logan_belchbottom/fallengate/logan_belchbottom/logan_belchbottom002.mp3", "", "", 1390924911, 3638584326, Spawn)
  45. AddConversationOption(conversation, "Sure. What can I do?", "offer")
  46. AddConversationOption(conversation, "I'll think about it. ")
  47. StartConversation(conversation, NPC, Spawn, "We made a pact, that if we ever separated, to meet at the exit. This is as far as I got. I'm terribly frightened! Please, will you help me?")
  48. end
  49. function Option2(NPC, Spawn)
  50. FaceTarget(NPC, Spawn)
  51. local conversation = CreateConversation()
  52. PlayFlavor(NPC, "voiceover/english/logan_belchbottom/fallengate/logan_belchbottom/logan_belchbottom005.mp3", "", "", 1643303310, 3774394168, Spawn)
  53. AddConversationOption(conversation, "Well...there was this cauldron and...it looks like I was too late to save him.", "Option3")
  54. StartConversation(conversation, NPC, Spawn, "What? Why do you return alone? Where is Mr. Burpbelly?")
  55. end
  56. function Option3(NPC, Spawn)
  57. SetStepComplete(Spawn, LostFriendInFallenGate, 2)
  58. FaceTarget(NPC, Spawn)
  59. local conversation = CreateConversation()
  60. PlayFlavor(NPC, "voiceover/english/logan_belchbottom/fallengate/logan_belchbottom/logan_belchbottom006.mp3", "", "", 466342668, 3080648051, Spawn)
  61. AddConversationOption(conversation, "My condolences. ")
  62. StartConversation(conversation, NPC, Spawn, "No ... NO! It can't be! What am I to do now?")
  63. end
  64. function Option4(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. local conversation = CreateConversation()
  67. PlayFlavor(NPC, "voiceover/english/logan_belchbottom/fallengate/logan_belchbottom/logan_belchbottom007.mp3", "", "", 2648633348, 1343979863, Spawn)
  68. AddConversationOption(conversation, "Who're 'they'?", "Option5")
  69. AddConversationOption(conversation, "I can see them too.")
  70. StartConversation(conversation, NPC, Spawn, "I can't leave! There are too many of them! They're all over the place!")
  71. end
  72. function Option5(NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. local conversation = CreateConversation()
  75. PlayFlavor(NPC, "voiceover/english/logan_belchbottom/fallengate/logan_belchbottom/logan_belchbottom008.mp3", "", "", 1938908818, 3560098645, Spawn)
  76. AddConversationOption(conversation, "Which wretched creatures?", "offer2")
  77. AddConversationOption(conversation, "No.")
  78. StartConversation(conversation, NPC, Spawn, "Would you help me one more time? Clear me a path by killing these wretched creatures. Will you do this for me?")
  79. end
  80. function Option6(NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. local conversation = CreateConversation()
  83. PlayFlavor(NPC, "voiceover/english/logan_belchbottom/fallengate/logan_belchbottom/logan_belchbottom009.mp3", "", "", 1019298887, 1679042471, Spawn)
  84. AddConversationOption(conversation, "Ok.")
  85. StartConversation(conversation, NPC, Spawn, "Kill them! Kill whatever or whoever is in the way of the exit! Just kill them.")
  86. end
  87. function offer(NPC, Spawn)
  88. OfferQuest(NPC, Spawn, LostFriendInFallenGate)
  89. end
  90. function offer2(NPC, Spawn)
  91. if not HasQuest(Spawn, KillEmAll) then
  92. OfferQuest(NPC, Spawn, KillEmAll)
  93. elseif HasQuest(Spawn, KillEmAll) then
  94. Option6(NPC, Spawn)
  95. end
  96. end
  97. function QuestProgress(NPC, Spawn)
  98. FaceTarget(NPC, Spawn)
  99. local conversation = CreateConversation()
  100. PlayFlavor(NPC, "voiceover/english/logan_belchbottom/fallengate/logan_belchbottom/logan_belchbottom004.mp3", "", "", 1774733230, 967814445, Spawn)
  101. AddConversationOption(conversation, "I will.")
  102. StartConversation(conversation, NPC, Spawn, "Please return as soon as you find my friend.")
  103. end
  104. function respawn(NPC)
  105. spawn(NPC)
  106. end