scraptastic.lua 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Script Name : Quests/Baubbleshire/scraptastic.lua
  3. Script Purpose : Handles the quest, "Scraptastic!"
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Zone : The Baubbleshire
  7. Quest Giver: Neezer Grund
  8. Preceded by: None
  9. Followed by: Nogginspark Reactors (nogginspark_reactors.lua)
  10. --]]
  11. -- Item ID's
  12. local SCRAP_METAL = 11996
  13. function Init(Quest)
  14. -- Scrap Metal
  15. AddQuestStepHarvest(Quest, 1, "I need to collect some scrap metal for Neezer Grund.", 7, 100, "I need to scour the Baubbleshire for some scrap metal.", 64, SCRAP_METAL)
  16. AddQuestStepCompleteAction(Quest, 1, "step1_complete_gotMetal")
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. FaceTarget(QuestGiver, Player)
  20. conversation = CreateConversation()
  21. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/neezer_grund/qey_village06/quests/neezer_grund/neezer_grund022a.mp3", "", "", 2015655109, 4127478341, Player)
  22. AddConversationOption(conversation, "All right.")
  23. StartConversation(conversation, QuestGiver, Player, "Don't forget to check in the water!")
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. end
  27. function Deleted(Quest, QuestGiver, Player)
  28. -- Remove Scrap Metal
  29. while HasItem(Player, SCRAP_METAL) do
  30. RemoveItem(Player, SCRAP_METAL)
  31. end
  32. end
  33. function step1_complete_gotMetal(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I have collected some scrap metal.")
  35. AddQuestStepChat(Quest, 2, "I need to return this scrap metal to Neezer Grund.", 1, "I need to scour the Baubbleshire for some scrap metal.", 0, 2380038)
  36. AddQuestStepCompleteAction(Quest, 2, "quest_complete")
  37. end
  38. function quest_complete(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 2, "I have given Neezer the scrap metal he asked for.")
  40. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected some scrap metal for Neezer Grund.")
  41. -- Remove Scrap Metal
  42. while HasItem(Player, SCRAP_METAL) do
  43. RemoveItem(Player, SCRAP_METAL)
  44. end
  45. UpdateQuestDescription(Quest, "I have collected the scrap metal for Neezer.")
  46. GiveQuestReward(Quest, Player)
  47. end
  48. function Reload(Quest, QuestGiver, Player, Step)
  49. if Step == 1 then
  50. step1_complete_gotMetal(Quest, QuestGiver, Player)
  51. end
  52. end