OldManMuckwort.lua 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. --[[
  2. Script Name : SpawnScripts/TempleSt/OldManMuckwort.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.10.23 04:10:16
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local MucksQuest = 5874
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, MucksQuest)
  12. SetPlayerProximityFunction(NPC, 9, "InRange", "LeaveRange")
  13. SetTempVariable(NPC, "CalloutTimer", "false")
  14. SetTempVariable(NPC, "CalloutTimer1", "false")
  15. end
  16. function InRange(NPC, Spawn)
  17. if GetFactionAmount(Spawn,12) <0 then
  18. FaceTarget(NPC, Spawn)
  19. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  20. else
  21. if not HasCompletedQuest(Spawn, MucksQuest) then
  22. if GetTempVariable(NPC, "CalloutTimer")== "false"then
  23. SetTempVariable(NPC, "CalloutTimer", "true")
  24. AddTimer(NPC,10000,"ResetTimer",1,Spawn)
  25. FaceTarget(NPC, Spawn)
  26. if GetTempVariable(NPC, "CalloutTimer1")== "false"then
  27. PlayFlavor(NPC, "voiceover/english/old_man_muckwort/fprt_hood03/100_oldmanmuckwort_callout_ff44b21f.mp3", "Darn pests... messing up my yard and sneaking up on my porch... What do you need, ya' snot-nosed punk?", "grumble", 3612569160, 2400812732, Spawn, 0)
  28. SetTempVariable(NPC, "CalloutTimer1", "true")
  29. elseif GetTempVariable(NPC, "CalloutTimer1")== "true"then
  30. PlayFlavor(NPC, "voiceover/english/old_man_muckwort/fprt_hood03/100_oldmanmuckwort_multhail1_13434115.mp3", "Bah! Keep your meddling to yourself, leave me be ... and STAY OFF MY PORCH! You heard me, get out of here!", "threaten", 3647820805, 3418409987, Spawn, 0)
  31. SetTempVariable(NPC, "CalloutTimer1", "false")
  32. end
  33. end
  34. end
  35. end
  36. end
  37. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  38. SetTempVariable(NPC, "CalloutTimer", "false")
  39. end
  40. function respawn(NPC)
  41. spawn(NPC)
  42. end
  43. function hailed(NPC, Spawn)
  44. if GetFactionAmount(Spawn,12) <0 then
  45. FaceTarget(NPC, Spawn)
  46. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  47. else
  48. Dialog1(NPC,Spawn)
  49. end
  50. end
  51. function Dialog1(NPC,Spawn)
  52. FaceTarget(NPC, Spawn)
  53. Dialog.New(NPC, Spawn)
  54. Dialog.AddDialog("Bah! Keep your meddling to yourself and leave me be. And STAY OFF MY PORCH!")
  55. PlayFlavor(NPC, "","","glare",0,0, Spawn)
  56. Dialog.AddVoiceover("voiceover/english/old_man_muckwort/fprt_hood03/qst_oldmanmuckwort.mp3",3076890390,3782590712)
  57. if CanReceiveQuest(Spawn, MucksQuest) then
  58. Dialog.AddOption("Let me guess: you live here so you can be the tallest?", "Dialog1a")
  59. elseif GetQuestStep(Spawn, MucksQuest)==2 then
  60. Dialog.AddOption("Here's the vial from Crantik. Take it quick, old man.", "Dialog2")
  61. end
  62. Dialog.AddOption("Alright! I'm going.")
  63. Dialog.Start()
  64. end
  65. function Dialog1a(NPC,Spawn)
  66. FaceTarget(NPC, Spawn)
  67. Dialog.New(NPC, Spawn)
  68. Dialog.AddDialog("For your information, I've always lived here. The Militia told me to move out and I told them to stuff it! You don't live to be my age by following orders from whippersnapper Militia guards! Now all these pesky little gnomes and rats scurry around and wake me up in the middle of the night! BAH!")
  69. Dialog.AddVoiceover("voiceover/english/old_man_muckwort/fprt_hood03/quests/oldmanmuckwort/muckwort_x1_initial.mp3",4224386696,2671412005)
  70. Dialog.AddOption("I see. Well, do you have anything that needs doing?", "Dialog1b")
  71. Dialog.AddOption("Don't worry. I'll see myself out.")
  72. Dialog.Start()
  73. end
  74. function Dialog1b(NPC,Spawn)
  75. FaceTarget(NPC, Spawn)
  76. Dialog.New(NPC, Spawn)
  77. Dialog.AddDialog("Are you implying I can't take care of myself? I can hold my own, you little punk. Don't make me put up my dukes! I'll knock your socks off doggone it!")
  78. Dialog.AddVoiceover("voiceover/english/old_man_muckwort/fprt_hood03/quests/oldmanmuckwort/muckwort_x1_initial2.mp3",2387965843,630955162)
  79. PlayFlavor(NPC, "","","stare",0,0, Spawn)
  80. Dialog.AddOption("No, no! I am trying to help cool your temper!", "OfferQuest1")
  81. Dialog.AddOption("Maybe I'll come back when you're not so angry.")
  82. Dialog.Start()
  83. end
  84. function OfferQuest1(NPC,Spawn)
  85. if CanReceiveQuest(Spawn, MucksQuest) then
  86. OfferQuest(NPC, Spawn, MucksQuest)
  87. end
  88. end
  89. function Dialog2(NPC,Spawn)
  90. FaceTarget(NPC, Spawn)
  91. Dialog.New(NPC, Spawn)
  92. Dialog.AddDialog("It took you long enough! I'm not getting any younger you know! Now, how much did he make? Good. Good. This is enough for another spray down ... Traipse on my lawn will those gnomes and Ratonga? More like run around screaming with holes burned in their feet! Heee heeee heeeee ... Now, look here, this copper is for you! Don't spend it in one place, you hear? NOW GET OFF MY LAWN!")
  93. Dialog.AddVoiceover("voiceover/english/old_man_muckwort/fprt_hood03/quests/oldmanmuckwort/muckwort_x1_finish.mp3",2708189106,591579773)
  94. PlayFlavor(NPC, "","","lookaway",0,0, Spawn)
  95. if GetRace(Spawn)== 5 then
  96. Dialog.AddOption("Well, it won't stop this gnome!...\n\n[Swipe a stien off the table]")
  97. elseif GetRace(Spawn)== 13 then
  98. Dialog.AddOption("Well, it won't stop this ratonga!...\n\n[Swipe a stien off the table]")
  99. else
  100. Dialog.AddOption("You had me deliver... poison... for this?!...\n\n[Swipe a stien off the table]")
  101. end
  102. Dialog.Start()
  103. SetStepComplete(Spawn, MucksQuest, 2)
  104. end