9
3

WesaelanBrookshadow.lua 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. --[[
  2. Script Name : SpawnScripts/ElddarGrove/WesaelanBrookshadow.lua
  3. Script Purpose : Wesaelan Brookshadow
  4. Script Author : John Adams
  5. Script Date : 2008.09.28
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local JournalOfElkare = 554
  9. local RecoveryOfTheBloodsaberPlans = 555
  10. function spawn(NPC)
  11. AddTimer(NPC, 5000, "EmoteLoop")
  12. ProvidesQuest(NPC,JournalOfElkare)
  13. ProvidesQuest(NPC,RecoveryOfTheBloodsaberPlans)
  14. -- AddTimer(NPC, 5000, "EmoteLoop")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function hailed(NPC, Spawn)
  20. FaceTarget(NPC, Spawn)
  21. conversation = CreateConversation()
  22. if GetFactionAmount(Spawn, 11) <0 then
  23. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  24. else
  25. PlayFlavor(NPC, "voiceover/english/optional4/wesaelan_brookshadow/brookshadow_01.mp3", "", "hello", 2834600234, 1504715618, Spawn)
  26. if not HasQuest(Spawn, JournalOfElkare) and not HasCompletedQuest(Spawn, JournalOfElkare) then
  27. AddConversationOption(conversation, "Is there anything I can assist the order with?", "dlg_01")
  28. end
  29. if GetQuestStep(Spawn, JournalOfElkare) == 2 then
  30. AddConversationOption(conversation, "I've returned with the tome, though I had to take it from a group of brigands.", "dlg_03")
  31. end
  32. if HasCompletedQuest(Spawn, JournalOfElkare) and not HasCompletedQuest(Spawn, RecoveryOfTheBloodsaberPlans) and not HasQuest(Spawn, RecoveryOfTheBloodsaberPlans) then
  33. AddConversationOption(conversation, "Did you ever happen to find out more about the tome?", "dlg_04")
  34. end
  35. if GetQuestStep(Spawn, RecoveryOfTheBloodsaberPlans) == 2 then
  36. AddConversationOption(conversation, "I managed to retrieve a letter from one of the Bloodsabers.", "RecoveryOfTheBloodsaberPlansComplete")
  37. end
  38. if HasCompletedQuest(Spawn, RecoveryOfTheBloodsaberPlans) and not HasQuest(Spawn, 5519) then
  39. AddConversationOption(conversation, "Who was it I needed to take the Bloodsaber note to again?", "RecoveryOfTheBloodsaberPlansComplete")
  40. end
  41. AddConversationOption(conversation, "Thank you, and good day to you.")
  42. StartConversation(conversation, NPC, Spawn, "Hail traveler! All friends of the Elddar are welcome.")
  43. end
  44. end
  45. -- JOURNAL OF ELKARE (QUEST 1)
  46. function dlg_01(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. conversation = CreateConversation()
  49. PlayFlavor(NPC, "voiceover/english/optional4/wesaelan_brookshadow/brookshadow_06.mp3", "", "ponder", 3658794713, 1958132476, Spawn)
  50. AddConversationOption(conversation, "I'm certainly interested.", "dlg_02")
  51. AddConversationOption(conversation, "If only I had more time myself...")
  52. StartConversation(conversation, NPC, Spawn, "I've uncovered the location of a tome hidden by Karana's followers long before the gods left this world. I recently discovered its location with the aid of Duvos. My duties here do not permit the time to recover the tome. I can charge you with recovering this treasure - if you're capable of such an invaluable task.")
  53. end
  54. function dlg_02(NPC,Spawn)
  55. FaceTarget(NPC, Spawn)
  56. conversation = CreateConversation()
  57. PlayFlavor(NPC, "voiceover/english/optional4/wesaelan_brookshadow/brookshadow_07.mp3","","agree", 2198545159, 1480496199)
  58. AddConversationOption(conversation, "I can do this!", "qoffer")
  59. StartConversation(conversation, NPC, Spawn, "You will need to venture to the great oak in the fields outside the city where the tome has been hidden for many decades. You must thoroughly search the tree. Remember, the tome has been missing for many years. Use care when handling this precious treasure.")
  60. end
  61. function dlg_03(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. conversation = CreateConversation()
  64. PlayFlavor(NPC, "voiceover/english/optional4/wesaelan_brookshadow/brookshadow_08.mp3", "", "boggle", 2710196423, 479366863, Spawn)
  65. AddConversationOption(conversation, "They mentioned using the tome to raise some great leader.", "JournalOfElkareComplete")
  66. StartConversation(conversation, NPC, Spawn, "Brigands! How would they find the location of the tome? I don't believe mere bandits could achieve such a task. What did these fiends look like? Did they speak of anything peculiar?")
  67. end
  68. function JournalOfElkareComplete(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. SetStepComplete(Spawn, JournalOfElkare, 2)
  71. conversation = CreateConversation()
  72. PlayFlavor(NPC, "voiceover/english/optional4/wesaelan_brookshadow/brookshadow_05.mp3", "", "", 3221820623, 129429736, Spawn)
  73. AddConversationOption(conversation, "My pleasure to be of service.")
  74. StartConversation(conversation, NPC, Spawn, "Please, say it isn't so ... Could they be attempting to raise an ancient Bloodsaber leader? How would this tome aid them in this task? To my knowledge, the tome is only a written historical record. Indeed, this requires further investigation! You've served us well, good friend. Take this coin with my blessing.")
  75. end
  76. -- RECOVERY OF THE BLOODSABER PLANS (QUEST 2)
  77. function dlg_04(NPC, Spawn)
  78. FaceTarget(NPC, Spawn)
  79. conversation = CreateConversation()
  80. PlayFlavor(NPC, "voiceover/english/optional4/wesaelan_brookshadow/brookshadow_15.mp3", "", "thank", 2951793076, 1507607629, Spawn)
  81. AddConversationOption(conversation, "Interesting... that would explain the brigands...", "dlg_05")
  82. AddConversationOption(conversation, "Let them be. I've no real quarrel with them.")
  83. StartConversation(conversation, NPC, Spawn, "I do thank you. I'm very glad you've returned, for I have an urgent matter to discuss with you. The Bloodsabers have been active. I know it's hard to believe, but the evidence cannot be denied.")
  84. end
  85. function dlg_05(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. conversation = CreateConversation()
  88. PlayFlavor(NPC, "voiceover/english/optional4/wesaelan_brookshadow/brookshadow_16.mp3", "", "", 111703684, 2397290337, Spawn)
  89. AddConversationOption(conversation, "I certainly can.", "qoffer2")
  90. StartConversation(conversation, NPC, Spawn, "According to the rumors, the more active members are lurking in the catacombs under the city. It's hard to find good help in the Down Below. We need you to penetrate the Vermin Snye and find out what the Bloodsabers' orders are. Can you do it?")
  91. end
  92. function RecoveryOfTheBloodsaberPlansComplete(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. if GetQuestStep(Spawn, RecoveryOfTheBloodsaberPlans) == 2 then
  95. SetStepComplete(Spawn, RecoveryOfTheBloodsaberPlans, 2)
  96. end
  97. conversation = CreateConversation()
  98. PlayFlavor(NPC, "voiceover/english/optional4/wesaelan_brookshadow/brookshadow_18.mp3", "", "", 3046972163, 3011859959, Spawn)
  99. AddConversationOption(conversation, "I will speak with her immediately.")
  100. StartConversation(conversation, NPC, Spawn, "Take it to Captain Eitoa at once. The duty to stop this resurgence of the Bloodsabers has fallen on her shoulders. She's been watching their suspicious movements and will certainly welcome this piece of intelligence. The Bloodsabers will cease their scheming once and for all!")
  101. end
  102. function qoffer(NPC, Spawn)
  103. FaceTarget(NPC, Spawn)
  104. OfferQuest(NPC, Spawn, JournalOfElkare)
  105. end
  106. function qoffer2(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. OfferQuest(NPC, Spawn, RecoveryOfTheBloodsaberPlans)
  109. end
  110. function EmoteLoop(NPC)
  111. local emoteChoice = MakeRandomInt(1,3)
  112. if emoteChoice == 1 then
  113. -- ponder
  114. PlayAnimation(NPC, 12030)
  115. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  116. elseif emoteChoice == 2 then
  117. -- sniff
  118. PlayAnimation(NPC, 12329)
  119. AddTimer(NPC, MakeRandomInt(6000,9000), "EmoteLoop")
  120. else
  121. -- tapfoot
  122. PlayAnimation(NPC, 13056)
  123. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  124. end
  125. end