cause_for_investigation.lua 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. --[[
  2. Script Name : Quests/Oakmyst/cause_for_investigation.lua
  3. Script Purpose : Handles the quest, "Cause for Investigation"
  4. Script Author : Scatman
  5. Script Date : 2009.10.07
  6. Zone : Oakmyst Forest
  7. Quest Giver: Lieutenant Charlin
  8. Preceded by: Natural Causes? (natural_causes.lua)
  9. Followed by: A Citizen's Request (a_citizens_request.lua)
  10. --]]
  11. function Init(Quest)
  12. -- unearthed soil
  13. Say(NPC, "This is me talking INit")
  14. AddQuestStepObtainItem(Quest, 1, "Lieutenant Charlin would like me to collect soil samples from all around Oakmyst Forest.", 5, 100, "Charlin has asked that I collect soil samples from the dirt piles that are popping up all around Oakmyst Forest.", 10, 15098)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_GotSoil")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. conversation = CreateConversation()
  20. Say(QuestGiver, "This is me talking try to set spawn to acive")
  21. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_charlin/qey_adv01_oakmyst/quests/charlin/charlin008a.mp3", "", "", 717032559, 738942880, Player)
  22. AddConversationOption(conversation, "You're welcome.")
  23. StartConversation(conversation, QuestGiver, Player, "It may be nothing, but it may help us. Thanks for doing this.")
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. end
  27. function Step1_Complete_GotSoil(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 1, "I have collected some soil samples for Lieutenant Charlin.")
  29. AddQuestStepChat(Quest, 2, "I need to bring this soil to Lieutenant Charlin.", 1, "Charlin has asked that I collect soil samples from the dirt piles that are popping up all around Oakmyst Forest.", 0, 1950008)
  30. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  31. end
  32. function QuestComplete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 2, "I have spoken with Lieutenant Charlin.")
  34. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected the soil for Charlin.")
  35. -- remove unearthed soil
  36. while HasItem(Player, 15098) do
  37. RemoveItem(Player, 15098)
  38. end
  39. UpdateQuestDescription(Quest, "I have gathered the soil samples for Charlin. He hopes something will turn up from the tests.")
  40. GiveQuestReward(Quest, Player)
  41. end
  42. function Reload(Quest, QuestGiver, Player, Step)
  43. if Step == 1 then
  44. Step1_Complete_GotSoil(Quest, QuestGiver, Player)
  45. end
  46. end