9
3

helping_some_friends.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. --[[
  2. Script Name : Quests/Baubbleshire/helping_some_friends.lua
  3. Script Purpose : Handles the quest, "Helping Some 'Friends'"
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Zone : The Baubbleshire
  7. Quest Giver: Rondo "The Belly" Roundstew
  8. Preceded by: Helping a Friend, Again (helping_a_friend_again.lua)
  9. Followed by: Paying Off a Sweet Debt (paying_off_a_sweet_debt.lua)
  10. --]]
  11. -- Quest ID's
  12. local HELPING_SOME_FRIENDS = 325 -- was 72
  13. -- Item ID's
  14. local PRANK_PREPAREDNESS_KIT = 10574
  15. function Init(Quest)
  16. AddQuestStep(Quest, 1, "I need to examine the Prank Preparedness Kit that Rondo gave me.", 1, 100, "Before I execute Rondo's plan I must go through the Prank Preparedness Kit he has given me. Rondo will give me another kit if I misplace the first one.", 0)
  17. AddQuestStepCompleteAction(Quest, 1, "step1_complete_examinedKit")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. conversation = CreateConversation()
  22. AddConversationOption(conversation, "All right. Give me the kit.", "GiveMeKit")
  23. StartConversation(conversation, QuestGiver, Player, "Delicious! I've put everything you'll need in this PPK, that's Prank Preparedness Kit. Remember, don't let them think you're up to anything, it's very important!")
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. end
  27. function Deleted(Quest, QuestGiver, Player)
  28. while HasItem(Player, PRANK_PREPAREDNESS_KIT) do
  29. RemoveItem(Player, PRANK_PREPAREDNESS_KIT)
  30. end
  31. end
  32. function step1_complete_examinedKit(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I have examined the Prank Preparedness Kit and know what I must do now.")
  34. UpdateQuestTaskGroupDescription(Quest, 1, "After going through the Prank Preparedness Kit I know what I must do.")
  35. AddQuestStepChat(Quest, 2, "I must find Drundo Parn in the tavern and give him a disguised walnut pie.", 1, "I need to visit Drundo, Jayla, and Bolo and set them up for Rondo's pranks.", 0, 2380026)
  36. AddQuestStepChat(Quest, 3, "I must find Jayla Midhop outside the armory and give her this forged note.", 1, "I need to visit Drundo, Jayla, and Bolo and set them up for Rondo's pranks.", 0, 2380009)
  37. AddQuestStepChat(Quest, 4, "I must find Bolo Brassharp outside of the inn and convince him to see Jayla with a bloat pie.", 1, "I need to visit Drundo, Jayla, and Bolo and set them up for Rondo's pranks.", 0, 2380017)
  38. AddQuestStepCompleteAction(Quest, 2, "step2_complete_talkedToDrundo")
  39. AddQuestStepCompleteAction(Quest, 3, "step3_complete_talkedToJayla")
  40. AddQuestStepCompleteAction(Quest, 4, "step4_complete_talkedToBolo")
  41. end
  42. function step2_complete_talkedToDrundo(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 2, "I have given Drundo the walnut pie.")
  44. if QuestIsComplete(Player, HELPING_SOME_FRIENDS) then
  45. pranks_given(Quest, QuestGiver, Player)
  46. end
  47. end
  48. function step3_complete_talkedToJayla(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 3, "I have given Jayla the forged note.")
  50. if QuestIsComplete(Player, HELPING_SOME_FRIENDS) then
  51. pranks_given(Quest, QuestGiver, Player)
  52. end
  53. end
  54. function step4_complete_talkedToBolo(Quest, QuestGiver, Player)
  55. UpdateQuestStepDescription(Quest, 4, "I have given Bolo the bloat pie.")
  56. if QuestIsComplete(Player, HELPING_SOME_FRIENDS) then
  57. pranks_given(Quest, QuestGiver, Player)
  58. end
  59. end
  60. function pranks_given(Quest, QuestGiver, Player)
  61. UpdateQuestTaskGroupDescription(Quest, 2, "I have set Druno, Jayla, and Bolo up for Rondo's pranks.")
  62. AddQuestStepChat(Quest, 5, "I have done what Rondo wanted and should return to him.", 1, "Now that Rondo's pranks are ready to go, I should speak with him.", 0, 2380039)
  63. AddQuestStepCompleteAction(Quest, 5, "quest_complete")
  64. end
  65. function quest_complete(Quest, QuestGiver, Player)
  66. UpdateQuestStepDescription(Quest, 5, "I have spoken with Rondo.")
  67. UpdateQuestTaskGroupDescription(Quest, 3, "I have spoken with Rondo.")
  68. -- Prank Preparedness Kit
  69. while HasItem(Player, PRANK_PREPAREDNESS_KIT) do
  70. RemoveItem(Player, PRANK_PREPAREDNESS_KIT)
  71. end
  72. UpdateQuestDescription(Quest, "I have helped Rondo set his friends up impending pranks. Rondo was absolutely giddy about it.")
  73. GiveQuestReward(Quest, Player)
  74. end
  75. function Reload(Quest, QuestGiver, Player, Step)
  76. if Step == 1 then
  77. step1_complete_examinedKit(Quest, QuestGiver, Player)
  78. elseif Step == 2 then
  79. step2_complete_talkedToDrundo(Quest, QuestGiver, Player)
  80. elseif Step == 3 then
  81. step3_complete_talkedToJayla(Quest, QuestGiver, Player)
  82. elseif Step == 4 then
  83. step4_complete_talkedToBolo(Quest, QuestGiver, Player)
  84. end
  85. end