9
3

MarcusPuer.lua 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. --[[
  2. Script Name : SpawnScripts/SerpentSewer/MarcusPuer.lua
  3. Script Author : premierio015
  4. Script Date : 2020.06.16 01:06:52
  5. Script Purpose :
  6. :
  7. --]]
  8. local FreshSamples = 5265
  9. local AGiftFromTheSerpentsMouth = 5273
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange", Spawn)
  12. ProvidesQuest(NPC, FreshSamples)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. if not HasQuest(Spawn, FreshSamples) and GetQuestCompleteCount(Spawn, FreshSamples) == 0 or GetQuestStep(Spawn, AGiftFromTheSerpentsMouth) >= 2 then
  17. PlayFlavor(NPC, "voiceover/english/marcus_puer/fprt_sewer02/marcuspuer001.mp3", "", "", 3945654346, 2381958681, Spawn)
  18. local conversation = CreateConversation()
  19. if GetQuestStep(Spawn, AGiftFromTheSerpentsMouth) == 1 then
  20. AddConversationOption(conversation, "I have a fang from the serpent Stench.", "Option2")
  21. elseif GetQuestCompleteCount(Spawn, FreshSamples) == 0 then
  22. AddConversationOption(conversation, "Then why do you do your work down here? ", "Option1")
  23. elseif GetQuestStep(Spawn, AGiftFromTheSerpentsMouth) == 5 then
  24. AddConversationOption(conversation, "I thought I was helping you. I have the items you need for the fang.", "Option4")
  25. end
  26. AddConversationOption(conversation, "Sorry I asked. ")
  27. StartConversation(conversation, NPC, Spawn, "It's difficult enough trying to do my work down here. Must you bother me as well?")
  28. elseif GetQuestStep(Spawn, FreshSamples) == 1 then
  29. QuestProgress(NPC, Spawn)
  30. elseif GetQuestStep(Spawn, FreshSamples) == 2 then
  31. QuestFinish(NPC, Spawn)
  32. elseif not HasQuest(Spawn, FreshSamples) and GetQuestCompleteCount(Spawn, FreshSamples) <= 5 then
  33. if GetQuestCompleteCount(Spawn, FreshSamples) > 0 then
  34. continue(NPC, Spawn)
  35. end
  36. end
  37. end
  38. function Option1(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. PlayFlavor(NPC, "voiceover/english/marcus_puer/fprt_sewer02/marcuspuer005.mp3", "", "", 1900057881, 242605270, Spawn)
  41. local conversation = CreateConversation()
  42. AddConversationOption(conversation, "What is it you need? ", "offer")
  43. AddConversationOption(conversation, "I'm not offering anything. ")
  44. StartConversation(conversation, NPC, Spawn, "Because my specimens need to be fresh, of course! Between my research and solution mixology, I've no time to get fresh specimens. Ah I see, so this is why you've interrupted me, to offer your aid. How awfully thoughtful! You're not like the others, but they won't be interrupting me any more.")
  45. end
  46. function offer(NPC, Spawn)
  47. OfferQuest(NPC, Spawn, FreshSamples)
  48. end
  49. function QuestProgress(NPC, Spawn)
  50. FaceTarget(NPC, Spawn)
  51. PlayFlavor(NPC, "voiceover/english/marcus_puer/fprt_sewer02/marcuspuer003.mp3", "", "", 1622376020, 1625303921, Spawn)
  52. local conversation = CreateConversation()
  53. AddConversationOption(conversation, "All right, okay.")
  54. StartConversation(conversation, NPC, Spawn, "I just can't complete my studies unless you return with the key materials.")
  55. end
  56. function QuestFinish(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. PlayFlavor(NPC, "voiceover/english/marcus_puer/fprt_sewer02/marcuspuer011.mp3", "", "", 2331598292, 1508009067, Spawn)
  59. local conversation = CreateConversation()
  60. if GetQuestCompleteCount(Spawn, FreshSamples) <= 5 then
  61. AddConversationOption(conversation, "Anything else you need?", "continue")
  62. end
  63. if GetQuestStep(Spawn, AGiftFromTheSerpentsMouth) == 1 then
  64. AddConversationOption(conversation, "I have a fang from the serpent Stench.", "Option2")
  65. end
  66. AddConversationOption(conversation, "Thanks")
  67. StartConversation(conversation, NPC, Spawn, "Splendid! It would've taken me days to collect these amounts. Not to mention the time lost documenting the last study group. Here, here take these; they're of my own design. They may prove useful some day.")
  68. end
  69. function continue(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. local conversation = CreateConversation()
  72. PlayFlavor(NPC, "voiceover/english/marcus_puer/fprt_sewer02/marcuspuer002.mp3", "", "", 182637408, 2140196654, Spawn)
  73. AddConversationOption(conversation, "Sure how can I help this time? ", "offer")
  74. AddConversationOption(conversation, "No, not this time. ")
  75. StartConversation(conversation, NPC, Spawn, "Oh well, hello! Back to help some more?")
  76. end
  77. function Option2(NPC, Spawn)
  78. FaceTarget(NPC, Spawn)
  79. local conversation = CreateConversation()
  80. PlayFlavor(NPC, "voiceover/english/marcus_puer/fprt_sewer02/marcuspuer008.mp3", "", "", 3172594915, 1628794700, Spawn)
  81. AddConversationOption(conversation, "I can get those things for you.", "Option3")
  82. AddConversationOption(conversation, "I don't want to bother with that. ")
  83. StartConversation(conversation, NPC, Spawn, "Ah, isn't that a beauty. I bet I could fashion that into a nasty poker with the right materials. I'd be willing to do that for you since you helped me out earlier. I just need a few things found in the area.")
  84. end
  85. function Option3(NPC, Spawn)
  86. SetStepComplete(Spawn, AGiftFromTheSerpentsMouth, 1)
  87. FaceTarget(NPC, Spawn)
  88. local conversation = CreateConversation()
  89. PlayFlavor(NPC, "voiceover/english/marcus_puer/fprt_sewer02/marcuspuer009.mp3", "", "", 665960402, 251602403, Spawn)
  90. AddConversationOption(conversation, "I'll be back soon.")
  91. StartConversation(conversation, NPC, Spawn, "All right, here is a list of things to collect. You can find all of them down here in the Serpent Sewer. Come back to me when you have all the materials.")
  92. end
  93. function Option4(NPC, Spawn)
  94. SetStepComplete(Spawn, AGiftFromTheSerpentsMouth, 5)
  95. FaceTarget(NPC, Spawn)
  96. local conversation = CreateConversation()
  97. PlayFlavor(NPC, "marcus_puer/fprt_sewer02/marcuspuer010.mp3", "", "", 728428829, 741170065, Spawn)
  98. AddConversationOption(conversation, "Not too shabby. ")
  99. StartConversation(conversation, NPC, Spawn, "Ah, these things will do nicely. Now just give me a minute as I create the paste... now to attach the handle... and add the scale grips... done! Now that's a fine looking rapier if you ask me!")
  100. end
  101. function respawn(NPC)
  102. spawn(NPC)
  103. end
  104. function InRange(NPC, Spawn)
  105. FaceTarget(NPC, Spawn)
  106. PlayFlavor(NPC, "voiceover/english/marcus_puer/fprt_sewer02/quests/020_quest_marcus_puer_aoicallout02_1f18e638.mp3", "Just who I was looking for! Come here, come here!", "", 2970554527, 4254211908, Spawn)
  107. end
  108. function LeaveRange(NPC, Spawn)
  109. end