9
3

CrispinLuviniusBC.lua 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/CrispinLuviniusBC.lua
  3. Script Purpose : Crispin Luvinius
  4. Script Author : Scatman\\torsten\\Dorbin
  5. Script Date : 2009.07.26 (17.7.2022 by torsten, moved both quests from The Sprawl to Beggar's Court as in classic EverQuest)
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local ProblemSolving = 5661
  10. local AdvancedProblemSolving = 5662
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, ProblemSolving)
  13. ProvidesQuest(NPC, AdvancedProblemSolving)
  14. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  15. SetTempVariable(NPC,"CalloutTimer","false")
  16. SetTempVariable(NPC, "CalloutTimer1", "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. else
  26. if CanReceiveQuest(Spawn, ProblemSolving) or CanReceiveQuest(Spawn, AdvancedProblemSolving) then
  27. if GetTempVariable(NPC, "CalloutTimer")== "false"then
  28. SetTempVariable(NPC, "CalloutTimer", "true")
  29. AddTimer(NPC,30000,"ResetTimer",1,Spawn)
  30. FaceTarget(NPC, Spawn)
  31. if GetTempVariable(NPC, "CalloutTimer1")== "false"then
  32. PlayFlavor(NPC, "voiceover/english/crispin_luvinius/fprt_hood04/100_std_crispin_luvinius_hum_m_callout1_eb27037a.mp3", "Are you looking for trouble? It'll find you if you don't keep walking.", "", 3293258894, 514248132, Spawn, 0)
  33. SetTempVariable(NPC, "CalloutTimer1", "true")
  34. elseif GetTempVariable(NPC, "CalloutTimer1")== "true"then
  35. PlayFlavor(NPC, "voiceover/english/crispin_luvinius/fprt_hood04/100_std_crispin_luvinius_hum_m_multhail1_e039d831.mp3", "Are you looking for trouble? It'll find you if you don't keep walking.", "glare", 2395364912, 2338408737, Spawn, 0)
  36. SetTempVariable(NPC, "CalloutTimer1", "false")
  37. end
  38. end
  39. elseif HasQuest(Spawn, ProblemSolving) or HasQuest(Spawn, AdvancedProblemSolving) then
  40. SetTempVariable(NPC, "CalloutTimer", "true")
  41. AddTimer(NPC,30000,"ResetTimer",1,Spawn)
  42. FaceTarget(NPC, Spawn)
  43. if GetTempVariable(NPC, "CalloutTimer1")== "false"then
  44. PlayFlavor(NPC, "voiceover/english/crispin_luvinius/fprt_hood04/100_std_crispin_luvinius_hum_m_multhail3_69ad5b7d.mp3","I thought you weren't looking for trouble, problem solver? I suggest you solve my problem or trouble will find you, understand?","glare",3672937879,782097653, Spawn)
  45. SetTempVariable(NPC, "CalloutTimer1", "true")
  46. elseif GetTempVariable(NPC, "CalloutTimer1")== "true"then
  47. PlayFlavor(NPC, "voiceover/english/crispin_luvinius/fprt_hood04/100_std_crispin_luvinius_hum_m_multhail3_69ad5b7d.mp3","I thought you weren't looking for trouble, problem solver? I suggest you solve my problem or trouble will find you, understand?","tapfoot",3672937879,782097653, Spawn)
  48. SetTempVariable(NPC, "CalloutTimer1", "false")
  49. end
  50. end
  51. end
  52. end
  53. function hailed(NPC, Spawn)
  54. if GetFactionAmount(Spawn,12) <0 then
  55. FaceTarget(NPC, Spawn)
  56. PlayFlavor(NPC, "","","cutthroat",0,0, Spawn)
  57. elseif GetQuestStep(Spawn,ProblemSolving)==1 then
  58. FaceTarget(NPC, Spawn)
  59. PlayFlavor(NPC, "voiceover/english/crispin_luvinius/fprt_hood04/100_std_crispin_luvinius_hum_m_multhail3_69ad5b7d.mp3","I thought you weren't looking for trouble, problem solver? I suggest you solve my problem or trouble will find you, understand?","glare",3672937879,782097653, Spawn)
  60. elseif GetQuestStep(Spawn,AdvancedProblemSolving)==1 then
  61. FaceTarget(NPC, Spawn)
  62. PlayFlavor(NPC, "voiceover/english/crispin_luvinius/fprt_hood04/100_std_crispin_luvinius_hum_m_multhail3_69ad5b7d.mp3","I thought you weren't looking for trouble, problem solver? I suggest you solve my problem or trouble will find you, understand?","glare",3672937879,782097653, Spawn)
  63. else
  64. Dialog1(NPC,Spawn)
  65. end
  66. end
  67. function Dialog1(NPC, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. Dialog.New(NPC, Spawn)
  70. Dialog.AddDialog("Do you have a problem? You're gonna have one soon if you don't keep walking.")
  71. Dialog.AddVoiceover("voiceover/english/crispin_luvinius/fprt_hood04/std_crispin_luvinius.mp3", 1982819374, 703450678)
  72. if CanReceiveQuest(Spawn,ProblemSolving) then
  73. Dialog.AddOption("I don't have a problem... I solve problems. Anything you need fixed?", "Dialog2")
  74. elseif GetQuestStep(Spawn, ProblemSolving) == 2 then
  75. Dialog.AddOption("They won't be delivering ANY kind of message.", "Dialog4")
  76. end
  77. if CanReceiveQuest(Spawn,AdvancedProblemSolving) then
  78. Dialog.AddOption("So... have any more problems you can't handle yourself?", "Dialog5")
  79. elseif GetQuestStep(Spawn, AdvancedProblemSolving) == 2 then
  80. Dialog.AddOption("Those Giantslayers got the 'message'.", "Dialog7")
  81. end
  82. Dialog.AddOption("I don't want any trouble.")
  83. Dialog.Start()
  84. end
  85. --========================= Quest 1
  86. function Dialog2(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. Dialog.New(NPC, Spawn)
  89. Dialog.AddDialog("A problem solver, huh? You can talk the talk, but can you walk the walk? Yeah ... I got a problem. One of our customers isn't paying us for our \"services,\" if you know what I'm saying. Maybe you can fix this problem for us, huh?")
  90. Dialog.AddVoiceover("voiceover/english/crispin_luvinius/fprt_hood04/quests/crispinluvinius/crispin_x1_initial.mp3", 1249000377, 1908833201)
  91. PlayFlavor(NPC, "", "", "confused", 0, 0, Spawn, 0)
  92. Dialog.AddOption("Of course I can. I said I was a problem solver, didn't I?", "Offer1")
  93. Dialog.AddOption("Not really... I've got too many other things to do. Maybe some other time.")
  94. Dialog.Start()
  95. end
  96. function Offer1(NPC, Spawn)
  97. OfferQuest(NPC, Spawn, ProblemSolving)
  98. end
  99. function Dialog3(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. Dialog.New(NPC, Spawn)
  102. Dialog.AddDialog("Come back when you're done.")
  103. Dialog.AddOption("All right.")
  104. Dialog.Start()
  105. end
  106. function Dialog4(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. Dialog.New(NPC, Spawn)
  109. Dialog.AddDialog("You mean ... you actually killed him?! Whoa ... you are tough! I never... Well, I didn't think you would actually... kill him. Okay, friend, here's your money. I don't want you thinking I'm not a man of my word ... Wow. You actually killed him! I must tell Manius about this!")
  110. Dialog.AddVoiceover("voiceover/english/crispin_luvinius/fprt_hood04/quests/crispinluvinius/crispin_x1_finish.mp3", 439266675, 1963599984)
  111. PlayFlavor(NPC, "", "", "confused", 0, 0, Spawn, 0)
  112. Dialog.AddOption("That would be good. Do that for me.")
  113. Dialog.Start()
  114. SetStepComplete(Spawn, ProblemSolving, 2)
  115. end
  116. --==================== Quest 2
  117. function Dialog5(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. Dialog.New(NPC, Spawn)
  120. Dialog.AddDialog("Oh! I recognize you. Glad you came along ... yeah ... very glad. I hope your uh ... services ... are available again because ... uh ... there's this little matter... and I'm too busy to take care of it. Yes, too busy.")
  121. Dialog.AddVoiceover("voiceover/english/crispin_luvinius/fprt_hood04/quests/crispinluvinius/crispin_x2_initial.mp3", 1982819374, 703450678)
  122. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn, 0)
  123. Dialog.AddOption("As long as you have the money, I'm willing to do it.", "Offer2")
  124. Dialog.AddOption("Sorry... I don't work for lazy people... or cowards.")
  125. Dialog.Start()
  126. end
  127. function Offer2(NPC, Spawn)
  128. OfferQuest(NPC, Spawn, AdvancedProblemSolving)
  129. end
  130. function Dialog6(NPC, Spawn)
  131. FaceTarget(NPC, Spawn)
  132. Dialog.New(NPC, Spawn)
  133. Dialog.AddDialog("Good, maybe you'll earn some respect with us.")
  134. Dialog.AddOption("Yah, yah.")
  135. Dialog.Start()
  136. end
  137. function Dialog7(NPC, Spawn)
  138. FaceTarget(NPC, Spawn)
  139. Dialog.New(NPC, Spawn)
  140. Dialog.AddDialog("I knew you'd take care of 'em! Good show! Oh, and here's a bit-o-coin for all your hard work. Heh, heh.")
  141. Dialog.AddVoiceover("voiceover/english/crispin_luvinius/fprt_hood04/quests/crispinluvinius/crispin_x2_finish.mp3", 156925709, 1579873115)
  142. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn, 0)
  143. Dialog.AddOption("Maybe I might, maybe not. We'll see what my schedule is like.")
  144. Dialog.Start()
  145. SetStepComplete(Spawn, AdvancedProblemSolving, 2)
  146. end