9
3

TheNumberOneThreatInButcherblock.lua 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : Quests/ButcherblockMountains/TheNumberOneThreatInButcherblock.lua
  3. Script Purpose : Handles the quest, "The Number One Threat in Butcherblock"
  4. Script Author : jakejp
  5. Script Date : 6/6/2018
  6. Script Notes :
  7. Zone : Butcherblock Mountains
  8. Quest Giver : Trapper Coalbear
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to slay several slatepaw bears in the area.", 10, 100, "I must reduce the threat of bears in Butcherblock!", 174, 1080259, 1080429, 1080614, 1081152, 1080378, 1080379, 1080380, 1080334)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I have slain several bears in the Butcherblock Mountains.")
  18. UpdateQuestTaskGroupDescription(Quest, 1, "I have successfully reduced the threat of bears in Butcherblock!")
  19. AddQuestStepChat(Quest, 2, "I should let Coalbear know I've slain several bears.", 1, "I should let Trapper Coalbear know that I've reduced the threat of bears in the region.", 11, 1080139)
  20. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  21. end
  22. function QuestComplete(Quest, QuestGiver, Player)
  23. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  24. UpdateQuestStepDescription(Quest, 2, "I let Coalbear know that I've slain several bears.")
  25. UpdateQuestTaskGroupDescription(Quest, 2, "Trapper Coalbear was thrilled to hear of my efforts... but he's still concerned about bears.")
  26. UpdateQuestDescription(Quest, "Trapper Coalbear should be most pleased. I have slain several bears and hopefully reduced their threat significantly.")
  27. GiveQuestReward(Quest, Player)
  28. end
  29. function Reload(Quest, QuestGiver, Player, Step)
  30. if Step == 1 then
  31. Step1Complete(Quest, QuestGiver, Player)
  32. elseif Step == 2 then
  33. QuestComplete(Quest, QuestGiver, Player)
  34. end
  35. end
  36. function Accepted(Quest, QuestGiver, Player)
  37. FaceTarget(QuestGiver, Player)
  38. conversation = CreateConversation()
  39. PlayFlavor(NPC, "", "", "", 0, 0, Player)
  40. AddConversationOption(conversation, "Will do!")
  41. StartConversation(conversation, QuestGiver, Player, "Great! You can get started right away. As I said, I've seen several already. Come see me again when you've significantly reduced the threat of bears in the area!")
  42. end
  43. function Declined(Quest, QuestGiver, Player)
  44. -- Add dialog here for when the quest is declined
  45. end