From a889a2a10afdc4afd2d8d6f0b61780f944606cb8 Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Sat, 4 May 2024 01:30:03 -0400 Subject: [PATCH 1/8] Shift-proof Southern San dOria and [S] Shift-proof Southern San dOria and [S] --- scripts/zones/Southern_San_dOria/IDs.lua | 4 ++-- scripts/zones/Southern_San_dOria_[S]/IDs.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/zones/Southern_San_dOria/IDs.lua b/scripts/zones/Southern_San_dOria/IDs.lua index 91b70b0c20f..f02c9e2fb9f 100644 --- a/scripts/zones/Southern_San_dOria/IDs.lua +++ b/scripts/zones/Southern_San_dOria/IDs.lua @@ -130,8 +130,8 @@ zones[xi.zone.SOUTHERN_SAN_DORIA] = [17719306] = 46, -- Apairemant [17719493] = 49, -- Pourette }, - LUSIANE = 17719350, - ARPETION = 17719409, + LUSIANE = GetFirstID('Lusiane'), + ARPETION = GetFirstID('Arpetion'), }, } diff --git a/scripts/zones/Southern_San_dOria_[S]/IDs.lua b/scripts/zones/Southern_San_dOria_[S]/IDs.lua index eefea9255ca..86c955238a2 100644 --- a/scripts/zones/Southern_San_dOria_[S]/IDs.lua +++ b/scripts/zones/Southern_San_dOria_[S]/IDs.lua @@ -63,7 +63,7 @@ zones[xi.zone.SOUTHERN_SAN_DORIA_S] = npc = { CAMPAIGN_NPC_OFFSET = GetFirstID('Saphiriance_TK'), -- San, Bas, Win, Flag +4, CA - SHIXO = 17105700, + SHIXO = GetFirstID('Shixo'), }, } From 3061a783ca196d53b593860788df69d1343e719d Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Sat, 4 May 2024 01:30:23 -0400 Subject: [PATCH 2/8] Shift-proof South Gustaberg Shift-proof South Gustaberg --- scripts/zones/South_Gustaberg/IDs.lua | 21 +++---------------- .../South_Gustaberg/mobs/Ornery_Sheep.lua | 15 ++++++++++++- .../South_Gustaberg/mobs/Rock_Lizard.lua | 8 ++++++- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/scripts/zones/South_Gustaberg/IDs.lua b/scripts/zones/South_Gustaberg/IDs.lua index 760224fc557..9a0b8d1cd74 100644 --- a/scripts/zones/South_Gustaberg/IDs.lua +++ b/scripts/zones/South_Gustaberg/IDs.lua @@ -41,24 +41,9 @@ zones[xi.zone.SOUTH_GUSTABERG] = }, mob = { - CARNERO_PH = - { - [17215638] = 17215626, -- 277.891 -39.854 -413.354 - [17215611] = 17215626, -- 186.081 -39.990 -367.942 - [17215612] = 17215626, -- 164.245 -39.900 -347.878 - [17215624] = 17215626, -- 160.304 -39.990 -460.400 - [17215625] = 17215626, -- 201.021 -39.904 -500.721 - [17215646] = 17215626, -- 275.135 -39.977 -477.840 - [17215645] = 17215626, -- 274.561 -39.972 -476.762 - [17215648] = 17215626, -- 213.010 -59.983 -442.766 - [17215649] = 17215626, -- 211.745 -59.938 -441.313 - }, - LEAPING_LIZZY_PH = - { - [17215867] = 17215868, -- -275.441 20.451 -347.294 - [17215887] = 17215888, -- -322.871 30.052 -401.184 - }, - BUBBLY_BERNIE = 17215494, + CARNERO = GetFirstID('Carnero'), -- TODO: Implement both NMs, there are 2 IDs + LEAPING_LIZZY = GetTableOfIDs('Leaping_Lizzy'), + BUBBLY_BERNIE = GetFirstID('Bubbly_Bernie'), }, npc = { diff --git a/scripts/zones/South_Gustaberg/mobs/Ornery_Sheep.lua b/scripts/zones/South_Gustaberg/mobs/Ornery_Sheep.lua index e278229c95d..fdf2475e876 100644 --- a/scripts/zones/South_Gustaberg/mobs/Ornery_Sheep.lua +++ b/scripts/zones/South_Gustaberg/mobs/Ornery_Sheep.lua @@ -7,11 +7,24 @@ local ID = zones[xi.zone.SOUTH_GUSTABERG] ----------------------------------- local entity = {} +local carneroPHTable = +{ + [ID.mob.CARNERO - 2] = ID.mob.CARNERO, -- 186.081 -39.990 -367.942 + [ID.mob.CARNERO - 1] = ID.mob.CARNERO, -- 164.245 -39.900 -347.878 + [ID.mob.CARNERO + 11] = ID.mob.CARNERO, -- 160.304 -39.990 -460.400 + [ID.mob.CARNERO + 12] = ID.mob.CARNERO, -- 201.021 -39.904 -500.721 + [ID.mob.CARNERO + 25] = ID.mob.CARNERO, -- 277.891 -39.854 -413.354 + [ID.mob.CARNERO + 32] = ID.mob.CARNERO, -- 274.561 -39.972 -476.762 + [ID.mob.CARNERO + 33] = ID.mob.CARNERO, -- 275.135 -39.977 -477.840 + [ID.mob.CARNERO + 35] = ID.mob.CARNERO, -- 213.010 -59.983 -442.766 + [ID.mob.CARNERO + 36] = ID.mob.CARNERO, -- 211.745 -59.938 -441.313 +} + entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.CARNERO_PH, 5, 1) -- Pure lottery + xi.mob.phOnDespawn(mob, carneroPHTable, 5, 1) -- Pure lottery end return entity diff --git a/scripts/zones/South_Gustaberg/mobs/Rock_Lizard.lua b/scripts/zones/South_Gustaberg/mobs/Rock_Lizard.lua index 6f8b430dba7..eaf2f0fab72 100644 --- a/scripts/zones/South_Gustaberg/mobs/Rock_Lizard.lua +++ b/scripts/zones/South_Gustaberg/mobs/Rock_Lizard.lua @@ -7,12 +7,18 @@ local ID = zones[xi.zone.SOUTH_GUSTABERG] ----------------------------------- local entity = {} +local lizzyPHTable = +{ + [ID.mob.LEAPING_LIZZY[1] - 1] = ID.mob.LEAPING_LIZZY[1], -- -275.441 20.451 -347.294 + [ID.mob.LEAPING_LIZZY[2] - 1] = ID.mob.LEAPING_LIZZY[2], -- -322.871 30.052 -401.184 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 80, 1, xi.regime.type.FIELDS) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.LEAPING_LIZZY_PH, 9, 1) -- Pure Lottery + xi.mob.phOnDespawn(mob, lizzyPHTable, 9, 1) -- Pure Lottery end return entity From 16eb981fd34ee0c91b8a26ee9d0506eb3d0ed7b6 Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Sat, 4 May 2024 01:30:50 -0400 Subject: [PATCH 3/8] Shift-proof Ships --- scripts/zones/Ship_bound_for_Mhaura_Pirates/IDs.lua | 6 ++---- scripts/zones/Ship_bound_for_Selbina/IDs.lua | 2 +- scripts/zones/Ship_bound_for_Selbina_Pirates/IDs.lua | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/zones/Ship_bound_for_Mhaura_Pirates/IDs.lua b/scripts/zones/Ship_bound_for_Mhaura_Pirates/IDs.lua index 750588a48c3..f2b3d9f43d0 100644 --- a/scripts/zones/Ship_bound_for_Mhaura_Pirates/IDs.lua +++ b/scripts/zones/Ship_bound_for_Mhaura_Pirates/IDs.lua @@ -23,10 +23,8 @@ zones[xi.zone.SHIP_BOUND_FOR_MHAURA_PIRATES] = }, mob = { - WIGHT = 17711120, - SILVERHOOK = 17711121, - SEA_MONK = 17682442, - SEA_HORROR = 17682446, + WIGHT = GetFirstID('Ship_Wight'), + SILVERHOOK = GetFirstID('Silverhook'), }, npc = { diff --git a/scripts/zones/Ship_bound_for_Selbina/IDs.lua b/scripts/zones/Ship_bound_for_Selbina/IDs.lua index f41da78f05d..485e4059303 100644 --- a/scripts/zones/Ship_bound_for_Selbina/IDs.lua +++ b/scripts/zones/Ship_bound_for_Selbina/IDs.lua @@ -23,7 +23,7 @@ zones[xi.zone.SHIP_BOUND_FOR_SELBINA] = }, mob = { - ENAGAKURE = 17678351, + ENAGAKURE = GetFirstID('Enagakure'), }, npc = { diff --git a/scripts/zones/Ship_bound_for_Selbina_Pirates/IDs.lua b/scripts/zones/Ship_bound_for_Selbina_Pirates/IDs.lua index e3fdd9ec761..84475ded385 100644 --- a/scripts/zones/Ship_bound_for_Selbina_Pirates/IDs.lua +++ b/scripts/zones/Ship_bound_for_Selbina_Pirates/IDs.lua @@ -23,8 +23,8 @@ zones[xi.zone.SHIP_BOUND_FOR_SELBINA_PIRATES] = }, mob = { - BLACKBEARD = 17707025, - SHIP_WIGHT = 17707024, + BLACKBEARD = GetFirstID('Blackbeard'), + SHIP_WIGHT = GetFirstID('Ship_Wight'), }, npc = { From 0a54afd9ba4fc84b7bc8a35a1fcdefb8a1bce7bb Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Sat, 4 May 2024 01:30:58 -0400 Subject: [PATCH 4/8] Shift-proof Selbina --- scripts/zones/Selbina/IDs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/zones/Selbina/IDs.lua b/scripts/zones/Selbina/IDs.lua index 487d13a36e8..e1c4c55a4a7 100644 --- a/scripts/zones/Selbina/IDs.lua +++ b/scripts/zones/Selbina/IDs.lua @@ -42,7 +42,7 @@ zones[xi.zone.SELBINA] = }, npc = { - EXPLORER_MOOGLE = 17793131, + EXPLORER_MOOGLE = GetFirstID('Explorer_Moogle'), }, } From 92997cb36fcbc88b5f514346c54ca820eb7d5f09 Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Sat, 4 May 2024 01:37:21 -0400 Subject: [PATCH 5/8] Shift-proof Sealions Den Shift-proof Sealions Den removed unnecessary ID checks that weren't being used --- scripts/zones/Sealions_Den/IDs.lua | 15 ++++----------- scripts/zones/Sealions_Den/mobs/Cherukiki.lua | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/scripts/zones/Sealions_Den/IDs.lua b/scripts/zones/Sealions_Den/IDs.lua index a1811e32fac..cb367ddb62b 100644 --- a/scripts/zones/Sealions_Den/IDs.lua +++ b/scripts/zones/Sealions_Den/IDs.lua @@ -26,20 +26,13 @@ zones[xi.zone.SEALIONS_DEN] = }, mob = { - ONE_TO_BE_FEARED_OFFSET = 16908289, - OMEGA_OFFSET = 16908294, - WARRIORS_PATH_OFFSET = 16908310, + ONE_TO_BE_FEARED_OFFSET = GetFirstID('Mammet-22_Zeta'), + OMEGA_OFFSET = GetFirstID('Omega'), + WARRIORS_PATH_OFFSET = GetFirstID('Tenzen'), }, npc = { - AIRSHIP_DOOR_OFFSET = 16908421, - }, - aWarriorsPath = - { - TENZEN_ID = 16908310, - MAKKI_SHAKKI_ID = 16908311, - KUKKI_CHEBUKKI_ID = 16908312, - CHERUKKI_ID = 16908313, + AIRSHIP_DOOR_OFFSET = GetFirstID('Airship_Door'), }, } diff --git a/scripts/zones/Sealions_Den/mobs/Cherukiki.lua b/scripts/zones/Sealions_Den/mobs/Cherukiki.lua index 4411a02f5f7..f627498d8f9 100644 --- a/scripts/zones/Sealions_Den/mobs/Cherukiki.lua +++ b/scripts/zones/Sealions_Den/mobs/Cherukiki.lua @@ -43,7 +43,7 @@ entity.onMobFight = function(mob, target) end end - local tenzenId = GetMobByID(ID.aWarriorsPath.TENZEN_ID + (bfID - 1)) + local tenzenId = GetMobByID(ID.aWarriorsPath.WARRIORS_PATH_OFFSET + (bfID - 1)) if tenzenId:getHPP() <= 70 and battlefield:getLocalVar('fireworks') == 0 From dea97530a958eacb594f0941a7c1944e2fc9139a Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Sat, 4 May 2024 01:39:27 -0400 Subject: [PATCH 6/8] Shift-proof Sea Serpent Grotto --- scripts/zones/Sea_Serpent_Grotto/IDs.lua | 91 ++++--------------- scripts/zones/Sea_Serpent_Grotto/Zone.lua | 5 +- .../Sea_Serpent_Grotto/mobs/Bog_Sahagin.lua | 7 +- .../Sea_Serpent_Grotto/mobs/Brook_Sahagin.lua | 8 +- .../mobs/Coastal_Sahagin.lua | 7 +- .../Sea_Serpent_Grotto/mobs/Delta_Sahagin.lua | 7 +- .../Sea_Serpent_Grotto/mobs/Devil_Manta.lua | 8 +- .../zones/Sea_Serpent_Grotto/mobs/Ghast.lua | 8 +- .../mobs/Lagoon_Sahagin.lua | 14 ++- .../Sea_Serpent_Grotto/mobs/Marsh_Sahagin.lua | 14 ++- .../mobs/Razorjaw_Pugil.lua | 8 +- .../mobs/Riparian_Sahagin.lua | 14 ++- .../Sea_Serpent_Grotto/mobs/Royal_Leech.lua | 8 +- .../mobs/Spring_Sahagin.lua | 7 +- .../Sea_Serpent_Grotto/mobs/Swamp_Sahagin.lua | 7 +- 15 files changed, 122 insertions(+), 91 deletions(-) diff --git a/scripts/zones/Sea_Serpent_Grotto/IDs.lua b/scripts/zones/Sea_Serpent_Grotto/IDs.lua index 36c5722308d..032cc744020 100644 --- a/scripts/zones/Sea_Serpent_Grotto/IDs.lua +++ b/scripts/zones/Sea_Serpent_Grotto/IDs.lua @@ -47,78 +47,25 @@ zones[xi.zone.SEA_SERPENT_GROTTO] = }, mob = { - MASAN_PH = - { - [17498155] = 17498159, -- 17.001 9.340 186.571 - [17498156] = 17498159, -- 18.702 9.512 183.594 - }, - NAMTAR_PH = - { - [17498178] = 17498184, -- -128.762 9.595 164.996 - [17498183] = 17498184, -- -157.606 9.905 168.518 - }, - WUUR_THE_SANDCOMBER_PH = - { - [17498195] = 17498199, -- 14.044 0.494 109.487 - }, - FYUU_THE_SEABELLOW_PH = - { - [17498266] = 17498269, -- 185.074 20.252 39.317 - }, - QULL_THE_SHELLBUSTER_PH = - { - [17498280] = 17498285, -- 348.293 10.133 -65.543 - [17498283] = 17498285, -- 363.430 10.578 -62.752 - }, - SEWW_THE_SQUIDLIMBED_PH = - { - [17498298] = 17498301, -- 232.828 9.860 63.214 - }, - PAHH_THE_GULLCALLER_PH = - { - [17498336] = 17498341, -- -13.532 21.301 -20.861 - }, - MOUU_THE_WAVERIDER_PH = - { - [17498355] = 17498356, -- -60.728 19.884 53.966 - }, - WORR_THE_CLAWFISTED_PH = - { - [17498410] = 17498413, -- -308.649 17.344 -52.316 - }, - SEA_HOG_PH = - { - [17498418] = 17498420, -- -221.455 9.542 -44.191 - [17498419] = 17498420, -- -249 10 -57 - }, - VOLL_THE_SHARKFINNED_PH = - { - [17498426] = 17498428, -- -337.035 16.950 -106.841 - }, - YARR_THE_PEARLEYED_PH = - { - [17498434] = 17498436, -- 1.654 19.914 -113.913 - }, - NOVV_THE_WHITEHEARTED_PH = - { - [17498444] = 17498445, - }, - DENN_THE_ORCAVOICED_PH = - { - [17498461] = 17498464, -- -102.127 9.797 -308.149 - }, - ZUUG_THE_SHORELEAPER_PH = - { - [17498512] = 17498516, - }, - CHARYBDIS_PH = - { - [17498518] = 17498522, -- -138.181, 48.389, -338.001 - [17498520] = 17498522, -- -212.407, 38.538, -342.544 - }, - MIMIC = 17498564, - WATER_LEAPER = 17498565, - GLYRYVILU = 17498566, + MASAN = GetFirstID('Masan'), + NAMTAR = GetFirstID('Namtar'), + WUUR_THE_SANDCOMBER = GetFirstID('Wuur_the_Sandcomber'), + FYUU_THE_SEABELLOW = GetFirstID('Fyuu_the_Seabellow'), + QULL_THE_SHELLBUSTER = GetFirstID('Qull_the_Shellbuster'), + SEWW_THE_SQUIDLIMBED = GetFirstID('Seww_the_Squidlimbed'), + PAHH_THE_GULLCALLER = GetFirstID('Pahh_the_Gullcaller'), + MOUU_THE_WAVERIDER = GetFirstID('Mouu_the_Waverider'), + WORR_THE_CLAWFISTED = GetFirstID('Worr_the_Clawfisted'), + VOLL_THE_SHARKFINNED = GetFirstID('Voll_the_Sharkfinned'), + YARR_THE_PEARLEYED = GetFirstID('Yarr_the_Pearleyed'), + NOVV_THE_WHITEHEARTED = GetFirstID('Novv_the_Whitehearted'), + DENN_THE_ORCAVOICED = GetFirstID('Denn_the_Orcavoiced'), + ZUUG_THE_SHORELEAPER = GetFirstID('Zuug_the_Shoreleaper'), + SEA_HOG = GetFirstID('Sea_Hog'), + CHARYBDIS = GetFirstID('Charybdis'), + MIMIC = GetFirstID('Mimic'), + WATER_LEAPER = GetFirstID('Water_Leaper'), + GLYRYVILU = GetFirstID('Glyryvilu'), }, npc = { diff --git a/scripts/zones/Sea_Serpent_Grotto/Zone.lua b/scripts/zones/Sea_Serpent_Grotto/Zone.lua index 76682bf187a..9660fd7b4ed 100644 --- a/scripts/zones/Sea_Serpent_Grotto/Zone.lua +++ b/scripts/zones/Sea_Serpent_Grotto/Zone.lua @@ -9,9 +9,8 @@ zoneObject.onInitialize = function(zone) -- Charybdis PH alternates, remove one local keys = {} - for k, v in pairs(ID.mob.CHARYBDIS_PH) do - table.insert(keys, k) - end + table.insert(keys, ID.mob.CHARYBDIS - 2) + table.insert(keys, ID.mob.CHARYBDIS - 4) DespawnMob(keys[math.random(1, #keys)]) diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Bog_Sahagin.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Bog_Sahagin.lua index cb523ed7f3f..8bab0658667 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Bog_Sahagin.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Bog_Sahagin.lua @@ -7,6 +7,11 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local mouuPHTable = +{ + [ID.mob.MOUU_THE_WAVERIDER - 1] = ID.mob.MOUU_THE_WAVERIDER, -- -60.728 19.884 53.966 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 806, 1, xi.regime.type.GROUNDS) xi.regime.checkRegime(player, mob, 807, 1, xi.regime.type.GROUNDS) @@ -14,7 +19,7 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.MOUU_THE_WAVERIDER_PH, 10, 7200) -- 2 hours + xi.mob.phOnDespawn(mob, mouuPHTable, 10, 7200) -- 2 hours end return entity diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Brook_Sahagin.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Brook_Sahagin.lua index 2d90fd9a43e..8f43045fa73 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Brook_Sahagin.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Brook_Sahagin.lua @@ -7,6 +7,12 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local qullPHTable = +{ + [ID.mob.QULL_THE_SHELLBUSTER - 5] = ID.mob.QULL_THE_SHELLBUSTER, -- 348.293 10.133 -65.543 + [ID.mob.QULL_THE_SHELLBUSTER - 2] = ID.mob.QULL_THE_SHELLBUSTER, -- 363.430 10.578 -62.752 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 806, 1, xi.regime.type.GROUNDS) xi.regime.checkRegime(player, mob, 807, 1, xi.regime.type.GROUNDS) @@ -14,7 +20,7 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.QULL_THE_SHELLBUSTER_PH, 10, 7200) -- 2 hours + xi.mob.phOnDespawn(mob, qullPHTable, 10, 7200) -- 2 hours end return entity diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Coastal_Sahagin.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Coastal_Sahagin.lua index 0f7ae10d066..ecee2816e1f 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Coastal_Sahagin.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Coastal_Sahagin.lua @@ -7,6 +7,11 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local dennPHTable = +{ + [ID.mob.DENN_THE_ORCAVOICED - 3] = ID.mob.DENN_THE_ORCAVOICED, -- -102.127 9.797 -308.149 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 806, 1, xi.regime.type.GROUNDS) xi.regime.checkRegime(player, mob, 807, 1, xi.regime.type.GROUNDS) @@ -14,7 +19,7 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.DENN_THE_ORCAVOICED_PH, 10, 7200) -- 2 hours + xi.mob.phOnDespawn(mob, dennPHTable, 10, 7200) -- 2 hours end return entity diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Delta_Sahagin.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Delta_Sahagin.lua index 87717cdc18f..515d21c70e6 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Delta_Sahagin.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Delta_Sahagin.lua @@ -7,6 +7,11 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local zuugPHTable = +{ + [ID.mob.ZUUG_THE_SHORELEAPER - 4] = ID.mob.ZUUG_THE_SHORELEAPER, +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 806, 1, xi.regime.type.GROUNDS) xi.regime.checkRegime(player, mob, 807, 1, xi.regime.type.GROUNDS) @@ -14,7 +19,7 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.ZUUG_THE_SHORELEAPER_PH, 10, 7200) -- 2 hours + xi.mob.phOnDespawn(mob, zuugPHTable, 10, 7200) -- 2 hours end return entity diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Devil_Manta.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Devil_Manta.lua index d1c2b243b47..57116efcf6f 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Devil_Manta.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Devil_Manta.lua @@ -7,12 +7,18 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local charybdisPHTable = +{ + [ID.mob.CHARYBDIS - 4] = ID.mob.CHARYBDIS, -- -138.181, 48.389, -338.001 + [ID.mob.CHARYBDIS - 2] = ID.mob.CHARYBDIS, -- -212.407, 38.538, -342.544 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 810, 2, xi.regime.type.GROUNDS) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.CHARYBDIS_PH, 10, math.random(28800, 43200)) -- 8 - 12 hours + xi.mob.phOnDespawn(mob, charybdisPHTable, 10, math.random(28800, 43200)) -- 8 - 12 hours end return entity diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Ghast.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Ghast.lua index 8f784093187..aadee526811 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Ghast.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Ghast.lua @@ -7,12 +7,18 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local namtarPHTable = +{ + [ID.mob.NAMTAR - 6] = ID.mob.NAMTAR, -- -128.762 9.595 164.996 + [ID.mob.NAMTAR - 1] = ID.mob.NAMTAR, -- -157.606 9.905 168.518 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 805, 2, xi.regime.type.GROUNDS) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.NAMTAR_PH, 10, 3600) -- 1 hour + xi.mob.phOnDespawn(mob, namtarPHTable, 10, 3600) -- 1 hour end return entity diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Lagoon_Sahagin.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Lagoon_Sahagin.lua index 47b31cd8ec6..7b3e3aed79f 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Lagoon_Sahagin.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Lagoon_Sahagin.lua @@ -7,6 +7,16 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local yarrPHTable = +{ + [ID.mob.YARR_THE_PEARLEYED - 2] = ID.mob.YARR_THE_PEARLEYED, -- 1.654 19.914 -113.913 +} + +local novvPHTable = +{ + [ID.mob.NOVV_THE_WHITEHEARTED - 1] = ID.mob.NOVV_THE_WHITEHEARTED, +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 806, 1, xi.regime.type.GROUNDS) xi.regime.checkRegime(player, mob, 807, 1, xi.regime.type.GROUNDS) @@ -14,8 +24,8 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.YARR_THE_PEARLEYED_PH, 10, 3600) -- 1 hour - xi.mob.phOnDespawn(mob, ID.mob.NOVV_THE_WHITEHEARTED_PH, 10, 7200) -- 2 hours + xi.mob.phOnDespawn(mob, yarrPHTable, 10, 3600) -- 1 hour + xi.mob.phOnDespawn(mob, novvPHTable, 10, 7200) -- 2 hours end return entity diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Marsh_Sahagin.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Marsh_Sahagin.lua index 835d08ebd6f..5c230064c13 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Marsh_Sahagin.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Marsh_Sahagin.lua @@ -7,6 +7,16 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local worrPHTable = +{ + [ID.mob.WORR_THE_CLAWFISTED - 3] = ID.mob.WORR_THE_CLAWFISTED, -- -308.649 17.344 -52.316 +} + +local vollPHTable = +{ + [ID.mob.VOLL_THE_SHARKFINNED - 2] = ID.mob.VOLL_THE_SHARKFINNED, -- -337.035 16.950 -106.841 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 806, 1, xi.regime.type.GROUNDS) xi.regime.checkRegime(player, mob, 807, 1, xi.regime.type.GROUNDS) @@ -14,8 +24,8 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.WORR_THE_CLAWFISTED_PH, 10, 7200) -- 2 hours - xi.mob.phOnDespawn(mob, ID.mob.VOLL_THE_SHARKFINNED_PH, 10, 7200) -- 2 hours + xi.mob.phOnDespawn(mob, worrPHTable, 10, 7200) -- 2 hours + xi.mob.phOnDespawn(mob, vollPHTable, 10, 7200) -- 2 hours end return entity diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Razorjaw_Pugil.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Razorjaw_Pugil.lua index f8332c50bad..2771249fb7e 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Razorjaw_Pugil.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Razorjaw_Pugil.lua @@ -7,11 +7,17 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local seaHogPHTable = +{ + [ID.mob.SEA_HOG - 2] = ID.mob.SEA_HOG, -- -221.455 9.542 -44.191 + [ID.mob.SEA_HOG - 1] = ID.mob.SEA_HOG, -- -249 10 -57 +} + entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.SEA_HOG_PH, 10, 3600) -- 1 hour + xi.mob.phOnDespawn(mob, seaHogPHTable, 10, 3600) -- 1 hour end return entity diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Riparian_Sahagin.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Riparian_Sahagin.lua index 0c1e64c0fe9..14464c411bf 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Riparian_Sahagin.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Riparian_Sahagin.lua @@ -7,6 +7,16 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local fyuuPHTable = +{ + [ID.mob.FYUU_THE_SEABELLOW - 3] = ID.mob.FYUU_THE_SEABELLOW, -- 185.074 20.252 39.317 +} + +local sewwPHTable = +{ + [ID.mob.SEWW_THE_SQUIDLIMBED - 3] = ID.mob.SEWW_THE_SQUIDLIMBED, -- 232.828 9.860 63.214 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 806, 1, xi.regime.type.GROUNDS) xi.regime.checkRegime(player, mob, 807, 1, xi.regime.type.GROUNDS) @@ -14,8 +24,8 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.SEWW_THE_SQUIDLIMBED_PH, 10, 7200) -- 2 hours - xi.mob.phOnDespawn(mob, ID.mob.FYUU_THE_SEABELLOW_PH, 10, 7200) -- 2 hours + xi.mob.phOnDespawn(mob, sewwPHTable, 10, 7200) -- 2 hours + xi.mob.phOnDespawn(mob, fyuuPHTable, 10, 7200) -- 2 hours end return entity diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Royal_Leech.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Royal_Leech.lua index bc3ec8fe5af..5f3b6318e84 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Royal_Leech.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Royal_Leech.lua @@ -7,12 +7,18 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local masanPHTable = +{ + [ID.mob.MASAN - 4] = ID.mob.MASAN, -- 17.001 9.340 186.571 + [ID.mob.MASAN - 3] = ID.mob.MASAN, -- 18.702 9.512 183.594 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 804, 1, xi.regime.type.GROUNDS) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.MASAN_PH, 10, 14400) -- 4 hours + xi.mob.phOnDespawn(mob, masanPHTable, 10, 14400) -- 4 hours end return entity diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Spring_Sahagin.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Spring_Sahagin.lua index 1ce5110d6e9..9cefd3b45fe 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Spring_Sahagin.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Spring_Sahagin.lua @@ -7,6 +7,11 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local wuurPHTable = +{ + [ID.mob.WUUR_THE_SANDCOMBER - 4] = ID.mob.WUUR_THE_SANDCOMBER, -- 14.044 0.494 109.487 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 806, 1, xi.regime.type.GROUNDS) xi.regime.checkRegime(player, mob, 807, 1, xi.regime.type.GROUNDS) @@ -14,7 +19,7 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.WUUR_THE_SANDCOMBER_PH, 10, 7200) -- 2 hours + xi.mob.phOnDespawn(mob, wuurPHTable, 10, 7200) -- 2 hours end return entity diff --git a/scripts/zones/Sea_Serpent_Grotto/mobs/Swamp_Sahagin.lua b/scripts/zones/Sea_Serpent_Grotto/mobs/Swamp_Sahagin.lua index 74c3dafc7de..b747349bcc5 100644 --- a/scripts/zones/Sea_Serpent_Grotto/mobs/Swamp_Sahagin.lua +++ b/scripts/zones/Sea_Serpent_Grotto/mobs/Swamp_Sahagin.lua @@ -7,6 +7,11 @@ local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- local entity = {} +local pahhPHTable = +{ + [ID.mob.PAHH_THE_GULLCALLER - 5] = ID.mob.PAHH_THE_GULLCALLER, -- -13.532 21.301 -20.861 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 806, 1, xi.regime.type.GROUNDS) xi.regime.checkRegime(player, mob, 807, 1, xi.regime.type.GROUNDS) @@ -14,7 +19,7 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.PAHH_THE_GULLCALLER_PH, 10, 7200) -- 2 hours + xi.mob.phOnDespawn(mob, pahhPHTable, 10, 7200) -- 2 hours end return entity From 9d02076ed77b250811f89ee7c4254bcfec44a9e9 Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Sat, 4 May 2024 01:40:00 -0400 Subject: [PATCH 7/8] Shift-proof Sauromugue Champaign and [S] --- scripts/zones/Sauromugue_Champaign/IDs.lua | 29 +++++-------------- .../Sauromugue_Champaign/mobs/Evil_Weapon.lua | 7 ++++- .../Sauromugue_Champaign/mobs/Hill_Lizard.lua | 7 ++++- .../Sauromugue_Champaign/mobs/Tabar_Beak.lua | 8 ++++- .../zones/Sauromugue_Champaign_[S]/IDs.lua | 8 ++--- .../Sauromugue_Champaign_[S]/mobs/Lynx.lua | 7 ++++- 6 files changed, 35 insertions(+), 31 deletions(-) diff --git a/scripts/zones/Sauromugue_Champaign/IDs.lua b/scripts/zones/Sauromugue_Champaign/IDs.lua index 9c3ef2f8405..a6e4abc5327 100644 --- a/scripts/zones/Sauromugue_Champaign/IDs.lua +++ b/scripts/zones/Sauromugue_Champaign/IDs.lua @@ -50,26 +50,13 @@ zones[xi.zone.SAUROMUGUE_CHAMPAIGN] = }, mob = { - DEADLY_DODO_PH = - { - [17268849] = 17268851, -- 238.000 40.000 332.000 - [17268850] = 17268851, -- 369.564 39.658 345.197 - }, - - BLIGHTING_BRAND_PH = - { - [17269013] = 17269016, -- 240.725 1.853 223.185 - }, - - BASHE_PH = - { - [17268782] = 17268788, -- 537.188 6.167 -11.067 - }, - - OLD_SABERTOOTH = 17268808, - ROC = 17269106, - CLIMBPIX_HIGHRISE = 17269107, - DRIBBLIX_GREASEMAW = 17269114, + DEADLY_DODO = GetFirstID('Deadly_Dodo'), + BLIGHTING_BRAND = GetFirstID('Blighting_Brand'), + BASHE = GetFirstID('Bashe'), + OLD_SABERTOOTH = GetFirstID('Old_Sabertooth'), + ROC = GetFirstID('Roc'), + CLIMBPIX_HIGHRISE = GetFirstID('Climbpix_Highrise'), + DRIBBLIX_GREASEMAW = GetFirstID('Dribblix_Greasemaw'), VOIDWALKER = { @@ -105,7 +92,7 @@ zones[xi.zone.SAUROMUGUE_CHAMPAIGN] = npc = { - QM2 = 17269229, + QM2 = GetFirstID('qm2'), -- THF AF2 }, } diff --git a/scripts/zones/Sauromugue_Champaign/mobs/Evil_Weapon.lua b/scripts/zones/Sauromugue_Champaign/mobs/Evil_Weapon.lua index 8b9344505a0..6bff8db370d 100644 --- a/scripts/zones/Sauromugue_Champaign/mobs/Evil_Weapon.lua +++ b/scripts/zones/Sauromugue_Champaign/mobs/Evil_Weapon.lua @@ -7,12 +7,17 @@ local ID = zones[xi.zone.SAUROMUGUE_CHAMPAIGN] ----------------------------------- local entity = {} +local brandPHTable = +{ + [ID.mob.BLIGHTING_BRAND - 3] = ID.mob.BLIGHTING_BRAND, -- 240.725 1.853 223.185 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 100, 2, xi.regime.type.FIELDS) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.BLIGHTING_BRAND_PH, 20, math.random(5400, 7200)) -- 90 to 120 minutes + xi.mob.phOnDespawn(mob, brandPHTable, 20, math.random(5400, 7200)) -- 90 to 120 minutes end return entity diff --git a/scripts/zones/Sauromugue_Champaign/mobs/Hill_Lizard.lua b/scripts/zones/Sauromugue_Champaign/mobs/Hill_Lizard.lua index 97eb2e8aefd..8c511c4f19c 100644 --- a/scripts/zones/Sauromugue_Champaign/mobs/Hill_Lizard.lua +++ b/scripts/zones/Sauromugue_Champaign/mobs/Hill_Lizard.lua @@ -6,12 +6,17 @@ local ID = zones[xi.zone.SAUROMUGUE_CHAMPAIGN] ----------------------------------- local entity = {} +local bashePHTable = +{ + [ID.mob.BASHE - 6] = ID.mob.BASHE, -- 537.188 6.167 -11.067 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 40, 1, xi.regime.type.FIELDS) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.BASHE_PH, 10, 3600) -- 1 hour + xi.mob.phOnDespawn(mob, bashePHTable, 10, 3600) -- 1 hour end return entity diff --git a/scripts/zones/Sauromugue_Champaign/mobs/Tabar_Beak.lua b/scripts/zones/Sauromugue_Champaign/mobs/Tabar_Beak.lua index 16b80b0acba..1e809b61121 100644 --- a/scripts/zones/Sauromugue_Champaign/mobs/Tabar_Beak.lua +++ b/scripts/zones/Sauromugue_Champaign/mobs/Tabar_Beak.lua @@ -7,12 +7,18 @@ local ID = zones[xi.zone.SAUROMUGUE_CHAMPAIGN] ----------------------------------- local entity = {} +local deadlyDodoPHTable = +{ + [ID.mob.DEADLY_DODO - 2] = ID.mob.DEADLY_DODO, -- 238.000 40.000 332.000 + [ID.mob.DEADLY_DODO - 1] = ID.mob.DEADLY_DODO, -- 369.564 39.658 345.197 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 100, 1, xi.regime.type.FIELDS) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.DEADLY_DODO_PH, 33, 3600) -- 1 hour + xi.mob.phOnDespawn(mob, deadlyDodoPHTable, 33, 3600) -- 1 hour end return entity diff --git a/scripts/zones/Sauromugue_Champaign_[S]/IDs.lua b/scripts/zones/Sauromugue_Champaign_[S]/IDs.lua index 0fdc60d3369..44497755472 100644 --- a/scripts/zones/Sauromugue_Champaign_[S]/IDs.lua +++ b/scripts/zones/Sauromugue_Champaign_[S]/IDs.lua @@ -33,12 +33,8 @@ zones[xi.zone.SAUROMUGUE_CHAMPAIGN_S] = }, mob = { - BALAM_QUITZ_PH = - { - [17178778] = 17178803, -- 481.509 24.184 98.264 - }, - - COQUECIGRUE = 17178689, + BALAM_QUITZ = GetFirstID('Balam-Quitz'), + COQUECIGRUE = GetFirstID('Coquecigrue'), VOIDWALKER = { diff --git a/scripts/zones/Sauromugue_Champaign_[S]/mobs/Lynx.lua b/scripts/zones/Sauromugue_Champaign_[S]/mobs/Lynx.lua index 2e7c491e5ce..95dd9c653ee 100644 --- a/scripts/zones/Sauromugue_Champaign_[S]/mobs/Lynx.lua +++ b/scripts/zones/Sauromugue_Champaign_[S]/mobs/Lynx.lua @@ -7,11 +7,16 @@ local ID = zones[xi.zone.SAUROMUGUE_CHAMPAIGN_S] ----------------------------------- local entity = {} +local balamPHTable = +{ + [ID.mob.BALAM_QUITZ - 5] = ID.mob.BALAM_QUITZ, -- 481.509 24.184 98.264 +} + entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.BALAM_QUITZ_PH, 10, 3600) -- 1 hour + xi.mob.phOnDespawn(mob, balamPHTable, 10, 3600) -- 1 hour end return entity From dac7961fdefb0078fdbc18cf425aa99f45a7dfcc Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Sat, 4 May 2024 01:40:12 -0400 Subject: [PATCH 8/8] Shift-proof Sacrarium --- scripts/zones/Sacrarium/IDs.lua | 19 ++++++------------- scripts/zones/Sacrarium/npcs/Stale_Draft.lua | 14 +++++++++++--- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/scripts/zones/Sacrarium/IDs.lua b/scripts/zones/Sacrarium/IDs.lua index a54e44d406f..fa74f8260c9 100644 --- a/scripts/zones/Sacrarium/IDs.lua +++ b/scripts/zones/Sacrarium/IDs.lua @@ -37,23 +37,16 @@ zones[xi.zone.SACRARIUM] = }, mob = { - SWIFT_BELT_NMS = - { - { 16892068, { [xi.race.HUME_M] = true, [xi.race.HUME_F] = true } }, -- Balor (hume) - { 16892069, { [xi.race.ELVAAN_M] = true, [xi.race.ELVAAN_F] = true } }, -- Luaith (elvaan) - { 16892070, { [xi.race.TARU_M] = true, [xi.race.TARU_F] = true } }, -- Lobais (tarutaru) - { 16892073, { [xi.race.MITHRA] = true } }, -- Caithleann (mithra) - { 16892074, { [xi.race.GALKA] = true } }, -- Indich (galka) - }, - OLD_PROFESSOR_MARISELLE = 16891970, + SWIFT_BELT_NM_OFFSET = GetFirstID('Balor'), + OLD_PROFESSOR_MARISELLE = GetFirstID('Old_Professor_Mariselle'), ELEL = GetFirstID('Elel'), }, npc = { - STALE_DRAFT_OFFSET = 16892097, - LABYRINTH_OFFSET = 16892111, - SMALL_KEYHOLE = 16892143, - QM_MARISELLE_OFFSET = 16892156, -- qm_professor_mariselle in npc_list.sql + STALE_DRAFT_OFFSET = GetFirstID('Stale_Draft'), + LABYRINTH_OFFSET = GetFirstID('_0sb'), + SMALL_KEYHOLE = GetFirstID('Small_Keyhole'), + QM_MARISELLE_OFFSET = GetFirstID('qm_prof_0'), TREASURE_CHEST = GetFirstID('Treasure_Chest'), }, } diff --git a/scripts/zones/Sacrarium/npcs/Stale_Draft.lua b/scripts/zones/Sacrarium/npcs/Stale_Draft.lua index eb4228a434d..f479dba6d9e 100644 --- a/scripts/zones/Sacrarium/npcs/Stale_Draft.lua +++ b/scripts/zones/Sacrarium/npcs/Stale_Draft.lua @@ -7,9 +7,17 @@ local ID = zones[xi.zone.SACRARIUM] ----------------------------------- local entity = {} +local swiftBeltNMs = +{ + { ID.mob.SWIFT_BELT_NM_OFFSET, { [xi.race.HUME_M] = true, [xi.race.HUME_F] = true } }, -- Balor (hume) + { ID.mob.SWIFT_BELT_NM_OFFSET + 1, { [xi.race.ELVAAN_M] = true, [xi.race.ELVAAN_F] = true } }, -- Luaith (elvaan) + { ID.mob.SWIFT_BELT_NM_OFFSET + 2, { [xi.race.TARU_M] = true, [xi.race.TARU_F] = true } }, -- Lobais (tarutaru) + { ID.mob.SWIFT_BELT_NM_OFFSET + 5, { [xi.race.MITHRA] = true } }, -- Caithleann (mithra) + { ID.mob.SWIFT_BELT_NM_OFFSET + 6, { [xi.race.GALKA] = true } }, -- Indich (galka) +} + entity.onTrigger = function(player, npc) local hate = player:getCharVar('FOMOR_HATE') - if hate < 8 then --hate lvl 1 player:messageSpecial(ID.text.NOTHING_OUT_OF_ORDINARY) elseif hate < 12 then @@ -25,8 +33,8 @@ entity.onTrade = function(player, npc, trade) -- fomor codex if trade:hasItemQty(xi.item.FOMOR_CODEX, 1) and trade:getItemCount() == 1 then local draftOffset = npc:getID() - ID.npc.STALE_DRAFT_OFFSET - local nmId = ID.mob.SWIFT_BELT_NMS[draftOffset + 1][1] - local races = ID.mob.SWIFT_BELT_NMS[draftOffset + 1][2] + local nmId = swiftBeltNMs[draftOffset + 1][1] + local races = swiftBeltNMs[draftOffset + 1][2] local nm = GetMobByID(nmId) local race = player:getRace() local hate = player:getCharVar('FOMOR_HATE')