VidaSweeps.lua 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. if not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  19. FaceTarget(NPC, Spawn)
  20. 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)
  21. end
  22. end
  23. function LeaveRange(NPC, Spawn)
  24. end
  25. --[[
  26. function hailed(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. conversation = CreateConversation()
  29. PlayFlavor(NPC, "voiceover/english/vida_sweeps/qey_village01/vidasweeps000.mp3", "", "", 931509640, 2296016698, Spawn)
  30. if not HasCompletedQuest(Spawn, QUEST_1) then
  31. if HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 2 then
  32. AddConversationOption(conversation, "I brought back the new broom from Tawli. She was a bit tough to find.", "dlg_13_1")
  33. elseif GetLevel(Spawn) >= 3 then
  34. AddConversationOption(conversation, "What little rocks?", "TheseStones")
  35. end
  36. end
  37. AddConversationOption(conversation, "Good luck with your work.")
  38. StartConversation(conversation, NPC, Spawn, "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.")
  39. end
  40. ]]
  41. function hailed(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC,Spawn)
  44. 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.")
  45. Dialog.AddVoiceover("voiceover/english/vida_sweeps/qey_village01/vidasweeps000.mp3", 931509640, 2296016698)
  46. Dialog.AddOption("I brought back the new broom from Tawli. She was a bit tough to find.", "dlg_13_1")
  47. Dialog.AddOptionRequirement(REQ_QUEST_NOT_HAS_COMPLETED_QUEST, QUEST_1)
  48. Dialog.AddOptionRequirement(REQ_QUEST_ON_STEP, QUEST_1, 2)
  49. Dialog.AddOption("What little rocks?", "TheseStones")
  50. Dialog.AddOptionRequirement(REQ_QUEST_NOT_HAS_COMPLETED_QUEST, QUEST_1)
  51. Dialog.AddOptionRequirement(REQ_QUEST_DOESNT_HAVE_QUEST, QUEST_1)
  52. Dialog.AddOptionRequirement(REQ_LEVEL_GREATER_OR_EQUAL, 3)
  53. Dialog.AddOption("Good luck with your work.")
  54. Dialog.Start()
  55. end
  56. function TheseStones(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. conversation = CreateConversation()
  59. PlayFlavor(NPC, "voiceover/english/vida_sweeps/qey_village01/vidasweeps001.mp3", "", "", 3847370594, 2690301162, Spawn)
  60. AddConversationOption(conversation, "I'll help you out. I am interested in the blue stone.", "OfferQuest1")
  61. AddConversationOption(conversation, "I'm sorry, but I really don't have time to run an errand for you.")
  62. StartConversation(conversation, NPC, Spawn, "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.")
  63. end
  64. function OfferQuest1(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. OfferQuest(NPC, Spawn, QUEST_1)
  67. end
  68. function dlg_13_1(NPC, Spawn)
  69. SetStepComplete(Spawn, QUEST_1, 2)
  70. FaceTarget(NPC, Spawn)
  71. conversation = CreateConversation()
  72. PlayFlavor(NPC, "voiceover/english/vida_sweeps/qey_village01/vidasweeps003.mp3", "", "", 1668292894, 3552793002, Spawn)
  73. AddConversationOption(conversation, "What should I do with this blue stone?", "dlg_13_2")
  74. AddConversationOption(conversation, "Thank you very much. ")
  75. StartConversation(conversation, NPC, Spawn, "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.")
  76. end
  77. function dlg_13_2(NPC, Spawn)
  78. FaceTarget(NPC, Spawn)
  79. conversation = CreateConversation()
  80. PlayFlavor(NPC, "voiceover/english/vida_sweeps/qey_village01/vidasweeps004.mp3", "", "", 2095544938, 2706458688, Spawn)
  81. AddConversationOption(conversation, "Hmm... I'll keep that in mind.")
  82. StartConversation(conversation, NPC, Spawn, "I suppose that is up to you. Maybe you can take it to a mineral expert somewhere in the city.")
  83. end