fish_for_grunthor.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --[[
  2. Script Name : Quests/Everfrost/fish_for_grunthor.lua
  3. Script Author : Flunklesnarkin
  4. Script Date : 2015.09.03 12:09:31
  5. Script Purpose :
  6. Zone : Everfrost
  7. Quest Giver: Burm Grunthor
  8. Preceded by: None
  9. Followed by: None
  10. --]]
  11. function Init(Quest)
  12. AddQuestRewardCoin(Quest, math.random(5,90), math.random(27,80), 1, 0)
  13. AddQuestStepObtainItem(Quest, 1, "I need to harvest a number of fish for Grunthor.", 10, 100, "I need to fish for Grunthor in Everfrost.", 2549, 4869, 5475)
  14. AddQuestStepCompleteAction(Quest, 1, "GatheredFish")
  15. end
  16. function Declined(Quest, QuestGiver, Player)
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. end
  20. function GatheredFish(Quest, QuestGiver, Player)
  21. UpdateQuestTaskGroupDescription(Quest, 1, "I have harvested a number of fish for Grunthor.")
  22. SetCompleteFlag(Quest)
  23. AddQuestStepChat(Quest, 2, "I should return these fish to Grunthor.", 1, "I should return these fish to Grunthor.", 0, 410014)
  24. AddQuestStepCompleteAction(Quest, 2, "CompleteQuest")
  25. end
  26. function CompleteQuest(Quest, QuestGiver, Player)
  27. UpdateQuestTaskGroupDescription(Quest, 2, "I have fished a number of fish for Grunthor.")
  28. GiveQuestReward(Quest, Player)
  29. end
  30. function Reload(Quest, QuestGiver, Player, Step)
  31. if QuestStepIsComplete(Player, 136, 1) then
  32. GatheredFish(Quest, QuestGiver, Player)
  33. elseif QuestStepIsComplete(Player, 136, 2) then
  34. CompleteQuest(Quest, QuestGiver, Player)
  35. end
  36. end