TagganBrookrich.lua 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/TagganBrookrich.lua
  3. Script Purpose : Taggan Brookrich
  4. Script Author : Dorbin
  5. Script Date :07.02.2022
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 9, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC,5602)
  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, "", "", "glare", 0, 0, Spawn)
  20. else
  21. if not HasQuest(Spawn, 5602) and not HasCompletedQuest(Spawn,5602)then
  22. local chance = math.random(0, 100)
  23. if chance <= 80 then
  24. local choice = MakeRandomInt(1,3)
  25. FaceTarget(NPC, Spawn)
  26. if choice == 1 then
  27. PlayFlavor(NPC, "voiceover/english/taggan_brookrich/qey_village02/100_human_spectator_multhail1_8a7fa75d.mp3", "Sorry, friend. I don't think you can help with my cunning scheme.", "no", 3665262967, 2636803513, Spawn)
  28. elseif choice == 2 then
  29. PlayFlavor(NPC, "voiceover/english/taggan_brookrich/qey_village02/100_human_spectator_callout_85964bfe.mp3", "Can you believe Vandis? You'd think he'd want help considering the mess he's in. But, ooohhh no... He's too stubborn to listen to any advice. When will he learn that he can't win without help?", "confused", 3426132034, 1351118898, Spawn, 0)
  30. elseif choice == 3 then --Repeated for focus
  31. PlayFlavor(NPC, "voiceover/english/taggan_brookrich/qey_village02/100_human_spectator_callout_85964bfe.mp3", "Can you believe Vandis? You'd think he'd want help considering the mess he's in. But, ooohhh no... He's too stubborn to listen to any advice. When will he learn that he can't win without help?", "confused", 3426132034, 1351118898, Spawn, 0)
  32. end
  33. end
  34. end
  35. end
  36. end
  37. function hailed(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. if GetFactionAmount(Spawn,11)<0 then
  40. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  41. else
  42. Dialog1(NPC, Spawn)
  43. end
  44. end
  45. function Dialog1(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. Dialog.New(NPC, Spawn)
  48. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  49. Dialog.AddDialog("Hello there! Hey, you'd think Vandis would want help considering the mess he's in. But, ooohhh no... He's too stubborn to listen to any advice.")
  50. Dialog.AddVoiceover("voiceover/english/taggan_brookrich/qey_village02/tagganbrookrich.mp3", 3755219167, 2355974799)
  51. if not HasCompletedQuest (Spawn, 5601) and not HasQuest (Spawn, 5602) then
  52. Dialog.AddOption("From that King's field game over there? What sort of advice are you talking about?","Dialog2")
  53. end
  54. if GetQuestStep (Spawn, 5602)==2 then
  55. Dialog.AddOption("Here are the rats you asked for. Unfortunately they are dead and some smell foul!","Delivered")
  56. end
  57. Dialog.AddOption("I'll leave you to figuring out that 'advice'.")
  58. Dialog.Start()
  59. end
  60. function Dialog2(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. Dialog.New(NPC, Spawn)
  63. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  64. Dialog.AddDialog("I told him he should try and get his game thrown out, but he's losing too bady to recover now. If I could find a distraction I could get the game called off...")
  65. Dialog.AddVoiceover("voiceover/english/taggan_brookrich/qey_village02/tagganbrookrich000.mp3", 1520241619, 3438346932)
  66. Dialog.AddOption("Why not rats? The foul things scurry about and would be distracting enough.", "QuestBegin")
  67. Dialog.AddOption("I'm leaving this scheme up to you. I'm needed elsewhere.")
  68. Dialog.Start()
  69. end
  70. function QuestBegin (NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. OfferQuest(NPC, Spawn, 5602)
  73. end
  74. function Delivered(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. Dialog.New(NPC, Spawn)
  77. SetStepComplete(Spawn, 5602, 2)
  78. PlayFlavor(NPC, "", "", "shrug", 0, 0, Spawn)
  79. Dialog.AddDialog("Oh don't mind that. Some of the city's less fortunate people eat sewer rats from time to time. Never you mind, these rats are perfect!")
  80. Dialog.AddVoiceover("voiceover/english/taggan_brookrich/qey_village02/tagganbrookrich002.mp3", 1496475770, 1677679367)
  81. Dialog.AddOption("Good luck on that 'distraction' of yours.")
  82. Dialog.Start()
  83. end