9
3

ebiks_missing_parts.lua 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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", "", "nod", 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. UpdateQuestStepDescription(Quest, 1, "I found a size 7 clunker.")
  37. if QuestIsComplete(Player, EbiksMissingParts) then
  38. givePartsToEbik(Quest, QuestGiver, Player)
  39. end
  40. end
  41. function step2_complete(Quest, QuestGiver, Player)
  42. -- UpdateQuestStepDescription(Quest, 2, "I have Ebik's copper-coated springer.")
  43. UpdateQuestStepDescription(Quest, 2, "I found a copper-coated springer.")
  44. if QuestIsComplete(Player, EbiksMissingParts) then
  45. givePartsToEbik(Quest, QuestGiver, Player)
  46. end
  47. end
  48. function step3_complete(Quest, QuestGiver, Player)
  49. -- UpdateQuestStepDescription(Quest, 3, "I have Ebik's triangle spinner.")
  50. UpdateQuestStepDescription(Quest, 3, "I found a triangle spinner.")
  51. if QuestIsComplete(Player, EbiksMissingParts) then
  52. givePartsToEbik(Quest, QuestGiver, Player)
  53. end
  54. end
  55. function givePartsToEbik(Quest, QuestGiver, Player)
  56. -- UpdateQuestTaskGroupDescription(Quest, 1, "I have found all of Ebik's parts.")
  57. UpdateQuestTaskGroupDescription(Quest, 1, "I have Ebik's three items.")
  58. 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)
  59. AddQuestStepCompleteAction(Quest, 4, "quest_complete_gavePartsToEbik")
  60. end
  61. function quest_complete_gavePartsToEbik(Quest, QuestGiver, Player)
  62. UpdateQuestTaskGroupDescription(Quest, 2, "I have given Ebik the parts I collected.")
  63. 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.")
  64. GiveQuestReward(Quest, Player)
  65. end
  66. function Reload(Quest, QuestGiver, Player, Step)
  67. if Step == 1 then
  68. step1_complete(Quest, QuestGiver, Player)
  69. elseif Step == 2 then
  70. step2_complete(Quest, QuestGiver, Player)
  71. elseif Step == 3 then
  72. step3_complete(Quest, QuestGiver, Player)
  73. end
  74. end