a_puppy_for_your_potion.lua 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. --[[
  2. Script Name : Quests/ScaleYard/a_puppy_for_your_potion.lua
  3. Script Purpose : Handles the quest, "A Puppy for Your Potion"
  4. Script Author : Xanibunib
  5. Script Date : 2009.03.13
  6. Zone : The Scale Yard
  7. Quest Giver: Brood Matron Vrim Malthyk
  8. QuestID # : 340
  9. Preceded by: None
  10. Followed by: He Said, he said (He_said_he_said.lua)
  11. --]]
  12. -- Item ID's
  13. local BOX_OF_ALCHEMY_COMPONENTS = 4537
  14. function Init(Quest)
  15. --Ancient Sebilisian Haversack
  16. AddQuestStepChat(Quest, 1, "I need to speak with Melvin Dunford. He was last seen in a tavern located North of the Fountain of the Fallen Soldier.", 1, "Melvin Dunford, a freeport dockworker knows the location of a box of alchemy componenets that belong to Brood Matron Vrim. I need to blackmail Melvin into giving me the box.", 0, 1390050)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_Threat")
  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. conversation = CreateConversation()
  24. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/brood_matron_vrim_malthyk/fprt_hood06/rcp_vrim007.mp3", "", "", 3926366236, 3342203469, Spawn)
  25. AddConversationOption(conversation, "With pleasure.")
  26. StartConversation(conversation, QuestGiver, Player, "You , I want you to take this. It is the collar of his most beloved puppy, Wittens. Show it to him and inform Mr. Dunford if he does not tell me the location of the alchemy components poor little Wittens here will find himself in the company of a rather insatiable and ravenous friend of mine. One of... trollish persuasion.")
  27. end
  28. end
  29. end
  30. function Declined(Quest, QuestGiver, Player)
  31. end
  32. function Deleted(Quest, QuestGiver, Player)
  33. RemoveAlchemyComponents(Player)
  34. end
  35. function RemoveAlchemyComponents(Player)
  36. while HasItem(Player, BOX_OF_ALCHEMY_COMPONENTS, 1) do
  37. RemoveItem(Player, BOX_OF_ALCHEMY_COMPONENTS)
  38. end
  39. end
  40. function Step1_Complete_Threat(Quest, QuestGiver, Player)
  41. UpdateQuestTaskGroupDescription(Quest, 1, "My threats were successful! Melvin told me where I could find the alchemy compnents.")
  42. AddQuestStep(Quest, 2, "I must recover the box of alchemy components. They are suppose to be near the enterance to the Thieve's Way.", 1, 100, "I need to look for the stolen box of alchemy components.", 654)
  43. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_HaveBox")
  44. end
  45. function Step2_Complete_HaveBox(Quest, QuestGiver, Player)
  46. UpdateQuestStepDescription(Quest, 2, "I recovered the box of stolen alchemy components. I need to bring them to Vrim.")
  47. UpdateQuestTaskGroupDescription(Quest, 2, "I recovered the box of stolen alchemy components. I need to bring them to Vrim.")
  48. AddQuestStepChat(Quest, 3, "I've recovered the box of stolen alchemy components. I need to bring them to Vrim.", 1, "I need to return the box of alchemy componenets to Vrim.", 654, 1260055)
  49. AddQuestStepCompleteAction(Quest, 3, "Step3_Quest_Complete")
  50. end
  51. function Step3_Quest_Complete(Quest, QuestGiver, Player)
  52. UpdateQuestTaskGroupDescription(Quest, 1, "I've located the box of stolen alchemy components and returned them to Vrim. She is most pleased!")
  53. GiveQuestReward(Quest, Player)
  54. RemoveAlchemyComponents(Player)
  55. end
  56. function Reload(Quest, QuestGiver, Player, Step)
  57. if Step == 1 then
  58. Step1_Complete_Threat(Quest, QuestGiver, Player)
  59. elseif Step == 2 then
  60. Step2_Complete_RecoBox(Quest, QuestGiver, Player)
  61. elseif Step == 3 then
  62. Step3_QuestComplete(Quest, QuestGiver, Player)
  63. end
  64. end