shells_of_protection.lua 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --[[
  2. Script Name : Quests/GreaterFaydark/shells_of_protection.lua
  3. Script Purpose : Handles the quest, "Shells of Protection"
  4. Script Author : Scatman
  5. Script Date : 2009.03.28
  6. Zone : Greater Faydark
  7. Quest Giver: Brink Trudger
  8. Preceded by: Spider Silk for Brink (spider_silk_for_brink.lua)
  9. Followed by: None
  10. --]]
  11. function Init(Quest)
  12. -- Brink's Spaulders (NEED PARSE)
  13. -- Brink's Stitched Footwraps
  14. -- Brink's Linked Sleeves
  15. -- Brink's Leather Boots
  16. AddQuestStepKill(Quest, 1, "I need to get shells from clawsnap crabs.", 4, 100, "I should head to the beach just east of the spirit bloom nursery and collect the shells of clawsnap crabs and sand sifter turtles.", 752, 1140055, 1140074)
  17. AddQuestStepKill(Quest, 2, "I need to get shells from sand sifter turtles.", 4, 100, "I should head to the beach just east of the spirit bloom nursery and collect the shells of clawsnap crabs and sand sifter turtles.", 201, 1140027, 1140031)
  18. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledCrabs")
  19. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_KilledTurtles")
  20. end
  21. function Accepted(Quest, QuestGiver, Player)
  22. FaceTarget(QuestGiver, Player)
  23. conversation = CreateConversation()
  24. PlayFlavor(QuestGiver, "voiceover/english/exp03_questvo2/brink_trudger/_exp03/exp03_rgn_greater_faydark/brink_trudger/brink_trudger012.mp3", "", "", 3911384586, 1778696172, Player)
  25. AddConversationOption(conversation, "Okay, I'll be right back.")
  26. StartConversation(conversation, QuestGiver, Player, "Thank you, " .. GetName(Player) .. ". I'll be right here putting this gear together.")
  27. end
  28. function Declined(Quest, QuestGiver, Player)
  29. end
  30. function Step1_Complete_KilledCrabs(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 1, "I have all of the clawsnap shells I need.")
  32. if QuestIsComplete(Player, 155) then
  33. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  34. end
  35. end
  36. function Step2_Complete_KilledTurtles(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I have all of the sand sifter shells I need.")
  38. if QuestIsComplete(Player, 155) then
  39. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  40. end
  41. end
  42. function Multiple_Steps_Complete(Quest, QuestGiver, Player)
  43. UpdateQuestTaskGroupDescription(Quest, 1, "I should have all the shells I need for Brink's armor pieces.")
  44. AddQuestStepChat(Quest, 3, "I should give the shells to Brink Trudger at the spirit bloom nursery.", 1, "I should take these clawsnap and sand sifter shells back to Brink Trudger at the spirit bloom nursery.", 201, 1140005)
  45. AddQuestStepCompleteAction(Quest, 3, "Quest_Complete")
  46. end
  47. function Quest_Complete(Quest, QuestGiver, Player)
  48. UpdateQuestDescription(Quest, "I collected clawsnap and sand sifter shells for Brink Trudger. He'll use them to make hard plates and build armor pieces.")
  49. GiveQuestReward(Quest, Player)
  50. end
  51. function Reload(Quest, QuestGiver, Player, Step)
  52. if Step == 1 then
  53. Step1_Complete_KilledCrabs(Quest, QuestGiver, Player)
  54. elseif Step == 2 then
  55. Step2_Complete_KilledTurtles(Quest, QuestGiver, Player)
  56. end
  57. end