9
3

a_lesson_to_learn.lua 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : Quests/LongshadowAlley/a_lesson_to_learn.lua
  3. Script Purpose : Handles the quest, "A Lesson to Learn"
  4. Script Author : Scatman
  5. Script Date : 2009.04.07
  6. Zone : Longshadow Alley
  7. Quest Giver: Aldera V'Exxa
  8. Preceded by: A Clear Understanding (a_clear_understanding.lua)
  9. Followed by: Brewing Trouble (brewing_trouble.lua)
  10. --]]
  11. -- Item ID's
  12. local SHADOWS_KISS = 12113
  13. function Init(Quest)
  14. AddQuestStepObtainItem(Quest, 1, "I need to retrieve a few clumps of Shadows' Kiss for Alders.", 5, 100, "Aldera has sent me to collect Shadows' Kiss - a small flowery fungus near the sewer.", 318, SHADOWS_KISS)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_GotFungus")
  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_006b.mp3", "", "", 2711787328, 3720975836, Player)
  21. AddConversationOption(conversation, "I will be back.")
  22. StartConversation(conversation, QuestGiver, Player, "Excellent. I look forward to your return.")
  23. end
  24. function Declined(Quest, QuestGiver, Player)
  25. end
  26. function Deleted(Quest, QuestGiver, Player)
  27. RemoveShadowsKiss(Player)
  28. end
  29. function RemoveShadowsKiss(Player)
  30. while HasItem(Player, SHADOWS_KISS, 1) do
  31. RemoveItem(Player, SHADOWS_KISS)
  32. end
  33. end
  34. function Step1_Complete_GotFungus(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 1, "I have found all of the Shadows' Kiss Aldera needs.")
  36. UpdateQuestTaskGroupDescription(Quest, 1, "I need to return to Aldera with the Shadows' Kiss I have collected.")
  37. AddQuestStepChat(Quest, 2, "I need to return to Aldera with the Shadows' Kiss.", 1, "I have collected the Shadows' Kiss for Aldera, I need to return it.", 0, 1380006)
  38. AddQuestStepCompleteAction(Quest, 2, "Quest_Complete")
  39. end
  40. function Quest_Complete(Quest, QuestGiver, Player)
  41. RemoveShadowsKiss(Player)
  42. UpdateQuestDescription(Quest, "I met a Teir'Dal woman named Aldera. She offered to teach me the proper ways of being Teir'Dal in exchange for helping her teach an improper Teir'Dal a lesson. The first step in this 'lesson' was to collect some poisonous fungus for her, which I have done.")
  43. GiveQuestReward(Quest, Player)
  44. end
  45. function Reload(Quest, QuestGiver, Player, Step)
  46. if Step == 1 then
  47. Step1_Complete_GotFungus(Quest, QuestGiver, Player)
  48. end
  49. end