studies_in_speciation.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. --[[
  2. Quest Template
  3. Script Name : Quests/Caves/studies_in_speciation.lua
  4. Script Purpose : Handles the quest, "Studies in Speciation"
  5. Script Author : Scatman
  6. Script Date : 2009.10.18
  7. Zone : The Caves
  8. Quest Giver : Kahla Ulno
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need four cave spider bodies.", 4, 100, "I need to collect some samples of the creatures in the Caves for Kahla.", 611, 1970019)
  14. AddQuestStepKill(Quest, 2, "I need four cave serpent bodies.", 4, 100, "I need to collect some samples of the creatures in the Caves for Kahla.", 611, 1970005)
  15. AddQuestStepKill(Quest, 3, "I need four cave bat bodies.", 4, 100, "I need to collect some samples of the creatures in the Caves for Kahla.", 611, 1970022, 1970037)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledSpiders")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_KilledSerpents")
  18. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_KilledBats")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. FaceTarget(QuestGiver, Player)
  22. conversation = CreateConversation()
  23. AddConversationOption(conversation, "Thanks.")
  24. StartConversation(conversation, QuestGiver, Player, "Good. The machines are likely a couple of levels up from this one. I'm sure I'll hear the explosions from here. I do hope you enjoy yourself, hah hah!")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. end
  28. function Step1_Complete_KilledSpiders(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I have collected the cave spider bodies.")
  30. if QuestIsComplete(Player, 228) then
  31. MultipleStepsComplete(Quest, QuestGiver, Player)
  32. end
  33. end
  34. function Step2_Complete_KilledSerpents(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I have collected the cave serpent bodies.")
  36. if QuestIsComplete(Player, 228) then
  37. MultipleStepsComplete(Quest, QuestGiver, Player)
  38. end
  39. end
  40. function Step3_Complete_KilledBats(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I have collected the cave bat bodies.")
  42. if QuestIsComplete(Player, 228) then
  43. MultipleStepsComplete(Quest, QuestGiver, Player)
  44. end
  45. end
  46. function MultipleStepsComplete(Quest, QuestGiver, Player)
  47. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected the samples for Kahla.")
  48. AddQuestStepChat(Quest, 4, "I must speak with Kahla.", 1, "I need to bring these samples back to Kahla.", 0, 1970004)
  49. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  50. end
  51. function QuestComplete(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 4, "I have spoken with Kahla.")
  53. UpdateQuestTaskGroupDescription(Quest, 2, "I have given the samples to Kahla.")
  54. UpdateQuestDescription(Quest, "I have given Kahla the samples she asked for. She thanked me for my help.")
  55. GiveQuestReward(Quest, Player)
  56. end
  57. function Reload(Quest, QuestGiver, Player, Step)
  58. if Step == 1 then
  59. Step1_Complete_KilledSpiders(Quest, QuestGiver, Player)
  60. elseif Step == 2 then
  61. Step2_Complete_KilledSerpents(Quest, QuestGiver, Player)
  62. elseif Step == 3 then
  63. Step3_Complete_KilledBats(Quest, QuestGiver, Player)
  64. end
  65. end