boatload_of_work.lua 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. --[[
  2. Script Name : Quests/FrostfangSea/boatload_of_work.lua
  3. Script Purpose : Handles the quest "Boatload of Work"
  4. Script Author : theFoof
  5. Script Date : 2013.5.5
  6. Zone : Frostfang Sea
  7. Quest Giver : Yasha Redblade
  8. Preceded by : Call to Arms
  9. Followed by : Flame On!
  10. --]]
  11. local Barricade = 46842
  12. function Accepted(Quest, QuestGiver, Player)
  13. end
  14. function Declined(Quest, QuestGiver, Player)
  15. end
  16. function Init(Quest)
  17. AddQuestRewardCoin(Quest, math.random(10,80), math.random(0,1), 0, 0)
  18. AddQuestStep(Quest, 1, "I need to gather planks of wood.", 3, 100, "I am to gather planks of wood around the bow of the old boat wreckage on the western side of Pilgrims' Landing, and then give them to Yasha.", 2361)
  19. AddQuestStepCompleteAction(Quest, 1, "GatheredPlanks")
  20. end
  21. function GatheredPlanks(Quest, QuestGiver, Player)
  22. UpdateQuestStepDescription(Quest, 1, "I have the bow planks Yasha needs.")
  23. AddQuestStepChat(Quest, 2, "Return to Yasha Redblade", 1, "I am to gather planks of wood around the bow of the old boat wreckage on the western side of Pilgrims' Landing, and then give them to Yasha.", 0, 4700005)
  24. AddQuestStepCompleteAction(Quest, 2, "TalkedYasha")
  25. end
  26. function TalkedYasha(Quest, QuestGiver, Player)
  27. UpdateQuestTaskGroupDescription(Quest, 1, "Yasha was able to craft a makeshift barricade piece out of the planks of wood I gave her.")
  28. SummonItem(Player, Barricade, 1)
  29. AddQuestStep(Quest, 3, "Complete the Pilgrims' Landing barricade.", 1, 100, "I am to set the makeshift barricade piece on the ground where the break in the barricade line, south of Yasha, is lit by two torches", 0)
  30. AddQuestStepCompleteAction(Quest, 3, "SetBarricade")
  31. end
  32. function Deleted(Quest, QuestGiver, Player)
  33. if HasItem(Player, 46842) then
  34. RemoveItem(Player, 46842)
  35. end
  36. end
  37. function SetBarricade(Quest, QuestGiver, Player)
  38. UpdateQuestTaskGroupDescription(Quest, 2, "The barricade keeping the orcs at bay is now complete!")
  39. AddQuestStepChat(Quest, 4, "Return Yasha Redblade", 1, "I am to return to Yasha Redblade near the broken ship's hull on southern section of Pilgrims' Landing.", 0 ,4700005)
  40. AddQuestStepCompleteAction(Quest, 4, "FinishQuest")
  41. end
  42. function FinishQuest(Quest, QuestGiver, Player)
  43. GiveQuestReward(Quest, Player)
  44. end
  45. function Reload(Quest, QuestGiver, Player, Step)
  46. if Step == 1 then
  47. GatheredPlanks(Quest, QuestGiver, Player)
  48. elseif Step == 2 then
  49. TalkedYasha(Quest, QuestGiver, Player)
  50. elseif Step == 3 then
  51. SetBarricade(Quest, QuestGiver, Player)
  52. end
  53. end