the_art_of_combat.lua 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : Quests/QueensColony/the_art_of_combat.lua
  3. Script Author : Zcoretri
  4. Script Date : 2015.07.30
  5. Script Purpose : Handles the quest, "The Art of Combat"
  6. Zone : The Queens Colony
  7. Quest Giver: Murrar Shar
  8. Preceded by: None
  9. Followed by: A Presence of Evil
  10. --]]
  11. function Init(Quest)
  12. -- Qeynosian Cloth Mitts
  13. -- Qeynosian Leather Gloves
  14. -- Qeynosian Studded Gloves
  15. -- Qeynosian Plated Gauntlets
  16. AddQuestStepChat(Quest, 1, "I need to speak to Trainer Hayl McGuinness at the Training Grounds northwest of Murrar Shar.", 1, "I need to learn about combat from Trainer Hayl McGuinness.", 0, 2530070)
  17. AddQuestStepCompleteAction(Quest, 1, "step1_complete_talkToHayl")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. if QuestGiver ~= nil then
  21. if GetDistance(Player, QuestGiver) < 30 then
  22. FaceTarget(QuestGiver, Player)
  23. conversation = CreateConversation()
  24. AddConversationOption(conversation, "Thanks.")
  25. StartConversation(conversation, QuestGiver, Player, "Goodluck.")
  26. end
  27. end
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. end
  31. function step1_complete_talkToHayl(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "I have spoken with Hayl McGuinness.")
  33. AddQuestStepKill(Quest, 2, "I need to defeat a sparring partner in combat. There are several sparring partners just north of Trainer Hayl McGuinness.", 1, 100, "I need to learn about combat from Trainer Hayl McGuinness.", 0, 2530000, 2530001, 2530002)
  34. AddQuestStepCompleteAction(Quest, 2, "step2_complete_killedSparringPartner")
  35. end
  36. function step2_complete_killedSparringPartner(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I have defeated a sparring partner in combat.")
  38. AddQuestStepChat(Quest, 3, "I should speak with Trainer Hayl McGuinness and tell him of my victory.", 1, "I need to learn about combat from Trainer Hayl McGuinness.", 0, 2530070)
  39. AddQuestStepCompleteAction(Quest, 3, "step3_complete_talkToHayl")
  40. end
  41. function step3_complete_talkToHayl(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I have spoken to Sergeant Hayl McGuinness.")
  43. UpdateQuestTaskGroupDescription(Quest, 1, "I have won a match against one of the sparring partners.")
  44. AddQuestStepChat(Quest, 4, "I should tell Murrar that my training was successful.", 1, "I should return to Murrar Shar to show that I am ready for my next challenege.", 0, 2530076)
  45. AddQuestStepCompleteAction(Quest, 4, "step4_complete_talkToMurrar")
  46. end
  47. function step4_complete_talkToMurrar(Quest, QuestGiver, Player)
  48. UpdateQuestDescription(Quest, "I have learned some of the basics of combat from Trainer Hayl McGuinness at the Queen's Colony. Hopefully this knowledge helps me serve Qeynos and uncover the trouble here.")
  49. GiveQuestReward(Quest, Player)
  50. end
  51. function Reload(Quest, QuestGiver, Player, Step)
  52. if Step == 1 then
  53. step1_complete_talkToHayl(Quest, QuestGiver, Player)
  54. elseif Step == 2 then
  55. step2_complete_killedSparringPartner(Quest, QuestGiver, Player)
  56. elseif Step == 3 then
  57. step3_complete_talkToHayl(Quest, QuestGiver, Player)
  58. end
  59. end