GerbardtheSnitch.lua 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. --[[
  2. Script Name : SpawnScripts/SunkenCity_Classic/GerbardtheSnitch.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.11.01 07:11:37
  5. Script Purpose :
  6. :
  7. --]]
  8. local QUEST_1 = 387
  9. require "SpawnScripts/Generic/DialogModule"
  10. function spawn(NPC)
  11. ProvidesQuest(NPC,QUEST_1)
  12. SetPlayerProximityFunction(NPC, 9, "InRange", "LeaveRange")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC,Spawn)
  18. if not HasCompletedQuest(Spawn,QUEST_1) then
  19. PlayFlavor(NPC,"","","grumble",0,0,Spawn)
  20. end
  21. end
  22. function hailed(NPC, Spawn)
  23. Dialog1(NPC, Spawn)
  24. end
  25. function Dialog1(NPC, Spawn)
  26. FaceTarget(NPC, Spawn)
  27. Dialog.New(NPC, Spawn)
  28. Dialog.AddDialog("Oh no! I did it again! The boys back on the boat are gonna kill me!")
  29. Dialog.AddVoiceover("voiceover/english/gerbard_the_snitch/fprt_adv01_sunken/gerbard_the_snitch000.mp3", 2512842567, 445857936)
  30. PlayFlavor(NPC,"","","sight",0,0,Spawn)
  31. if CanReceiveQuest(Spawn, QUEST_1) then
  32. Dialog.AddOption("What happened?", "Dialog2")
  33. elseif GetQuestStep(Spawn, QUEST_1)==2 then
  34. Dialog.AddOption("I've returned with the pirate coins.", "Dialog3")
  35. end
  36. Dialog.AddOption("That sounds like something I'd rather stay out of.")
  37. Dialog.Start()
  38. end
  39. function Dialog2(NPC, Spawn)
  40. FaceTarget(NPC, Spawn)
  41. Dialog.New(NPC, Spawn)
  42. Dialog.AddDialog("I blew all my coins on a game of dice. I just need a few more pirate coins to throw in, and I'll earn back my money in no time! Will you help me out? My crew will toss me overboard if they find out how much money I lost!")
  43. Dialog.AddVoiceover("voiceover/english/gerbard_the_snitch/fprt_adv01_sunken/gerbard_the_snitch001.mp3", 2460257667, 2197101465)
  44. Dialog.AddOption("I'll do it, whats involved?", "Offer")
  45. Dialog.AddOption("Not today, sorry.")
  46. Dialog.Start()
  47. end
  48. function Offer(NPC,Spawn)
  49. OfferQuest(NPC,Spawn,QUEST_1)
  50. end
  51. function Dialog3(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. Dialog.New(NPC, Spawn)
  54. Dialog.AddDialog("You're a lifesaver! Now it's time to win it all back.")
  55. Dialog.AddVoiceover("voiceover/english/gerbard_the_snitch/fprt_adv01_sunken/gerbard_the_snitch003.mp3", 1766615640, 492599183)
  56. PlayFlavor(NPC,"","","smile",0,0,Spawn)
  57. Dialog.AddOption("Good luck.")
  58. Dialog.Start()
  59. SetStepComplete(Spawn,QUEST_1,2)
  60. end