ouch_my_head.lua 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. --[[
  2. Script Name : Quests/Antonica/ouch_my_head.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.09.04 07:09:41
  5. Script Purpose :
  6. Zone : Antonica
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I must gather pond glider slime.", 1, 30, "I must gather the ingredients needed for a hangover cure.", 158, 120090, 121246)
  13. AddQuestStepKill(Quest, 2, "I must gather wandering bat fur.", 2, 30, "I must gather the ingredients needed for a hangover cure.", 140, 120210, 121349)
  14. AddQuestStepKill(Quest, 3, "I must get a fresh egg from a snake.", 1, 30, "I must gather the ingredients needed for a hangover cure.", 2538, 120187, 121327, 120068, 120208, 121226, 121347)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  17. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. local conversation = CreateConversation()
  22. AddConversationOption(conversation, "Sure, I don't see why not.")
  23. AddConversationOption(conversation, "Not tonight, I have a headache.")
  24. StartConversation(conversation, QuestGiver, Player, "Great! An' hurry on up, I can't be waiting all day. I mean, it pains me to see Aroof in such a mess. Go on now! ")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. -- Add dialog here for when the quest is declined
  28. end
  29. function Deleted(Quest, QuestGiver, Player)
  30. -- Remove any quest specific items here when the quest is deleted
  31. end
  32. function Step1Complete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I have gathered pond glider slime.")
  34. CheckProgress(Quest, QuestGiver, Player)
  35. end
  36. function Step2Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I have gathered enough bat fur.")
  38. CheckProgress(Quest, QuestGiver, Player)
  39. end
  40. function Step3Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I have gathered a snake egg.")
  42. CheckProgress(Quest, QuestGiver, Player)
  43. end
  44. function CheckProgress(Quest, QuestGiver, Player)
  45. if QuestStepIsComplete(Player, 5353, 1) and QuestStepIsComplete(Player, 5353, 2) and QuestStepIsComplete(Player, 5353, 3) then
  46. UpdateQuestTaskGroupDescription(Quest, 1, "I have gathered all the ingredients I need for a hangover cure.")
  47. AddQuestStepChat(Quest, 4, "I must talk to Haddek.", 1, "I need to deliver the hangover cure to Haddek.", 11, 120281)
  48. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  49. end
  50. end
  51. function QuestComplete(Quest, QuestGiver, Player)
  52. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  53. UpdateQuestStepDescription(Quest, 4, "I have spoken with Haddek.")
  54. UpdateQuestTaskGroupDescription(Quest, 2, "I have delivered the hangover cure to Haddek.")
  55. UpdateQuestDescription(Quest, "I have gathered everything needed to make a hangover cure for Haddek.")
  56. GiveQuestReward(Quest, Player)
  57. end
  58. function Reload(Quest, QuestGiver, Player, Step)
  59. if Step == 1 then
  60. Step1Complete(Quest, QuestGiver, Player)
  61. elseif Step == 2 then
  62. Step2Complete(Quest, QuestGiver, Player)
  63. elseif Step == 3 then
  64. Step3Complete(Quest, QuestGiver, Player)
  65. elseif Step == 4 then
  66. QuestComplete(Quest, QuestGiver, Player)
  67. end
  68. end