瀏覽代碼

Update to server/ lua scripts

devn00b 6 月之前
父節點
當前提交
95b5a78852
共有 100 個文件被更改,包括 379 次插入425 次删除
  1. 2 2
      server/Quests/GraystoneYard/rat_man_bloodsaber_crusade.lua
  2. 4 1
      server/SpawnScripts/A Meeting of the Minds/Borxx.lua
  3. 1 0
      server/SpawnScripts/Antonica/AdvisorPandrus.lua
  4. 4 3
      server/SpawnScripts/Antonica/AglaemantistheColdwindTerror.lua
  5. 3 1
      server/SpawnScripts/Antonica/AnimatorRotpaw.lua
  6. 1 0
      server/SpawnScripts/Antonica/Blackbark.lua
  7. 3 1
      server/SpawnScripts/Antonica/CaptainGaebrail.lua
  8. 3 1
      server/SpawnScripts/Antonica/ChiefKeizall.lua
  9. 3 1
      server/SpawnScripts/Antonica/GhostofVhalen.lua
  10. 3 1
      server/SpawnScripts/Antonica/GrolvenChiptooth.lua
  11. 3 1
      server/SpawnScripts/Antonica/HollyWindstalker.lua
  12. 3 1
      server/SpawnScripts/Antonica/KingKlicnik.lua
  13. 3 1
      server/SpawnScripts/Antonica/LadyFaideth.lua
  14. 3 1
      server/SpawnScripts/Antonica/LordRison.lua
  15. 3 1
      server/SpawnScripts/Antonica/MayorWoodbridge.lua
  16. 3 1
      server/SpawnScripts/Antonica/PriestofthePlaguebringer.lua
  17. 4 64
      server/SpawnScripts/Antonica/RenuxtheUndying.lua
  18. 3 1
      server/SpawnScripts/Antonica/Rotclaw.lua
  19. 3 1
      server/SpawnScripts/Antonica/SarkinSearfang.lua
  20. 1 2
      server/SpawnScripts/Antonica/SentryActon.lua
  21. 4 64
      server/SpawnScripts/Antonica/Stoneclaw.lua
  22. 3 1
      server/SpawnScripts/Antonica/TarkSearfang.lua
  23. 3 1
      server/SpawnScripts/Antonica/TheDarkpawFanglord.lua
  24. 3 1
      server/SpawnScripts/Antonica/TheKlicnikQueen.lua
  25. 4 2
      server/SpawnScripts/Antonica/TheTwotoedRat.lua
  26. 20 0
      server/SpawnScripts/Antonica/WatchmanHaggerty.lua
  27. 20 0
      server/SpawnScripts/Antonica/WatchmanLoxley.lua
  28. 3 1
      server/SpawnScripts/Antonica/aBloodsaberCorruptor.lua
  29. 1 1
      server/SpawnScripts/Antonica/aColdwindKingCrab.lua
  30. 1 0
      server/SpawnScripts/Antonica/aColdwindLunker.lua
  31. 3 1
      server/SpawnScripts/Antonica/aDeepwaterLurker.lua
  32. 4 1
      server/SpawnScripts/Antonica/aMalevolentViper.lua
  33. 3 3
      server/SpawnScripts/Antonica/aMoatRat.lua
  34. 3 1
      server/SpawnScripts/Antonica/aSabertoothHero.lua
  35. 3 1
      server/SpawnScripts/Antonica/aSabertoothPackLord.lua
  36. 3 1
      server/SpawnScripts/Antonica/aSoddenStalker.lua
  37. 3 1
      server/SpawnScripts/Antonica/anAncientSogbone.lua
  38. 1 0
      server/SpawnScripts/BloodSkullValleyMaulicsStronghold/GeneralDrull.lua
  39. 1 0
      server/SpawnScripts/BloodSkullValleyMaulicsStronghold/LegioneerGorlak.lua
  40. 3 1
      server/SpawnScripts/Classic_forest/KendallCopperholdsRemains.lua
  41. 4 2
      server/SpawnScripts/Classic_forest/KinlocFlamepawsRemains.lua
  42. 4 2
      server/SpawnScripts/Classic_forest/SornCopperholdsRemains.lua
  43. 5 4
      server/SpawnScripts/Classic_forest/TheBasaltWatcher.lua
  44. 4 2
      server/SpawnScripts/Classic_forest/TinshenBrinthsRemains.lua
  45. 4 2
      server/SpawnScripts/Classic_forest/YesturaRhamreysRemains.lua
  46. 4 64
      server/SpawnScripts/Classic_forest/aRabidBadger.lua
  47. 3 2
      server/SpawnScripts/DownBelow_Classic/AFallenPrince.lua
  48. 3 1
      server/SpawnScripts/DownBelow_Classic/ARottingVermin.lua
  49. 2 1
      server/SpawnScripts/DownBelow_Classic/TheCreeper.lua
  50. 3 1
      server/SpawnScripts/DownBelow_Classic/TheCryptProtector.lua
  51. 7 1
      server/SpawnScripts/DownBelow_Classic/TheGroundsKeeper.lua
  52. 1 0
      server/SpawnScripts/DownBelow_Classic/aBloodsaberCenterPatrol.lua
  53. 3 1
      server/SpawnScripts/DrayeksChamber/Frostbite.lua
  54. 5 5
      server/SpawnScripts/DrayeksChamber/KingDrayek.lua
  55. 3 5
      server/SpawnScripts/DrayeksChamber/KromiseSentinel.lua
  56. 3 5
      server/SpawnScripts/DrayeksChamber/KromiseSpirit.lua
  57. 4 1
      server/SpawnScripts/DrayeksChamber/Misty.lua
  58. 3 1
      server/SpawnScripts/DrayeksChamber/aKromiseroyalguard.lua
  59. 4 1
      server/SpawnScripts/DrayeksChamber/afrozensentinel.lua
  60. 3 1
      server/SpawnScripts/DrayeksChamber/afrozenvigilant.lua
  61. 3 1
      server/SpawnScripts/FarJourneyFreeport/agoblin.lua
  62. 3 1
      server/SpawnScripts/ForestRuins_Classic/aBlackAsp.lua
  63. 3 1
      server/SpawnScripts/ForestRuins_Classic/aCrownedScavenger.lua
  64. 47 18
      server/SpawnScripts/Generic/NPCModule.lua
  65. 2 2
      server/SpawnScripts/Generic/UnknownLanguage.lua
  66. 8 17
      server/SpawnScripts/Graystone/WatcherCurmoglielKarthal.lua
  67. 2 2
      server/SpawnScripts/GrimgashsLair/aGruttoothchampion.lua
  68. 2 2
      server/SpawnScripts/GrimgashsLair/aGruttoothprotector.lua
  69. 2 3
      server/SpawnScripts/GrimgashsLair/aGruttoothsparkcaster.lua
  70. 2 2
      server/SpawnScripts/GrimgashsLair/aGruttoothwitchdoctor.lua
  71. 2 0
      server/SpawnScripts/IsleRefuge1/Bladefin.lua
  72. 2 0
      server/SpawnScripts/IsleRefuge1/CaptainRockbelly.lua
  73. 1 0
      server/SpawnScripts/IsleRefuge1/Direspike.lua
  74. 2 0
      server/SpawnScripts/IsleRefuge1/Greybeard.lua
  75. 2 4
      server/SpawnScripts/IsleRefuge1/HighChieftanKryx.lua
  76. 2 0
      server/SpawnScripts/IsleRefuge1/Quagmaul.lua
  77. 2 0
      server/SpawnScripts/IsleRefuge1/aGruttoothWarmonger.lua
  78. 2 0
      server/SpawnScripts/IsleRefuge1/aShadowSerpent.lua
  79. 2 0
      server/SpawnScripts/IsleRefuge1/aSiegePlanner.lua
  80. 2 0
      server/SpawnScripts/IsleRefuge1/aSupplyCaptain.lua
  81. 2 0
      server/SpawnScripts/IsleRefuge1/aTitanbeetle.lua
  82. 2 0
      server/SpawnScripts/IsleRefuge1/anAlphaWolf.lua
  83. 3 9
      server/SpawnScripts/MeetingOfTheMinds/Braxx.lua
  84. 4 4
      server/SpawnScripts/MeetingOfTheMinds/Brixx.lua
  85. 0 2
      server/SpawnScripts/MeetingOfTheMinds/PkzwkTzkr.lua
  86. 3 17
      server/SpawnScripts/MeetingOfTheMinds/strangeguardian.lua
  87. 7 2
      server/SpawnScripts/Oakmyst_Classic/AmbassadorJalanderra.lua
  88. 7 2
      server/SpawnScripts/Oakmyst_Classic/AmbassadorKialee.lua
  89. 4 3
      server/SpawnScripts/Oakmyst_Classic/FerithAnar.lua
  90. 4 30
      server/SpawnScripts/Oakmyst_Classic/Grubdigger.lua
  91. 3 1
      server/SpawnScripts/Oakmyst_Classic/Madeline.lua
  92. 3 1
      server/SpawnScripts/Oakmyst_Classic/NAlmiatheCorruptor.lua
  93. 5 23
      server/SpawnScripts/Oakmyst_Classic/Rotweed.lua
  94. 3 1
      server/SpawnScripts/Oakmyst_Classic/Solas.lua
  95. 3 1
      server/SpawnScripts/Oakmyst_Classic/Truesteel.lua
  96. 3 1
      server/SpawnScripts/Peatbog_Classic/Bashmouth.lua
  97. 4 4
      server/SpawnScripts/Peatbog_Classic/Lurkblister.lua
  98. 3 1
      server/SpawnScripts/Peatbog_Classic/QueenEzeldra.lua
  99. 3 1
      server/SpawnScripts/Peatbog_Classic/Sicklejaw.lua
  100. 3 1
      server/SpawnScripts/Peatbog_Classic/Stonegnasher.lua

+ 2 - 2
server/Quests/GraystoneYard/rat_man_bloodsaber_crusade.lua

@@ -28,10 +28,10 @@ end
 
 
 function Accepted(Quest, QuestGiver, Player)
 function Accepted(Quest, QuestGiver, Player)
 	FaceTarget(QuestGiver, Player)
 	FaceTarget(QuestGiver, Player)
+    PlayFlavor(QuestGiver, "","","agree",0,0,Player)
 	Dialog.New(QuestGiver, Player)
 	Dialog.New(QuestGiver, Player)
 	Dialog.AddDialog("Then seek out the catacombs! You must slay the Bloodsabers in the caverns. May your faith in the righteous bring you victory, or welcome you in the afterlife. The gods are watching!")
 	Dialog.AddDialog("Then seek out the catacombs! You must slay the Bloodsabers in the caverns. May your faith in the righteous bring you victory, or welcome you in the afterlife. The gods are watching!")
-	Dialog.AddVoiceover("voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel002", 1937849354, 1911529851)
-    PlayFlavor(QuestGiver, "","","agree",0,0,Player)
+	Dialog.AddVoiceover("voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel002.mp3", 1937849354, 1911529851)
     Dialog.AddOption("I will prove myself. I will be back.")
     Dialog.AddOption("I will prove myself. I will be back.")
     Dialog.Start()
     Dialog.Start()
 end
 end

+ 4 - 1
server/SpawnScripts/A Meeting of the Minds/Borxx.lua

@@ -9,7 +9,10 @@
 
 
 -- spells = {Gaze, Glare of Eradication, Gaze of Commandment, Gaze of Writhing Agony}
 -- spells = {Gaze, Glare of Eradication, Gaze of Commandment, Gaze of Writhing Agony}
 
 
-function spawn(NPC)
+require "SpawnScripts/Generic/NPCModule"
+
+function spawn(NPC, Spawn)
+    --NPCModule(NPC, Spawn)
 end
 end
 
 
 function aggro(NPC, Spawn)
 function aggro(NPC, Spawn)

+ 1 - 0
server/SpawnScripts/Antonica/AdvisorPandrus.lua

@@ -9,6 +9,7 @@ require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))

+ 4 - 3
server/SpawnScripts/Antonica/AglaemantistheColdwindTerror.lua

@@ -5,14 +5,15 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))
-    
-
+    RandomMovement(NPC, Spawn, 20, -20, 2, 8, 15)
 end
 end
 
 
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)

+ 3 - 1
server/SpawnScripts/Antonica/AnimatorRotpaw.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(45 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(45 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(90 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(90 + dmgMod))

+ 1 - 0
server/SpawnScripts/Antonica/Blackbark.lua

@@ -9,6 +9,7 @@ require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/CaptainGaebrail.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/ChiefKeizall.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/GhostofVhalen.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/GrolvenChiptooth.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(70 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(70 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(110 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(110 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/HollyWindstalker.lua

@@ -7,9 +7,11 @@
 	Notes: Updated w/ Holly's 20+ min pathing script. 2022.08.26 Dorbin
 	Notes: Updated w/ Holly's 20+ min pathing script. 2022.08.26 Dorbin
 	       Updated w/ autoattack damage. LordPazuzu 1/12/24
 	       Updated w/ autoattack damage. LordPazuzu 1/12/24
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/KingKlicnik.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(35 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(35 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(75 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(75 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/LadyFaideth.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/LordRison.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/MayorWoodbridge.lua

@@ -6,9 +6,11 @@
                    : 
                    : 
 --]]
 --]]
 dofile("SpawnScripts/Generic/MonsterCallouts/Windstalkers.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/Windstalkers.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(45 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(45 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(85 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(85 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/PriestofthePlaguebringer.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))

+ 4 - 64
server/SpawnScripts/Antonica/RenuxtheUndying.lua

@@ -5,75 +5,15 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))
-
-ChooseMovement(NPC)
-end
-
-function ChooseMovement(NPC)
-	local route = math.random(1,4)
-	if route == 1 then
-	    RouteOne(NPC, Spawn)
-	elseif route == 2 then
-	    RouteTwo(NPC, Spawn)
-	elseif route == 3 then
-	    RouteThree(NPC, Spawn)
-	elseif route == 4 then
-	    RouteFour(NPC, Spawn)
-	end
-end
-
-function RouteOne(NPC, Spawn)
-    local X = GetX(NPC)
-	local Y = GetY(NPC)
-	local Z = GetZ(NPC)
-    MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-    MovementLoopAddLocation(NPC, X + 7, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 7, Y, Z + 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 14, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 7, Y, Z + 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
-end
-
-function RouteTwo(NPC, Spawn)
-    local X = GetX(NPC)
-	local Y = GetY(NPC)
-	local Z = GetZ(NPC)
-    MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-    MovementLoopAddLocation(NPC, X - 7, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 7, Y, Z - 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 14, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 7, Y, Z - 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10), "ChooseMovement")
-end
-
-function RouteThree(NPC, Spawn)
-    local X = GetX(NPC)
-	local Y = GetY(NPC)
-	local Z = GetZ(NPC)
-    MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 7, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 7, Y, Z - 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 14, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 7, Y, Z - 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
-end
-
-function RouteFour(NPC, Spawn)
-    local X = GetX(NPC)
-	local Y = GetY(NPC)
-	local Z = GetZ(NPC)
-    MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 7, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 7, Y, Z + 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 14, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 7, Y, Z + 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10),"ChooseMovement")
+    RandomMovement(NPC, Spawn, 12, -12, 2, 8, 15)
 end
 end
 
 
 function respawn(NPC, Spawn)
 function respawn(NPC, Spawn)

+ 3 - 1
server/SpawnScripts/Antonica/Rotclaw.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/SarkinSearfang.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(42 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(42 + dmgMod))

+ 1 - 2
server/SpawnScripts/Antonica/SentryActon.lua

@@ -10,10 +10,9 @@ local Quest2 = 5783
     local greetingsTable = { "voiceover/english/voice_emotes/greetings/greetings_1_1034.mp3",
     local greetingsTable = { "voiceover/english/voice_emotes/greetings/greetings_1_1034.mp3",
     						 "voiceover/english/voice_emotes/greetings/greetings_2_1034.mp3",
     						 "voiceover/english/voice_emotes/greetings/greetings_2_1034.mp3",
     						 "voiceover/english/voice_emotes/greetings/greetings_3_1034.mp3"};
     						 "voiceover/english/voice_emotes/greetings/greetings_3_1034.mp3"};
-require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
-    NPCModule(NPC, Spawn)
+
 end
 end
 
 
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)

+ 4 - 64
server/SpawnScripts/Antonica/Stoneclaw.lua

@@ -5,75 +5,15 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))
-
-ChooseMovement(NPC)
-end
-
-function ChooseMovement(NPC)
-	local route = math.random(1,4)
-	if route == 1 then
-	    RouteOne(NPC, Spawn)
-	elseif route == 2 then
-	    RouteTwo(NPC, Spawn)
-	elseif route == 3 then
-	    RouteThree(NPC, Spawn)
-	elseif route == 4 then
-	    RouteFour(NPC, Spawn)
-	end
-end
-
-function RouteOne(NPC, Spawn)
-    local X = GetX(NPC)
-	local Y = GetY(NPC)
-	local Z = GetZ(NPC)
-    MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-    MovementLoopAddLocation(NPC, X + 7, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 7, Y, Z + 7, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 14, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 7, Y, Z + 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
-end
-
-function RouteTwo(NPC, Spawn)
-    local X = GetX(NPC)
-	local Y = GetY(NPC)
-	local Z = GetZ(NPC)
-    MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-    MovementLoopAddLocation(NPC, X - 7, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 7, Y, Z - 7, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 14, Y, Z+7, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 7, Y, Z - 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10), "ChooseMovement")
-end
-
-function RouteThree(NPC, Spawn)
-    local X = GetX(NPC)
-	local Y = GetY(NPC)
-	local Z = GetZ(NPC)
-    MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 7, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 7, Y, Z - 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 14, Y, Z+12, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 7, Y, Z - 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
-end
-
-function RouteFour(NPC, Spawn)
-    local X = GetX(NPC)
-	local Y = GetY(NPC)
-	local Z = GetZ(NPC)
-    MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 7, Y, Z+14, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 7, Y, Z + 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 14, Y, Z -14, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 7, Y, Z + 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
+    RandomMovement(NPC, Spawn, 12, -12, 2, 8, 15)
 end
 end
 
 
 function respawn(NPC, Spawn)
 function respawn(NPC, Spawn)

+ 3 - 1
server/SpawnScripts/Antonica/TarkSearfang.lua

@@ -6,9 +6,11 @@
                    : 
                    : 
 --]]
 --]]
 dofile("SpawnScripts/Generic/MonsterCallouts/DarkpawGnoll1.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/DarkpawGnoll1.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(42 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(42 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/TheDarkpawFanglord.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/TheKlicnikQueen.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(35 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(35 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(75 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(75 + dmgMod))

+ 4 - 2
server/SpawnScripts/Antonica/TheTwotoedRat.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
-    DmgBonus = math.floor(GetStr(NPC) /10)
+function spawn(NPC, Spawn)
+    dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 6 + DmgBonus) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 6 + DmgBonus) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 12 + DmgBonus)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 12 + DmgBonus)

+ 20 - 0
server/SpawnScripts/Antonica/WatchmanHaggerty.lua

@@ -0,0 +1,20 @@
+--[[
+    Script Name    : SpawnScripts/Antonica/WatchmanHaggerty.lua
+    Script Author  : LordPazuzu
+    Script Date    : 2024.04.14 05:04:04
+    Script Purpose : 
+                   : 
+--]]
+require "SpawnScripts/Generic/NPCModule"
+
+function spawn(NPC, Spawn)
+    NPCModule(NPC, Spawn)
+end
+
+function hailed(NPC, Spawn)
+	FaceTarget(NPC, Spawn)
+end
+
+function respawn(NPC)
+	spawn(NPC)
+end

+ 20 - 0
server/SpawnScripts/Antonica/WatchmanLoxley.lua

@@ -0,0 +1,20 @@
+--[[
+    Script Name    : SpawnScripts/Antonica/WatchmanLoxley.lua
+    Script Author  : LordPazuzu
+    Script Date    : 2024.04.14 05:04:28
+    Script Purpose : 
+                   : 
+--]]
+require "SpawnScripts/Generic/NPCModule"
+
+function spawn(NPC, Spawn)
+    NPCModule(NPC, Spawn)
+end
+
+function hailed(NPC, Spawn)
+	FaceTarget(NPC, Spawn)
+end
+
+function respawn(NPC)
+	spawn(NPC)
+end

+ 3 - 1
server/SpawnScripts/Antonica/aBloodsaberCorruptor.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))

+ 1 - 1
server/SpawnScripts/Antonica/aColdwindKingCrab.lua

@@ -5,11 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
-
 require "SpawnScripts/Generic/NPCModule"
 require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(42 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(42 + dmgMod))

+ 1 - 0
server/SpawnScripts/Antonica/aColdwindLunker.lua

@@ -9,6 +9,7 @@ require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(42 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(42 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/aDeepwaterLurker.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(30 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(30 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))

+ 4 - 1
server/SpawnScripts/Antonica/aMalevolentViper.lua

@@ -5,8 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
+
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
-    DmgBonus = math.floor(GetStr(NPC) /10)
+    dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 8 + DmgBonus) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 8 + DmgBonus) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 15 + DmgBonus)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 15 + DmgBonus)

+ 3 - 3
server/SpawnScripts/Antonica/aMoatRat.lua

@@ -12,9 +12,9 @@ function spawn(NPC, Spawn)
     RandomMovement(NPC, Spawn, 12, -12, 2, 8, 15)
     RandomMovement(NPC, Spawn, 12, -12, 2, 8, 15)
 end
 end
 
 
-function respawn(NPC, Spawn)
-    spawn(NPC)
-end
+--function respawn(NPC, Spawn)
+    --spawn(NPC)
+--end
 
 
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)
     FaceTarget(NPC, Spawn)
     FaceTarget(NPC, Spawn)

+ 3 - 1
server/SpawnScripts/Antonica/aSabertoothHero.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(65 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(105 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/aSabertoothPackLord.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/aSoddenStalker.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))

+ 3 - 1
server/SpawnScripts/Antonica/anAncientSogbone.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(30 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(30 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))

+ 1 - 0
server/SpawnScripts/BloodSkullValleyMaulicsStronghold/GeneralDrull.lua

@@ -9,6 +9,7 @@ require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(55 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(95 + dmgMod))

+ 1 - 0
server/SpawnScripts/BloodSkullValleyMaulicsStronghold/LegioneerGorlak.lua

@@ -9,6 +9,7 @@ require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(45 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(45 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(85 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(85 + dmgMod))

+ 3 - 1
server/SpawnScripts/Classic_forest/KendallCopperholdsRemains.lua

@@ -6,10 +6,12 @@
                    : 
                    : 
 --]]
 --]]
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton1.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton1.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     SetSpawnAnimation(NPC, 13016)
     SetSpawnAnimation(NPC, 13016)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))

+ 4 - 2
server/SpawnScripts/Classic_forest/KinlocFlamepawsRemains.lua

@@ -6,10 +6,12 @@
                    : 
                    : 
 --]]
 --]]
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton1.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton1.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
-    SetSpawnAnimation(NPC, 13016)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
+    SetSpawnAnimation(NPC, 13016)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(42 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(42 + dmgMod))

+ 4 - 2
server/SpawnScripts/Classic_forest/SornCopperholdsRemains.lua

@@ -6,10 +6,12 @@
                    : 
                    : 
 --]]
 --]]
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton1.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton1.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
-    SetSpawnAnimation(NPC, 13016)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
+    SetSpawnAnimation(NPC, 13016)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))

+ 5 - 4
server/SpawnScripts/Classic_forest/TheBasaltWatcher.lua

@@ -5,19 +5,20 @@
     Script Purpose : Classic Version of the basalt watcher
     Script Purpose : Classic Version of the basalt watcher
                    : 
                    : 
 --]]
 --]]
-
+require "SpawnScripts/Generic/NPCModule"
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)
+    
 end
 end
 
 
 function respawn(NPC)
 function respawn(NPC)
 	spawn(NPC)
 	spawn(NPC)
 end
 end
 
 
-
-function spawn(NPC)
+function spawn(NPC, Spawn)
+    dmgMod = GetStr(NPC)/10
+    Named(NPC)
 	SetPlayerProximityFunction(NPC, 15, "InRange", "LeaveRange")	    
 	SetPlayerProximityFunction(NPC, 15, "InRange", "LeaveRange")	    
     AddTimer(NPC,math.random(1260000, 2160000),"wakeup")            --random activation between 12 (~21min) and 24 (37min) Norrath/in-game hours
     AddTimer(NPC,math.random(1260000, 2160000),"wakeup")            --random activation between 12 (~21min) and 24 (37min) Norrath/in-game hours
-    dmgMod = GetStr(NPC)/10
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(30 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(30 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))

+ 4 - 2
server/SpawnScripts/Classic_forest/TinshenBrinthsRemains.lua

@@ -6,10 +6,12 @@
                    : 
                    : 
 --]]
 --]]
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton1.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton1.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
-    SetSpawnAnimation(NPC, 13016)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
+    SetSpawnAnimation(NPC, 13016)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(18 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(18 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(32 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(32 + dmgMod))

+ 4 - 2
server/SpawnScripts/Classic_forest/YesturaRhamreysRemains.lua

@@ -6,10 +6,12 @@
                    : 
                    : 
 --]]
 --]]
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton1.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton1.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
-    SetSpawnAnimation(NPC, 13016)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
+    SetSpawnAnimation(NPC, 13016)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))

+ 4 - 64
server/SpawnScripts/Classic_forest/aRabidBadger.lua

@@ -5,75 +5,15 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(10 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(10 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(22 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(22 + dmgMod))
-
-ChooseMovement(NPC)
-end
-
-function ChooseMovement(NPC)
-	local route = math.random(1,4)
-	if route == 1 then
-	    RouteOne(NPC, Spawn)
-	elseif route == 2 then
-	    RouteTwo(NPC, Spawn)
-	elseif route == 3 then
-	    RouteThree(NPC, Spawn)
-	elseif route == 4 then
-	    RouteFour(NPC, Spawn)
-	end
-end
-
-function RouteOne(NPC, Spawn)
-    local X = GetX(NPC)
-	local Y = GetY(NPC)
-	local Z = GetZ(NPC)
-    MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-    MovementLoopAddLocation(NPC, X + 5, Y, Z, 2,math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 5, Y, Z + 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 6, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 5, Y, Z + 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-end
-
-function RouteTwo(NPC, Spawn)
-    local X = GetX(NPC)
-	local Y = GetY(NPC)
-	local Z = GetZ(NPC)
-    MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-    MovementLoopAddLocation(NPC, X - 5, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 5, Y, Z - 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 6, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 5, Y, Z - 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10))
-end
-
-function RouteThree(NPC, Spawn)
-    local X = GetX(NPC)
-	local Y = GetY(NPC)
-	local Z = GetZ(NPC)
-    MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 5, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 5, Y, Z - 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 6, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X + 5, Y, Z - 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-end
-
-function RouteFour(NPC, Spawn)
-    local X = GetX(NPC)
-	local Y = GetY(NPC)
-	local Z = GetZ(NPC)
-    MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 5, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 5, Y, Z + 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 6, Y, Z, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X - 5, Y, Z + 4, 2, math.random(5,10))
-	MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
+    RandomMovement(NPC, Spawn, 6, -6, 2, 8, 15)
 end
 end
 
 
 function respawn(NPC, Spawn)
 function respawn(NPC, Spawn)

+ 3 - 2
server/SpawnScripts/DownBelow_Classic/AFallenPrince.lua

@@ -5,13 +5,14 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(24 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(42 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(42 + dmgMod))
-
     SetSeeHide(NPC,1)
     SetSeeHide(NPC,1)
     SetSeeInvis(NPC,1)
     SetSeeInvis(NPC,1)
 end
 end

+ 3 - 1
server/SpawnScripts/DownBelow_Classic/ARottingVermin.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))

+ 2 - 1
server/SpawnScripts/DownBelow_Classic/TheCreeper.lua

@@ -5,10 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
-
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))

+ 3 - 1
server/SpawnScripts/DownBelow_Classic/TheCryptProtector.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))

+ 7 - 1
server/SpawnScripts/DownBelow_Classic/TheGroundsKeeper.lua

@@ -5,8 +5,14 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
+    dmgMod = GetStr(NPC)/10
+    Named(NPC)
+    SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
+    SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(30 + dmgMod)) 
+    SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))
     SetSeeHide(NPC,1)
     SetSeeHide(NPC,1)
     SetSeeInvis(NPC,1)
     SetSeeInvis(NPC,1)
     AddTimer(NPC, 6000,"waypoints")
     AddTimer(NPC, 6000,"waypoints")

+ 1 - 0
server/SpawnScripts/DownBelow_Classic/aBloodsaberCenterPatrol.lua

@@ -15,6 +15,7 @@ function spawn(NPC, Spawn)
     
     
     if GetSpawnID(NPC) == 8340015 then
     if GetSpawnID(NPC) == 8340015 then
         dmgMod = GetStr(NPC)/10
         dmgMod = GetStr(NPC)/10
+        Named(NPC)
         SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
         SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
         SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(12 + dmgMod)) 
         SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(12 + dmgMod)) 
         SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(24 + dmgMod))
         SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(24 + dmgMod))

+ 3 - 1
server/SpawnScripts/DrayeksChamber/Frostbite.lua

@@ -6,8 +6,10 @@
     Script Notes   : Spell collects are pending. The wolves send a timer to Drayek once they're dead so he attacks.
     Script Notes   : Spell collects are pending. The wolves send a timer to Drayek once they're dead so he attacks.
 --]]
 --]]
 
 
-function spawn(NPC)
+require "SpawnScripts/Generic/NPCModule"
 
 
+function spawn(NPC, Spawn)
+    NPCModule(NPC, Spawn)
 end
 end
 
 
 function death(NPC, Spawn)
 function death(NPC, Spawn)

+ 5 - 5
server/SpawnScripts/DrayeksChamber/KingDrayek.lua

@@ -49,7 +49,7 @@ local current = GetHP(NPC)
 end
 end
 
 
 function wolfDeath(NPC, Spawn) -- Attack after wolves are dead
 function wolfDeath(NPC, Spawn) -- Attack after wolves are dead
-    Say(NPC, "Prepare yourselves! Now, I must deal with you... personally.")
+    Shout(NPC, "Prepare yourselves! Now, I must deal with you... personally.")
     SpawnSet(NPC, "attackable", "1")
     SpawnSet(NPC, "attackable", "1")
     Attack(NPC, Spawn)
     Attack(NPC, Spawn)
 end
 end
@@ -64,7 +64,7 @@ local zone = GetZone(NPC)
         end
         end
     elseif GetTempVariable(NPC, "addsphase") == "1" then
     elseif GetTempVariable(NPC, "addsphase") == "1" then
     local hated = GetMostHated(NPC)
     local hated = GetMostHated(NPC)
-        Say(NPC, "Enough of this! You can have them now my pets!")
+        Shout(NPC, "Enough of this! You can have them now my pets!")
         for k,v in pairs(wolves) do
         for k,v in pairs(wolves) do
             local wolf = GetSpawnByLocationID(zone, v)
             local wolf = GetSpawnByLocationID(zone, v)
             SpawnSet(wolf, "attackable", "1")
             SpawnSet(wolf, "attackable", "1")
@@ -73,9 +73,9 @@ local zone = GetZone(NPC)
     elseif GetTempVariable(NPC, "addsphase") == "2" then
     elseif GetTempVariable(NPC, "addsphase") == "2" then
     local hated = GetMostHated(NPC)
     local hated = GetMostHated(NPC)
         if GetTempVariable(NPC, "encounterphase") == "0" then
         if GetTempVariable(NPC, "encounterphase") == "0" then
-            Say(NPC, "Such insolence! Guards, to me!")
+            Shout(NPC, "Such insolence! Guards, to me!")
         elseif GetTempVariable(NPC, "encounterphase") == "2" then
         elseif GetTempVariable(NPC, "encounterphase") == "2" then
-            Say(NPC, "As much fun as this was, I grow tired of you all... Guards!!!")
+            Shout(NPC, "As much fun as this was, I grow tired of you all... Guards!!!")
         end
         end
         for k,v in pairs(guards) do
         for k,v in pairs(guards) do
             local guard = SpawnByLocationID(zone, v)
             local guard = SpawnByLocationID(zone, v)
@@ -83,7 +83,7 @@ local zone = GetZone(NPC)
         end
         end
     elseif GetTempVariable(NPC, "addsphase") == "3" then
     elseif GetTempVariable(NPC, "addsphase") == "3" then
     local hated = GetMostHated(NPC)
     local hated = GetMostHated(NPC)
-        Say(NPC, "Kings of old, I call to you now! Aid your King!!!!")
+        Shout(NPC, "Kings of old, I call to you now! Aid your King!!!!")
         for k,v in pairs(kings) do
         for k,v in pairs(kings) do
             local king = SpawnByLocationID(zone, v)
             local king = SpawnByLocationID(zone, v)
             Attack(king, hated)
             Attack(king, hated)

+ 3 - 5
server/SpawnScripts/DrayeksChamber/KromiseSentinel.lua

@@ -6,12 +6,10 @@
                    : 
                    : 
 --]]
 --]]
 
 
-function spawn(NPC)
+require "SpawnScripts/Generic/NPCModule"
 
 
-end
-
-function hailed(NPC, Spawn)
-	FaceTarget(NPC, Spawn)
+function spawn(NPC, Spawn)
+    --NPCModule(NPC, Spawn)
 end
 end
 
 
 function respawn(NPC)
 function respawn(NPC)

+ 3 - 5
server/SpawnScripts/DrayeksChamber/KromiseSpirit.lua

@@ -6,12 +6,10 @@
                    : 
                    : 
 --]]
 --]]
 
 
-function spawn(NPC)
+require "SpawnScripts/Generic/NPCModule"
 
 
-end
-
-function hailed(NPC, Spawn)
-	FaceTarget(NPC, Spawn)
+function spawn(NPC, Spawn)
+   --NPCModule(NPC, Spawn)
 end
 end
 
 
 function respawn(NPC)
 function respawn(NPC)

+ 4 - 1
server/SpawnScripts/DrayeksChamber/Misty.lua

@@ -6,7 +6,10 @@
     Script Notes   : Spell collects are pending. The wolves send a timer to Drayek once they're dead so he attacks.
     Script Notes   : Spell collects are pending. The wolves send a timer to Drayek once they're dead so he attacks.
 --]]
 --]]
 
 
-function spawn(NPC)
+require "SpawnScripts/Generic/NPCModule"
+
+function spawn(NPC, Spawn)
+    --NPCModule(NPC, Spawn)
 end
 end
 
 
 function death(NPC, Spawn)
 function death(NPC, Spawn)

+ 3 - 1
server/SpawnScripts/DrayeksChamber/aKromiseroyalguard.lua

@@ -6,8 +6,10 @@
     Script Notes   : Spell collects are pending.
     Script Notes   : Spell collects are pending.
 --]]
 --]]
 
 
-function spawn(NPC)
+require "SpawnScripts/Generic/NPCModule"
 
 
+function spawn(NPC, Spawn)
+    --NPCModule(NPC, Spawn)
 end
 end
 
 
 function respawn(NPC)
 function respawn(NPC)

+ 4 - 1
server/SpawnScripts/DrayeksChamber/afrozensentinel.lua

@@ -6,7 +6,10 @@
     Script Notes   : Spell collects are pending. The frozen mobs all check themselves when they die and send a timer to Drayek to send in the wolves.
     Script Notes   : Spell collects are pending. The frozen mobs all check themselves when they die and send a timer to Drayek to send in the wolves.
 --]]
 --]]
 
 
-function spawn(NPC)
+require "SpawnScripts/Generic/NPCModule"
+
+function spawn(NPC, Spawn)
+    --NPCModule(NPC, Spawn)
 end
 end
 
 
 function death(NPC, Spawn)
 function death(NPC, Spawn)

+ 3 - 1
server/SpawnScripts/DrayeksChamber/afrozenvigilant.lua

@@ -6,8 +6,10 @@
     Script Notes   : Spell collects are pending. The frozen mobs all check themselves when they die and send a timer to Drayek to send in the wolves.
     Script Notes   : Spell collects are pending. The frozen mobs all check themselves when they die and send a timer to Drayek to send in the wolves.
 --]]
 --]]
 
 
-function spawn(NPC)
+require "SpawnScripts/Generic/NPCModule"
 
 
+function spawn(NPC, Spawn)
+    --NPCModule(NPC, Spawn)
 end
 end
 
 
 function death(NPC, Spawn)
 function death(NPC, Spawn)

+ 3 - 1
server/SpawnScripts/FarJourneyFreeport/agoblin.lua

@@ -10,7 +10,9 @@ local legacy = true -- Client check.  True == DoF or Classic
 require "SpawnScripts/Generic/CombatModule"
 require "SpawnScripts/Generic/CombatModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
-    combatModule(NPC, Spawn)
+    SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
+    SetInfoStructUInt(NPC, "primary_weapon_damage_low", 1) 
+    SetInfoStructUInt(NPC, "primary_weapon_damage_high", 3)
     CageCollision(NPC)
     CageCollision(NPC)
 
 
 end
 end

+ 3 - 1
server/SpawnScripts/ForestRuins_Classic/aBlackAsp.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(10 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(10 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(22 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(22 + dmgMod))

+ 3 - 1
server/SpawnScripts/ForestRuins_Classic/aCrownedScavenger.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))

+ 47 - 18
server/SpawnScripts/Generic/NPCModule.lua

@@ -23,7 +23,7 @@ function NPCModule(NPC, Spawn)
     Regen(NPC, Spawn)          -- Sets NPC's health and/or power regeneration rates or disables regeneration entirely.
     Regen(NPC, Spawn)          -- Sets NPC's health and/or power regeneration rates or disables regeneration entirely.
     HealthPower(NPC, Spawn)    -- Calculates NPC's based on level and difficulty.
     HealthPower(NPC, Spawn)    -- Calculates NPC's based on level and difficulty.
     --Heroic(NPC, Spawn)         -- Detects if an NPC should be flagged as heroic and sets the heroic flag accordingly.
     --Heroic(NPC, Spawn)         -- Detects if an NPC should be flagged as heroic and sets the heroic flag accordingly.
-    AddTimer(NPC, 25, "Heroic")
+    AddTimer(NPC, 25, "Heroic")  --  Applies heroic flag immediately after spawn in accordance with the way the server loads spawns.
     AddTimer(NPC, 1000, "Heroic") -- Redundant heroic check to compensate for server lag when using developer commands to reload spawns.
     AddTimer(NPC, 1000, "Heroic") -- Redundant heroic check to compensate for server lag when using developer commands to reload spawns.
     
     
 end
 end
@@ -371,10 +371,12 @@ function HealthPower(NPC, Spawn)
         pw = 900 * PWMod * GlobalPowerMod -- temp values
         pw = 900 * PWMod * GlobalPowerMod -- temp values
     end  
     end  
 
 
-    SetMaxHP(NPC, math.floor(hp))
+    ModifyMaxHP(NPC, math.floor(hp))
     ModifyHP(NPC, math.floor(hp))
     ModifyHP(NPC, math.floor(hp))
-    SetMaxPower(NPC, math.floor(pw))
-    ModifyPower(NPC, math.floor(pw))
+    ModifyMaxPower(NPC, math.floor(pw))
+    ModifyPower(NPC, math.floor(hp))
+
+    
     
     
 end
 end
 
 
@@ -611,13 +613,11 @@ end
 function Deathfist(NPC, Spawn)
 function Deathfist(NPC, Spawn)
     SpawnSet(NPC,"model_type",137)
     SpawnSet(NPC,"model_type",137)
     SpawnSet(NPC, "race", 20)
     SpawnSet(NPC, "race", 20)
-    SpawnSet(NPC, "faction", 119)
 end
 end
 
 
 function Bloodskull(NPC, Spawn)
 function Bloodskull(NPC, Spawn)
     SpawnSet(NPC,"model_type",137)
     SpawnSet(NPC,"model_type",137)
     SpawnSet(NPC, "race", 20)
     SpawnSet(NPC, "race", 20)
-    SpawnSet(NPC, "faction", 120)
     SpawnSet(NPC, "skin_color", "50 60 50")
     SpawnSet(NPC, "skin_color", "50 60 50")
     SpawnSet(NPC, "eye_color", "98 63 28")
     SpawnSet(NPC, "eye_color", "98 63 28")
 end
 end
@@ -625,7 +625,6 @@ end
 function Brokentusk(NPC, Spawn)
 function Brokentusk(NPC, Spawn)
     SpawnSet(NPC,"model_type",137)
     SpawnSet(NPC,"model_type",137)
     SpawnSet(NPC, "race", 20)
     SpawnSet(NPC, "race", 20)
-    SpawnSet(NPC, "faction", 367)
     SpawnSet(NPC, "skin_color", "110 75 75")
     SpawnSet(NPC, "skin_color", "110 75 75")
     SpawnSet(NPC, "eye_color", "98 63 28")
     SpawnSet(NPC, "eye_color", "98 63 28")
 end
 end
@@ -633,7 +632,6 @@ end
 function Lonetusk(NPC, Spawn)
 function Lonetusk(NPC, Spawn)
     SpawnSet(NPC,"model_type",137)
     SpawnSet(NPC,"model_type",137)
     SpawnSet(NPC, "race", 20)
     SpawnSet(NPC, "race", 20)
-    SpawnSet(NPC, "faction", 366)
     SpawnSet(NPC, "skin_color", "92 52 52")
     SpawnSet(NPC, "skin_color", "92 52 52")
     SpawnSet(NPC, "eye_color", "98 63 28")
     SpawnSet(NPC, "eye_color", "98 63 28")
 end
 end
@@ -641,7 +639,6 @@ end
 function Ree(NPC, Spawn)
 function Ree(NPC, Spawn)
     SpawnSet(NPC,"model_type",137)
     SpawnSet(NPC,"model_type",137)
     SpawnSet(NPC, "race", 20)
     SpawnSet(NPC, "race", 20)
-    SpawnSet(NPC, "faction", 121)
 end
 end
 
 
 -- DoF compatible hair functions
 -- DoF compatible hair functions
@@ -1008,16 +1005,48 @@ function MovementMod(NPC, Spawn, NegDist, PosDist, Speed, MinDly, MaxDly)
 
 
 end
 end
 
 
---  Automatically enforce level uniformity in multi-spawn encounters
-function Encounters(NPC, Spawn)
-    local group = GetGroup(NPC)
+-- Automatically calculate hit points, power, and regeneration for named NPCs
+function Named(NPC, Spawn)
+    level = GetLevel(NPC)
+    difficulty =  GetDifficulty(NPC)
+    NamedMod = 1.5
+    HealthPower(NPC)
     
     
-    if group ~= nil then
-        for k,v in ipairs(group) do
-            GroupLevel=  GetLevel(v)
-            Level = GroupLevel
-            SpawnSet(NPC,  "level", GroupLevel)
-        end
+    ModifyMaxHP(NPC, math.floor(hp * NamedMod))
+    ModifyHP(NPC, math.floor(hp * NamedMod))
+    ModifyMaxPower(NPC, math.floor(pw * NamedMod))
+    ModifyPower(NPC, math.floor(hp * NamedMod))
+
+
+    SetInfoStructUInt(NPC, "hp_regen_override", 1)  
+    SetInfoStructSInt(NPC, "hp_regen", (level * 2) + (difficulty * 2))           
+    SetInfoStructUInt(NPC, "pw_regen_override", 1)  
+    SetInfoStructSInt(NPC, "pw_regen", (level * 2) + (difficulty * 2))           
+end
+
+
+
+-- Social Aggro by Faction- IN PROGRESS, DO NOT USE
+function Social(NPC, Spawn)
+    MyFaction = GetFactionID(NPC)
+    SocialRadius = GetAggroRadius(NPC) * 2
+    SetPlayerProximityFunction(NPC, SocialRadius, "CheckCombat")
+end
+
+function CheckCombat(NPC, Spawn)
+    Say(NPC, "Checking for combat.")
+    if IsInCombat(Spawn) then
+        Say(NPC, "You're in combat!")
+        SocialAggro(NPC, Spawn)
     end
     end
 end
 end
 
 
+function SocialAggro(NPC, Spawn)
+    local MobAssist = GetTarget(Spawn)
+    local AssistFaction = GetFactionID(MobAssist)
+    if MyFaction == AssistFaction then
+            Attack(NPC, Spawn)
+    end
+end
+
+

+ 2 - 2
server/SpawnScripts/Generic/UnknownLanguage.lua

@@ -62,7 +62,7 @@ function Garbled(NPC, Spawn, Faction)
 	                elseif choice ==4 then
 	                elseif choice ==4 then
 					PlayFlavor(NPC, "voiceover/english/barbarian_eco_good_1/ft/barbarian/barbarian_eco_good_1_garbled_gf_f8c9923f.mp3", "Try not to screw up my fist with your face.", "", 653161975, 3035939203, Spawn,1)
 					PlayFlavor(NPC, "voiceover/english/barbarian_eco_good_1/ft/barbarian/barbarian_eco_good_1_garbled_gf_f8c9923f.mp3", "Try not to screw up my fist with your face.", "", 653161975, 3035939203, Spawn,1)
 	                elseif choice ==5 then
 	                elseif choice ==5 then
-                    PlayFlavor(NPC, "voiceover/english/barbarian/ft/barbarian/barbarian_eco_garble_garbled_gf_befe5c31.mp3", "Washing three dozen kilts is murder", "", 1408939577, 3083827178, Spawn)
+                    PlayFlavor(NPC, "voiceover/english/barbarian/ft/barbarian/barbarian_eco_garble_garbled_gf_befe5c31.mp3", "Washing three dozen kilts is murder", "", 1408939577, 3083827178, Spawn,1)
 			  
 			  
 			         end
 			         end
 				end
 				end
@@ -169,7 +169,7 @@ function Garbled(NPC, Spawn, Faction)
 	                if choice == 1 then				
 	                if choice == 1 then				
 					PlayFlavor(NPC, "voiceover/english/gnome_sewer_rats/ft/gnome/gnome_sewer_rats_1_garbled_gf_9833761f.mp3", "Never fear! Inventions will provide.", "", 3347501993, 118609776, Spawn,6)
 					PlayFlavor(NPC, "voiceover/english/gnome_sewer_rats/ft/gnome/gnome_sewer_rats_1_garbled_gf_9833761f.mp3", "Never fear! Inventions will provide.", "", 3347501993, 118609776, Spawn,6)
 				    elseif choice ==2 then
 				    elseif choice ==2 then
-					PlayFlavor(NPC, "voiceover/english/gnome_sewer_rats/ft/gnome/gnome_sewer_rats_1_victory_gm_3f8221f0.mp3", "My sprockets just fell from my pocket!", "", 2760547670, 4241194541, Spawn,6)
+					PlayFlavor(NPC, "voiceover/english/gnome_sewer_rats/ft/gnome/gnome_sewer_rats_1_garbled_gf_cbfe503a.mp3", "My sprockets just fell from my pocket!", "", 2760547670, 4241194541, Spawn,6)
     			    end				    
     			    end				    
 				end
 				end
 			elseif race == HALF_ELF then
 			elseif race == HALF_ELF then

+ 8 - 17
server/SpawnScripts/Graystone/WatcherCurmoglielKarthal.lua

@@ -71,33 +71,24 @@ end
 	FaceTarget(NPC, Spawn)
 	FaceTarget(NPC, Spawn)
 	Dialog.New(NPC, Spawn)
 	Dialog.New(NPC, Spawn)
 	Dialog.AddDialog("The Celestial Watch is the bearer of faith in this near faithless world. The powers that be have been silenced for ages, and far too many have lost faith. Now is the time for all to prove their faith.")
 	Dialog.AddDialog("The Celestial Watch is the bearer of faith in this near faithless world. The powers that be have been silenced for ages, and far too many have lost faith. Now is the time for all to prove their faith.")
-	Dialog.AddVoiceover("voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel001", 2796372523, 2339729936)
+	Dialog.AddVoiceover("voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel001.mp3", 2796372523, 2339729936)
     Dialog.AddOption("How can I prove my faith?","Prove2")
     Dialog.AddOption("How can I prove my faith?","Prove2")
     Dialog.AddOption("I don't need faith telling me what to do.","NoFaith")  
     Dialog.AddOption("I don't need faith telling me what to do.","NoFaith")  
     Dialog.Start()
     Dialog.Start()
 end   
 end   
 
 
- function Prove(NPC, Spawn)
-  conversation = CreateConversation()
-    FaceTarget(NPC, Spawn)  
-  PlayFlavor(NPC, "voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel002.mp3","","agree",1937849354,1911529851,Spawn)
-  AddConversationOption(conversation, "I will prove myself. I will be back.","Prove2")
-  AddConversationOption(conversation, "I don't need faith telling me what to do.","NoFaith")  
-  StartConversation(conversation, NPC, Spawn, "Then seek out the catacombs! You must slay the Bloodsabers in the caverns. May your faith in the righteous bring you victory, or welcome you in the afterlife. The gods are watching!")
-end   
 
 
 function Prove2(NPC,Spawn)
 function Prove2(NPC,Spawn)
     OfferQuest(NPC,Spawn, Rats)
     OfferQuest(NPC,Spawn, Rats)
 end
 end
 
 
  function Finished(NPC, Spawn)
  function Finished(NPC, Spawn)
-  conversation = CreateConversation()
-    FaceTarget(NPC, Spawn)  
-  PlayFlavor(NPC, "voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel003.mp3","","thank",2058282306,1196487776,Spawn)
-  AddConversationOption(conversation, "Thank you.","Finished2")
-  StartConversation(conversation, NPC, Spawn, "You've done well. The Celestial Watch salutes you! Take this reward for our gratitude. Use it wisely so that you may aid those in need. You'll be in our prayers. Should your adventures take you to the Temple of Light in Qeynos, please visit us fair traveler. Farewell.")
+	FaceTarget(NPC, Spawn)
+	Dialog.New(NPC, Spawn)
+	Dialog.AddDialog("You've done well. The Celestial Watch salutes you! Take this reward for our gratitude. Use it wisely so that you may aid those in need. You'll be in our prayers. Should your adventures take you to the Temple of Light in Qeynos, please visit us fair traveler. Farewell.")
+	Dialog.AddVoiceover("voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel003.mp3", 2058282306,1196487776)
+    Dialog.AddOption("Thank you.")
+    SetStepComplete(Spawn,Rats,2)
+    Dialog.Start()
 end 
 end 
 
 
-function Finished2(NPC,Spawn)
-    SetStepComplete(Spawn,Rats,2)
-end

+ 2 - 2
server/SpawnScripts/GrimgashsLair/aGruttoothchampion.lua

@@ -5,10 +5,10 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
-require "SpawnScripts/Generic/CombatModule"
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
-    combatModule(NPC, Spawn)  
+    NPCModule(NPC, Spawn)
     EmoteLoop(NPC,Spawn)
     EmoteLoop(NPC,Spawn)
 end
 end
 
 

+ 2 - 2
server/SpawnScripts/GrimgashsLair/aGruttoothprotector.lua

@@ -5,10 +5,10 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
-require "SpawnScripts/Generic/CombatModule"
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
-    combatModule(NPC, Spawn)  
+    NPCModule(NPC, Spawn)
     AddTimer(NPC,2000,"EmoteLoop")
     AddTimer(NPC,2000,"EmoteLoop")
 end
 end
 
 

+ 2 - 3
server/SpawnScripts/GrimgashsLair/aGruttoothsparkcaster.lua

@@ -5,11 +5,10 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
-require "SpawnScripts/Generic/CombatModule"
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
-    combatModule(NPC, Spawn)  
-
+    NPCModule(NPC, Spawn)
 end
 end
 
 
 
 

+ 2 - 2
server/SpawnScripts/GrimgashsLair/aGruttoothwitchdoctor.lua

@@ -5,10 +5,10 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
-require "SpawnScripts/Generic/CombatModule"
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC, Spawn)
 function spawn(NPC, Spawn)
-    combatModule(NPC, Spawn)  
+    NPCModule(NPC, Spawn)
     AddTimer(NPC,2000,"EmoteLoop")
     AddTimer(NPC,2000,"EmoteLoop")
 end
 end
 
 

+ 2 - 0
server/SpawnScripts/IsleRefuge1/Bladefin.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
     local dmgMod = GetStr(NPC)/10
     local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)

+ 2 - 0
server/SpawnScripts/IsleRefuge1/CaptainRockbelly.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
     local dmgMod = GetStr(NPC)/10
     local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)

+ 1 - 0
server/SpawnScripts/IsleRefuge1/Direspike.lua

@@ -9,6 +9,7 @@ require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
     local dmgMod = GetStr(NPC)/10
     local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 3 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 3 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 7 + dmgMod)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 7 + dmgMod)

+ 2 - 0
server/SpawnScripts/IsleRefuge1/Greybeard.lua

@@ -7,9 +7,11 @@
 --]]
 --]]
 
 
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton2.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton2.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
     local dmgMod = GetStr(NPC)/10
     local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)

+ 2 - 4
server/SpawnScripts/IsleRefuge1/HighChieftanKryx.lua

@@ -6,16 +6,14 @@
                    : 
                    : 
 --]]
 --]]
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseGoblin3.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseGoblin3.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
     local dmgMod = GetStr(NPC)/10
     local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)
-    SetInfoStructUInt(NPC, "hp_regen_override", 1) 
-    SetInfoStructSInt(NPC, "hp_regen", 0) 
-    SetInfoStructUInt(NPC, "pw_regen_override", 1) 
-    SetInfoStructSInt(NPC, "pw_regen", 0) 
 end
 end
 
 
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)

+ 2 - 0
server/SpawnScripts/IsleRefuge1/Quagmaul.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
     local dmgMod = GetStr(NPC)/10
     local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 4 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 4 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 10 + dmgMod)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 10 + dmgMod)

+ 2 - 0
server/SpawnScripts/IsleRefuge1/aGruttoothWarmonger.lua

@@ -6,9 +6,11 @@
                    : 
                    : 
 --]]
 --]]
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseGoblin3.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseGoblin3.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
     local dmgMod = GetStr(NPC)/10
     local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 4 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 4 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 10 + dmgMod)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 10 + dmgMod)

+ 2 - 0
server/SpawnScripts/IsleRefuge1/aShadowSerpent.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
     local dmgMod = GetStr(NPC)/10
     local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)

+ 2 - 0
server/SpawnScripts/IsleRefuge1/aSiegePlanner.lua

@@ -6,9 +6,11 @@
                    : 
                    : 
 --]]
 --]]
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseGoblin3.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseGoblin3.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
     local dmgMod = GetStr(NPC)/10
     local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 4 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 4 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 10 + dmgMod)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 10 + dmgMod)

+ 2 - 0
server/SpawnScripts/IsleRefuge1/aSupplyCaptain.lua

@@ -6,9 +6,11 @@
                    : 
                    : 
 --]]
 --]]
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseGoblin3.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseGoblin3.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
     local dmgMod = GetStr(NPC)/10
     local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 4 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 4 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 10 + dmgMod)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 10 + dmgMod)

+ 2 - 0
server/SpawnScripts/IsleRefuge1/aTitanbeetle.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
     local dmgMod = GetStr(NPC)/10
     local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 4 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 4 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 10 + dmgMod)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 10 + dmgMod)

+ 2 - 0
server/SpawnScripts/IsleRefuge1/anAlphaWolf.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
     local dmgMod = GetStr(NPC)/10
     local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", 5 + dmgMod) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", 11 + dmgMod)

+ 3 - 9
server/SpawnScripts/MeetingOfTheMinds/Braxx.lua

@@ -6,16 +6,10 @@
                    : Spell functions de-activated pending proper spell implementation on mobs.
                    : Spell functions de-activated pending proper spell implementation on mobs.
 --]]
 --]]
 
 
--- spells = {Gaze, Glare of Eradication, Gaze of Commandment, Gaze of Writhing Agony}
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
-end
-
-function aggro(NPC, Spawn)
-    AddTimer(NPC, math.random(1500,2500), "spellLoop")
-end
-
-function hailed(NPC, Spawn)
+function spawn(NPC, Spawn)
+    --NPCModule(NPC, Spawn)
 end
 end
 
 
 function respawn(NPC)
 function respawn(NPC)

+ 4 - 4
server/SpawnScripts/MeetingOfTheMinds/Brixx.lua

@@ -8,7 +8,10 @@
 
 
 -- spells = {Gaze, Glare of Eradication, Gaze of Commandment, Gaze of Writhing Agony}
 -- spells = {Gaze, Glare of Eradication, Gaze of Commandment, Gaze of Writhing Agony}
 
 
-function spawn(NPC)
+require "SpawnScripts/Generic/NPCModule"
+
+function spawn(NPC, Spawn)
+    --NPCModule(NPC, Spawn)
 end
 end
 
 
 function aggro(NPC, Spawn)
 function aggro(NPC, Spawn)
@@ -17,6 +20,3 @@ end
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)
 end
 end
 
 
-function respawn(NPC)
-	spawn(NPC)
-end

+ 0 - 2
server/SpawnScripts/MeetingOfTheMinds/PkzwkTzkr.lua

@@ -6,8 +6,6 @@
     Boss Mechanics : Spawns with 10 strange guardians linked.
     Boss Mechanics : Spawns with 10 strange guardians linked.
 --]]
 --]]
 
 
-spells = {40173, 40155, 40183, 40083}
-
 function spawn(NPC)
 function spawn(NPC)
 end
 end
  
  

+ 3 - 17
server/SpawnScripts/MeetingOfTheMinds/strangeguardian.lua

@@ -6,27 +6,13 @@
                    : 
                    : 
 --]]
 --]]
 
 
-spells = {30159, 30011, 30121, 30153}
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
+    --NPCModule(NPC, Spawn)
 end
 end
  
  
 function attacked(NPC, Spawn)
 function attacked(NPC, Spawn)
-    AddTimer(NPC, 100, "spellLoop")
-end
- 
-
-function spellLoop(NPC, Spawn) -- referred from aggro. Loopback function for spellcasts.
-    AddTimer(NPC, math.random(1500, 2500), "spellChoice", Spawn) -- add timer to refer to spellchoice.
-end
-
-function spellChoice(NPC, Spawn) -- select a spell from table. Zalak is a shadowknight, so only casts on highest hate target.
-    local hated = GetMostHated(NPC) -- get pointer for whoever has threat.
-        if hated ~= nil then -- if pointer isn't blank, proceed.
-            FaceTarget(NPC, hated) -- face the NPC toward threat target if they aren't already.
-            -- CastSpell(hated, spells[math.random(#spells)], 3, NPC) -- get random spell from table, cast on target.
-        end
-    AddTimer(NPC, math.random(1500, 2500), "spellLoop") -- refer to loopback
 end
 end
 
 
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)

+ 7 - 2
server/SpawnScripts/Oakmyst_Classic/AmbassadorJalanderra.lua

@@ -8,8 +8,13 @@
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseFairy1.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseFairy1.lua")
 require "SpawnScripts/Generic/NPCModule"
 require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC, Spawn)
-    NPCModule(NPC, Spawn)
+function spawn(NPC)
+    local dmgMod = GetStr(NPC)/10
+    Named(NPC)
+    SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
+    SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(5 + dmgMod)) 
+    SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(15 + dmgMod))
+
 end
 end
 
 
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)

+ 7 - 2
server/SpawnScripts/Oakmyst_Classic/AmbassadorKialee.lua

@@ -8,8 +8,13 @@
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseFairy1.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/BaseFairy1.lua")
 require "SpawnScripts/Generic/NPCModule"
 require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC, Spawn)
-    NPCModule(NPC, Spawn)
+function spawn(NPC)
+    local dmgMod = GetStr(NPC)/10
+    Named(NPC)
+    SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
+    SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(5 + dmgMod)) 
+    SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(15 + dmgMod))
+
 end
 end
 
 
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)

+ 4 - 3
server/SpawnScripts/Oakmyst_Classic/FerithAnar.lua

@@ -5,14 +5,15 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
-    dmgMod = GetStr(NPC)/10
+    local dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(18 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(18 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(32 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(32 + dmgMod))
-
-waypoints(NPC)
+    AddTimer(NPC, 6000, "waypoints")
 end
 end
 
 
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)

+ 4 - 30
server/SpawnScripts/Oakmyst_Classic/Grubdigger.lua

@@ -5,41 +5,15 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
-    local Level = GetLevel(NPC)
-    local level1 = 15
-    local level2 = 16
-    local level3 = 17
-    local difficulty1 = 8
-    local hp1 = 2985
-    local power1 = 800
-    local difficulty2 = 8
-    local hp2 = 3410
-    local power2 = 840
-    local difficulty3 =8
-    local hp3 = 3990
-    local power3 = 910
-    if Level == level1 then
-    SpawnSet(NPC, "difficulty", difficulty1)
-    SpawnSet(NPC, "hp", hp1)
-    SpawnSet(NPC, "power", power1)
-    elseif Level == level2
-        then
-    SpawnSet(NPC, "difficulty", difficulty2)
-    SpawnSet(NPC, "hp", hp2)
-    SpawnSet(NPC, "power", power2)
-     elseif Level == level3
-        then
-    SpawnSet(NPC, "difficulty", difficulty3)
-    SpawnSet(NPC, "hp", hp3)
-    SpawnSet(NPC, "power", power3)
-    end
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(30 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(30 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))
-waypoints(NPC)
+    AddTimer(NPC, 6000, "waypoints")
 end
 end
 
 
 
 

+ 3 - 1
server/SpawnScripts/Oakmyst_Classic/Madeline.lua

@@ -8,8 +8,10 @@
 
 
 dofile("SpawnScripts/Generic/AdvancementGaze.lua")
 dofile("SpawnScripts/Generic/AdvancementGaze.lua")
 dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
 dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
+    NPCModule(NPC, Spawn)
 	SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
 	SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
 end
 end
 
 

+ 3 - 1
server/SpawnScripts/Oakmyst_Classic/NAlmiatheCorruptor.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(5 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(5 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(15 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(15 + dmgMod))

+ 5 - 23
server/SpawnScripts/Oakmyst_Classic/Rotweed.lua

@@ -5,29 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
-    local Level = GetLevel(NPC)
-    local level1 = 13
-    local level2 = 14
-    local difficulty1 = 8
-    local hp1 = 1770
-    local power1 = 485
-    local difficulty2 = 8
-    local hp2 = 1990
-    local power2 = 530
-    if Level == level1 then
-    SpawnSet(NPC, "difficulty", difficulty1)
-    SpawnSet(NPC, "hp", hp1)
-    SpawnSet(NPC, "power", power1)
-    elseif Level == level2
-        then
-    SpawnSet(NPC, "difficulty", difficulty2)
-    SpawnSet(NPC, "hp", hp2)
-    SpawnSet(NPC, "power", power2)
-    end
-    
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(12 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(12 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(24 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(24 + dmgMod))
@@ -42,8 +24,8 @@ function aggrotimer(NPC)
 local Rotweed = GetSpawnByLocationID(zone, 133779140)
 local Rotweed = GetSpawnByLocationID(zone, 133779140)
     if IsInCombat(Rotweed) and Rotweed ~=nil then
     if IsInCombat(Rotweed) and Rotweed ~=nil then
     else
     else
-    Despawn(Rotweed) --Despawns Thistles and Cube, which disables update
-end
+        Despawn(Rotweed) --Despawns Thistles and Cube, which disables update
+    end
 end
 end
 
 
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)

+ 3 - 1
server/SpawnScripts/Oakmyst_Classic/Solas.lua

@@ -7,8 +7,10 @@
 --]]
 --]]
 dofile("SpawnScripts/Generic/AdvancementGaze.lua")
 dofile("SpawnScripts/Generic/AdvancementGaze.lua")
 dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
 dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
+    NPCModule(NPC, Spawn)
 	SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
 	SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
 end
 end
 
 

+ 3 - 1
server/SpawnScripts/Oakmyst_Classic/Truesteel.lua

@@ -7,8 +7,10 @@
 --]]
 --]]
 dofile("SpawnScripts/Generic/AdvancementGaze.lua")
 dofile("SpawnScripts/Generic/AdvancementGaze.lua")
 dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
 dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
+    NPCModule(NPC, Spawn)
 	SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
 	SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
 end
 end
 
 

+ 3 - 1
server/SpawnScripts/Peatbog_Classic/Bashmouth.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(10 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(10 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(22 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(22 + dmgMod))

+ 4 - 4
server/SpawnScripts/Peatbog_Classic/Lurkblister.lua

@@ -5,15 +5,15 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(30 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(30 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(60 + dmgMod))
-
-waypoints(NPC)
-
+    AddTimer(NPC, 6000, "waypoints")
 end
 end
 
 
 function waypoints(NPC)
 function waypoints(NPC)

+ 3 - 1
server/SpawnScripts/Peatbog_Classic/QueenEzeldra.lua

@@ -6,9 +6,11 @@
                    : 
                    : 
 --]]
 --]]
 dofile("SpawnScripts/Generic/MonsterCallouts/Fairy_PeatBog.lua")
 dofile("SpawnScripts/Generic/MonsterCallouts/Fairy_PeatBog.lua")
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(12 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(12 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(24 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(24 + dmgMod))

+ 3 - 1
server/SpawnScripts/Peatbog_Classic/Sicklejaw.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(18 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(18 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(32 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(32 + dmgMod))

+ 3 - 1
server/SpawnScripts/Peatbog_Classic/Stonegnasher.lua

@@ -5,9 +5,11 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/NPCModule"
 
 
-function spawn(NPC)
+function spawn(NPC, Spawn)
     dmgMod = GetStr(NPC)/10
     dmgMod = GetStr(NPC)/10
+    Named(NPC)
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "override_primary_weapon", 1)        
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(15 + dmgMod)) 
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))
     SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(26 + dmgMod))

部分文件因文件數量過多而無法顯示