aFreeportmole.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. --[[
  2. Script Name : SpawnScripts/QeynosCitizenshipTrialChamber/aFreeportmole.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.08.31 03:08:06
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/CombatModule"
  9. local BQCitizen = 5718
  10. local CVQCitizen = 5719
  11. local GQCitizen = 5720
  12. local NQCitizen = 5721
  13. local SCQCitizen = 5722
  14. local WWQCitizen = 5723
  15. function spawn(NPC, Spawn)
  16. combatModule(NPC, Spawn)
  17. local Level = GetLevel(NPC)
  18. local level1 = 5
  19. local level2 = 6
  20. local difficulty1 = 6
  21. local hp1 = 130
  22. local power1 = 65
  23. local difficulty2 = 6
  24. local hp2 = 150
  25. local power2 = 80
  26. if Level == level1 then
  27. SpawnSet(NPC, "difficulty", difficulty1)
  28. SpawnSet(NPC, "hp", hp1)
  29. SpawnSet(NPC, "power", power1)
  30. elseif Level == level2
  31. then
  32. SpawnSet(NPC, "difficulty", difficulty2)
  33. SpawnSet(NPC, "hp", hp2)
  34. SpawnSet(NPC, "power", power2)
  35. end
  36. waypoints(NPC)
  37. end
  38. function hailed(NPC, Spawn)
  39. end
  40. function respawn(NPC)
  41. spawn(NPC)
  42. end
  43. function aggro(NPC,Spawn)
  44. if GetGender(NPC)== 2 then
  45. choice = MakeRandomInt(1,2)
  46. if choice ==1 then
  47. PlayFlavor(NPC, "voiceover/english/halfelf_eco_evil_1/ft/halfelf/halfelf_eco_evil_1_hail_gf_e88fad9f.mp3", "Whoa!!! I don't remember saying I wanted to talk to you!", "", 3869016622, 3073089976, Spawn)
  48. else
  49. PlayFlavor(NPC, "", "I'll take you down just like that last knight!", "", 0, 0, Spawn, 0)
  50. end
  51. else
  52. choice = MakeRandomInt(1,2)
  53. if choice ==1 then
  54. PlayFlavor(NPC, "voiceover/english/halfelf_eco_evil_1/ft/halfelf/halfelf_eco_evil_1_hail_gm_7344f21b.mp3", "I'm in the mood to kick someone in the teeth.", "kick", 620861878, 995351111, Spawn, 0)
  55. else
  56. PlayFlavor(NPC, "", "I'll take you down just like that last knight!", "", 0, 0, Spawn, 0)
  57. end
  58. end
  59. end
  60. function death(NPC,Spawn)
  61. local Mole = GetSpawn(NPC,8250011)
  62. local Refu = GetSpawn(NPC,8250012)
  63. local Part = GetSpawn(NPC,8250013)
  64. local Tavi = GetSpawn(NPC,8250014)
  65. if Mole == nil or not IsAlive(Mole) then
  66. if Refu == nil or not IsAlive(Refu) then
  67. if Part == nil or not IsAlive(Part) then
  68. if Tavi == nil or not IsAlive(Tavi) then
  69. if HasQuest(Spawn,BQCitizen) then
  70. SetStepComplete(Spawn,BQCitizen,4)
  71. elseif HasQuest(Spawn,CVQCitizen) then
  72. SetStepComplete(Spawn,CVQCitizen,4)
  73. elseif HasQuest(Spawn,GQCitizen) then
  74. SetStepComplete(Spawn,GQCitizen,4)
  75. elseif HasQuest(Spawn,NQCitizen) then
  76. SetStepComplete(Spawn,NQCitizen,4)
  77. elseif HasQuest(Spawn,SCQCitizen) then
  78. SetStepComplete(Spawn,SCQCitizen,4)
  79. elseif HasQuest(Spawn,WWQCitizen) then
  80. SetStepComplete(Spawn,WWQCitizen,4)
  81. end
  82. end
  83. end
  84. end
  85. end
  86. if GetGender(NPC)== 2 then
  87. PlayFlavor(NPC, "voiceover/english/optional3/halfelf_base_1/ft/halfelf/halfelf_base_1_1_death_gf_610c650e.mp3", "You must flee! I'll try to hold them.", "", 1612338229, 10301262, Spawn, 0)
  88. else
  89. PlayFlavor(NPC, "voiceover/english/halfelf_base_1/ft/halfelf/halfelf_base_1_1_death_gm_610c650e.mp3", "You must flee! I'll try to hold them.", "", 3580386891, 3023137994, Spawn, 0)
  90. end
  91. end
  92. function waypoints(NPC)
  93. MovementLoopAddLocation(NPC, -5.55, -0.39, -9.49, 2, 8)
  94. MovementLoopAddLocation(NPC, -5.62, -0.39, 0.64, 2, 6)
  95. MovementLoopAddLocation(NPC, -2.9, -0.39, 0.77, 2, 8)
  96. MovementLoopAddLocation(NPC, -5.26, -0.39, -7.92, 2, 8)
  97. MovementLoopAddLocation(NPC, -2.84, -0.39, 2.12, 2, 6)
  98. MovementLoopAddLocation(NPC, -4.8, -0.39, 4.41, 2, 5)
  99. end
  100. function FailureExit(NPC,Spawn)
  101. if GetRace(Spawn)== 7 or GetRace(Spawn)== 5 then
  102. BBShire = GetZone("Baubbleshire")
  103. Zone(BBShire,Spawn,819.46, -20.60, -525.61, 200.47)
  104. elseif GetRace(Spawn)== 0 or GetRace(Spawn)== 2 then
  105. Gray = GetZone("graystone")
  106. Zone(Gray,Spawn,865.03, -25.45, -97.91, 357.68)
  107. elseif GetRace(Spawn)== 4 or GetRace(Spawn)== 8 then
  108. CV = GetZone("castleview")
  109. Zone(CV,Spawn,729.01, -21.10, -124.36, 290.81)
  110. elseif GetRace(Spawn)== 9 or GetRace(Spawn)== 11 then
  111. Net = GetZone("nettleville")
  112. Zone(Net,Spawn,670.07, -20.39, 273.85, 114.78)
  113. elseif GetRace(Spawn)== 3 or GetRace(Spawn)== 8 then
  114. SC = GetZone("starcrest")
  115. Zone(SC,Spawn,704.07, -20.38, 264.40, 269.84)
  116. elseif GetRace(Spawn)== 15 or GetRace(Spawn)== 16 or GetRace(Spawn)== 6 then
  117. WW = GetZone("willowwood")
  118. Zone(WW,Spawn,809.96, -21.30, -566.02, 323.13)
  119. else
  120. Net = GetZone("nettleville")
  121. Zone(Net,Spawn,670.07, -20.39, 273.85, 114.78)
  122. end
  123. end
  124. function victory(NPC,Spawn)
  125. AddTimer(NPC,2500,"FailureExit",1,Spawn)
  126. end