ThayvlUlthonis.lua 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --[[
  2. Script Name : SpawnScripts/ButcherblockMountains/ThayvlUlthonis.lua
  3. Script Purpose : Thayvl Ulthonis
  4. Script Author : jakejp
  5. Script Date : 2018.06.17
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local StockComponents = 345
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, StockComponents)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. conversation = CreateConversation()
  18. if HasCompletedQuest(Spawn, StockComponents) == false and HasQuest(Spawn, StockComponents) == false and CanReceiveQuest(Spawn, StockComponents) == true then
  19. -- Offer first quest if not completed or started
  20. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1008.mp3", "", "", 0, 0, Spawn)
  21. AddConversationOption(conversation, "What are you seeking?", "dlg_5_1")
  22. AddConversationOption(conversation, "Spell components?", "dlg_5_4")
  23. StartConversation(conversation, NPC, Spawn, "A thousand curses on the Master! A mage of my stature shouldn't have to stoop so low as to be forced to collect spell components for his experiments.")
  24. elseif GetQuestStep(Spawn, StockComponents) == 1 then
  25. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1008.mp3", "", "", 0, 0, Spawn)
  26. Say(NPC, "Do not return until you have gathered all the wandering essence dust that I require!")
  27. elseif GetQuestStep(Spawn, StockComponents) == 2 then
  28. SetStepComplete(Spawn, StockComponents, 2)
  29. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1008.mp3", "", "", 0, 0, Spawn)
  30. AddConversationOption(conversation, "Indeed.")
  31. AddConversationOption(conversation, "Um, I've actually heard otherwise but... Nevermind.")
  32. StartConversation(conversation, NPC, Spawn, "Good. The Master will be most pleased with me. Perhaps now, after securing his trust I can... well, my plans are of little matter to you. Here take this. Let it not be said that the Teir'Dal do not keep their word.")
  33. elseif HasCompletedQuest(Spawn, StockComponents) == true then
  34. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1008.mp3", "", "", 0, 0, Spawn)
  35. Say(NPC, "Your efforts are appreciated. If the Master demands another cadaver, I'll make sure you're not it.")
  36. end
  37. end
  38. function dlg_5_1(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. conversation = CreateConversation()
  41. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  42. AddConversationOption(conversation, "For a reward I might be able to collect the essence dust for you.", "GiveStockComponents")
  43. AddConversationOption(conversation, "Interesting. What sort of spell is he preparing?", "dlg_5_3")
  44. StartConversation(conversation, NPC, Spawn, "My... benefactor is most insistent that I gather the dust from the wandering essences that meander throughout these mountains. Something about their nature adds to the potency of a spell he is creating.")
  45. end
  46. function AcceptedDialogue(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. conversation = CreateConversation()
  49. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  50. AddConversationOption(conversation, "We have a deal. I will return with a large amount of dust shortly.")
  51. StartConversation(conversation, NPC, Spawn, "Hmm. Alright, I might be able to part with a trinket of sorts in exchange for your help. The sooner I have all the material components I've been... asked to bring back, the sooner I can return to... home. Yes, home.")
  52. end
  53. function dlg_5_3(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. conversation = CreateConversation()
  56. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  57. AddConversationOption(conversation, "Fine, fine. Though, for a reward I might be able to collect the essence dust for you.", "GiveStockComponents")
  58. StartConversation(conversation, NPC, Spawn, "Many questions should remain unanswered, my friend. I've seen the Master kill people for asking too much. I'll not risk a similar fate in divulging secrets to a newly met adventurer.")
  59. end
  60. function dlg_5_4(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. conversation = CreateConversation()
  63. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  64. AddConversationOption(conversation, "Yes, I've seen that. What other components are there?", "dlg_5_5")
  65. AddConversationOption(conversation, "Actually, I'm not looking for a lesson on spell casting. What are you out doing out here?", "dlg_5_1")
  66. StartConversation(conversation, NPC, Spawn, "Yes, often times special components are required to cast a spell. As an adventurer you no doubt have come across mages who use verbal components when they cast a spell.")
  67. end
  68. function dlg_5_5(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. conversation = CreateConversation()
  71. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  72. AddConversationOption(conversation, "Yes, I've seen that. What other components are there?", "dlg_5_6")
  73. AddConversationOption(conversation, "Actually, I'm not looking for a lesson on spell casting. What are you out doing out here?", "dlg_5_1")
  74. StartConversation(conversation, NPC, Spawn, "A mage might also be required to gesture or, more simply put, move one's hands in a particular fashion to complete a spell. This type of component is called a somatic component.")
  75. end
  76. function dlg_5_6(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. conversation = CreateConversation()
  79. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  80. AddConversationOption(conversation, "So what sort of component are you gathering?", "dlg_5_1")
  81. StartConversation(conversation, NPC, Spawn, "The third type of component, which happens to be the type I've been sent to these acursed mountains to harvest, is the material type. A pinch of dirt from a particular location, the wing of a shriller, or a gem are all examples.")
  82. end
  83. function GiveStockComponents(NPC, Spawn)
  84. OfferQuest(NPC, Spawn, StockComponents)
  85. end