9
3

speckled_rattler_venom.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --[[
  2. Script Name: speckled_rattler_venom.lua
  3. Script Purpose: Handles the quest, "Speckled Rattler Venom"
  4. Script Author: vo1d
  5. Script Date: 10/8/2019
  6. Script Notes: n/a
  7. Zone: Commonlands
  8. Quest Giver:
  9. Preceded by: None
  10. Followed by: Beetle Shells
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. local GerunPontian = 330014
  14. local SpeckledRattler = 330020
  15. function Init(Quest)
  16. AddQuestStepKill(Quest, 1, "I need to collect venom from eight speckled rattlers", 8, 100, "Gerun wants the venom from eight speckled rattlers.", 325, SpeckledRattler)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. if QuestGiver ~= nil then
  21. if GetDistance (Player, QuestGiver) < 30 then
  22. FaceTarget(QuestGiver, Player)
  23. Dialog.New(QuestGiver, Player)
  24. Dialog.AddDialog("Great! I'll be here, of course.")
  25. Dialog.AddVoiceover("", "", 0)
  26. Dialog.AddOption("I'll be back.")
  27. Dialog.Start()
  28. end
  29. end
  30. end
  31. function Declined(Quest, QuestGiver, Player)
  32. -- Add dialog here for when the quest is declined
  33. end
  34. function Deleted(Quest, QuestGiver, Player)
  35. -- Remove any quest specific items here when the quest is deleted
  36. end
  37. function Step1Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 1, "I have collected the venom.")
  39. AddQuestStepChat(Quest, 2, "I need to bring this venom back to Gerun", 1, "Gerun wants the venom from eight speckled rattlers.", 11, GerunPontian)
  40. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  41. end
  42. function QuestComplete(Quest, QuestGiver, Player)
  43. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed,
  44. -- parser adds them for completion in case stuff needs to be moved around
  45. UpdateQuestStepDescription(Quest, 2, "I have given Gerun the venom.")
  46. UpdateQuestTaskGroupDescription(Quest, 1, "I acquired the venom for Gerun.")
  47. UpdateQuestDescription(Quest, "I collected the venom for Gerun and received my payment.")
  48. GiveQuestReward(Quest, Player)
  49. end
  50. function Reload(Quest, QuestGiver, Player, Step)
  51. if Step == 1 then
  52. Step1Complete(Quest, QuestGiver, Player)
  53. elseif Step == 2 then
  54. QuestComplete(Quest, QuestGiver, Player)
  55. end
  56. end