9
3

OrcsandGhosts.lua 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --[[
  2. Script Name : orcs_and_ghosts.lua
  3. Script Purpose : Handles the quest, "Orcs and Ghosts"
  4. Script Author : premierio015
  5. Script Date : 27.02.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Commonlands
  8. Quest Giver : Gerun Pontian
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to slay ten ghostly orcs", 10, 100, "I need to kill ten ghostly orcs.", 611, 330034)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(NPC, Spawn)
  18. local conversation = CreateConversation()
  19. AddConversationOption(conversation, "I'll let you know when I've done this.")
  20. StartConversation(conversation, QuestGiver, Player, "Great, that's a relief to hear. Don't worry about the spectral defenders. Like the ghostly orcs, they imagine they are in some never-ending war. I don't think they even realize they're dead. It's sad, really. Anyway, ghostly orcs: take out ten of them, those were my orders.")
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. -- Add dialog here for when the quest is declined
  24. end
  25. function Deleted(Quest, QuestGiver, Player)
  26. -- Remove any quest specific items here when the quest is deleted
  27. end
  28. function Step1Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I have slain the ghostly orcs.")
  30. AddQuestStepChat(Quest, 2, "I need to return to Gerun", 1, "I need to kill ten ghostly orcs.", 11, 330014)
  31. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  32. end
  33. function QuestComplete(Quest, QuestGiver, Player)
  34. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  35. UpdateQuestStepDescription(Quest, 2, "I have spoken with Gerun.")
  36. UpdateQuestTaskGroupDescription(Quest, 1, "I have slain the orcs.")
  37. UpdateQuestDescription(Quest, "I have slain the ghostly orcs for Gerun. He thanked me and paid me what he would've made for the task.")
  38. GiveQuestReward(Quest, Player)
  39. end
  40. function Reload(Quest, QuestGiver, Player, Step)
  41. if Step == 1 then
  42. Step1Complete(Quest, QuestGiver, Player)
  43. elseif Step == 2 then
  44. QuestComplete(Quest, QuestGiver, Player)
  45. end
  46. end