a_lesson_learned.lua 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --[[
  2. Script Name : Quests/LongshadowAlley/a_lesson_learned.lua
  3. Script Purpose : Handles the quest, "A Lesson Learned"
  4. Script Author : Scatman
  5. Script Date : 2009.04.11
  6. Zone : Longshadow Alley
  7. Quest Giver: Aldera V'Exxa
  8. Preceded by: Brewing Trouble (brewing_trouble.lua)
  9. Followed by: Meet the Custodian (meet_the_custodian.lua)
  10. --]]
  11. -- Item ID's
  12. local POISONED_LOAF_OF_BREAD = 10496
  13. function Init(Quest)
  14. AddQuestStepLocation(Quest, 1, "I need to place this poisoned bread on Lynsia's vendor booth, where Teah will be sure to find it.", 10, "Aldera has given me a loaf of poisoned bread. I need to place to loaf on Lynsia's booth near the Destroyed Knowledge Portal so Teah can find it.", 300, -1.41, 0, -19.60)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_PlacedBread")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. conversation = CreateConversation()
  20. -- Poisoned Loaf of Bread
  21. if not HasItem(Player, POISONED_LOAF_OF_BREAD) then
  22. SummonItem(Player, POISONED_LOAF_OF_BREAD)
  23. SendMessage(Player, "You receive 1 Poisoned Loaf of Bread")
  24. end
  25. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/aldera_v_exxa/fprt_hood05/quests/alderavexxa/aldera_x1_025.mp3", "", "", 2044102497, 3428374214, Player)
  26. AddConversationOption(conversation, "Of course.")
  27. StartConversation(conversation, QuestGiver, Player, "Before we deal with Teah, I feel you must learn about the current split in our people's loyalties. You may not need this information now, but it may be useful later. Take heed of my words and choose carefully if the choice is presented to you.")
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. end
  31. function Deleted(Quest, QuestGiver, Player)
  32. RemoveBread(Player)
  33. end
  34. function RemoveBread(Player)
  35. while HasItem(Player, POISONED_LOAF_OF_BREAD, 1) do
  36. RemoveItem(Player, POISONED_LOAF_OF_BREAD)
  37. end
  38. end
  39. function Step1_Complete_PlacedBread(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 1, "I have planted the bread.")
  41. UpdateQuestTaskGroupDescription(Quest, 1, "I have planted the bread.")
  42. RemoveBread(Player)
  43. -- a loaf of bread
  44. SpawnMob(GetZone(Player), 1380102, false, -3.04, 1.06, -19.24, 290)
  45. -- Teah
  46. SpawnMob(GetZone(Player), 1380046, false, 16.79, 0, -16.03, 70.02)
  47. AddQuestStepChat(Quest, 2, "I need to return to Aldera to let her know that I am finished.", 1, "With the bread placed on Lynsia's counter, who showed up but that sloth, Teah?", 0, 1380006)
  48. AddQuestStepCompleteAction(Quest, 2, "Quest_Complete")
  49. end
  50. function Quest_Complete(Quest, QuestGiver, Player)
  51. UpdateQuestDescription(Quest, "Everything I have been working on with Aldera has gone well and Teah has learned a lesson he will never forget.")
  52. GiveQuestReward(Quest, Player)
  53. end
  54. function Reload(Quest, QuestGiver, Player, Step)
  55. if Step == 1 then
  56. Step1_Complete_PlacedBread(Quest, QuestGiver, Player)
  57. end
  58. end