MarianaDarkleaf.lua 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/MarianaDarkleaf.lua
  3. Script Purpose : Mariana Darkleaf
  4. Script Author : torsten\\Dorbin - Dialog is fabricated.
  5. Script Date : 2022.07.17
  6. Script Notes :
  7. --]]
  8. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  9. require "SpawnScripts/Generic/DialogModule"
  10. local ToSpiteaDarkleaf = 5665
  11. local RunningForACandidate = 5666
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, ToSpiteaDarkleaf)
  14. ProvidesQuest(NPC, RunningForACandidate)
  15. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  16. SetTempVariable(NPC,"CalloutTimer","false")
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function InRange(NPC, Spawn)
  22. if GetFactionAmount(Spawn,12) <0 then
  23. FaceTarget(NPC, Spawn)
  24. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  25. elseif GetTempVariable(NPC,"CalloutTimer")=="false"then
  26. SetTempVariable(NPC,"CalloutTimer","true")
  27. AddTimer(NPC,24000,"ResetCallout",1,Spawn)
  28. if not HasLanguage(Spawn,7) then
  29. Garbled(NPC,Spawn)
  30. elseif CanReceiveQuest(Spawn, ToSpiteaDarkleaf) then
  31. PlayFlavor(NPC, "voiceover/english/mariana_darkleaf/fprt_hood04/100_std_mariana_darkleaf_elf_f_callout1_3a667a53.mp3", "Elowyn is a treat for the eyes ... and even better, he's as handsome as he is stupid ...", "", 578977669, 3350940430, Spawn, 7)
  32. elseif CanReceiveQuest(Spawn, RunningForACandidate) then
  33. PlayFlavor(NPC, "", "You again? Haven't you bothered me enough?!", "", 578977669, 3350940430, Spawn, 7)
  34. end
  35. end
  36. end
  37. function ResetCallout(NPC,Spawn)
  38. SetTempVariable(NPC,"CalloutTimer","false")
  39. end
  40. function hailed(NPC, Spawn)
  41. SetTarget(NPC,Spawn)
  42. if GetFactionAmount(Spawn,12) <0 then
  43. FaceTarget(NPC, Spawn)
  44. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  45. elseif not HasLanguage(Spawn,7) then
  46. FaceTarget(NPC, Spawn)
  47. Garbled(NPC,Spawn)
  48. elseif CanReceiveQuest(Spawn, ToSpiteaDarkleaf) then
  49. Dialog1(NPC,Spawn)
  50. elseif HasQuest(Spawn, ToSpiteaDarkleaf) and GetQuestStep(Spawn,ToSpiteaDarkleaf) >=1 then
  51. DialogWait_Quest1(NPC,Spawn)
  52. elseif CanReceiveQuest(Spawn, RunningForACandidate) then
  53. Dialog3_Quest2 (NPC,Spawn)
  54. elseif HasQuest(Spawn, RunningForACandidate) and GetQuestStep(Spawn,RunningForACandidate) ==1 then
  55. DialogWait_Quest2(NPC,Spawn)
  56. else
  57. Dialog1(NPC,Spawn)
  58. end
  59. end
  60. function Dialog1(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. Dialog.New(NPC, Spawn)
  63. Dialog.AddDialog("Elowyn is a treat for the eyes ... and even better, he's as handsome as he is stupid ...")
  64. Dialog.AddVoiceover("voiceover/english/mariana_darkleaf/fprt_hood04/100_std_mariana_darkleaf_elf_f_callout1_3a667a53.mp3", 578977669, 3350940430)
  65. PlayFlavor(NPC,"","","sit_exit",0,0,Spawn)
  66. if CanReceiveQuest(Spawn, ToSpiteaDarkleaf) then
  67. Dialog.AddOption("Excuse me... what about Elowyn?","Dialog1_Quest1")
  68. end
  69. Dialog.AddOption("Whatever you say...")
  70. Dialog.Start()
  71. end
  72. function Dialog1_Quest1(NPC,Spawn)
  73. FaceTarget(NPC, Spawn)
  74. Dialog.New(NPC, Spawn)
  75. Dialog.AddDialog("You seem lost ... Do you often wander into people's homes and start asking questions? Perhaps if the Militia were made aware of the worthless filth entering our streets, we might have less skulking about attempting to listen in on other's thoughts ... Oh, if only someone would deal with this rubbish...")
  76. PlayFlavor(NPC, "", "", "shame", 0, 0, Spawn)
  77. Dialog.AddOption("Hey! I'm not rubbish!","Offer1")
  78. Dialog.AddOption("Fine. Sit here in your hovel, fool.")
  79. Dialog.Start()
  80. end
  81. function Offer1(NPC,Spawn)
  82. OfferQuest(NPC, Spawn, ToSpiteaDarkleaf)
  83. end
  84. function DialogWait_Quest1(NPC,Spawn)
  85. FaceTarget(NPC, Spawn)
  86. Dialog.New(NPC, Spawn)
  87. Dialog.AddDialog("I'm pretty sure I told you to get out of my face! Begone!")
  88. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_"..MakeRandomInt(1,3).."_1023.mp3", 0, 0)
  89. PlayFlavor(NPC, "", "", "sit_exit", 0, 0, Spawn)
  90. if GetQuestStep(Spawn, ToSpiteaDarkleaf)==2 then
  91. Dialog.AddOption("Even snakes can't get rid of me. ","Dialog2_Quest1")
  92. else
  93. Dialog.AddOption("...")
  94. end
  95. Dialog.Start()
  96. end
  97. function Dialog2_Quest1(NPC,Spawn)
  98. FaceTarget(NPC, Spawn)
  99. Dialog.New(NPC, Spawn)
  100. SetStepComplete(Spawn, ToSpiteaDarkleaf, 2)
  101. Dialog.AddDialog("UHG! You survived?! Why can't a single thing go right?! Why why WHY?!... Fine. No matter. You refuse to die? Perhaps you have other uses. Still, why must you be so infuriating?!")
  102. PlayFlavor(NPC, "", "", "swear", 0, 0, Spawn)
  103. Dialog.AddOption("I'm glad I could dissapoint you.")
  104. Dialog.Start()
  105. end
  106. function Dialog3_Quest2(NPC,Spawn)
  107. FaceTarget(NPC, Spawn)
  108. Dialog.New(NPC, Spawn)
  109. Dialog.AddDialog("If you keep pestering me, I will have to report you to the Freeport Militia.")
  110. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_"..MakeRandomInt(1,3).."_1023.mp3", 0, 0)
  111. PlayFlavor(NPC, "", "", "sit_exit", 0, 0, Spawn)
  112. if CanReceiveQuest(Spawn,RunningForACandidate) then
  113. Dialog.AddOption("Perhaps you should. I'm not going anywhere.","Dialog4_Quest2")
  114. end
  115. Dialog.AddOption("Fine.")
  116. Dialog.Start()
  117. end
  118. function Dialog4_Quest2(NPC,Spawn)
  119. FaceTarget(NPC, Spawn)
  120. Dialog.New(NPC, Spawn)
  121. Dialog.AddDialog("Your insolence has no limit... I have a task you can do if it will get you out of my hair. I've been keeping my eye open for someone to... protect... a friend of mine. We need to look out for eachother here in Beggar's Court, and sometimes we need a little help keeping our households in one piece... Do something with yourself and deliver this message for me?")
  122. Dialog.AddOption("Perhaps, but I expect payment.","Offer2")
  123. Dialog.AddOption("Nope. I just enjoy pestering you.")
  124. Dialog.Start()
  125. end
  126. function Offer2(NPC,Spawn)
  127. OfferQuest(NPC, Spawn, RunningForACandidate)
  128. end