public_service.lua 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : Quests/Darklight/public_service.lua
  3. Script Purpose : Handles the quest, "Public Service"
  4. Script Author : Scatman
  5. Script Date : 2009.02.03
  6. Zone : Darklight Wood
  7. Quest Giver: Laexyra Y'Barriath
  8. Preceded by: Purposeful Trinkets (purposeful_trinkets.lua)
  9. Followed by: A Friendly Reminder (a_friendly_reminder.lua)
  10. --]]
  11. function Init(Quest)
  12. -- Beaded Belt of Persistance
  13. -- Sacrosanct Signet
  14. -- Botanical Gloves
  15. AddQuestStepKill(Quest, 1, "I need to kill eight purulent defenders.", 8, 100, "I need to kill a number of undead soldiers north of T'Vatar Post.", 611, 340117, 340126)
  16. AddQuestStepKill(Quest, 2, "I need to kill five moldering soldiers.", 5, 100, "I need to kill a number of undead soldiers north of T'Vatar Post.", 611, 340114, 340118)
  17. AddQuestStepCompleteAction(Quest, 1, "step1_complete_killedDefenders")
  18. AddQuestStepCompleteAction(Quest, 2, "step2_complete_killedSoldiers")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. FaceTarget(QuestGiver, Player)
  22. conversation = CreateConversation()
  23. PlayFlavor(QuestGiver, "voiceover/english/neriak/laexyra_y_barriath/darklight_wood/tvatar_post/laexyra/laexyra011.mp3", "", "", 370299149, 331491163, Player)
  24. AddConversationOption(conversation, "Ok.")
  25. StartConversation(conversation, QuestGiver, Player, "Return to me when you are finished.")
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. end
  29. function step1_complete_killedDefenders(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 1, "I have slain the purulent defenders.")
  31. if QuestIsComplete(Player, 98) then
  32. multiple_steps_complete(Quest, QuestGiver, Player)
  33. end
  34. end
  35. function step2_complete_killedSoldiers(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 2, "I have slain the moldering soldiers.")
  37. if QuestIsComplete(Player, 98) then
  38. multiple_steps_complete(Quest, QuestGiver, Player)
  39. end
  40. end
  41. function multiple_steps_complete(Quest, QuestGiver, Player)
  42. UpdateQuestTaskGroupDescription(Quest, 1, "I have killed the undead soldiers for Laexyra.")
  43. AddQuestStepChat(Quest, 3, "I need to speak with Laexyra Y'Barriath.", 1, "I should return to Laexyra Y'Barriath now that I have thinned out the undead.", 0, 340109)
  44. AddQuestStepCompleteAction(Quest, 3, "quest_complete")
  45. end
  46. function quest_complete(Quest, QuestGiver, Player)
  47. UpdateQuestDescription(Quest, "I have thinned out the undead population north of T'Vatar Post.")
  48. GiveQuestReward(Quest, Player)
  49. end
  50. function Reload(Quest, QuestGiver, Player, Step)
  51. if Step == 1 then
  52. step1_complete_killedDefenders(Quest, QuestGiver, Player)
  53. elseif Step == 2 then
  54. step2_complete_killedSoldiers(Quest, QuestGiver, Player)
  55. end
  56. end