natural_causes.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. --[[
  2. Script Name : Quests/Oakmyst/natural_causes.lua
  3. Script Purpose : Handles the quest, "Natural Causes?"
  4. Script Author : Scatman
  5. Script Date : 2009.05.03
  6. modified by : Ememjr
  7. modified date: 2017.04.21
  8. Zone : Oakmyst Forest
  9. Quest Giver: Lieutenant Charlin
  10. Preceded by: None
  11. Followed by: Cause for Investigation (cause_for_investigation.lua)
  12. --]]
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "I need to collect a poison gland from the frogs of Oakmyst Forest, commonly found near The Western Falls.", 1, 25, "Lieutenant Charlin has asked that I collect poison from some of the creatures local to Oakmyst Forest.", 160, 1950020)
  15. AddQuestStepKill(Quest, 2, "I need to collect a poison sac from the spiders found near The Western Falls.", 1, 25, "Lieutenant Charlin has asked that I collect poison from some of the creatures local to Oakmyst Forest.", 158, 1950014,1950015)
  16. AddQuestStepKill(Quest, 3, "I need to collect a poison sac from any of the mystail rats in Oakmyst Forest.", 1, 25, "Lieutenant Charlin has asked that I collect poison from some of the creatures local to Oakmyst Forest.", 112, 1950009,1950017,1950010,1950016)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_GotPoison")
  18. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_GotPoison")
  19. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_GotPoison")
  20. end
  21. function Accepted(Quest, QuestGiver, Player)
  22. FaceTarget(QuestGiver, Player)
  23. conversation = CreateConversation()
  24. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_charlin/qey_adv01_oakmyst/quests/charlin/charlin005a.mp3", "", "", 3816458075, 1868191399, Player)
  25. AddConversationOption(conversation, "I will be.")
  26. StartConversation(conversation, QuestGiver, Player, "Be careful out there.")
  27. end
  28. function Declined(Quest, QuestGiver, Player)
  29. end
  30. function Step1_Complete_GotPoison(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 1, "I have collected a frog poison gland.")
  32. if QuestIsComplete(Player, 207) then
  33. MultipleStepComplete(Quest, QuestGiver, Player)
  34. end
  35. end
  36. function Step2_Complete_GotPoison(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I have found a poison sac from a spider in Oakmyst Forest.")
  38. if QuestIsComplete(Player, 207) then
  39. MultipleStepComplete(Quest, QuestGiver, Player)
  40. end
  41. end
  42. function Step3_Complete_GotPoison(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 3, "I have collected a poison sac from a mystail rat in Oakmyst Forest.")
  44. if QuestIsComplete(Player, 207) then
  45. MultipleStepComplete(Quest, QuestGiver, Player)
  46. end
  47. end
  48. function MultipleStepComplete(Quest, QuestGiver, Player)
  49. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected some poison for Lieutenant Charlin.")
  50. AddQuestStepChat(Quest, 4, "I need to speak with Lieutenant Charlin near the gates to Castleview Hamlet.", 1, "I need to return to Lieutenant Charlin and give him the poison that I have collected.", 0, 1950008)
  51. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  52. end
  53. function QuestComplete(Quest, QuestGiver, Player)
  54. UpdateQuestDescription(Quest, "I have collected the poisons that Charlin requested. He will send the poisons back to town to have tests run on them.")
  55. GiveQuestReward(Quest, Player)
  56. end
  57. function Reload(Quest, QuestGiver, Player, Step)
  58. if Step == 1 then
  59. Step1_Complete_GotPoison(Quest, QuestGiver, Player)
  60. elseif Step == 2 then
  61. Step2_Complete_GotPoison(Quest, QuestGiver, Player)
  62. elseif Step == 3 then
  63. Step3_Complete_GotPoison(Quest, QuestGiver, Player)
  64. end
  65. end