helping_a_friend_again.lua 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --[[
  2. Script Name : Quests/Baubbleshire/helping_a_friend_again.lua
  3. Script Purpose : Handles the quest, "Helping a Friend, Again"
  4. Script Author : Scatman
  5. Script Date : 2009.09.26
  6. Zone : The Baubbleshire
  7. Quest Giver: Rondo "The Belly" Roundstew
  8. Preceded by: Helping a Friend (helping_a_friend.lua)
  9. Followed by: Helping Some 'Friends' (helping_some_friends.lua)
  10. --]]
  11. -- Race ID's
  12. local HALFLING = 7
  13. -- Item ID's
  14. local MISTY_THICKET_SHADEBLOOM = 9868
  15. function Init(Quest)
  16. -- a Misty Thicket Shadebloom
  17. AddQuestStepHarvest(Quest, 1, "I need to collect some Misty Thicket Shadeblooms from around the Baubbleshire.", 6, 100, "I need to collect some Misty Thicket Shadeblooms and see if they will help convince Maela to get her feelings off of her chest.", 1946, MISTY_THICKET_SHADEBLOOM)
  18. AddQuestStepCompleteAction(Quest, 1, "step1_complete_gotFlowers")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. FaceTarget(QuestGiver, Player)
  22. conversation = CreateConversation()
  23. AddConversationOption(conversation, "All right.")
  24. StartConversation(conversation, QuestGiver, Player, "I don't know what I'll do if this doesn't work.")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. end
  28. function Deleted(Quest, QuestGiver, Player)
  29. while HasItem(Player, MISTY_THICKET_SHADEBLOOM) do
  30. RemoveItem(Player, MISTY_THICKET_SHADEBLOOM)
  31. end
  32. end
  33. function step1_complete_gotFlowers(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I have collected the Misty Thicket Shadeblooms.")
  35. AddQuestStepChat(Quest, 2, "I should speak with Maela now that I have these Shadeblooms.", 1, "I need to collect some Misty Thicket Shadeblooms and see if they will help convince Maela to get her feelings off of her chest.", 0, 2380035)
  36. AddQuestStepCompleteAction(Quest, 2, "step2_complete_talkedToMaela")
  37. end
  38. function step2_complete_talkedToMaela(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 2, "Maela came out of her shell.")
  40. -- a Misty Thicket Shadebloom
  41. while HasItem(Player, MISTY_THICKET_SHADEBLOOM) do
  42. RemoveItem(Player, MISTY_THICKET_SHADEBLOOM)
  43. end
  44. AddQuestStepChat(Quest, 3, "I should return to Rondo and let him know the good news.", 1, "I need to collect some Misty Thicket Shadeblooms and see if they will help convince Maela to get her feelings off of her chest.", 0, 2380039)
  45. AddQuestStepCompleteAction(Quest, 3, "quest_complete")
  46. end
  47. function quest_complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 3, "I have spoken with Rondo.")
  49. UpdateQuestTaskGroupDescription(Quest, 1, "Maela opened up to me after I presented her with the Shadeblooms.")
  50. UpdateQuestDescription(Quest, "After seeing the flowers Maela opened up and told me of her worries.")
  51. GiveQuestReward(Quest, Player)
  52. end
  53. function Reload(Quest, QuestGiver, Player, Step)
  54. if Step == 1 then
  55. step1_complete_gotFlowers(Quest, QuestGiver, Player)
  56. elseif Step == 2 then
  57. step2_complete_talkedToMaela(Quest, QuestGiver, Player)
  58. end
  59. end