Vondorinsarnoo.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/Vondorinsarnoo.lua
  3. Script Purpose : Vondorinsarnoo
  4. Script Author : John Adams
  5. Script Date : 2008.09.23
  6. Script Notes : Completely recreated using new format, applied all voiceovers/language check - Dorbin 06.29.2022
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  10. -- Quest ID's
  11. local SOBERING_REMEDY = 246
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, SOBERING_REMEDY)
  14. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function InRange(NPC,Spawn)
  20. if GetFactionAmount(Spawn,11)<0 then
  21. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  22. else
  23. if not HasQuest(Spawn, SOBERING_REMEDY) and not HasCompletedQuest(Spawn,SOBERING_REMEDY)then
  24. if math.random(1,100)<=85 then
  25. if not HasLanguage(Spawn,4)then
  26. Garbled(NPC,Spawn)
  27. else
  28. if math.random(1,100)<=65 then
  29. PlayFlavor(NPC, "voiceover/english/vondorinsarnoo/qey_village02/100_erudite_sorcerer_callout_df456754.mp3", "We're all coping with the recent events. Some in better ways than others. Take that poor drunk Hubert across the way. I must help that poor lost soul.", "", 764679878, 531610440, Spawn,4)
  30. -- FaceTarget(NPC, Spawn)
  31. end
  32. end
  33. end
  34. end
  35. end
  36. end
  37. function hailed(NPC, Spawn)
  38. FaceTarget(NPC,Spawn)
  39. PlayAnimation(NPC,539)
  40. if GetFactionAmount(Spawn,11) <0 then
  41. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  42. else
  43. if not HasLanguage(Spawn,4)then
  44. Garbled(NPC,Spawn)
  45. else
  46. Dialog3(NPC, Spawn)
  47. end
  48. end
  49. end
  50. function Dialog1(NPC, Spawn)
  51. FaceTarget(NPC, Spawn)
  52. Dialog.New(NPC, Spawn)
  53. Dialog.AddDialog("His faith is shaken, and he's suffered insurmountable hardships and loss. I could help this poor soul, but first, I must remove him from his drunken stupor.")
  54. Dialog.AddVoiceover("voiceover/english/vondorinsarnoo/qey_village02/vondorinsarnoo000.mp3", 1058669874, 774577358)
  55. Dialog.AddLanguage(4)
  56. Dialog.AddOption("I'll help you, seems to be a worthy cause.", "OfferQuestSoberingRemedy")
  57. Dialog.AddOption("Best of luck to you. I'll be off to pursue other interests.")
  58. Dialog.Start()
  59. end
  60. function OfferQuestSoberingRemedy(NPC, Spawn)
  61. OfferQuest(NPC, Spawn, SOBERING_REMEDY)
  62. end
  63. function Turnin(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. Dialog.New(NPC, Spawn)
  66. PlayFlavor(NPC,"","","stinky",0,0,Spawn)
  67. Dialog.AddDialog("Whew, from the stench I can tell you have the putrid ingredients. Depart now traveler. I must care for Hubert.")
  68. Dialog.AddVoiceover("voiceover/english/vondorinsarnoo/qey_village02/vondorinsarnoo002.mp3", 2853879143, 1516182372)
  69. SetStepComplete(Spawn, SOBERING_REMEDY, 4)
  70. Dialog.AddLanguage(4)
  71. Dialog.AddOption("Best of luck with Hubert.")
  72. Dialog.AddOption("Yes, wonderful. Now to find somewhere to wash off this oder.")
  73. Dialog.Start()
  74. end
  75. function Dialog3(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. Dialog.New(NPC, Spawn)
  78. Dialog.AddDialog("We are coping with the recent events... some in better ways than others. Take that poor drunk, Hubert, across the way for instance...")
  79. Dialog.AddVoiceover("voiceover/english/vondorinsarnoo/qey_village02/vondorinsarnoo.mp3", 2553715267, 748246036)
  80. Dialog.AddLanguage(4)
  81. if not HasQuest(Spawn, SOBERING_REMEDY) and not HasCompletedQuest(Spawn,SOBERING_REMEDY) then
  82. Dialog.AddOption("What's wrong with him?","Dialog1")
  83. end
  84. if GetQuestStep(Spawn,SOBERING_REMEDY) ==4 then
  85. Dialog.AddOption("Here are the components you asked for.","Turnin")
  86. end
  87. Dialog.AddOption("Guess some people handle their liquor better than others. Good day!")
  88. Dialog.Start()
  89. end
  90. function respawn(NPC)
  91. spawn(NPC)
  92. end