DirkVagrin.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/DirkVagrin.lua
  3. Script Purpose : Dirk Vagrin
  4. Script Author : Dorbin
  5. Script Date : 06.25.2022
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 11, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC,5597)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. if GetFactionAmount(Spawn,11)<0 then
  18. FaceTarget(NPC, Spawn)
  19. PlayFlavor(NPC, "voiceover/english/dirk_vagrin/qey_village01/qey_village01_dirk_vagrin_multhail1_e70947c7.mp3", "Bah! Go away or I'll ... I'll ... I don't know. Just go away!", "", 3343827845, 2701332902, Spawn)
  20. else
  21. if HasCompletedQuest(Spawn,5597)then
  22. local chance = math.random(0, 100)
  23. if chance <= 25 then
  24. FaceTarget(NPC, Spawn)
  25. PlayFlavor(NPC, "voiceover/english/dirk_vagrin/qey_village01/qey_village01_dirk_vagrin_multhail2_be08c03e.mp3", "Bah! Off with ye! These barrels are mine! Mine!", "", 4248926679, 4124146023, Spawn, 0)
  26. end
  27. elseif not HasQuest(Spawn, 5597) and not HasCompletedQuest(Spawn,5597)then
  28. local chance = math.random(0, 100)
  29. if chance <= 80 then
  30. local choice = MakeRandomInt(1,3)
  31. FaceTarget(NPC, Spawn)
  32. if choice == 1 then
  33. PlayFlavor(NPC, "voiceover/english/dirk_vagrin/qey_village01/qey_village01_dirk_vagrin_callout_ab43615b.mp3", "Ehh? Who goes there? You looking for adventure? I bet my shinys will tempt you!", "boggle", 2386377043, 3237731304, Spawn)
  34. elseif choice == 2 then
  35. PlayFlavor(NPC, "voiceover/english/dirk_vagrin/qey_village01/qey_village01_dirk_vagrin_multhail2_be08c03e.mp3", "Bah! Off with ye! These barrels are mine! Mine!", "", 4248926679, 4124146023, Spawn, 0)
  36. elseif choice == 3 then --Repeated for focus
  37. PlayFlavor(NPC, "voiceover/english/dirk_vagrin/qey_village01/qey_village01_dirk_vagrin_callout_ab43615b.mp3", "Ehh? Who goes there? You looking for adventure? I bet my shinys will tempt you!", "boggle", 2386377043, 3237731304, Spawn)
  38. end
  39. end
  40. end
  41. end
  42. end
  43. function LeaveRange(NPC, Spawn)
  44. end
  45. function hailed(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. if GetFactionAmount(Spawn,11)<0 then
  48. PlayFlavor(NPC, "voiceover/english/dirk_vagrin/qey_village01/qey_village01_dirk_vagrin_multhail1_e70947c7.mp3", "Bah! Go away or I'll ... I'll ... I don't know. Just go away!", "", 3343827845, 2701332902, Spawn)
  49. else
  50. Dialog1(NPC, Spawn)
  51. end
  52. end
  53. function Dialog1(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. Dialog.New(NPC, Spawn)
  56. PlayFlavor(NPC, "", "", "noway", 0, 0, Spawn)
  57. Dialog.AddDialog("Bah! Off with ye! These barrels are mine! Mine!")
  58. Dialog.AddVoiceover("voiceover/english/devon_varin/qey_village01/dirkvagrin000.mp3", 2305501029, 475655569)
  59. if not HasCompletedQuest (Spawn, 5597) and not HasQuest (Spawn, 5597) then
  60. Dialog.AddOption("But those barrels look look empty...","Empty")
  61. end
  62. if GetQuestStep (Spawn, 5597)==2 then
  63. Dialog.AddOption("I've come back with the 'scalies' you asked for.","Delivered")
  64. end
  65. Dialog.AddOption("Yeesh. Sorry to bother you!")
  66. Dialog.Start()
  67. end
  68. function Empty(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. Dialog.New(NPC, Spawn)
  71. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn)
  72. Dialog.AddDialog("Of course they're empty! You think I'm crazy?! They need to be emtpy before I can fill them, right? I'll fill them with albino snakeskins! Scalies! You know the white scalies?! I pay a good shiney for scalies! HAH! Shineies for scalies! Shhhinies for scaaalies!")
  73. Dialog.AddVoiceover("voiceover/english/devon_varin/qey_village01/dirkvagrin001.mp3", 798602979, 2160251346)
  74. Dialog.AddOption("I could get you some albino snakeskins... scalies... if you're paying with 'shinies'.", "QuestBegin")
  75. Dialog.AddOption("... I think I hear someone calling me... over there.")
  76. Dialog.Start()
  77. end
  78. function QuestBegin (NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. OfferQuest(NPC, Spawn, 5597)
  81. end
  82. function Delivered(NPC, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. Dialog.New(NPC, Spawn)
  85. PlayAnimation(NPC,10760)
  86. SetStepComplete(Spawn, 5597, 2)
  87. Dialog.AddDialog("HAHahah! Give'm here! Take your shinies! Hah! You scalies! Into the barrels with you all!")
  88. Dialog.AddVoiceover("voiceover/english/devon_varin/qey_village01/dirkvagrin003.mp3", 3809079045, 2637215855)
  89. Dialog.AddOption("...Thanks for the 'shinies'.")
  90. Dialog.Start()
  91. end