BattleOfWits.lua 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. --[[
  2. Script Name : battle_of_wits.lua
  3. Script Purpose : Handles the quest, "Battle of Wits"
  4. Script Author : premierio015
  5. Script Date : 12.08.2020
  6. Script Notes :
  7. Zone : The City of Freeport
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepLocation(Quest, 1, "Enter Temple Street", 10, "I will need to enter Temple Street, and deipher the equations of the gnomes left on the walls there.", 11, 17.68, 2.92, 22.76)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. -- Add dialog here for when the quest is accepted
  18. end
  19. function Declined(Quest, QuestGiver, Player)
  20. -- Add dialog here for when the quest is declined
  21. end
  22. function Deleted(Quest, QuestGiver, Player)
  23. -- Remove any quest specific items here when the quest is deleted
  24. end
  25. function Step1Complete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "")
  27. AddQuestStepObtainItem(Quest, 2, "Search for the gnomish equations on the walls of Temple Street, and copy them.", 3, 100, "I will need to enter Temple Street, and deipher the equations of the gnomes left on the walls there.", 374, 12090)
  28. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  29. end
  30. function Step2Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 2, "")
  32. AddQuestStep(Quest, 3, "Use the study materials in the library to decipher and solve the gnomish equations.", 1, 100, "I will need to enter Temple Street, and deipher the equations of the gnomes left on the walls there.", 3040)
  33. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  34. end
  35. function Step3Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 3, "That was easy enough. Back to Temple Street.")
  37. AddQuestStepChat(Quest, 4, "Return to Temple Street, and activate the broken clockwork.", 1, "I will need to enter Temple Street, and deipher the equations of the gnomes left on the walls there.", 1040, 5590218)
  38. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  39. end
  40. function Step4Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 4, "")
  42. AddQuestStepKill(Quest, 5, "Use the activated clockwork to destroy the necromachines in Temple Street.", 6, 100, "I will need to enter Temple Street, and deipher the equations of the gnomes left on the walls there.", 3109, 6460005)
  43. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  44. end
  45. function Step5Complete(Quest, QuestGiver, Player)
  46. UpdateQuestStepDescription(Quest, 5, "")
  47. UpdateQuestTaskGroupDescription(Quest, 1, "I was able to decipher the equations, and have rebuilt one of the gnomish inventions.")
  48. AddQuestStepChat(Quest, 6, "Return to Sneel in Freeport", 1, "I should return to Sneel in Freeport, and inform him of my success.", 11, 5590218)
  49. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  50. end
  51. function QuestComplete(Quest, QuestGiver, Player)
  52. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  53. UpdateQuestStepDescription(Quest, 6, "")
  54. UpdateQuestTaskGroupDescription(Quest, 2, "I was able to prove the superior intelligence of the ratongas.")
  55. UpdateQuestDescription(Quest, "I was able to solve the equations left by the gnomes in Temple Street, simplistic as they were. With my quick thinking, I was able to defeat the inferior ones assembled by the gnomes themselves, which will pose no threat to Freeport now. ")
  56. GiveQuestReward(Quest, Player)
  57. end
  58. function Reload(Quest, QuestGiver, Player, Step)
  59. if Step == 1 then
  60. Step1Complete(Quest, QuestGiver, Player)
  61. elseif Step == 2 then
  62. Step2Complete(Quest, QuestGiver, Player)
  63. elseif Step == 3 then
  64. Step3Complete(Quest, QuestGiver, Player)
  65. elseif Step == 4 then
  66. Step4Complete(Quest, QuestGiver, Player)
  67. elseif Step == 5 then
  68. Step5Complete(Quest, QuestGiver, Player)
  69. elseif Step == 6 then
  70. QuestComplete(Quest, QuestGiver, Player)
  71. end
  72. end