hidden_treasures.lua 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. --[[
  2. Script Name : Quests/StarcrestCommune/hidden_treasures.lua
  3. Script Purpose : Handles the quest, "Hidden Treasures"
  4. Script Author : Scatman
  5. Script Date : 2008.09.21
  6. Zone : Starcrest Commune
  7. Quest Giver: Maareona Ludimintium
  8. Preceded by: Information Merchants (information_merchants.lua)
  9. Followed by: Confrontation (confrontation.lua)
  10. --]]
  11. -- Item ID's
  12. local SMALL_METAL_BOX_AND_PAPER = 12950
  13. function Init(Quest)
  14. AddQuestStep(Quest, 1, "I need to swim in the ferryway in the eastern portion of Starcrest Commune and see if anything is stuck behind the grate.", 1, 100, "I need to see if the undelivered package is stuck in the ferryway in Starcrest Commune.")
  15. AddQuestStepCompleteAction(Quest, 1, "step1_complete_inspectedBox")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. if QuestGiver ~= nil then
  19. if GetDistance(Player, QuestGiver) < 30 then
  20. FaceTarget(QuestGiver, Player)
  21. conversation = CreateConversation()
  22. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/maareona_ludimintium/qey_village02/quests/maareona/maareona020a.mp3", "", "", 2218692163, 3483095154, Player)
  23. AddConversationOption(conversation, "Thank you.")
  24. StartConversation(conversation, QuestGiver, Player, "Good luck.")
  25. end
  26. end
  27. end
  28. function Declined(Quest, QuestGiver, Player)
  29. end
  30. function Deleted(Quest, QuestGiver, Player)
  31. end
  32. function step1_complete_inspectedBox(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I have found the package Maareona spoke of.")
  34. UpdateQuestTaskGroupDescription(Quest, 1, "I have found the package Maareona spoke of.")
  35. AddQuestStepChat(Quest, 2, "I must return this package to Maaereona in the eastern portion of Starcrest Commune.", 1, "I need to see if the undelivered package is stuck in the ferryway in Starcrest Commune.", 0, 2340006)
  36. AddQuestStepCompleteAction(Quest, 2, "quest_complete")
  37. end
  38. function quest_complete(Quest, QuestGiver, Player)
  39. UpdateQuestDescription(Quest, "")
  40. GiveQuestReward(Quest, Player)
  41. while HasItem(Player, SMALL_METAL_BOX_AND_PAPER, 1) do
  42. RemoveItem(Player, SMALL_METAL_BOX_AND_PAPER)
  43. end
  44. end
  45. function Reload(Quest, QuestGiver, Player, Step)
  46. if Step == 1 then
  47. step1_complete_inspectedBox(Quest, QuestGiver, Player)
  48. end
  49. end