9
3

marta_terrilons_fur_hunt.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : Quests/Everfrost/marta_terrilons_fur_hunt.lua
  3. Script Author : Flunklesnarkin
  4. Script Date : 2015.09.04 11:09:29
  5. Script Purpose :
  6. Zone : Everfrost
  7. Quest Giver: Marta Terrilon
  8. Preceded by: None
  9. Followed by: None
  10. --]]
  11. function Init(Quest)
  12. local Pelt_Type = math.random(1,2)
  13. AddQuestRewardCoin(Quest, math.random(5,90), math.random(27,80), math.random(3,5), 0)
  14. if Pelt_Type == 1 then
  15. AddQuestStepKill(Quest, 1, "Hunt glacier bears in Everfrost", math.random(8,12), 100, "I'm suppose to help Marta Terrilon get the furs that she needs. I should return to her with the furs as soon as I've gathered enough.", 126, 410087, 410088, 410122)
  16. AddQuestStepCompleteAction(Quest, 1, "KilledBeasts")
  17. else
  18. AddQuestStepKill(Quest, 1, "Hunt northern stags in Everfrost.", math.random(8,12), 100, "I'm suppose to help Marta Terrilon get the furs that she needs. I should return to her with the furs as soon as I've gathered enough.", 122, 410041, 410079)
  19. AddQuestStepCompleteAction(Quest, 1, "KilledBeasts")
  20. end
  21. end
  22. function Accepted(Quest, QuestGiver, Player)
  23. end
  24. function Declined(Quest, QuestGiver, Player)
  25. end
  26. function KilledBeasts(Quest, QuestGiver, Player)
  27. UpdateQuestTaskGroupDescription(Quest, 1, "I've hunted a large number of furred creatures, I hope these will satisfy Marta's quota.")
  28. SetCompleteFlag(Quest)
  29. AddQuestStepChat(Quest, 2, "I should return to Marta Terrilon in Everfrost.", 1, "I should return to Marta Terrilon in Everfrost.", 0, 410004)
  30. AddQuestStepCompleteAction(Quest, 2, "Quest_Complete")
  31. end
  32. function Quest_Complete(Quest, QuestGiver, Player)
  33. UpdateQuestTaskGroupDescription(Quest, 2, "Marta rewarded me once I returned with the furs.")
  34. GiveQuestReward(Quest, Player)
  35. end
  36. function Reload(Quest, QuestGiver, Player, Step)
  37. if QuestStepIsComplete(Player, 161, 1) then
  38. KilledBeasts(Quest, QuestGiver, Player)
  39. elseif QuestStepIsComplete(Player, 161, 2) then
  40. Quest_Complete(Quest, QuestGiver, Player)
  41. end
  42. end