9
3

RatcatcherZarbt.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --[[
  2. Script Name : SpawnScripts/BigBend/RatcatcherZarbt.lua
  3. Script Purpose : Ratcatcher Zarbt
  4. Script Author : torsten
  5. Script Date : 2022.07.10
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local VerminReduction = 5619
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, VerminReduction)
  12. waypoints(NPC)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. if HasLanguage(Spawn, 15) then --Ykeshan
  20. local count = GetQuestCompleteCount(Spawn, 5619)
  21. if count<5 then --repeatable exactly 5 times
  22. if GetQuestStep(Spawn, VerminReduction) == 2 then
  23. SetStepComplete(Spawn, VerminReduction, 2)
  24. else
  25. Dialog.New(NPC, Spawn)
  26. Dialog.AddDialog("Hass you seens any rats around latelys? ")
  27. Dialog.AddVoiceover("voiceover/english/optional1/ratcatcher_zarbt/fprt_hood1/qst_ratcatcherzarbt.mp3", 3774469332, 1538503466)
  28. Dialog.AddLanguage(15)
  29. Dialog.AddOption("Why would I care about rats? Don't bother me.")
  30. Dialog.Start()
  31. OfferQuest(NPC, Spawn, VerminReduction)
  32. end
  33. end
  34. end
  35. RandomGreeting(NPC, Spawn)
  36. end
  37. function RandomGreeting(NPC, Spawn)
  38. local choice = MakeRandomInt(1,2)
  39. if choice == 1 then
  40. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1032.mp3", 0, 0, Spawn)
  41. elseif choice == 2 then
  42. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1032.mp3", 0, 0, Spawn)
  43. end
  44. end
  45. function waypoints(NPC)
  46. MovementLoopAddLocation(NPC, -27.38, -4.67, 101.28, 4, 0)
  47. MovementLoopAddLocation(NPC, -26.77, -4.65, 87.02, 2, 0)
  48. MovementLoopAddLocation(NPC, -26.06, -4.49, 70.28, 2, 0)
  49. MovementLoopAddLocation(NPC, -25.79, -4.5, 63.68, 2, 0)
  50. MovementLoopAddLocation(NPC, -22.1, -3.22, 51.18, 2, 0)
  51. MovementLoopAddLocation(NPC, -22.5, -2.13, 42.24, 2, math.random(8,12))
  52. MovementLoopAddLocation(NPC, -33.67, -0.73, 40.25, 2, 0)
  53. MovementLoopAddLocation(NPC, -36.06, -0.61, 38.12, 2, 0)
  54. MovementLoopAddLocation(NPC, -47.13, 0.59, 21.15, 2, 0)
  55. MovementLoopAddLocation(NPC, -55.5, 3.52, 2.33, 2, 0)
  56. MovementLoopAddLocation(NPC, -50.76, 3.99, -4.11, 2, 0)
  57. MovementLoopAddLocation(NPC, -32.76, 4.28, -20.35, 2, 0)
  58. MovementLoopAddLocation(NPC, -21.39, 3.4, -28.99, 2, 0)
  59. MovementLoopAddLocation(NPC, -15.94, 3, -31.83, 2, 0)
  60. MovementLoopAddLocation(NPC, -4.11, 2.95, -32.19, 2, math.random(8,12))
  61. MovementLoopAddLocation(NPC, 4.21, 2.38, -30.66, 2, 0)
  62. MovementLoopAddLocation(NPC, 18.61, 1.41, -25.79, 4, 0)
  63. MovementLoopAddLocation(NPC, 36.11, -0.73, -13.78, 2, 0)
  64. MovementLoopAddLocation(NPC, 42.65, -1.46, 1.48, 2, 0)
  65. MovementLoopAddLocation(NPC, 44.33, -1.52, 10.75, 4, 0)
  66. MovementLoopAddLocation(NPC, 34.44, -1.34, 15.57, 2, math.random(8,12))
  67. MovementLoopAddLocation(NPC, 26.97, -0.62, 16.75, 2, 0)
  68. MovementLoopAddLocation(NPC, 18.53, 0, 15.89, 2, 0)
  69. MovementLoopAddLocation(NPC, 8.33, 0.04, 14.01, 2, 0)
  70. MovementLoopAddLocation(NPC, -10.5, 0, 18.02, 2, 0)
  71. MovementLoopAddLocation(NPC, -15.78, 0, 10.78, 1, 1)
  72. MovementLoopAddLocation(NPC, -20.29, 0, -7.88, 2, 0)
  73. MovementLoopAddLocation(NPC, -10.24, 0, -17.33, 2, 0)
  74. MovementLoopAddLocation(NPC, 10.63, 0, -8.32, 2, 0)
  75. MovementLoopAddLocation(NPC, 17, 0, 6.58, 2, 0)
  76. MovementLoopAddLocation(NPC, 15.7, 0, 13.55, 2, 0)
  77. MovementLoopAddLocation(NPC, -12.07, 0, 18.45, 2, 0)
  78. MovementLoopAddLocation(NPC, -23.52, -0.03, 28.77, 2, 0)
  79. MovementLoopAddLocation(NPC, -24.89, -0.67, 33.87, 2, math.random(8,12))
  80. MovementLoopAddLocation(NPC, -22.42, -3.26, 51.4, 2, 0)
  81. MovementLoopAddLocation(NPC, -25.62, -4.31, 63.3, 2, 0)
  82. MovementLoopAddLocation(NPC, -27.32, -4.67, 101.83, 2, 0)
  83. end