Dancer.lua 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. --[[
  2. Script Name : SpawnScripts/Antonica/Dancer.lua
  3. Script Purpose : Dancer
  4. Script Author : premierio015
  5. Script Date : 09.05.2022
  6. Script Notes :
  7. --]]
  8. local AFrontiersladysTask = 5528
  9. local BattleWithTheTimberclaws = 5530
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange")
  12. end
  13. function InRange(NPC, Spawn)
  14. if not HasQuest(Spawn, AFrontiersladysTask) and not HasCompletedQuest(Spawn, AFrontiersladysTask) then
  15. ProvidesQuest(NPC, AFrontiersladysTask)
  16. elseif HasCompletedQuest(Spawn, AFrontiersladysTask) then
  17. ProvidesQuest(NPC, BattleWithTheTimberclaws)
  18. SetInfoFlag(NPC)
  19. SetVisualFlag(NPC)
  20. end
  21. end
  22. function respawn(NPC)
  23. spawn(NPC)
  24. end
  25. function hailed(NPC, Spawn)
  26. FaceTarget(NPC, Spawn)
  27. conversation = CreateConversation()
  28. PlayFlavor(NPC, "voiceover/english/verona/antonica/verona000.mp3", "", "", 2049178803, 173582214, Spawn)
  29. if not HasQuest(Spawn, AFrontiersladysTask) and not HasCompletedQuest(Spawn, AFrontiersladysTask) then
  30. AddConversationOption(conversation, "I am a bit of an adventurer and a bit of an explorer.", "Option1")
  31. elseif GetQuestStep(Spawn, AFrontiersladysTask) == 2 then
  32. AddConversationOption(conversation, "Sighard gave me this special arrow.", "Option2")
  33. elseif GetQuestStep(Spawn, AFrontiersladysTask) == 4 or HasCompletedQuest(Spawn, AFrontiersladysTask) and not HasQuest(Spawn, BattleWithTheTimberclaws) and not HasCompletedQuest(Spawn, BattleWithTheTimberclaws) then
  34. AddConversationOption(conversation, "The arrow is in the training dummy.", "Option4")
  35. elseif HasQuest(Spawn, BattleWithTheTimberclaws) then
  36. AddConversationOption(conversation, "You so quickly forget the world's greatest adventurer.", "Option6")
  37. elseif GetQuestStep(Spawn, BattleWithTheTimberclaws) == 2 then
  38. AddConversationOption(conversation, "I tried my best, but their numbers are strong.", "Option7")
  39. end
  40. AddConversationOption(conversation, "I cannot chat now. Farewell.")
  41. StartConversation(conversation, NPC, Spawn, "You must be an adventurer who's new to these parts. Who else would brave the wilds so far from the watchful eye of the Qeynos Guard?")
  42. end
  43. function Option1(NPC, Spawn)
  44. FaceTarget(NPC, Spawn)
  45. local conversation = CreateConversation()
  46. PlayFlavor(NPC, "voiceover/english/verona/antonica/verona001.mp3", "", "", 3474200771, 3431607508, Spawn)
  47. AddConversationOption(conversation, "I am always available to assist a frontiersman.", "offer")
  48. AddConversationOption(conversation, "I cannot assist. Farewell.")
  49. StartConversation(conversation, NPC, Spawn, "Adventurer ... explorer ... how would you like to be a courier too?")
  50. end
  51. function Option2(NPC, Spawn)
  52. SetStepComplete(Spawn, AFrontiersladysTask, 2)
  53. FaceTarget(NPC, Spawn)
  54. conversation = CreateConversation()
  55. PlayFlavor(NPC, "voiceover/english/verona/antonica/verona003.mp3", "", "", 1306460538, 3525298419, Spawn)
  56. AddConversationOption(conversation, "What is this arrow?", "Option3")
  57. AddConversationOption(conversation, "I shall do as requested.")
  58. StartConversation(conversation, NPC, Spawn, "Now, can you take that arrow and apply it to a training dummy in Archer Woods? Search for the dummy with the symbol of a golden tree and green arrow.")
  59. end
  60. function Option3(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. conversation = CreateConversation()
  63. PlayFlavor(NPC, "voiceover/english/verona/antonica/verona004.mp3", "", "", 2295000938, 2111794040, Spawn)
  64. AddConversationOption(conversation, "I understand.")
  65. StartConversation(conversation, NPC, Spawn, "The arrow is a special marker for some friends of mine.")
  66. end
  67. function Option4(NPC, Spawn)
  68. if GetQuestStep(Spawn, AFrontiersladysTask) == 4 then
  69. SetStepComplete(Spawn, AFrontiersladysTask, 4)
  70. end
  71. FaceTarget(NPC, Spawn)
  72. conversation = CreateConversation()
  73. PlayFlavor(NPC, "voiceover/english/verona/antonica/verona005.mp3", "", "", 3454016717, 1472655172, Spawn)
  74. AddConversationOption(conversation, "I did not see any Trusaris.", "Option5")
  75. AddConversationOption(conversation, "Farewell.")
  76. StartConversation(conversation, NPC, Spawn, "Thank you, courier. I trust you have done as I requested. If not, Trusaris will tell me. He sees all in Archer Woods, including your every step.")
  77. end
  78. function Option5(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. PlayFlavor(NPC, "voiceover/english/verona/antonica/verona006.mp3", "", "", 4166511705, 1130362343, Spawn)
  82. AddConversationOption(conversation, "I will help clear his home.", "offer2")
  83. StartConversation(conversation, NPC, Spawn, "Trusaris is the great oak of Archer Woods. He has lived in these hills for many ages. He has seen much grief in his lifetime. Now gnolls are taking over what is left of his home.")
  84. end
  85. function Option6(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. conversation = CreateConversation()
  88. PlayFlavor(NPC, "voiceover/english/verona/antonica/verona008.mp3", "", "", 3282299207, 1917374337, Spawn)
  89. AddConversationOption(conversation, "They will know me when I rid the woods of them!")
  90. StartConversation(conversation, NPC, Spawn, "Forget the world's greatest? I think not, but your name may have slipped my mind. Ha! Fear not, my brave courier. The gnolls of Archer Woods are the only ones near here that have yet to know your name.")
  91. end
  92. function Option7(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. conversation = CreateConversation()
  95. PlayFlavor(NPC, "voiceover/english/verona/antonica/verona010.mp3", "", "", 3182250399, 3459878429, Spawn)
  96. AddConversationOption(conversation, "Thank you, Dancer.", "Option8")
  97. StartConversation(conversation, NPC, Spawn, "Your best is all that we ask. I shall reward you for servicing what remains of Archer Woods. I shall mention your name among my friends.")
  98. end
  99. function Option8(NPC, Spawn)
  100. SetStepComplete(Spawn, BattleWithTheTimberclaws, 2)
  101. FaceTarget(NPC, Spawn)
  102. conversation = CreateConversation()
  103. PlayFlavor(NPC, "voiceover/english/verona/antonica/verona011.mp3", "", "", 2906971481, 4178549824, Spawn)
  104. AddConversationOption(conversation, "Is your name really Dancer?", "Option9")
  105. AddConversationOption(conversation, "Thank you, Dancer.")
  106. StartConversation(conversation, NPC, Spawn, "By the way, courier, Sighard asked me about you. He wishes to speak with you.")
  107. end
  108. function Option9(NPC, Spawn)
  109. FaceTarget(NPC, Spawn)
  110. conversation = CreateConversation()
  111. PlayFlavor(NPC, "voiceover/english/verona/antonica/verona007.mp3", "", "", 1777708143, 1227602978, Spawn)
  112. AddConversationOption(conversation, "Farewell, Dancer.")
  113. StartConversation(conversation, NPC, Spawn, "There was a dark time in my life when dancing was not a thing of joy, but a subjugated torment. It is a time I choose not to recall. But Dancer is my name among my new circle of friends, friends you may some day meet.")
  114. end
  115. function offer(NPC, Spawn)
  116. OfferQuest(NPC, Spawn, AFrontiersladysTask)
  117. end
  118. function offer2(NPC, Spawn)
  119. OfferQuest(NPC, Spawn, BattleWithTheTimberclaws)
  120. end