9
3

Verth.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/Verth.lua
  3. Script Purpose : Verth
  4. Script Author : John Adams
  5. Script Date : 2008.09.24
  6. Script Notes : Original had 1 PlayFlavor. Recreated quest, applied voiceovers, and used new dialog format - Dorbin 06.25.2022
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Delivery = 5595
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC, Delivery)
  13. end
  14. function InRange(NPC, Spawn) --Quest Callout
  15. if GetFactionAmount(Spawn,11)<0 then
  16. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. else
  19. if math.random(1, 100) <= 85 then
  20. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) then
  21. FaceTarget(NPC, Spawn)
  22. choice = math.random(1,3)
  23. if choice ==1 then
  24. PlayFlavor(NPC, "voiceover/english/verth/qey_village01/qey_village01_flavor_verth_callout_12846b29.mp3", "Psst! Come over here!", "beckon", 2983925092, 3211744371, Spawn)
  25. elseif choice ==2 then
  26. PlayFlavor(NPC, "voiceover/english/verth/qey_village01/qey_village01_flavor_verth_multhail1_1b036b2d.mp3", "That meddling Falkoner didn't see you come back here, did he? Hmmm... I don't know if I can trust you. You better leave, now!", "", 1876464980, 1327443401, Spawn)
  27. elseif choice ==3 then
  28. PlayFlavor(NPC, "voiceover/english/verth/qey_village01/qey_village01_flavor_verth_callout_12846b29.mp3", "Psst! Come over here!", "beckon", 2983925092, 3211744371, Spawn)
  29. end
  30. end
  31. end
  32. end
  33. end
  34. function hailed(NPC, Spawn)
  35. if GetFactionAmount(Spawn,11)<0 then
  36. FaceTarget(NPC, Spawn)
  37. PlayFlavor(NPC, "", "", "noway", 0, 0, Spawn)
  38. else
  39. if HasCompletedQuest (Spawn, Delivery) then
  40. FaceTarget(NPC, Spawn)
  41. PlayFlavor(NPC, "voiceover/english/verth/qey_village01/qey_village01_flavor_verth_multhail1_1b036b2d.mp3", "That meddling Falkoner didn't see you come back here, did he? Hmmm... I don't know if I can trust you. You better leave, now!", "glare", 1876464980, 1327443401, Spawn)
  42. else
  43. FaceTarget(NPC, Spawn)
  44. Dialog.New(NPC, Spawn)
  45. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  46. Dialog.AddDialog("You didn't let that meddling Falkoner see you come back here, did ya? Well, you do look the type. How'd you like to put your hands on some quick coin?")
  47. Dialog.AddVoiceover("voiceover/english/verth/qey_village01/verth000.mp3", 93012578, 1263443219)
  48. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) then
  49. Dialog.AddOption("I'm listening.", "Helping")
  50. end
  51. if GetQuestStep (Spawn, Delivery)==2 then
  52. Dialog.AddOption("Here is your 'delivery'. You know this stuff isn't allowed in the city, right?","Delivered")
  53. end
  54. if HasQuest (Spawn, Delivery) then
  55. Dialog.AddOption("I'm still working on your pickup. I'll let you know once I've got your package.")
  56. end
  57. if not HasQuest (Spawn, Delivery) then
  58. Dialog.AddOption("I'm not much for dealings in a back alley. Keep your coin.")
  59. end
  60. Dialog.Start()
  61. end
  62. end
  63. end
  64. function Helping(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. Dialog.New(NPC, Spawn)
  67. Dialog.AddDialog("Yes, you look like a trustworthy type to make a delivery for me. What do you say? It's very easy money! All you must do is meet my brother down by the dock.")
  68. Dialog.AddVoiceover("voiceover/english/verth/qey_village01/verth001.mp3", 823694387, 2631515121)
  69. Dialog.AddOption("Sounds easy enough.", "Helping2")
  70. Dialog.AddOption("A delivery? Find someone else to be your courier.")
  71. Dialog.Start()
  72. end
  73. function Helping2(NPC,Spawn)
  74. OfferQuest(NPC,Spawn,Delivery)
  75. end
  76. function Delivered(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. Dialog.New(NPC, Spawn)
  79. SetStepComplete(Spawn, Delivery, 2)
  80. PlayFlavor(NPC, "", "", "shrug", 0, 0, Spawn)
  81. Dialog.AddDialog("Yeah yeah, I know the lecture, but nothing beats a Freeport Stout! I don't care much for the people there, but their brewing, heh, that's a different story.")
  82. Dialog.AddVoiceover("voiceover/english/verth/qey_village01/verth003.mp3", 715579141, 3202334422)
  83. Dialog.AddOption("Pass one here and we'll pretend nothing happened here.","DoneDrink")
  84. Dialog.AddOption("Thanks for the coin. I'll just leave you in this alley to your own devices.","Done")
  85. Dialog.Start()
  86. end
  87. function DoneDrink(NPC,Spawn)
  88. SetStepComplete(Spawn, Delivery, 2)
  89. SummonItem(Spawn,37386,1)
  90. SendMessage(Spawn, "Verth grumbles to himself as he pours out a drink and forces it in your hands.")
  91. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  92. end
  93. function Done(NPC,Spawn)
  94. SetStepComplete(Spawn, Delivery, 2)
  95. end