From ab07388de88799b11c5049eb86f4372154f367a0 Mon Sep 17 00:00:00 2001 From: CriticalXI Date: Tue, 4 Mar 2025 15:02:40 -0700 Subject: [PATCH] [lua, sql] Ro'Maeve NM Audit --- scripts/globals/mobs.lua | 7 ++- scripts/zones/RoMaeve/mobs/Magic_Flagon.lua | 51 +++++++++++++++++-- scripts/zones/RoMaeve/mobs/Martinet.lua | 27 +++++++++- scripts/zones/RoMaeve/mobs/Nargun.lua | 29 +++++++++++ scripts/zones/RoMaeve/mobs/Nightmare_Vase.lua | 6 +++ .../zones/RoMaeve/mobs/Rogue_Receptacle.lua | 13 ++++- .../zones/RoMaeve/mobs/Shikigami_Weapon.lua | 2 + sql/mob_groups.sql | 8 +-- sql/mob_pools.sql | 2 +- sql/mob_skill_lists.sql | 3 +- sql/mob_spawn_points.sql | 4 +- sql/nm_spawn_points.sql | 7 --- 12 files changed, 136 insertions(+), 23 deletions(-) diff --git a/scripts/globals/mobs.lua b/scripts/globals/mobs.lua index f5174883cd6..283eb7ca6be 100644 --- a/scripts/globals/mobs.lua +++ b/scripts/globals/mobs.lua @@ -124,7 +124,12 @@ xi.mob.phOnDespawn = function(ph, phList, chance, cooldown, params) -- This is a temporary solution until all NMs have been updated to use params.spawnPoints and moved out of sql if params.spawnPoints then - xi.mob.updateNMSpawnPoint(nm, params.spawnPoints) + if params.spawnPoints[nmId] then -- Special check for NMs with multiple IDs + xi.mob.updateNMSpawnPoint(nm, params.spawnPoints[nmId]) + else + xi.mob.updateNMSpawnPoint(nm, params.spawnPoints) + end + params.noPosUpdate = true -- If we have a table of spawn points, we don't need to run UpdateNMSpawnPoint() end diff --git a/scripts/zones/RoMaeve/mobs/Magic_Flagon.lua b/scripts/zones/RoMaeve/mobs/Magic_Flagon.lua index a00d62cf54f..3e0df46cbb0 100644 --- a/scripts/zones/RoMaeve/mobs/Magic_Flagon.lua +++ b/scripts/zones/RoMaeve/mobs/Magic_Flagon.lua @@ -2,16 +2,59 @@ -- Area: RoMaeve -- Mob: Magic Flagon -- Note: PH for Nightmare Vase and Rogue Receptacle +-- TODO: Nightmare Vase and Rogue Receptacle PHs should be in spawn groups ----------------------------------- local ID = zones[xi.zone.ROMAEVE] ----------------------------------- ---@type TMobEntity local entity = {} +local nightmareSpawnPoints = +{ + [ID.mob.NIGHTMARE_VASE[1]] = + { + { x = -31.029, y = -5.200, z = -7.555 }, + { x = -38.892, y = -6.000, z = -0.706 }, + { x = -42.628, y = -5.200, z = -9.417 }, + { x = -55.255, y = -5.555, z = 24.697 }, + { x = -65.535, y = -6.000, z = 15.072 }, + { x = -71.796, y = -5.200, z = 21.319 }, + { x = -93.556, y = -6.000, z = -0.131 }, + { x = -102.526, y = -5.200, z = 3.657 }, + { x = -105.634, y = -5.200, z = -7.916 }, + }, + + [ID.mob.NIGHTMARE_VASE[2]] = + { + { x = 68.198, y = -5.600, z = 17.087 }, + { x = 62.997, y = -5.200, z = 24.771 }, + { x = 54.403, y = -5.424, z = 18.799 }, + { x = 44.904, y = -5.952, z = -4.392 }, + { x = 37.619, y = -5.200, z = -10.822 }, + { x = 33.296, y = -5.692, z = 0.800 }, + { x = 105.164, y = -5.600, z = -4.998 }, + { x = 104.359, y = -5.200, z = 6.807 }, + { x = 93.207, y = -6.000, z = -0.404 }, + }, +} + local nightmarePHTable = { - [ID.mob.NIGHTMARE_VASE[1] - 1] = ID.mob.NIGHTMARE_VASE[1], -- -101.575 -6.099 -1.520 (west) - [ID.mob.NIGHTMARE_VASE[2] - 5] = ID.mob.NIGHTMARE_VASE[2], -- 59.825 -5.760 25.123 (east) (Needs Audit) + [ID.mob.NIGHTMARE_VASE[1] - 5] = ID.mob.NIGHTMARE_VASE[1], + [ID.mob.NIGHTMARE_VASE[1] - 3] = ID.mob.NIGHTMARE_VASE[1], + [ID.mob.NIGHTMARE_VASE[1] - 1] = ID.mob.NIGHTMARE_VASE[1], + [ID.mob.NIGHTMARE_VASE[2] - 5] = ID.mob.NIGHTMARE_VASE[2], + [ID.mob.NIGHTMARE_VASE[2] - 3] = ID.mob.NIGHTMARE_VASE[2], + [ID.mob.NIGHTMARE_VASE[2] - 1] = ID.mob.NIGHTMARE_VASE[2], +} + +local rogueSpawnPoints = +{ + { x = 219.800, y = -3.200, z = -41.220 }, + { x = -307.000, y = 2.000, z = 216.000 }, + { x = -299.000, y = 0.000, z = 192.000 }, + { x = -334.000, y = 3.000, z = 182.000 }, + { x = -301.000, y = 0.000, z = 166.000 }, } local roguePHTable = @@ -25,8 +68,8 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, nightmarePHTable, 10, 3600) -- 1 hour - xi.mob.phOnDespawn(mob, roguePHTable, 10, 7200) -- 2 hour + xi.mob.phOnDespawn(mob, nightmarePHTable, 10, 3600, { spawnPoints = nightmareSpawnPoints }) -- 1 hour + xi.mob.phOnDespawn(mob, roguePHTable, 10, 7200, { spawnPoints = rogueSpawnPoints }) -- 2 hour end return entity diff --git a/scripts/zones/RoMaeve/mobs/Martinet.lua b/scripts/zones/RoMaeve/mobs/Martinet.lua index 0e2a883cd76..f363bedb2f6 100644 --- a/scripts/zones/RoMaeve/mobs/Martinet.lua +++ b/scripts/zones/RoMaeve/mobs/Martinet.lua @@ -5,10 +5,33 @@ ---@type TMobEntity local entity = {} +local spawnPoints = +{ + { x = -187.611, y = -8.000, z = -35.805 }, + { x = -196.069, y = -8.000, z = -36.258 }, + { x = -199.632, y = -8.000, z = -46.155 }, + { x = -189.160, y = -8.000, z = -49.926 }, + { x = -191.781, y = -8.808, z = -38.077 }, + { x = -189.696, y = -8.500, z = -33.497 }, +} + entity.onMobInitialize = function(mob) mob:setMobMod(xi.mobMod.AUTO_SPIKES, 1) + mob:addImmunity(xi.immunity.BIND) + mob:addImmunity(xi.immunity.DARK_SLEEP) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.GRAVITY) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) mob:addStatusEffect(xi.effect.SHOCK_SPIKES, 60, 0, 0) mob:getStatusEffect(xi.effect.SHOCK_SPIKES):setEffectFlags(xi.effectFlag.DEATH) + + xi.mob.updateNMSpawnPoint(mob, spawnPoints) + mob:setRespawnTime(7200) +end + +entity.onMobSpawn = function(mob) + mob:setMod(xi.mod.STORETP, 80) end entity.onSpikesDamage = function(mob, target, damage) @@ -34,8 +57,8 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - -- UpdateNMSpawnPoint(mob:getID()) - -- mob:setRespawnTime(math.random(?, ?)) -- Uncertain repop time + xi.mob.updateNMSpawnPoint(mob, spawnPoints) + mob:setRespawnTime(7200) end return entity diff --git a/scripts/zones/RoMaeve/mobs/Nargun.lua b/scripts/zones/RoMaeve/mobs/Nargun.lua index 05ab29770dc..8f487dc0068 100644 --- a/scripts/zones/RoMaeve/mobs/Nargun.lua +++ b/scripts/zones/RoMaeve/mobs/Nargun.lua @@ -5,8 +5,32 @@ ---@type TMobEntity local entity = {} +local spawnPoints = +{ + { x = -107.888, y = 4.000, z = 112.399 }, + { x = -111.739, y = 4.000, z = 114.772 }, + { x = -119.399, y = 4.000, z = 109.537 }, + { x = -127.626, y = 4.000, z = 106.828 }, + { x = -143.349, y = 4.000, z = 108.313 }, + { x = -147.202, y = 4.000, z = 99.363 }, + { x = -144.044, y = 4.000, z = 90.136 }, +} + entity.onMobInitialize = function(mob) mob:setMobMod(xi.mobMod.ADD_EFFECT, 1) + mob:addImmunity(xi.immunity.BIND) + mob:addImmunity(xi.immunity.DARK_SLEEP) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.GRAVITY) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) + + xi.mob.updateNMSpawnPoint(mob, spawnPoints) + mob:setRespawnTime(7200) +end + +entity.onMobSpawn = function(mob) + mob:setMod(xi.mod.STORETP, 135) end entity.onAdditionalEffect = function(mob, target, damage) @@ -17,4 +41,9 @@ entity.onMobDeath = function(mob, player, optParams) xi.hunts.checkHunt(mob, player, 330) end +entity.onMobDespawn = function(mob) + xi.mob.updateNMSpawnPoint(mob, spawnPoints) + mob:setRespawnTime(7200) +end + return entity diff --git a/scripts/zones/RoMaeve/mobs/Nightmare_Vase.lua b/scripts/zones/RoMaeve/mobs/Nightmare_Vase.lua index c3f87d5902e..f473f5a74ed 100644 --- a/scripts/zones/RoMaeve/mobs/Nightmare_Vase.lua +++ b/scripts/zones/RoMaeve/mobs/Nightmare_Vase.lua @@ -5,6 +5,12 @@ ---@type TMobEntity local entity = {} +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.DARK_SLEEP) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.TERROR) +end + entity.onMobDeath = function(mob, player, optParams) xi.hunts.checkHunt(mob, player, 327) end diff --git a/scripts/zones/RoMaeve/mobs/Rogue_Receptacle.lua b/scripts/zones/RoMaeve/mobs/Rogue_Receptacle.lua index 46995587c08..f1de823a643 100644 --- a/scripts/zones/RoMaeve/mobs/Rogue_Receptacle.lua +++ b/scripts/zones/RoMaeve/mobs/Rogue_Receptacle.lua @@ -1,16 +1,27 @@ ----------------------------------- -- Area: RoMaeve -- NM: Rogue Receptacle +-- WOTG Nov 2009 NM: Immune to Bind, Sleep, Gravity. Uses only 1 TP move. ----------------------------------- ---@type TMobEntity local entity = {} entity.onMobInitialize = function(mob) mob:setMobMod(xi.mobMod.ADD_EFFECT, 1) + mob:addImmunity(xi.immunity.BIND) + mob:addImmunity(xi.immunity.DARK_SLEEP) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.GRAVITY) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) +end + +entity.onMobSpawn = function(mob) + mob:setMod(xi.mod.STORETP, 20) end entity.onAdditionalEffect = function(mob, target, damage) - return xi.mob.onAddEffect(mob, target, damage, xi.mob.ae.ENLIGHT) + return xi.mob.onAddEffect(mob, target, damage, xi.mob.ae.ENLIGHT, { chance = 100 }) end entity.onMobDeath = function(mob, player, optParams) diff --git a/scripts/zones/RoMaeve/mobs/Shikigami_Weapon.lua b/scripts/zones/RoMaeve/mobs/Shikigami_Weapon.lua index 4c786fa913c..e2174efbd73 100644 --- a/scripts/zones/RoMaeve/mobs/Shikigami_Weapon.lua +++ b/scripts/zones/RoMaeve/mobs/Shikigami_Weapon.lua @@ -1,6 +1,8 @@ ----------------------------------- -- Area: RoMaeve -- NM: Shikigami Weapon +-- TODO: Needs additional spawn points added along with pathfind being adjusted +-- to path to the nearest pos in pathNodes on spawn and disengage ----------------------------------- ---@type TMobEntity local entity = {} diff --git a/sql/mob_groups.sql b/sql/mob_groups.sql index b4ba654b2c5..0f1d72ba5d5 100644 --- a/sql/mob_groups.sql +++ b/sql/mob_groups.sql @@ -8817,16 +8817,16 @@ INSERT INTO `mob_groups` VALUES (5,623,122,'Cannonball',330,8,216,0,0,66,70,0); INSERT INTO `mob_groups` VALUES (6,4309,122,'Water_Elemental',330,4,2629,0,0,67,69,0); INSERT INTO `mob_groups` VALUES (7,2476,122,'Magic_Flagon',330,0,1565,0,0,64,69,0); INSERT INTO `mob_groups` VALUES (8,3912,122,'Thunder_Elemental',330,4,2410,0,0,67,69,0); -INSERT INTO `mob_groups` VALUES (9,2873,122,'Nightmare_Vase',0,32,1806,7000,0,72,73,0); +INSERT INTO `mob_groups` VALUES (9,2873,122,'Nightmare_Vase',0,32,1806,8000,0,70,73,0); INSERT INTO `mob_groups` VALUES (10,199,122,'Apocalyptic_Weapon',330,0,0,0,0,78,80,0); INSERT INTO `mob_groups` VALUES (11,2077,122,'Infernal_Weapon',330,0,0,9600,0,79,81,0); INSERT INTO `mob_groups` VALUES (12,5426,122,'Martinet',7200,0,2946,0,0,72,74,0); INSERT INTO `mob_groups` VALUES (13,2793,122,'Mythril_Golem',330,0,1765,0,0,68,70,0); INSERT INTO `mob_groups` VALUES (14,906,122,'Darksteel_Golem',330,0,565,0,0,80,82,0); -INSERT INTO `mob_groups` VALUES (15,3420,122,'Rogue_Receptacle',0,32,3086,0,0,67,67,0); -INSERT INTO `mob_groups` VALUES (16,5842,122,'Nargun',7200,0,3321,0,0,77,79,0); +INSERT INTO `mob_groups` VALUES (15,3420,122,'Rogue_Receptacle',0,32,3086,7000,0,67,68,0); +INSERT INTO `mob_groups` VALUES (16,5842,122,'Nargun',7200,0,3321,11000,0,77,79,0); INSERT INTO `mob_groups` VALUES (17,1194,122,'Eldhrimnir',0,128,0,0,0,76,78,0); -INSERT INTO `mob_groups` VALUES (18,3603,122,'Shikigami_Weapon',76500,0,2237,0,0,77,80,0); +INSERT INTO `mob_groups` VALUES (18,3603,122,'Shikigami_Weapon',76500,0,2237,14000,0,77,80,0); INSERT INTO `mob_groups` VALUES (19,2117,122,'Jackpot',0,128,0,0,0,1,1,0); -- TODO: capture level from retail INSERT INTO `mob_groups` VALUES (20,4727,122,'Mimic_King',0,128,0,0,9999,93,95,0); INSERT INTO `mob_groups` VALUES (21,4726,122,'Mimic_Jester',0,128,0,0,9999,90,91,0); diff --git a/sql/mob_pools.sql b/sql/mob_pools.sql index bd02a1b7cf4..59bb5f5ce09 100644 --- a/sql/mob_pools.sql +++ b/sql/mob_pools.sql @@ -3473,7 +3473,7 @@ INSERT INTO `mob_pools` VALUES (3416,'Ruminator','Ruminator',241,0x0000680400000 INSERT INTO `mob_pools` VALUES (3417,'Russet_Rarab','Russet_Rarab',206,0x00000C0100000000000000000000000000000000,1,1,3,240,100,0,0,0,1,0,0,0,0,129,0,0,0,0,0,206,206); INSERT INTO `mob_pools` VALUES (3418,'Ruszor','Ruszor',211,0x0000AF0800000000000000000000000000000000,1,1,0,240,100,0,0,0,0,0,0,0,558,129,4,0,0,0,0,211,211); INSERT INTO `mob_pools` VALUES (3419,'Rutrix_Hamgams','Rutrix_Hamgams',373,0x0000400400000000000000000000000000000000,9,9,5,240,100,0,1,0,1,2,0,32,0,159,0,0,0,0,0,373,373); -INSERT INTO `mob_pools` VALUES (3420,'Rogue_Receptacle','Rogue_Receptacle',175,0x00009C0100000000000000000000000000000000,6,6,7,240,100,0,1,0,0,2,6150,0,0,3,0,0,0,0,0,175,175); +INSERT INTO `mob_pools` VALUES (3420,'Rogue_Receptacle','Rogue_Receptacle',175,0x00009C0100000000000000000000000000000000,6,6,7,240,100,0,1,0,0,2,6150,0,0,3,0,0,0,0,0,421,175); INSERT INTO `mob_pools` VALUES (3421,'RuBha_Stonewall','RuBha_Stonewall',337,0x0000510800000000000000000000000000000000,1,1,0,240,100,0,0,0,0,0,0,0,7,0,0,0,0,0,0,337,337); INSERT INTO `mob_pools` VALUES (3422,'Ruphuabo','Ruphuabo',194,0x0000830400000000000000000000000000000000,1,1,7,280,100,0,1,1,1,0,0,0,0,0,1,0,0,0,0,194,194); INSERT INTO `mob_pools` VALUES (3423,'Ryy_Qihi_the_Idolrobber','Ryy_Qihi_the_Idolrobber',360,0x0000390400000000000000000000000000000000,6,6,2,240,100,0,1,0,1,2,0,32,0,159,0,0,0,0,0,360,360); diff --git a/sql/mob_skill_lists.sql b/sql/mob_skill_lists.sql index 3f13c5bc7d5..01d553aa761 100644 --- a/sql/mob_skill_lists.sql +++ b/sql/mob_skill_lists.sql @@ -1945,7 +1945,8 @@ INSERT INTO `mob_skill_lists` VALUES ('Barbaric_Weapon',417,514); -- Whirl of Ra INSERT INTO `mob_skill_lists` VALUES ('Picolaton',418,403); -- Stormwind INSERT INTO `mob_skill_lists` VALUES ('Dahu',419,802); -- Great Sandstorm INSERT INTO `mob_skill_lists` VALUES ('Huwasi',420,678); -- Crystal Rain --- 421 to 435: free +INSERT INTO `mob_skill_lists` VALUES ('Rogue_Receptacle',421,520); -- Double Ray +-- 422 to 435: free INSERT INTO `mob_skill_lists` VALUES ('Bloodlapper',436,2162); INSERT INTO `mob_skill_lists` VALUES ('Ghillie_Dhu',437,685); INSERT INTO `mob_skill_lists` VALUES ('Highlander_Lizard',438,371); diff --git a/sql/mob_spawn_points.sql b/sql/mob_spawn_points.sql index 8535655e52f..34b72f53722 100644 --- a/sql/mob_spawn_points.sql +++ b/sql/mob_spawn_points.sql @@ -43752,7 +43752,7 @@ INSERT INTO `mob_spawn_points` VALUES (17277007,'Water_Elemental','Water Element INSERT INTO `mob_spawn_points` VALUES (17277008,'Apocalyptic_Weapon','Apocalyptic Weapon',10,-202.351,-8.500,-46.018,127); INSERT INTO `mob_spawn_points` VALUES (17277009,'Infernal_Weapon','Infernal Weapon',11,-200.057,-8.500,-38.039,58); INSERT INTO `mob_spawn_points` VALUES (17277010,'Cursed_Puppet','Cursed Puppet',4,-190.027,-8.499,-34.157,127); -INSERT INTO `mob_spawn_points` VALUES (17277011,'Martinet','Martinet',12,-196.000,-8.000,-48.000,32); -- Pos data needs correction +INSERT INTO `mob_spawn_points` VALUES (17277011,'Martinet','Martinet',12,-189.696,-8.500,-33.497,32); INSERT INTO `mob_spawn_points` VALUES (17277012,'Apocalyptic_Weapon','Apocalyptic Weapon',10,-163.567,-8.499,-21.382,127); INSERT INTO `mob_spawn_points` VALUES (17277013,'Infernal_Weapon','Infernal Weapon',11,-185.180,-8.500,-12.199,16); INSERT INTO `mob_spawn_points` VALUES (17277014,'Cursed_Puppet','Cursed Puppet',4,-79.223,-11.480,60.435,115); @@ -43844,7 +43844,7 @@ INSERT INTO `mob_spawn_points` VALUES (17277099,'Magic_Flagon','Magic Flagon',7, INSERT INTO `mob_spawn_points` VALUES (17277100,'Apocalyptic_Weapon','Apocalyptic Weapon',10,-158.640,-7.837,50.393,127); INSERT INTO `mob_spawn_points` VALUES (17277101,'Infernal_Weapon','Infernal Weapon',11,-150.077,3.500,108.614,127); INSERT INTO `mob_spawn_points` VALUES (17277102,'Darksteel_Golem','Darksteel Golem',14,-143.373,3.499,101.769,127); -INSERT INTO `mob_spawn_points` VALUES (17277103,'Nargun','Nargun',16,-171.571,3.884,108.852,127); +INSERT INTO `mob_spawn_points` VALUES (17277103,'Nargun','Nargun',16,-127.626,4.000,106.828,127); INSERT INTO `mob_spawn_points` VALUES (17277104,'Apocalyptic_Weapon','Apocalyptic Weapon',10,-162.479,2.352,85.123,127); INSERT INTO `mob_spawn_points` VALUES (17277105,'Darksteel_Golem','Darksteel Golem',14,-172.296,3.167,71.227,83); INSERT INTO `mob_spawn_points` VALUES (17277106,'Apocalyptic_Weapon','Apocalyptic Weapon',10,209.381,-4.499,65.228,61); diff --git a/sql/nm_spawn_points.sql b/sql/nm_spawn_points.sql index 935fd5d4012..24efb47af5c 100644 --- a/sql/nm_spawn_points.sql +++ b/sql/nm_spawn_points.sql @@ -1554,13 +1554,6 @@ INSERT INTO `nm_spawn_points` VALUES (17269106,47,304.025,0.638,-326.122); INSERT INTO `nm_spawn_points` VALUES (17269106,48,248.637,-0.510,-355.112); INSERT INTO `nm_spawn_points` VALUES (17269106,49,321.210,0.000,-282.105); INSERT INTO `nm_spawn_points` VALUES (17273278,0,-391.184,-0.269,-159.086); -INSERT INTO `nm_spawn_points` VALUES (17276982,0,-108.575,-5.699,-5.432); -- Nightmare Vase (west) -INSERT INTO `nm_spawn_points` VALUES (17276992,0,69.000,-5.000,21.000); -- Nightmare Vase (east) -INSERT INTO `nm_spawn_points` VALUES (17277079,0,219.800,-3.200,-41.220); -- Rogue Receptacle -INSERT INTO `nm_spawn_points` VALUES (17281061,0,-307.000,2.000,216.000); -INSERT INTO `nm_spawn_points` VALUES (17281061,1,-299.000,0.000,192.000); -INSERT INTO `nm_spawn_points` VALUES (17281061,2,-334.000,3.000,182.000); -INSERT INTO `nm_spawn_points` VALUES (17281061,3,-301.000,0.000,166.000); INSERT INTO `nm_spawn_points` VALUES (17281149,0,-279.575,3.317,16.011); -- Mischievous Micholas INSERT INTO `nm_spawn_points` VALUES (17281281,0,-404.454,17.021,-378.4268); -- Meww the Turtlerider INSERT INTO `nm_spawn_points` VALUES (17281281,1,-426.268,17.000,-398.5605);