an_explosive_idea.lua 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : Quests/Caves/an_explosive_idea.lua
  3. Script Purpose : Handles the quest, "An Explosive Idea"
  4. Script Author : Scatman
  5. Script Date : 2009.10.18
  6. Zone : The Caves
  7. Quest Giver: Emma Torque
  8. Preceded by: None
  9. Followed by: Destroying the Foundation (destroying_the_foundation.lua)
  10. --]]
  11. function Init(Quest)
  12. -- blasting powder
  13. AddQuestStepObtainItem(Quest, 1, "I need to collect the explosive powder from 15 piles of powdered minerals.", 15, 100, "Emma Torque has asked me to collect some explosive powder for her.", 3478, 3801)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_GotMinerals")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. conversation = CreateConversation()
  19. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/emma_torque/qey_adv03_caves/quests/emma/emma_005a.mp3", "", "", 3292345907, 870183962, Player)
  20. AddConversationOption(conversation, "I'll be back.")
  21. StartConversation(conversation, QuestGiver, Player, "The explosive potential is... amazing! I can't wait!")
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. end
  25. function Step1_Complete_GotMinerals(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I have collected the explosive powder from 15 piles of powdered minerals.")
  27. AddQuestStepChat(Quest, 2, "I need to bring this explosive powder to Emma Torque.", 1, "Emma Torque has asked me to collect some explosive powder for her.", 3478, 1970012)
  28. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  29. end
  30. function QuestComplete(Quest, QuestGiver, Player)
  31. -- blasting powder
  32. while HasItem(Player, 3801) do
  33. RemoveItem(Player, 3801)
  34. end
  35. UpdateQuestStepDescription(Quest, 2, "I have brought Emma Torque the explosive powder.")
  36. UpdateQuestTaskGroupDescription(Quest, 1, "I have done Emma's task for her.")
  37. UpdateQuestDescription(Quest, "I have collected the explosive powder that Emma required.")
  38. GiveQuestReward(Quest, Player)
  39. end
  40. function Reload(Quest, QuestGiver, Player, Step)
  41. if Step == 1 then
  42. Step1_Complete_GotMinerals(Quest, QuestGiver, Player)
  43. end
  44. end