9
3

brewing_trouble.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. --[[
  2. Script Name : Quests/LongshadowAlley/brewing_trouble.lua
  3. Script Purpose : Handles the quest, "Brewing Trouble"
  4. Script Author : Scatman
  5. Script Date : 2009.04.07
  6. Zone : Longshadow Alley
  7. Quest Giver: Aldera V'Exxa
  8. Preceded by: A Lesson to Learn (a_lesson_to_learn.lua)
  9. Followed by: A Lesson Learned (a_lesson_learned.lua)
  10. --]]
  11. -- Item ID's
  12. local ALCHEMICAL_MEDIUM = 3404
  13. function Init(Quest)
  14. AddQuestStepChat(Quest, 1, "I need to get an alchemical medium from a man named Kalraath.", 1, "I need to get an alchemical medium from Kalraath. He is near the gate to North Freeport.", 0, 1380043)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_SpokeToKalraath")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. conversation = CreateConversation()
  20. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/aldera_v_exxa/fprt_hood05/quests/alderavexxa/aldera_x1_011.mp3", "", "", 1591440619, 3916449893, Player)
  21. AddConversationOption(conversation, "I will return with the medium from Kalraath.")
  22. StartConversation(conversation, QuestGiver, Player, "Let him know that I sent you, but remember that no great Teir'Dal ever accomplished anything without discretion.")
  23. end
  24. function Declined(Quest, QuestGiver, Player)
  25. end
  26. function Deleted(Quest, QuestGiver, Player)
  27. RemoveAlchemicalMedium(Player)
  28. end
  29. function Step1_Complete_SpokeToKalraath(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 1, "I need to return to Aldera with the Medium.")
  31. UpdateQuestTaskGroupDescription(Quest, 1, "I need to return to Aldera with the Medium.")
  32. -- Alchemical Medium
  33. SummonItem(Player, ALCHEMICAL_MEDIUM)
  34. AddQuestStepChat(Quest, 2, "I have received the alchemical medium from Kalraath, I need to return to Aldera with it now.", 1, "I have received the alchemical medium I needed from Kalraath. I need to return to Aldera.", 0, 1380006)
  35. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_SpokeToAldera")
  36. end
  37. function Step2_Complete_SpokeToAldera(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "Aldera was pleased with the alchemical medium that I brought her.")
  39. UpdateQuestTaskGroupDescription(Quest, 2, "Aldera was pleased with the alchemical medium that I brought her.")
  40. AddQuestStepChat(Quest, 3, "By refreshing my memory with a few questions, Aldera will ensure that no mistakes are made.", 1, "Aldera wants to ensure I understand the task we are undertaking.", 0, 1380006)
  41. AddQuestStepCompleteAction(Quest, 3, "Quest_Complete")
  42. end
  43. function Quest_Complete(Quest, QuestGiver, Player)
  44. RemoveAlchemicalMedium(Player)
  45. UpdateQuestDescription(Quest, "I was able to get the alchemical medium from Kalraath, and I have given it to Aldera. She seemed pleased by it, and started another one of her long winded conversations when I gave it to her.")
  46. GiveQuestReward(Quest, Player)
  47. end
  48. function RemoveAlchemicalMedium(Player)
  49. while HasItem(Player, ALCHEMICAL_MEDIUM, 1) do
  50. RemoveItem(Player, ALCHEMICAL_MEDIUM)
  51. end
  52. end
  53. function Reload(Quest, QuestGiver, Player, Step)
  54. if Step == 1 then
  55. Step1_Complete_SpokeToKalraath(Quest, QuestGiver, Player)
  56. elseif Step == 2 then
  57. Step2_Complete_SpokeToAldera(Quest, QuestGiver, Player)
  58. end
  59. end