a_lack_of_information.lua 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. --[[
  2. Quest Template
  3. Script Name : Quests/Caves/a_lack_of_information.lua
  4. Script Purpose : Handles the quest, "A Lack of Information"
  5. Script Author : Scatman
  6. Script Date : 2009.10.08
  7. Zone : The Caves
  8. Quest Giver : Consul Bree
  9. Preceded by : None
  10. Followed by : Hit Them Where it Hurts (hit_them_where_it_hurts.lua)
  11. --]]
  12. function Init(Quest)
  13. AddQuestStep(Quest, 1, "I need to search the Dustpaw gnoll camp for their orders. I should be able to find the camp somewhere through the tunnel to the west of Consul Bree.", 1, 100, "Consul Bree has asked that I help her in obtaining a recent version of the Rockpaw gnoll battle orders.", 2693)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_FoundOrders")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. conversation = CreateConversation()
  19. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_004a.mp3", "", "", 1048313312, 911223295, Player)
  20. AddConversationOption(conversation, "All right.")
  21. StartConversation(conversation, QuestGiver, Player, "And be wary of the Dustpaw. They didn't have the strength to beat the Rockpaw, but that doesn't mean they're docile.")
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. end
  25. function Step1_Complete_FoundOrders(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I have found the written orders of the Dustpaw gnolls in their camp.")
  27. -- A Book of Gnollish Orders (regular item)
  28. if not HasItem(Player, 1245) then
  29. SummonItem(Player, 1245, 1)
  30. end
  31. AddQuestStepChat(Quest, 2, "I need to read the book I found in the Dustpaw camp (Dev note: Talk to Consul Bree for now).", 1, "Consul Bree has asked that I help her in obtaining a recent version of the Rockpaw gnoll battle orders.", 0, 1970010)
  32. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_ReadBook")
  33. end
  34. function Step2_Complete_ReadBook(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I have attempted to read the book in the Dustpaw camp.")
  36. AddQuestStepKill(Quest, 3, "I need to retrieve the key to the Rockpaw cipher. Any gnoll in the Caves may have one.", 1, 100, "Consul Bree has asked that I help her in obtaining a recent version of the Rockpaw gnoll battle orders.", 185, 1970070, 1970035, 1970036, 1970067, 1970027, 1970044, 1970038, 1970069, 1970028, 1970042, 1970061, 1970068, 1970063, 1970041, 1970043, 1970060, 1970024)
  37. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_GotKey")
  38. end
  39. function Step3_Complete_GotKey(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 3, "I have found the key to the cipher.")
  41. -- A Book of Gnollish Orders (regular item)
  42. while HasItem(Player, 1245) do
  43. RemoveItem(Player, 1245)
  44. end
  45. -- A Book of Gnollish Orders (house item)
  46. if not HasItem(Player, 210020) then
  47. SummonItem(Player, 210020, 1)
  48. end
  49. AddQuestStepChat(Quest, 4, "I need to bring this information to Consul Bree.", 1, "Consul Bree has asked that I help her in obtaining a recent version of the Rockpaw gnoll battle orders.", 0, 1970010)
  50. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  51. end
  52. function QuestComplete(Quest, QuestGiver, Player)
  53. UpdateQuestStepDescription(Quest, 4, "I have spoken with Consul Bree.")
  54. UpdateQuestTaskGroupDescription(Quest, 1, "I have obtained the battle orders for Consul Bree.")
  55. UpdateQuestDescription(Quest, "I have found the book for Consul Bree.")
  56. GiveQuestReward(Quest, Player)
  57. end
  58. function Reload(Quest, QuestGiver, Player, Step)
  59. if Step == 1 then
  60. Step1_Complete_FoundOrders(Quest, QuestGiver, Player)
  61. elseif Step == 2 then
  62. Step2_Complete_ReadBook(Quest, QuestGiver, Player)
  63. elseif Step == 3 then
  64. Step3_Complete_GotKey(Quest, QuestGiver, Player)
  65. end
  66. end