9
3

ElvicGarrett.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. --[[
  2. Script Name : SpawnScripts/ForestRuins/ElvicGarrett.lua
  3. Script Purpose : Elvic Garrett
  4. Script Author : Scatman
  5. Script Date : 2009.09.26
  6. Script Notes :
  7. --]]
  8. local HALF_ELF = 6
  9. local HALFELF_MENTOR_QUEST_4 = 221
  10. local QUEST_1 = 5491
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, 5491)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. conversation = CreateConversation()
  20. if HasQuest(Spawn, HALFELF_MENTOR_QUEST_4) then
  21. HalfElfMentorQuest(NPC, Spawn, conversation)
  22. else
  23. if HasCompletedQuest(Spawn, QUEST_1) then
  24. elseif HasQuest(Spawn, QUEST_1) then
  25. else
  26. -- posibily a level req of 3 here too.
  27. if GetRace(Spawn) == HALF_ELF then
  28. MyMindOccupied(NPC, Spawn, conversation)
  29. else
  30. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/elvic_garrett/qey_adv02_ruins_revamp/qst_halfelf_elvic_garrett_notonquest_2d73840b.mp3", "The changes to this land scare me.", "", 2326633148, 4032539718, Spawn)
  31. end
  32. end
  33. end
  34. end
  35. --------------------------------------------------------------------------------------------------------------
  36. -- HALFELF_MENTOR_QUEST_4
  37. --------------------------------------------------------------------------------------------------------------
  38. function HalfElfMentorQuest(NPC, Spawn, conversation)
  39. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/elvic_garrett/qey_adv02_ruins/quests/elvic/elvic_daelyn000.mp3", "", "", 422032417, 1174930976, Spawn)
  40. AddConversationOption(conversation, "Daelyn has written something. He would like you to have a copy.", "dlg_0_1")
  41. StartConversation(conversation, NPC, Spawn, "These lands are not as safe as they once were.")
  42. end
  43. function dlg_0_1(NPC, Spawn)
  44. SetStepComplete(Spawn, HALFELF_MENTOR_QUEST_4, 1)
  45. FaceTarget(NPC, Spawn)
  46. conversation = CreateConversation()
  47. if not HasCompletedQuest(Spawn, QUEST_1) then
  48. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/elvic_garrett/qey_adv02_ruins/quests/elvic/elvic_daelyn001.mp3", "", "", 361439431, 2027311841, Spawn)
  49. AddConversationOption(conversation, "What has your mind occupied?", "MyMindOccupied")
  50. StartConversation(conversation, NPC, Spawn, "Ah, this is fortuitious. It has been some time since Daelyn has written something. My mind has been occupied as of late, I may have to save reading this for a time when I can focus more on my people.")
  51. -- check too see what quest the player is on here. also do the check in OfferQuest
  52. end
  53. end
  54. --------------------------------------------------------------------------------------------------------------
  55. -- QUEST 1
  56. --------------------------------------------------------------------------------------------------------------
  57. function MyMindOccupied(NPC, Spawn)
  58. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/elvic_garrett/qey_adv02_ruins/quests/elvic/elvic_daelyn002.mp3", "", "", 873310203, 1695943624, Spawn)
  59. AddConversationOption(conversation, "I can help.", "dlg_0_3")
  60. AddConversationOption(conversation, "Well, that's unfortunate. Goodbye.")
  61. StartConversation(conversation, NPC, Spawn, "My mind is occupied with these lands. Something is off, though I know not what. I offered my assistance to the Qeynos guard, but haven't turned up anything yet.")
  62. end
  63. function dlg_0_3(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/elvic_garrett/qey_adv02_ruins/quests/elvic/elvic_daelyn003.mp3", "", "", 3059918187, 1161029478, Spawn)
  67. AddConversationOption(conversation, "I will see what I can find.", "OfferQuest1")
  68. StartConversation(conversation, NPC, Spawn, "Perhaps you can. I've been patrolling the land around the ruins lately, occasionally I come across abandoned camps. Usually a fire pit or a collection of firewood that hasn't yet been burnt. Sometimes these abandoned camps have what may end up being clues, other times they contain worthless junk. If you could do me the favor of seeking out these camps it may help unwravel the mystery that is going on here.")
  69. end
  70. function OfferQuest1(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. if not HasQuest(Spawn, QUEST_1) then
  73. OfferQuest(NPC, Spawn, QUEST_1)
  74. end
  75. end
  76. function dlg_1_1(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. conversation = CreateConversation()
  79. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/elvic_garrett/qey_adv02_ruins/quests/elvic/elvic_daelyn003.mp3", "", "", 3059918187, 1161029478, Spawn)
  80. AddConversationOption(conversation, "I will see what I can find.", "dlg_1_2")
  81. StartConversation(conversation, NPC, Spawn, "Perhaps you can. I've been patrolling the land around the ruins lately, occasionally I come across abandoned camps. Usually a fire pit or a collection of firewood that hasn't yet been burnt. Sometimes these abandoned camps have what may end up being clues, other times they contain worthless junk. If you could do me the favor of seeking out these camps it may help unwravel the mystery that is going on here.")
  82. end