9
3

StudiesInSpeciation.lua 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. --[[
  2. Script Name : StudiesinSpeciation.lua
  3. Script Purpose : Handles the quest, "Studies in Speciation"
  4. Script Author : Shatou
  5. Script Date : 1/5/2020
  6. Script Notes :
  7. Zone : Caves
  8. Quest Giver : Kahla Ulno
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local A_WHITE_SPIDER_ID = 1970012
  13. local A_WHITE_SPIDERLING_ID = 1970002
  14. local ALBINO_ARACHNID_ID = 1970010
  15. local SHALE_BAT_ID = 1970014
  16. local TERRA_BAT_ID = 1970023
  17. local CAVE_SERPENT_ID = 1970008
  18. local KAHLA_ULNO_ID = 1970026
  19. function Init(Quest)
  20. 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, A_WHITE_SPIDER_ID, A_WHITE_SPIDERLING_ID, ALBINO_ARACHNID_ID)
  21. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  22. end
  23. function Step1Complete(Quest, QuestGiver, Player)
  24. UpdateQuestStepDescription(Quest, 1, "I have collected the cave spider bodies.")
  25. 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, CAVE_SERPENT_ID)
  26. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  27. end
  28. function Step2Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 2, "I have collected the cave serpent bodies.")
  30. 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, SHALE_BAT_ID, TERRA_BAT_ID)
  31. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  32. end
  33. function Step3Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 3, "I have collected the cave bat bodies.")
  35. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected the samples for Kahla.")
  36. AddQuestStepChat(Quest, 4, "I must speak with Kahla.", 1, "I need to bring these samples back to Kahla.", 11, KAHLA_ULNO_ID)
  37. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  38. end
  39. function QuestComplete(Quest, QuestGiver, Player)
  40. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  41. UpdateQuestStepDescription(Quest, 4, "I have spoken with Kahla.")
  42. UpdateQuestTaskGroupDescription(Quest, 2, "I have given the samples to Kahla.")
  43. UpdateQuestDescription(Quest, "I have given Kahla the samples she asked for. She thanked me for my help.")
  44. GiveQuestReward(Quest, Player)
  45. end
  46. function Reload(Quest, QuestGiver, Player, Step)
  47. if Step == 1 then
  48. Step1Complete(Quest, QuestGiver, Player)
  49. elseif Step == 2 then
  50. Step2Complete(Quest, QuestGiver, Player)
  51. elseif Step == 3 then
  52. Step3Complete(Quest, QuestGiver, Player)
  53. elseif Step == 4 then
  54. QuestComplete(Quest, QuestGiver, Player)
  55. end
  56. end
  57. function Accepted(Quest, QuestGiver, Player)
  58. -- Add dialog here for when the quest is accepted
  59. end
  60. function Declined(Quest, QuestGiver, Player)
  61. -- Add dialog here for when the quest is declined
  62. end