TheStolenChest.lua 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --[[
  2. Script Name : the_stolen_chest.lua
  3. Script Purpose : Handles the quest, "The Stolen Chest"
  4. Script Author : EmemJR
  5. Script Date : 10/7/2019
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Thieves' Way
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local itemId = 2115
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "I must kill one darkblade brigand.", 1, 100, "I must kill a darkblade brigand.", 11, 1540018,1540023)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. end
  17. function Step1Complete(Quest, QuestGiver, Player)
  18. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  19. UpdateQuestStepDescription(Quest, 1, "I have killed one darkblade brigand.")
  20. UpdateQuestTaskGroupDescription(Quest, 1, "I have killed a darkblade brigand.")
  21. UpdateQuestZone(Quest,"Beggar's Court")
  22. AddQuestStepChat(Quest, 2, "I must find Anrean Velvinna.", 1, "I must find Anrean Velvinna in the Beggar's Court.", 611, 1360202,1360004)
  23. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  24. end
  25. function Accepted(Quest, QuestGiver, Player)
  26. while HasItem(Player, itemId, 1) do
  27. RemoveItem(Player, itemId)
  28. SendMessage(Player,"You place the locked chest in your quest satchle.")
  29. end
  30. end
  31. function Declined(Quest, QuestGiver, Player)
  32. -- Add dialog here for when the quest is declined
  33. end
  34. function Deleted(Quest, QuestGiver, Player)
  35. -- Remove any quest specific items here when the quest is deleted
  36. end
  37. function QuestComplete(Quest, QuestGiver, Player)
  38. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  39. UpdateQuestStepDescription(Quest, 1, "I have found Anrean Velvinna.")
  40. UpdateQuestTaskGroupDescription(Quest, 1, "I have found Anrean Velvinna.")
  41. UpdateQuestDescription(Quest, "I found a bounty that promised a reward for the return of a stolen chest. After I recovered the chest from the Darkblade brigands, I returned it to Anrean Velvinna. She awarded me some money for returning the chest.")
  42. GiveQuestReward(Quest, Player)
  43. end
  44. function Reload(Quest, QuestGiver, Player, Step)
  45. if Step == 1 then
  46. Step1Complete(Quest, QuestGiver, Player)
  47. elseif Step == 2 then
  48. QuestComplete(Quest, QuestGiver, Player)
  49. end
  50. end