running_off_the_grobin_scouts.lua 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : Quests/GreaterFaydark/running_off_the_grobin_scouts.lua
  3. Script Purpose : Handles the quest Running Off the Grobin Scouts
  4. Script Author : Zcoretri
  5. Script Date : 2009.03.02
  6. Zone : Greater Faydark
  7. Quest Giver: Matron of the Nursery
  8. Preceded by: Infestation!
  9. Followed by: Grobin Trouble at the Pond
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I need to defeat the grobin scouts in the area southwest of the spirit bloom nursery near Amethyst Pond.", 4, 100, "The Matron of the Nursery wants me to investigate the reports about grobin near Amethyst Pond to the southwest and run off any scouts I find.", 2566, 1140022)
  13. AddQuestStepCompleteAction(Quest, 1, "KilledAllGrobinScouts")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. conversation = CreateConversation()
  17. if QuestGiver ~= nil then
  18. if GetDistance(Player, QuestGiver) < 30 then
  19. FaceTarget(QuestGiver, Player)
  20. AddConversationOption(conversation, "I'll take care of things.")
  21. StartConversation(conversation, QuestGiver, Player, "Thank you. I fear for the spirit bloom nursery with the grobins so close. It wouldn't surprise me if they're behind the infestation too!")
  22. end
  23. end
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. end
  27. function KilledAllGrobinScouts(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 1, "I should tell the Matron of the Nursery that I ran off the grobins scouts.")
  29. UpdateQuestTaskGroupDescription(Quest, 1, "I visited Amethyst Pond and scared off the grobin scouts in the area. I noticed that there were some grobin at the water's edge that seemed to be up to something.")
  30. AddQuestStepChat(Quest, 2, "I should tell the Matron of the Nursery that I ran off the grobin scouts.", 1, "I should return to the Matron of the Nursery and let her know I scared off a few scouts but the grobin were up to something at the pond.", 0, 1140004)
  31. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  32. end
  33. function QuestComplete(Quest, QuestGiver, Player)
  34. UpdateQuestDescription(Quest, "I ran off the grobin scouts and told the Matron of the Nursery about the grobins I saw at the water's edge of the pond.")
  35. GiveQuestReward(Quest, Player)
  36. end
  37. function Reload(Quest, QuestGiver, Player)
  38. if Step == 1 then
  39. KilledAllGrobinScouts(Quest, QuestGiver, Player)
  40. end
  41. end