GerunPontian.lua 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/GerunPontian.lua
  3. Script Purpose : Gerun Pontian
  4. Script Author : vo1d
  5. Script Date : 2019.10.28
  6. Script Notes : n/a
  7. --]]
  8. local SpeckledRattlerVenom = 375
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, SpeckledRattlerVenom)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. if HasCompletedQuest(Spawn, SpeckledRattlerVenom) then
  17. CompletedRattlerQuest(NPC, Spawn)
  18. elseif HasQuest(Spawn, SpeckledRattlerVenom) then
  19. if GetQuestStep(Spawn, SpeckledRattlerVenom) == 1 then
  20. HaventGotTheVenom(NPC, Spawn)
  21. elseif GetQuestStep(Spawn, SpeckledRattlerVenom) == 2 then
  22. HasGotTheVenom(NPC, Spawn)
  23. end
  24. else
  25. FirstTimeSpeaking(NPC, Spawn)
  26. end
  27. end
  28. function dlg_2(NPC, Spawn)
  29. FaceTarget(NPC, Spawn)
  30. Conversation = CreateConversation()
  31. AddConversationOption(Conversation, "How does this post turn profit?", "dlg_3")
  32. StartConversation(Conversation, NPC, Spawn, "Who attacks the gates of Freeport? Orcs? Dervish Cutthroats? Qeynosians? Hah! The only good thing about this post is it gives me a lot of time. And even the most daft of fools knows that time equals money.")
  33. end
  34. function dlg_3(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. Conversation = CreateConversation()
  37. AddConversationOption(Conversation, "What do you need?", "dlg_4")
  38. AddConversationOption(Conversation, "No thanks.")
  39. StartConversation(Conversation, NPC, Spawn, "Like I said, I've got free time. So while I'm out here I can acquire commodities that I can then sell to the merchants of Freeport. If I can't be out there earning glory, I'll stay back here and earn coin. Care to help?")
  40. end
  41. function dlg_4(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. Conversation = CreateConversation()
  44. AddConversationOption(Conversation, "Sure.", "OfferSpeckledRattlerVenom")
  45. StartConversation(Conversation, NPC, Spawn, "Venom has been selling quite nicely. There are quite a few speckled rattlers around here. They're a great source of venom. If you bring me back the venom from eight of them I'll give you a portion of what the profit will be. Sound good?")
  46. end
  47. function FirstTimeSpeaking(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. Conversation = CreateConversation()
  50. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1022.mp3", "", "", 0, 0, Spawn)
  51. AddConversationOption(Conversation, "What makes it so dreary?", "dlg_2")
  52. AddConversationOption(Conversation, "I have to go.")
  53. StartConversation(Conversation, NPC, Spawn, "Gerun Pontian of the Militia. I watch the gates. I assure you a more dreary job does not exist in all of D'Lere.")
  54. end
  55. function OfferSpeckledRattlerVenom(NPC, Spawn)
  56. OfferQuest(NPC, Spawn, SpeckledRattlerVenom)
  57. FaceTarget(NPC, Spawn)
  58. Conversation = CreateConversation()
  59. AddConversationOption(Conversation, "I'll be back.")
  60. StartConversation(Conversation, NPC, Spawn, "Great! I'll be here, of course.")
  61. end
  62. function HaventGotTheVenom(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. Conversation = CreateConversation()
  65. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1022.mp3", "", "", 0, 0, Spawn)
  66. AddConversationOption(Conversation, "Not yet.")
  67. StartConversation(Conversation, NPC, Spawn, "Did you get the venom?")
  68. end
  69. function HasGotTheVenom(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. Conversation = CreateConversation()
  72. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1022.mp3", "", "", 0, 0, Spawn)
  73. AddConversationOption(Conversation, "Yes, here it is.", "CompleteSpeckledRattlerVenom")
  74. StartConversation(Conversation, NPC, Spawn, "Did you get the venom?")
  75. end
  76. function CompleteSpeckledRattlerVenom(NPC, Spawn)
  77. SetStepComplete(Spawn, SpeckledRattlerVenom, 2)
  78. FaceTarget(NPC, Spawn)
  79. Conversation = CreateConversation()
  80. AddConversationOption(Conversation, "What is it?")
  81. AddConversationOption(Conversation, "No thanks.")
  82. StartConversation(Conversation, NPC, Spawn, "Good work. You've made us both quite a bit of coin. Thanks for the help. I'm sorry that my tasks have been so dull, it's hard to pull the important missions when you're a lowly gate patrol. I do have something a bit more exciting if you're interested.")
  83. end
  84. function CompletedRattlerQuest(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. Conversation = CreateConversation()
  87. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1022.mp3", "", "", 0, 0, Spawn)
  88. AddConversationOption(Conversation, "My pleasure.")
  89. StartConversation(Conversation, NPC, Spawn, "You did well gathering the snake venom for freeport.")
  90. end