ebiks_missing_parts.lua 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. --[[
  2. Script Name : Quests/QueensColony/ebiks_missing_parts.lua
  3. Script Purpose : Handles the quest, "Ebik's Missing Parts"
  4. Script Author : Scatman
  5. Script Date : 2008.09.04
  6. Zone : The Queen's Colony
  7. Quest Giver: Ebik Wobblecog
  8. Preceded by: None
  9. Followed by: None
  10. --]]
  11. local EbiksMissingParts = 185
  12. function Init(Quest)
  13. -- Constructed Wrist Spanner
  14. AddQuestStep(Quest, 1, "I still need to get a size 7 clunker. Perhaps Ebik lost it while getting a better view of the bay.", 1, 100, "I need to find the three items that were lost on this island. I should keep an eye out while I explore the colony.", 173)
  15. AddQuestStep(Quest, 2, "I still need to get a copper-coated springer. It's possible Ebik could have lost it over the side of the ship.", 1, 100, "I need to find the three items that were lost on this island. I should keep an eye out while I explore the colony.", 216)
  16. AddQuestStep(Quest, 3, "I still need to get a triangle spinner. Maybe Ebik was trying to run from something and dropped it?", 1, 100, "I need to find the three items that were lost on this island. I should keep an eye out while I explore the colony.", 86)
  17. AddQuestStepCompleteAction(Quest, 1, "step1_complete")
  18. AddQuestStepCompleteAction(Quest, 2, "step2_complete")
  19. AddQuestStepCompleteAction(Quest, 3, "step3_complete")
  20. end
  21. function Accepted(Quest, QuestGiver, Player)
  22. if QuestGiver ~= nil then
  23. if GetDistance(Player, QuestGiver) < 30 then
  24. FaceTarget(QuestGiver, Player)
  25. conversation = CreateConversation()
  26. PlayFlavor(QuestGiver, "voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_secondtalk_01.mp3", "", "", 688070292, 1255284608, Player)
  27. AddConversationOption(conversation, "Okay.")
  28. StartConversation(conversation, QuestGiver, Player, "I need all the parts, I can't leave without them and luckily the boat to Qeynos hasn't showed up yet. Please help me find all of the parts.")
  29. end
  30. end
  31. end
  32. function Declined(Quest, QuestGiver, Player)
  33. end
  34. function step1_complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 1, "I have Ebik's size 7 clunker.")
  36. if QuestIsComplete(Player, EbiksMissingParts) then
  37. givePartsToEbik(Quest, QuestGiver, Player)
  38. end
  39. end
  40. function step2_complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 2, "I have Ebik's copper-coated springer.")
  42. if QuestIsComplete(Player, EbiksMissingParts) then
  43. givePartsToEbik(Quest, QuestGiver, Player)
  44. end
  45. end
  46. function step3_complete(Quest, QuestGiver, Player)
  47. UpdateQuestStepDescription(Quest, 3, "I have Ebik's triangle spinner.")
  48. if QuestIsComplete(Player, EbiksMissingParts) then
  49. givePartsToEbik(Quest, QuestGiver, Player)
  50. end
  51. end
  52. function givePartsToEbik(Quest, QuestGiver, Player)
  53. UpdateQuestTaskGroupDescription(Quest, 1, "I have found all of Ebik's parts.")
  54. AddQuestStepChat(Quest, 4, "I should bring these parts back to Ebik.", 1, "I found all the parts Ebik needs and I should return them to him.", 0, 2530059)
  55. AddQuestStepCompleteAction(Quest, 4, "quest_complete_gavePartsToEbik")
  56. end
  57. function quest_complete_gavePartsToEbik(Quest, QuestGiver, Player)
  58. UpdateQuestTaskGroupDescription(Quest, 2, "I have given Ebik the parts I collected.")
  59. UpdateQuestDescription(Quest, "I gave Ebik Wobblecog all the parts he needed. Hopefully now he can meet up with his father and evade their family's famous curse.")
  60. GiveQuestReward(Quest, Player)
  61. end
  62. function Reload(Quest, QuestGiver, Player, Step)
  63. if Step == 1 then
  64. step1_complete(Quest, QuestGiver, Player)
  65. elseif Step == 2 then
  66. step2_complete(Quest, QuestGiver, Player)
  67. elseif Step == 3 then
  68. step3_complete(Quest, QuestGiver, Player)
  69. end
  70. end