9
3

snake_slaying.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --[[
  2. Script Name : Quests/WillowWood/snake_slaying.lua
  3. Script Purpose : Handles the quest, "Snake Slaying"
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Zone : The Willow Wood
  7. Quest Giver: Hunter Vannil
  8. Preceded by: None
  9. Followed by: None
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I must kill some rock adders.", 8, 100, "I need to kill eight rock adders in the Forest Ruins.", 611, 1960018,8270017,8270002)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledSnakes")
  14. UpdateQuestZone(Quest,"Forest Ruins")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. conversation = CreateConversation()
  19. PlayFlavor(QuestGiver, "voiceover/english/hunter_vannil/qey_village05/huntervannil002.mp3", "", "", 2784879734, 2610513967, Player)
  20. AddConversationOption(conversation, "Thanks, this shouldn't be too difficult a hunt.")
  21. StartConversation(conversation, QuestGiver, Player, "Good. Killing the deadly adders shall make our village a safer place. Good luck on your hunt. Please be careful.")
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. end
  25. function Step1_Complete_KilledSnakes(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I have killed some rock adders.")
  27. UpdateQuestZone(Quest, "Willow Wood")
  28. AddQuestStepChat(Quest, 2, "I should return to Hunter Vannil.", 1, "I should return to Hunter Vannil atop the cliff in The Willow Wood.", 0, 2370032)
  29. AddQuestStepCompleteAction(Quest, 2, "Quest_Complete")
  30. end
  31. function Quest_Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 2, "I have spoken with Hunter Vannil.")
  33. UpdateQuestTaskGroupDescription(Quest, 1, "I killed eight rock adders.")
  34. UpdateQuestDescription(Quest, "I eliminated eight rock adders to make the area safer for the populace of the Willow Wood.")
  35. GiveQuestReward(Quest, Player)
  36. end
  37. function Reload(Quest, QuestGiver, Player, Step)
  38. if Step == 1 then
  39. Step1_Complete_KilledSnakes(Quest, QuestGiver, Player)
  40. elseif Step == 2 then
  41. Quest_Complete(Quest, QuestGiver, Player)
  42. end
  43. end