9
3

VidaSweeps.lua 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/VidaSweeps.lua
  3. Script Purpose : Vida Sweeps
  4. Script Author : Scatman
  5. Script Date : 2009.08.12
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local QUEST_1 = 310
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, QUEST_1)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. AddTimer(NPC, 5000, "EmoteLoop")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn)
  19. if not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  20. FaceTarget(NPC, Spawn)
  21. PlayFlavor(NPC, "voiceover/english/vida_sweeps/qey_village01/qey_village01_groundskeeper_vida_sweeps_callout_6c14234e.mp3", "So much to do! So little time! I must finish my sweeping, but I need a new broom. Perhaps you'll help me in return for a precious stone?", "confused", 1752767860, 1342853234, Spawn)
  22. end
  23. end
  24. function LeaveRange(NPC, Spawn)
  25. end
  26. function hailed(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. Dialog.New(NPC,Spawn)
  29. Dialog.AddDialog("So much to do! So little time! I must get these tents in order, and all this sweeping is giving me blisters. It wouldn't be so bad if there weren't all these little rocks about.")
  30. Dialog.AddVoiceover("voiceover/english/vida_sweeps/qey_village01/vidasweeps000.mp3", 931509640, 2296016698)
  31. Dialog.AddOption("I brought back the new broom from Tawli. She was a bit tough to find.", "dlg_13_1")
  32. Dialog.AddOptionRequirement(REQ_QUEST_NOT_HAS_COMPLETED_QUEST, QUEST_1)
  33. Dialog.AddOptionRequirement(REQ_QUEST_ON_STEP, QUEST_1, 2)
  34. Dialog.AddOption("What little rocks?", "TheseStones")
  35. Dialog.AddOptionRequirement(REQ_QUEST_NOT_HAS_COMPLETED_QUEST, QUEST_1)
  36. Dialog.AddOptionRequirement(REQ_QUEST_DOESNT_HAVE_QUEST, QUEST_1)
  37. Dialog.AddOptionRequirement(REQ_LEVEL_GREATER_OR_EQUAL, 3)
  38. Dialog.AddOption("Good luck with your work.")
  39. Dialog.Start()
  40. end
  41. function TheseStones(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC, Spawn)
  44. Dialog.AddDialog("These stones on the ground, of course ... I guess I swept away most of the pebbles, but I did keep one strange blue rock that I found in the dust. If you agree to help me, I'll give you the precious stone as payment. Unfortunately, I'm short on coin.")
  45. Dialog.AddVoiceover("voiceover/english/vida_sweeps/qey_village01/vidasweeps001.mp3", 3847370594, 2690301162)
  46. Dialog.AddOption("I'll help you out. I am interested in the blue stone.", "OfferQuest1")
  47. Dialog.AddOption("I'm sorry, but I really don't have time to run an errand for you.")
  48. Dialog.Start()
  49. end
  50. function OfferQuest1(NPC, Spawn)
  51. FaceTarget(NPC, Spawn)
  52. OfferQuest(NPC, Spawn, QUEST_1)
  53. end
  54. function dlg_13_1(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. Dialog.New(NPC, Spawn)
  57. SetStepComplete(Spawn, QUEST_1, 2)
  58. Dialog.AddDialog("Aye, I told you she was a bit flighty. Thank you for the broom and here is the stone I promised. I hope it brings you good luck.")
  59. Dialog.AddVoiceover("voiceover/english/vida_sweeps/qey_village01/vidasweeps003.mp3", 1668292894, 3552793002)
  60. Dialog.AddOption("What should I do with this blue stone?", "Dialog7")
  61. Dialog.AddOption("Thank you very much. ")
  62. Dialog.Start()
  63. end
  64. function Dialog7(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. Dialog.New(NPC, Spawn)
  67. PlayFlavor(QuestGiver, "", "", "ponder", 0, 0, Player)
  68. Dialog.AddDialog("I suppose that is up to you. Maybe you can take it to a mineral expert somewhere in the city.")
  69. Dialog.AddVoiceover("voiceover/english/vida_sweeps/qey_village01/vidasweeps004.mp3", 2095544938, 2706458688)
  70. Dialog.AddOption("Hmm... I'll keep that in mind.")
  71. Dialog.Start()
  72. end
  73. function EmoteLoop(NPC)
  74. local emoteChoice = MakeRandomInt(1,3)
  75. if emoteChoice == 1 then
  76. -- ponder
  77. PlayAnimation(NPC, 12030)
  78. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  79. elseif emoteChoice == 2 then
  80. -- sniff
  81. PlayAnimation(NPC, 12329)
  82. AddTimer(NPC, MakeRandomInt(6000,9000), "EmoteLoop")
  83. else
  84. -- tapfoot
  85. PlayAnimation(NPC, 13056)
  86. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  87. end
  88. end