stonefists_art_of_combat.lua 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. --[[
  2. Script Name : Quests/FrostfangSea/stonefists_art_of_combat.lua
  3. Script Purpose : Handles the quest "Stonefist's Art of Combat"
  4. Script Author : theFoof
  5. Script Date : 2013.5.3
  6. Zone : Frostfang Sea
  7. Quest Giver : Yasha Redblade
  8. Preceded by : A Fine Halasian Welcome
  9. Followed by : Call to Arms
  10. --]]
  11. function Init(Quest)
  12. AddQuestRewardCoin(Quest, math.random(10,80), math.random(1,3), 0, 0)
  13. AddQuestStepChat(Quest, 1, "Speak to Trainer Ragnhild Stonefist.", 1, "I need to learn about combat from Trainer Ragnhild Stonefist at the Training Grounds east of Yasha Redblade.", 0, 4700015)
  14. AddQuestStepCompleteAction(Quest, 1, "TalkedToStonefist")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. end
  18. function Declined(Quest, QuestGiver, Player)
  19. end
  20. function TalkedToStonefist(Quest, QuestGiver, Player)
  21. UpdateQuestStepDescription(Quest, 1, "I have spoken with Ragnhild Stonefist.")
  22. AddQuestStepKill(Quest, 2, "Defeat a sparring partner in combat.", 1, 100, "I need to learn about combat from Trainer Ragnhild Stonefist at the Training Grounds east of Yasha Redblade.", 0, 4700018, 4700017, 4700014)
  23. AddQuestStepCompleteAction(Quest, 2, "KilledSparringPartner")
  24. end
  25. function KilledSparringPartner(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 2, "I have defeated a sparring partner in combat.")
  27. AddQuestStepChat(Quest, 3, "Speak with Trainer Ragnhild Stonefist.", 1, "I need to learn about combat from Trainer Ragnhild Stonefist at the Training Grounds east of Yasha Redblade.", 0, 4700015)
  28. AddQuestStepCompleteAction(Quest, 3, "ReturnedToStonefist")
  29. end
  30. function ReturnedToStonefist(Quest, QuestGiver, Player)
  31. UpdateQuestTaskGroupDescription(Quest, 1, "I have won a match against one of the sparring partners.")
  32. AddQuestStepChat(Quest, 4, "Return to Yasha Redblade.", 1, "I am to return to Yasha Redblade near the ship's hull on Pilgrims' Landing.", 0, 4700005)
  33. AddQuestStepCompleteAction(Quest, 4, "ReturnToYasha")
  34. end
  35. function ReturnToYasha(Quest, QuestGiver, Player)
  36. GiveQuestReward(Quest, Player)
  37. end
  38. function Reload(Quest, QuestGiver, Player, Step)
  39. if Step == 1 then
  40. TalkedToStonefist(Quest, QuestGiver, Player)
  41. elseif Step == 2 then
  42. KilledSparringPartner(Quest, QuestGiver, Player)
  43. elseif Step == 3 then
  44. ReturnedToStonefist(Quest, QuestGiver, Player)
  45. elseif Step == 4 then
  46. ReturnToYasha(Quest, QuestGiver, Player)
  47. end
  48. end