GerunPontian.lua 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --[[
  2. Script Name: SpawnScripts/Commonlands/GerunPontian.lua
  3. Script Purpose: Gerun Pontian
  4. Script Author: vo1d
  5. Script Date: 10/8/2019
  6. Script Notes: n/a
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local SpeckledRattlerVenom = 375
  10. function spawn(NPC)
  11. spawn(NPC)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. Dialog.New(NPC, Spawn)
  19. if HasCompletedQuest(Spawn, SpeckledRattlerVenom) == false and HasQuest(Spawn, SpeckledRattlerVenom) == false then
  20. Dialog.AddDialog("Gerun Pontian of the Militia. I watch the gates. I assure you a more dreary job does not exist in all of D'Lere.")
  21. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_3_1022.mp3", 0, 0)
  22. Dialog.AddOption("What makes it so dreary?", "dlg_2")
  23. Dialog.AddOption("I have to go.")
  24. Dialog.Start()
  25. elseif GetQuestStep(Spawn, SpeckledRattlerVenom) == 1 then
  26. Dialog.New(NPC, Spawn)
  27. Dialog.AddDialog("Did you get the venom?")
  28. Dialog.AddOption("Not yet.")
  29. Dialog.Start()
  30. elseif GetQuestStep(Spawn, SpeckledRattlerVenom) == 2 then
  31. Dialog.New(NPC, Spawn)
  32. Dialog.AddDialog("Did you get the venom?")
  33. Dialog.AddOption("Yes, here it is.", "CompleteSpeckledRattlerVenom")
  34. Dialog.Start()
  35. elseif HasCompletedQuest(Spawn, SpeckledRattlerVenom) == true then
  36. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_3_1022.mp3", 0, 0)
  37. end
  38. end
  39. function dlg_2(NPC, Spawn)
  40. FaceTarget(NPC, Spawn)
  41. Dialog.New(NPC, Spawn)
  42. Dialog.AddDialog("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.")
  43. Dialog.AddVoiceover("", "", 0)
  44. Dialog.AddOption("How does this post turn profit?", "dlg_3")
  45. Dialog.Start()
  46. end
  47. function dlg_3(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. Dialog.New(NPC, Spawn)
  50. Dialog.AddDialog("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?")
  51. Dialog.AddOption("What do you need?", "dlg_4")
  52. Dialog.AddOption("No thanks.")
  53. Dialog.Start()
  54. end
  55. function dlg_4(NPC, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. Dialog.New(NPC, Spawn)
  58. Dialog.AddDialog("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?")
  59. Dialog.AddOption("Sure.", "OfferSpeckledRattlerVenom")
  60. Dialog.Start()
  61. end
  62. function dlg_5(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. Dialog.New(NPC, Spawn)
  65. Dialog.AddDialog("Great! I'll be here, of course.")
  66. Dialog.AddVoiceover("", "", 0)
  67. Dialog.AddOption("I'll be back.")
  68. Dialog.Start()
  69. end
  70. function OfferSpeckledRattlerVenom(NPC, Spawn)
  71. OfferQuest(NPC, Spawn, SpeckledRattlerVenom)
  72. end
  73. function CompleteSpeckledRattlerVenom(NPC, Spawn)
  74. SetStepComplete(Spawn, SpeckledRattlerVenom, 2)
  75. PlaySound(NPC, "sounds/ui/gui_quest_complete.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  76. FaceTarget(NPC, Spawn)
  77. Dialog.New(NPC, Spawn)
  78. Dialog.AddDialog("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.")
  79. Dialog.AddOption("What is it?")
  80. Dialog.AddOption("No thanks.")
  81. Dialog.Start()
  82. end