From 7313ba9e2a87789aae2929811ae25d453baee2e4 Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Fri, 3 May 2024 22:20:41 -0400 Subject: [PATCH 1/8] Shift-proof The Boyahda Tree Shift-proof The Boyahda Tree --- scripts/zones/The_Boyahda_Tree/IDs.lua | 54 +++---------------- .../The_Boyahda_Tree/mobs/Boyahda_Sapling.lua | 11 +++- .../zones/The_Boyahda_Tree/mobs/Death_Cap.lua | 7 ++- .../The_Boyahda_Tree/mobs/Demonic_Rose.lua | 7 ++- .../The_Boyahda_Tree/mobs/Moss_Eater.lua | 18 ++++++- .../The_Boyahda_Tree/mobs/Robber_Crab.lua | 15 +++++- 6 files changed, 61 insertions(+), 51 deletions(-) diff --git a/scripts/zones/The_Boyahda_Tree/IDs.lua b/scripts/zones/The_Boyahda_Tree/IDs.lua index bce0043c1ad..948fd8f737d 100644 --- a/scripts/zones/The_Boyahda_Tree/IDs.lua +++ b/scripts/zones/The_Boyahda_Tree/IDs.lua @@ -37,52 +37,14 @@ zones[xi.zone.THE_BOYAHDA_TREE] = }, mob = { - ELLYLLON_PH = - { - [17403938] = 17403939, -- 192.54 8.532 -163.41 - }, - AQUARIUS_PH = - { - [17403993] = 17404000, -- 170.97 9.414 -12.579 - [17403994] = 17404000, -- 174.99 9.589 -16.718 - [17403995] = 17404000, -- 182.40 8.707 -33.993 - [17403997] = 17404000, -- 163.31 9.590 -58.550 - [17403998] = 17404000, -- 162.88 9.591 -58.082 - [17403999] = 17404000, -- 195.37 8.972 -73.536 - [17404002] = 17404000, -- 149.30 9.742 -64.239 - [17404003] = 17404000, -- 146.14 9.712 -51.616 - [17404004] = 17404000, -- 149.59 9.765 -61.490 - }, - UNUT_PH = - { - [17404014] = 17404029, -- 112.08 8.368 34.423 - [17404015] = 17404029, -- 134.44 7.846 45.197 - [17404016] = 17404029, -- 127.32 7.768 93.138 - [17404018] = 17404029, -- 95.055 8.132 71.958 - [17404019] = 17404029, -- 108.66 8.193 49.643 - [17404020] = 17404029, -- 97.774 7.837 67.815 - [17404025] = 17404029, -- 109.55 8.561 83.275 - [17404026] = 17404029, -- 59.283 8.700 78.246 - [17404027] = 17404029, -- 60.408 8.711 82.500 - [17404030] = 17404029, -- 70.822 6.211 61.711 - [17404031] = 17404029, -- 57.942 8.544 88.215 - [17404032] = 17404029, -- 66.392 5.884 66.909 - }, - LESHONKI_PH = - { - [17404293] = 17404300, -- -222.0 14.380 25.724 - [17404294] = 17404300, -- -223.5 14.430 23.877 - [17404295] = 17404300, -- -215.2 13.585 68.666 - [17404296] = 17404300, -- -216.4 14.317 56.532 - [17404302] = 17404300, -- -223.8 14.267 96.920 - }, - VOLUPTUOUS_VIVIAN_PH = - { - [17404330] = 17404331, -- -196.178 5.592 190.971 - }, - MIMIC = 17404336, - AGAS = 17404337, - BEET_LEAFHOPPER = 17404338, + ELLYLLON = GetFirstID('Ellyllon'), + AQUARIUS = GetFirstID('Aquarius'), + UNUT = GetFirstID('Unut'), + LESHONKI = GetFirstID('Leshonki'), + VOLUPTUOUS_VIVIAN = GetFirstID('Voluptuous_Vivian'), + MIMIC = GetFirstID('Mimic'), + AGAS = GetFirstID('Agas'), + BEET_LEAFHOPPER = GetFirstID('Beet_Leafhopper'), }, npc = { diff --git a/scripts/zones/The_Boyahda_Tree/mobs/Boyahda_Sapling.lua b/scripts/zones/The_Boyahda_Tree/mobs/Boyahda_Sapling.lua index 6d0dbf59ce2..6d85b0ddc21 100644 --- a/scripts/zones/The_Boyahda_Tree/mobs/Boyahda_Sapling.lua +++ b/scripts/zones/The_Boyahda_Tree/mobs/Boyahda_Sapling.lua @@ -7,12 +7,21 @@ local ID = zones[xi.zone.THE_BOYAHDA_TREE] ----------------------------------- local entity = {} +local leshonkiPHTable = +{ + [ID.mob.LESHONKI - 7] = ID.mob.LESHONKI, -- -222.0 14.380 25.724 + [ID.mob.LESHONKI - 6] = ID.mob.LESHONKI, -- -223.5 14.430 23.877 + [ID.mob.LESHONKI - 5] = ID.mob.LESHONKI, -- -215.2 13.585 68.666 + [ID.mob.LESHONKI - 4] = ID.mob.LESHONKI, -- -216.4 14.317 56.532 + [ID.mob.LESHONKI + 2] = ID.mob.LESHONKI, -- -223.8 14.267 96.920 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 725, 1, xi.regime.type.GROUNDS) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.LESHONKI_PH, 5, 3600) -- 1 hour + xi.mob.phOnDespawn(mob, leshonkiPHTable, 5, 3600) -- 1 hour end return entity diff --git a/scripts/zones/The_Boyahda_Tree/mobs/Death_Cap.lua b/scripts/zones/The_Boyahda_Tree/mobs/Death_Cap.lua index 91c26577fc8..e98f1b848ca 100644 --- a/scripts/zones/The_Boyahda_Tree/mobs/Death_Cap.lua +++ b/scripts/zones/The_Boyahda_Tree/mobs/Death_Cap.lua @@ -7,12 +7,17 @@ local ID = zones[xi.zone.THE_BOYAHDA_TREE] ----------------------------------- local entity = {} +local ellyllonPHTable = +{ + [ID.mob.ELLYLLON - 1] = ID.mob.ELLYLLON, -- 192.54 8.532 -163.41 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 719, 1, xi.regime.type.GROUNDS) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.ELLYLLON_PH, 10, math.random(7200, 10800)) -- 2 to 3 hours + xi.mob.phOnDespawn(mob, ellyllonPHTable, 10, math.random(7200, 10800)) -- 2 to 3 hours end return entity diff --git a/scripts/zones/The_Boyahda_Tree/mobs/Demonic_Rose.lua b/scripts/zones/The_Boyahda_Tree/mobs/Demonic_Rose.lua index 53c4e85192e..de843120244 100644 --- a/scripts/zones/The_Boyahda_Tree/mobs/Demonic_Rose.lua +++ b/scripts/zones/The_Boyahda_Tree/mobs/Demonic_Rose.lua @@ -7,11 +7,16 @@ local ID = zones[xi.zone.THE_BOYAHDA_TREE] ----------------------------------- local entity = {} +local vivianPHTable = +{ + [ID.mob.VOLUPTUOUS_VIVIAN - 1] = ID.mob.VOLUPTUOUS_VIVIAN, -- -196.178 5.592 190.971 +} + entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.VOLUPTUOUS_VIVIAN_PH, 10, math.random(57600, 86400)) -- 16 to 24 hours + xi.mob.phOnDespawn(mob, vivianPHTable, 10, math.random(57600, 86400)) -- 16 to 24 hours end return entity diff --git a/scripts/zones/The_Boyahda_Tree/mobs/Moss_Eater.lua b/scripts/zones/The_Boyahda_Tree/mobs/Moss_Eater.lua index 6bd2183e7c5..fe3d8c7eb95 100644 --- a/scripts/zones/The_Boyahda_Tree/mobs/Moss_Eater.lua +++ b/scripts/zones/The_Boyahda_Tree/mobs/Moss_Eater.lua @@ -7,12 +7,28 @@ local ID = zones[xi.zone.THE_BOYAHDA_TREE] ----------------------------------- local entity = {} +local unutPHTable = +{ + [ID.mob.UNUT - 15] = ID.mob.UNUT, -- 112.08 8.368 34.423 + [ID.mob.UNUT - 14] = ID.mob.UNUT, -- 134.44 7.846 45.197 + [ID.mob.UNUT - 13] = ID.mob.UNUT, -- 127.32 7.768 93.138 + [ID.mob.UNUT - 11] = ID.mob.UNUT, -- 95.055 8.132 71.958 + [ID.mob.UNUT - 10] = ID.mob.UNUT, -- 108.66 8.193 49.643 + [ID.mob.UNUT - 9] = ID.mob.UNUT, -- 97.774 7.837 67.815 + [ID.mob.UNUT - 4] = ID.mob.UNUT, -- 109.55 8.561 83.275 + [ID.mob.UNUT - 3] = ID.mob.UNUT, -- 59.283 8.700 78.246 + [ID.mob.UNUT - 2] = ID.mob.UNUT, -- 60.408 8.711 82.500 + [ID.mob.UNUT + 1] = ID.mob.UNUT, -- 70.822 6.211 61.711 + [ID.mob.UNUT + 2] = ID.mob.UNUT, -- 57.942 8.544 88.215 + [ID.mob.UNUT + 3] = ID.mob.UNUT, -- 66.392 5.884 66.909 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 721, 2, xi.regime.type.GROUNDS) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.UNUT_PH, 5, 7200) -- 2 hours + xi.mob.phOnDespawn(mob, unutPHTable, 5, 7200) -- 2 hours end return entity diff --git a/scripts/zones/The_Boyahda_Tree/mobs/Robber_Crab.lua b/scripts/zones/The_Boyahda_Tree/mobs/Robber_Crab.lua index b343b7fa54c..01125c336cc 100644 --- a/scripts/zones/The_Boyahda_Tree/mobs/Robber_Crab.lua +++ b/scripts/zones/The_Boyahda_Tree/mobs/Robber_Crab.lua @@ -7,12 +7,25 @@ local ID = zones[xi.zone.THE_BOYAHDA_TREE] ----------------------------------- local entity = {} +local aquariusPHTable = +{ + [ID.mob.AQUARIUS - 7] = ID.mob.AQUARIUS, -- 170.97 9.414 -12.579 + [ID.mob.AQUARIUS - 6] = ID.mob.AQUARIUS, -- 174.99 9.589 -16.718 + [ID.mob.AQUARIUS - 5] = ID.mob.AQUARIUS, -- 182.40 8.707 -33.993 + [ID.mob.AQUARIUS - 3] = ID.mob.AQUARIUS, -- 163.31 9.590 -58.550 + [ID.mob.AQUARIUS - 2] = ID.mob.AQUARIUS, -- 162.88 9.591 -58.082 + [ID.mob.AQUARIUS - 1] = ID.mob.AQUARIUS, -- 195.37 8.972 -73.536 + [ID.mob.AQUARIUS + 2] = ID.mob.AQUARIUS, -- 149.30 9.742 -64.239 + [ID.mob.AQUARIUS + 3] = ID.mob.AQUARIUS, -- 146.14 9.712 -51.616 + [ID.mob.AQUARIUS + 4] = ID.mob.AQUARIUS, -- 149.59 9.765 -61.490 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 720, 2, xi.regime.type.GROUNDS) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.AQUARIUS_PH, 5, 1) -- can repop instantly + xi.mob.phOnDespawn(mob, aquariusPHTable, 5, 1) -- can repop instantly end return entity From 8bc019ec62e6789731f45eb42e57612e6427be59 Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Fri, 3 May 2024 22:21:31 -0400 Subject: [PATCH 2/8] Shift-proof The Ashu Talif Shift-proof The Ashu Talif --- scripts/zones/The_Ashu_Talif/IDs.lua | 33 +++---------------- .../instances/against_all_odds.lua | 8 ++++- .../instances/the_black_coffin.lua | 28 ++++++++++++++-- 3 files changed, 37 insertions(+), 32 deletions(-) diff --git a/scripts/zones/The_Ashu_Talif/IDs.lua b/scripts/zones/The_Ashu_Talif/IDs.lua index a856a922689..2ab7c6f022a 100644 --- a/scripts/zones/The_Ashu_Talif/IDs.lua +++ b/scripts/zones/The_Ashu_Talif/IDs.lua @@ -46,34 +46,11 @@ zones[xi.zone.THE_ASHU_TALIF] = mob = { - -- The Black Coffin - Wave 1 - GESSHO = 17022979, - - [1] = - { - ASHU_TALIF_CREW_1 = 17022980, - ASHU_TALIF_CREW_2 = 17022981, - ASHU_TALIF_CREW_3 = 17022982, - ASHU_TALIF_CREW_4 = 17022983, - ASHU_TALIF_CREW_5 = 17022984, - }, - - -- The Black Coffin - Wave 2 - [2] = - { - ASHU_TALIF_CAPTAIN = 17022985, - ASHU_TALIF_CREW_6 = 17022986, - ASHU_TALIF_CREW_7 = 17022987, - ASHU_TALIF_CREW_8 = 17022988, - ASHU_TALIF_CREW_9 = 17022989, - }, - - -- Against All Odds - Cor AF2 - [54] = - { - GOWAM = 17022977, - YAZQUHL = 17022978, - }, + GESSHO = GetFirstID('Gessho'), + ASHU_CREW_OFFSET = GetFirstID('Ashu_Talif_Crew'), + ASHU_CAPTAIN_OFFSET = GetFirstID('Ashu_Talif_Captain'), + GOWAM = GetFirstID('Gowam'), + YAZQUHL = GetFirstID('Yazquhl'), }, npc = diff --git a/scripts/zones/The_Ashu_Talif/instances/against_all_odds.lua b/scripts/zones/The_Ashu_Talif/instances/against_all_odds.lua index 8102f20b1d9..1513acc4d04 100644 --- a/scripts/zones/The_Ashu_Talif/instances/against_all_odds.lua +++ b/scripts/zones/The_Ashu_Talif/instances/against_all_odds.lua @@ -6,6 +6,12 @@ local ID = zones[xi.zone.THE_ASHU_TALIF] ----------------------------------- local instanceObject = {} +local mobTable = +{ + ID.mob.GOWAM, + ID.mob.YAZQUHL, +} + instanceObject.registryRequirements = function(player) return player:hasKeyItem(xi.ki.LIFE_FLOAT) and player:getCharVar('AgainstAllOdds') == 2 @@ -16,7 +22,7 @@ instanceObject.entryRequirements = function(player) end instanceObject.onInstanceCreated = function(instance) - for i, v in pairs(ID.mob[54]) do + for i, v in pairs(mobTable) do SpawnMob(v, instance) end end diff --git a/scripts/zones/The_Ashu_Talif/instances/the_black_coffin.lua b/scripts/zones/The_Ashu_Talif/instances/the_black_coffin.lua index b2d1a007c51..5d5717d4624 100644 --- a/scripts/zones/The_Ashu_Talif/instances/the_black_coffin.lua +++ b/scripts/zones/The_Ashu_Talif/instances/the_black_coffin.lua @@ -6,6 +6,28 @@ local ID = zones[xi.zone.THE_ASHU_TALIF] ----------------------------------- local instanceObject = {} +local crewTable = +{ + -- The Black Coffin - Wave 1 + [1] = + { + ID.mob.ASHU_CREW_OFFSET, + ID.mob.ASHU_CREW_OFFSET + 1, + ID.mob.ASHU_CREW_OFFSET + 2, + ID.mob.ASHU_CREW_OFFSET + 3, + ID.mob.ASHU_CREW_OFFSET + 4, + }, + -- The Black Coffin - Wave 2 + [2] = + { + ID.mob.ASHU_CAPTAIN_OFFSET, + ID.mob.ASHU_CAPTAIN_OFFSET + 1, + ID.mob.ASHU_CAPTAIN_OFFSET + 2, + ID.mob.ASHU_CAPTAIN_OFFSET + 3, + ID.mob.ASHU_CAPTAIN_OFFSET + 4, + }, +} + instanceObject.registryRequirements = function(player) return player:getCurrentMission(xi.mission.log_id.TOAU) == xi.mission.id.toau.THE_BLACK_COFFIN and player:hasKeyItem(xi.ki.EPHRAMADIAN_GOLD_COIN) @@ -18,7 +40,7 @@ end instanceObject.onInstanceCreated = function(instance) SpawnMob(ID.mob.GESSHO, instance) - for i, mob in pairs(ID.mob[1]) do + for i, mob in pairs(crewTable[1]) do SpawnMob(mob, instance) end end @@ -49,7 +71,7 @@ end instanceObject.onInstanceProgressUpdate = function(instance, progress) if progress == 5 then - for i, mob in pairs(ID.mob[2]) do + for i, mob in pairs(crewTable[2]) do SpawnMob(mob, instance) end elseif progress >= 10 and not instance:completed() then @@ -66,7 +88,7 @@ instanceObject.onInstanceComplete = function(instance) local players = instance:getChars() DespawnMob(ID.mob.GESSHO, instance) - for i, mob in pairs(ID.mob[2]) do + for i, mob in pairs(crewTable[2]) do DespawnMob(mob, instance) end From 724511f96a37abc56c9cb641282e481e75d71783 Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Fri, 3 May 2024 22:22:05 -0400 Subject: [PATCH 3/8] Shift-proof Temple of Uggalepih Shift-proof Temple of Uggalepih --- scripts/zones/Temple_of_Uggalepih/IDs.lua | 55 +++++++------------ .../mobs/Tonberry_Cutter.lua | 7 ++- .../mobs/Tonberry_Dismayer.lua | 8 ++- .../mobs/Tonberry_Harrier.lua | 7 ++- .../zones/Temple_of_Uggalepih/mobs/Torama.lua | 7 ++- 5 files changed, 46 insertions(+), 38 deletions(-) diff --git a/scripts/zones/Temple_of_Uggalepih/IDs.lua b/scripts/zones/Temple_of_Uggalepih/IDs.lua index 03743b448aa..d2970845167 100644 --- a/scripts/zones/Temple_of_Uggalepih/IDs.lua +++ b/scripts/zones/Temple_of_Uggalepih/IDs.lua @@ -50,43 +50,30 @@ zones[xi.zone.TEMPLE_OF_UGGALEPIH] = }, mob = { - SOZU_SARBERRY_PH = - { - [17428551] = 17428554, -- 89 0.499 -23 - }, - SOZU_TERBERRY_PH = - { - [17428608] = 17428611, -- -122 0.028 -13 - }, - TONBERRY_KINQ_PH = - { - [17428673] = 17428677, -- -221.717 0.996 12.819 - [17428675] = 17428677 -- -218 -0.792 24 - }, - FLAUROS_PH = - { - [17428740] = 17428737, -- 259 0.03 80 - }, - TEMPLE_GUARDIAN = 17428494, - NIO_A = 17428495, - NIO_HUM = 17428496, - MIMIC = 17428497, - SOZU_ROGBERRY = 17428751, - CLEUVARION_M_RESOAIX = 17428807, - ROMPAULION_S_CITALLE = 17428808, - BERYL_FOOTED_MOLBERRY = 17428809, - DEATH_FROM_ABOVE = 17428810, - HABETROT = 17428811, - CRIMSON_TOOTHED_PAWBERRY = 17428813, - SACRIFICIAL_GOBLET = 17428816, - YALLERY_BROWN = 17428817, + SOZU_SARBERRY = GetFirstID('Sozu_Sarberry'), + SOZU_TERBERRY = GetFirstID('Sozu_Terberry'), + TONBERRY_KINQ = GetFirstID('Tonberry_Kinq'), + FLAUROS = GetFirstID('Flauros'), + TEMPLE_GUARDIAN = GetFirstID('Temple_Guardian'), + NIO_A = GetFirstID('Nio-A'), + NIO_HUM = GetFirstID('Nio-Hum'), + MIMIC = GetFirstID('Mimic'), + SOZU_ROGBERRY = GetFirstID('Sozu_Rogberry'), + CLEUVARION_M_RESOAIX = GetFirstID('Cleuvarion_M_Resoaix'), + ROMPAULION_S_CITALLE = GetFirstID('Rompaulion_S_Citalle'), + BERYL_FOOTED_MOLBERRY = GetFirstID('Beryl-footed_Molberry'), + DEATH_FROM_ABOVE = GetFirstID('Death_from_Above'), + HABETROT = GetFirstID('Habetrot'), + CRIMSON_TOOTHED_PAWBERRY = GetFirstID('Crimson-toothed_Pawberry'), + SACRIFICIAL_GOBLET = GetFirstID('Sacrificial_Goblet'), + YALLERY_BROWN = GetFirstID('Yallery_Brown'), }, npc = { - PLONGEUR_MONBERRY = 17428934, - BOOK_OFFSET = 17428974, - TEMPLE_GUARDIAN_DOOR = 17428979, - DOOR_TO_RANCOR = 17428990, + PLONGEUR_MONBERRY = GetFirstID('Plongeur_Monberry'), + BOOK_OFFSET = GetFirstID('Worn_Book'), + TEMPLE_GUARDIAN_DOOR = GetFirstID('_mf1'), + DOOR_TO_RANCOR = GetFirstID('_mfb'), TREASURE_COFFER = GetFirstID('Treasure_Coffer'), }, } diff --git a/scripts/zones/Temple_of_Uggalepih/mobs/Tonberry_Cutter.lua b/scripts/zones/Temple_of_Uggalepih/mobs/Tonberry_Cutter.lua index e72514b7ba8..581af285a9c 100644 --- a/scripts/zones/Temple_of_Uggalepih/mobs/Tonberry_Cutter.lua +++ b/scripts/zones/Temple_of_Uggalepih/mobs/Tonberry_Cutter.lua @@ -8,6 +8,11 @@ mixins = { require('scripts/mixins/families/tonberry') } ----------------------------------- local entity = {} +local sarberryPHTable = +{ + [ID.mob.SOZU_SARBERRY - 3] = ID.mob.SOZU_SARBERRY, -- 89 0.499 -23 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 790, 1, xi.regime.type.GROUNDS) xi.regime.checkRegime(player, mob, 791, 1, xi.regime.type.GROUNDS) @@ -18,7 +23,7 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.SOZU_SARBERRY_PH, 10, 3600) -- 1 hour + xi.mob.phOnDespawn(mob, sarberryPHTable, 10, 3600) -- 1 hour end return entity diff --git a/scripts/zones/Temple_of_Uggalepih/mobs/Tonberry_Dismayer.lua b/scripts/zones/Temple_of_Uggalepih/mobs/Tonberry_Dismayer.lua index a549e804c03..22354aedc55 100644 --- a/scripts/zones/Temple_of_Uggalepih/mobs/Tonberry_Dismayer.lua +++ b/scripts/zones/Temple_of_Uggalepih/mobs/Tonberry_Dismayer.lua @@ -8,6 +8,12 @@ mixins = { require('scripts/mixins/families/tonberry') } ----------------------------------- local entity = {} +local kingqPHTable = +{ + [ID.mob.TONBERRY_KINQ - 4] = ID.mob.TONBERRY_KINQ, -- -221.717 0.996 12.819 + [ID.mob.TONBERRY_KINQ - 2] = ID.mob.TONBERRY_KINQ, -- -218 -0.792 24 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 790, 1, xi.regime.type.GROUNDS) xi.regime.checkRegime(player, mob, 791, 1, xi.regime.type.GROUNDS) @@ -18,7 +24,7 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.TONBERRY_KINQ_PH, 10, 21600) -- 6 hours, 10% pop chance + xi.mob.phOnDespawn(mob, kingqPHTable, 10, 21600) -- 6 hours, 10% pop chance end return entity diff --git a/scripts/zones/Temple_of_Uggalepih/mobs/Tonberry_Harrier.lua b/scripts/zones/Temple_of_Uggalepih/mobs/Tonberry_Harrier.lua index da375fb43f0..6e9a0e68962 100644 --- a/scripts/zones/Temple_of_Uggalepih/mobs/Tonberry_Harrier.lua +++ b/scripts/zones/Temple_of_Uggalepih/mobs/Tonberry_Harrier.lua @@ -8,6 +8,11 @@ mixins = { require('scripts/mixins/families/tonberry') } ----------------------------------- local entity = {} +local terberryPHTable = +{ + [ID.mob.SOZU_TERBERRY - 3] = ID.mob.SOZU_TERBERRY, -- -122 0.028 -13 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 790, 1, xi.regime.type.GROUNDS) xi.regime.checkRegime(player, mob, 791, 1, xi.regime.type.GROUNDS) @@ -18,7 +23,7 @@ entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.SOZU_TERBERRY_PH, 10, 3600) -- 1 hour + xi.mob.phOnDespawn(mob, terberryPHTable, 10, 3600) -- 1 hour end return entity diff --git a/scripts/zones/Temple_of_Uggalepih/mobs/Torama.lua b/scripts/zones/Temple_of_Uggalepih/mobs/Torama.lua index 07bec3868d7..9a10618e5c0 100644 --- a/scripts/zones/Temple_of_Uggalepih/mobs/Torama.lua +++ b/scripts/zones/Temple_of_Uggalepih/mobs/Torama.lua @@ -7,11 +7,16 @@ local ID = zones[xi.zone.TEMPLE_OF_UGGALEPIH] ----------------------------------- local entity = {} +local flaurosPHTable = +{ + [ID.mob.FLAUROS + 3] = ID.mob.FLAUROS, -- 259 0.03 80 +} + entity.onMobDeath = function(mob, player, optParams) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.FLAUROS_PH, 10, 3600) -- 1 hour + xi.mob.phOnDespawn(mob, flaurosPHTable, 10, 3600) -- 1 hour end return entity From 56e97ba47df65bda22ac5b2ebee1b3aaf2fb9bfa Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Fri, 3 May 2024 22:22:16 -0400 Subject: [PATCH 4/8] Shift-proof Tavnazian Safehold Shift-proof Tavnazian Safehold --- scripts/zones/Tavnazian_Safehold/IDs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/zones/Tavnazian_Safehold/IDs.lua b/scripts/zones/Tavnazian_Safehold/IDs.lua index 32995835dce..fb75cc10964 100644 --- a/scripts/zones/Tavnazian_Safehold/IDs.lua +++ b/scripts/zones/Tavnazian_Safehold/IDs.lua @@ -47,7 +47,7 @@ zones[xi.zone.TAVNAZIAN_SAFEHOLD] = }, npc = { - QM_IN_SEARCH_OF_TRUTH_BASE = 16883860, + QM_IN_SEARCH_OF_TRUTH_BASE = GetFirstID('qm_in_search_of_truth'), }, } From 683c6e0d18d68f9d62c6283ac4113f764480dd48 Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Fri, 3 May 2024 22:22:29 -0400 Subject: [PATCH 5/8] Shift-proof Talacca Cove Shift-proof Talacca Cove --- scripts/zones/Talacca_Cove/IDs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/zones/Talacca_Cove/IDs.lua b/scripts/zones/Talacca_Cove/IDs.lua index c20eed88fac..8c73e66c9f9 100644 --- a/scripts/zones/Talacca_Cove/IDs.lua +++ b/scripts/zones/Talacca_Cove/IDs.lua @@ -33,7 +33,7 @@ zones[xi.zone.TALACCA_COVE] = }, mob = { - GESSHO = 17010725, + GESSHO = GetFirstID('Gessho'), }, npc = { From 57eb2eae4b5760f02b6b4b40acd7dc22c8dff55d Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Fri, 3 May 2024 22:23:01 -0400 Subject: [PATCH 6/8] Shift-proof Tahrongi Canyon Shift-proof Tahrongi Canyon --- scripts/zones/Tahrongi_Canyon/IDs.lua | 19 +++++-------------- .../Tahrongi_Canyon/mobs/Canyon_Crawler.lua | 7 ++++++- .../Tahrongi_Canyon/mobs/Wild_Dhalmel.lua | 8 +++++++- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/scripts/zones/Tahrongi_Canyon/IDs.lua b/scripts/zones/Tahrongi_Canyon/IDs.lua index 20d00c09e78..8c7881f64d3 100644 --- a/scripts/zones/Tahrongi_Canyon/IDs.lua +++ b/scripts/zones/Tahrongi_Canyon/IDs.lua @@ -61,19 +61,10 @@ zones[xi.zone.TAHRONGI_CANYON] = }, mob = { - SERPOPARD_ISHTAR_PH = - { - [17256560] = 17256563, -- -9.176 -8.191 -64.347 (south) - [17256686] = 17256690, -- 22.360 23.757 281.584 (north) - }, - - HERBAGE_HUNTER_PH = - { - [17256835] = 17256836, -- -119.301, 24.087, 448.636 - }, - - HABROK = 17256493, - YARA_MA_YHA_WHO = 17256900, + SERPOPARD_ISHTAR = GetTableOfIDs('Serpopard_Ishtar'), + HERBAGE_HUNTER = GetFirstID('Herbage_Hunter'), + HABROK = GetFirstID('Habrok'), + YARA_MA_YHA_WHO = GetFirstID('Yara_Ma_Yha_Who'), VOIDWALKER = { @@ -109,7 +100,7 @@ zones[xi.zone.TAHRONGI_CANYON] = npc = { - SIGNPOST_OFFSET = 17257034, + SIGNPOST_OFFSET = GetFirstID('Signpost'), EXCAVATION = GetTableOfIDs('Excavation_Point'), }, } diff --git a/scripts/zones/Tahrongi_Canyon/mobs/Canyon_Crawler.lua b/scripts/zones/Tahrongi_Canyon/mobs/Canyon_Crawler.lua index e10fb305017..5b9858b11ff 100644 --- a/scripts/zones/Tahrongi_Canyon/mobs/Canyon_Crawler.lua +++ b/scripts/zones/Tahrongi_Canyon/mobs/Canyon_Crawler.lua @@ -8,13 +8,18 @@ require('scripts/quests/tutorial') ----------------------------------- local entity = {} +local herbagePHTable = +{ + [ID.mob.HERBAGE_HUNTER - 1] = ID.mob.HERBAGE_HUNTER, -- -119.301, 24.087, 448.636 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 96, 1, xi.regime.type.FIELDS) xi.tutorial.onMobDeath(player) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.HERBAGE_HUNTER_PH, 10, 3600) -- 1 hour minimum + xi.mob.phOnDespawn(mob, herbagePHTable, 10, 3600) -- 1 hour minimum end return entity diff --git a/scripts/zones/Tahrongi_Canyon/mobs/Wild_Dhalmel.lua b/scripts/zones/Tahrongi_Canyon/mobs/Wild_Dhalmel.lua index 3c593c26dff..cb4da095786 100644 --- a/scripts/zones/Tahrongi_Canyon/mobs/Wild_Dhalmel.lua +++ b/scripts/zones/Tahrongi_Canyon/mobs/Wild_Dhalmel.lua @@ -8,13 +8,19 @@ require('scripts/quests/tutorial') ----------------------------------- local entity = {} +local serpopardPHTable = +{ + [ID.mob.SERPOPARD_ISHTAR[1] - 3] = ID.mob.SERPOPARD_ISHTAR[1], -- -9.176 -8.191 -64.347 (south) + [ID.mob.SERPOPARD_ISHTAR[2] - 4] = ID.mob.SERPOPARD_ISHTAR[2], -- 22.360 23.757 281.584 (north) +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 96, 2, xi.regime.type.FIELDS) xi.tutorial.onMobDeath(player) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.SERPOPARD_ISHTAR_PH, 10, 3600) -- 1 hour + xi.mob.phOnDespawn(mob, serpopardPHTable, 10, 3600) -- 1 hour end return entity From e89b0e5a9d243e52a53d2b0ffc7b9719accf524b Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Fri, 3 May 2024 22:19:57 -0400 Subject: [PATCH 7/8] Shift-proof The Eldieme Necropolis Shift-proof The Eldieme Necropolis --- scripts/zones/The_Eldieme_Necropolis/IDs.lua | 29 +++++++------------ .../zones/The_Eldieme_Necropolis/globals.lua | 2 +- .../The_Eldieme_Necropolis/mobs/Tomb_Wolf.lua | 10 ++++++- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/scripts/zones/The_Eldieme_Necropolis/IDs.lua b/scripts/zones/The_Eldieme_Necropolis/IDs.lua index 374af8fc031..acc05355940 100644 --- a/scripts/zones/The_Eldieme_Necropolis/IDs.lua +++ b/scripts/zones/The_Eldieme_Necropolis/IDs.lua @@ -61,31 +61,24 @@ zones[xi.zone.THE_ELDIEME_NECROPOLIS] = }, mob = { - CWN_CYRFF_PH = - { - [17576050] = 17576054, -- -375.862 0.542 382.17 - [17576051] = 17576054, -- -399.941 0.027 379.055 - [17576052] = 17576054, -- -384.019 0.509 384.26 - [17576053] = 17576054, -- -376.974 0.586 343.750 - }, - LICH_C_MAGNUS = 17575937, - YUM_KIMIL = 17576264, - STURM = 17576267, - TAIFUN = 17576268, - TROMBE = 17576269, - MIMIC = 17576270, + CWN_CYRFF = GetFirstID('Cwn_Cyrff'), + LICH_C_MAGNUS = GetFirstID('Lich_C_Magnus'), + YUM_KIMIL = GetFirstID('Yum_Kimil'), + STURM = GetFirstID('Sturm'), + TAIFUN = GetFirstID('Taifun'), + TROMBE = GetFirstID('Trombe'), + MIMIC = GetFirstID('Mimic'), APPARATUS_ELEMENTAL = 17576271, - NAMORODO = 17576272, - SKULL_OFFSET = 17575937, + NAMORODO = GetFirstID('Namorodo'), }, npc = { - GATE_OFFSET = 17576307, + GATE_OFFSET = GetFirstID('_5f1'), BRAZIER = GetFirstID('Brazier'), TREASURE_CHEST = GetFirstID('Treasure_Chest'), TREASURE_COFFER = GetFirstID('Treasure_Coffer'), - SARCOPHAGUS_OFFSET = 17576395, - CANDLE_OFFSET = 17576335, + SARCOPHAGUS_OFFSET = GetFirstID('Sarcophagus'), + CANDLE_OFFSET = GetFirstID('_5fu'), }, } diff --git a/scripts/zones/The_Eldieme_Necropolis/globals.lua b/scripts/zones/The_Eldieme_Necropolis/globals.lua index ec4fb28cb2d..2c7cc58307a 100644 --- a/scripts/zones/The_Eldieme_Necropolis/globals.lua +++ b/scripts/zones/The_Eldieme_Necropolis/globals.lua @@ -63,7 +63,7 @@ local eldiemeGlobal = -- Spawn all 7 Skulls for skull = 1, 7 do - SpawnMob(ID.mob.SKULL_OFFSET + skull) + SpawnMob(ID.mob.LICH_C_MAGNUS + skull) -- IDs based off Lich C Magnus end break diff --git a/scripts/zones/The_Eldieme_Necropolis/mobs/Tomb_Wolf.lua b/scripts/zones/The_Eldieme_Necropolis/mobs/Tomb_Wolf.lua index b2eb6eaece0..10a0bc40900 100644 --- a/scripts/zones/The_Eldieme_Necropolis/mobs/Tomb_Wolf.lua +++ b/scripts/zones/The_Eldieme_Necropolis/mobs/Tomb_Wolf.lua @@ -7,12 +7,20 @@ local ID = zones[xi.zone.THE_ELDIEME_NECROPOLIS] ----------------------------------- local entity = {} +local cwnCryffPHTable = +{ + [ID.mob.CWN_CYRFF - 4] = ID.mob.CWN_CYRFF, -- -375.862 0.542 382.17 + [ID.mob.CWN_CYRFF - 3] = ID.mob.CWN_CYRFF, -- -399.941 0.027 379.055 + [ID.mob.CWN_CYRFF - 2] = ID.mob.CWN_CYRFF, -- -384.019 0.509 384.26 + [ID.mob.CWN_CYRFF - 1] = ID.mob.CWN_CYRFF, -- -376.974 0.586 343.750 +} + entity.onMobDeath = function(mob, player, optParams) xi.regime.checkRegime(player, mob, 675, 1, xi.regime.type.GROUNDS) end entity.onMobDespawn = function(mob) - xi.mob.phOnDespawn(mob, ID.mob.CWN_CYRFF_PH, 5, 3600) -- 1-4 hours + xi.mob.phOnDespawn(mob, cwnCryffPHTable, 5, 3600) -- 1-4 hours end return entity From 70f4e3f4060f40a9bd3d3547aa04065474829967 Mon Sep 17 00:00:00 2001 From: Frankie-hz <105882754+Frankie-hz@users.noreply.github.com> Date: Fri, 3 May 2024 22:16:37 -0400 Subject: [PATCH 8/8] Shift-proof The Garden of RuHmet Shift-proof The Garden of RuHmet Move global qm spawn positions to globals.lua --- scripts/zones/The_Garden_of_RuHmet/IDs.lua | 50 +++++-------------- scripts/zones/The_Garden_of_RuHmet/Zone.lua | 11 ++-- .../zones/The_Garden_of_RuHmet/globals.lua | 33 ++++++++++++ .../mobs/Jailer_of_Faith.lua | 3 +- .../mobs/Jailer_of_Fortitude.lua | 3 +- .../npcs/qm_ixaern_drk.lua | 3 +- 6 files changed, 57 insertions(+), 46 deletions(-) create mode 100644 scripts/zones/The_Garden_of_RuHmet/globals.lua diff --git a/scripts/zones/The_Garden_of_RuHmet/IDs.lua b/scripts/zones/The_Garden_of_RuHmet/IDs.lua index 250a9581f7b..e1328449f8a 100644 --- a/scripts/zones/The_Garden_of_RuHmet/IDs.lua +++ b/scripts/zones/The_Garden_of_RuHmet/IDs.lua @@ -46,48 +46,22 @@ zones[xi.zone.THE_GARDEN_OF_RUHMET] = 16920665, -- SE }, - JAILER_OF_FORTITUDE = 16921015, - KFGHRAH_WHM = 16921016, - KFGHRAH_BLM = 16921017, - IXAERN_DRK = 16921018, - JAILER_OF_FAITH = 16921021, - IXAERN_DRG = 16921022, - IXZDEI_BASE = 16921011, - QNZDEI_OFFSET = 16920577, + JAILER_OF_FORTITUDE = GetFirstID('Jailer_of_Fortitude'), + KFGHRAH_WHM = GetFirstID('Kfghrah_WHM'), + KFGHRAH_BLM = GetFirstID('Kfghrah_BLM'), + IXAERN_DRK = GetFirstID('Ixaern_DRK'), + JAILER_OF_FAITH = GetFirstID('Jailer_of_Faith'), + IXAERN_DRG = GetFirstID('Ixaern_DRG'), + IXZDEI_BASE = GetFirstID('Ixzdei_RDM'), + QNZDEI_OFFSET = GetFirstID('Qnzdei'), }, npc = { - QM_IXAERN_DRK_POS = - { - { -560, 5.00, 239 }, -- Taru-Mithra - { -600, 5.00, 440 }, -- Mithra-Hume - { -240, 5.00, 440 }, -- Hume-Elvaan - { -280, 5.00, 240 }, -- Elvaan-Galka - }, - - QM_JAILER_OF_FORTITUDE_POS = - { - { -420.00, 0.00, 755.00 }, -- North / Hume tower. - { -43.00, 0.00, 460.00 }, -- NE / Elvaan tower. - { -260.00, 0.00, 44.821 }, -- SE / Galka tower. - { -580.00, 0.00, 43.00 }, -- SW / Tarutaru tower. - { -796.00, 0.00, 460.00 }, -- NW / Mithra tower. - }, - - QM_JAILER_OF_FAITH_POS = - { - { -420.00, 0.00, -157.00 }, -- North / Hume tower. - { -157.00, 0.00, -340.00 }, -- NE / Elvaan tower. - { -260.00, 0.00, -643.00 }, -- SE / Galka tower. - { -580.00, 0.00, -644.00 }, -- SW / Tarutaru tower. - { -683.00, 0.00, -340.00 }, -- NW / Mithra tower. - }, - - QM_JAILER_OF_FORTITUDE = 16921027, - QM_IXAERN_DRK = 16921028, - QM_JAILER_OF_FAITH = 16921029, - QNZDEI_DOOR_OFFSET = 16921069, + QM_JAILER_OF_FORTITUDE = GetFirstID('qm_jailer_of_fortitude'), + QM_IXAERN_DRK = GetFirstID('qm_ixaern_drk'), + QM_JAILER_OF_FAITH = GetFirstID('qm_jailer_of_faith'), + QNZDEI_DOOR_OFFSET = GetFirstID('_0zw'), }, } diff --git a/scripts/zones/The_Garden_of_RuHmet/Zone.lua b/scripts/zones/The_Garden_of_RuHmet/Zone.lua index 68f5f65029f..b7659a4b6cb 100644 --- a/scripts/zones/The_Garden_of_RuHmet/Zone.lua +++ b/scripts/zones/The_Garden_of_RuHmet/Zone.lua @@ -2,6 +2,7 @@ -- Zone: The_Garden_of_RuHmet (35) ----------------------------------- local ID = zones[xi.zone.THE_GARDEN_OF_RUHMET] +local gardenGlobal = require('scripts/zones/The_Garden_of_RuHmet/globals') ----------------------------------- local zoneObject = {} @@ -47,18 +48,18 @@ zoneObject.onInitialize = function(zone) -- Give the Fortitude ??? a random spawn local qmFort = GetNPCByID(ID.npc.QM_JAILER_OF_FORTITUDE) - qmFort:setPos(unpack(ID.npc.QM_JAILER_OF_FORTITUDE_POS[math.random(1, 5)])) + qmFort:setPos(unpack(gardenGlobal.qmPosFortTable[math.random(1, 5)])) -- Give the Ix'Aern DRK ??? a random spawn local qmDrk = GetNPCByID(ID.npc.QM_IXAERN_DRK) local qmDrkPos = math.random(1, 4) qmDrk:setLocalVar('position', qmDrkPos) - qmDrk:setPos(unpack(ID.npc.QM_IXAERN_DRK_POS[qmDrkPos])) + qmDrk:setPos(unpack(gardenGlobal.qmPosDRKTable[qmDrkPos])) qmDrk:setLocalVar('hatedPlayer', 0) -- Give the Faith ??? a random spawn local qmFaith = GetNPCByID(ID.npc.QM_JAILER_OF_FAITH) - qmFaith:setPos(unpack(ID.npc.QM_JAILER_OF_FAITH_POS[math.random(1, 5)])) + qmFaith:setPos(unpack(gardenGlobal.qmPosFaithTable[math.random(1, 5)])) -- Give Ix'DRG a random placeholder by picking one of the four groups at random, then adding a random number of 0-2 for the specific mob. local groups = ID.mob.AWAERN_DRG_GROUPS @@ -89,7 +90,7 @@ zoneObject.onGameHour = function(zone) if vanadielHour % s == 0 then local qmFaith = GetNPCByID(ID.npc.QM_JAILER_OF_FAITH) -- Jailer of Faith qmFaith:hideNPC(60) -- Hide it for 60 seconds - qmFaith:setPos(unpack(ID.npc.QM_JAILER_OF_FAITH_POS[math.random(1, 5)])) -- Set the new position + qmFaith:setPos(unpack(gardenGlobal.qmPosFaithTable[math.random(1, 5)])) -- Set the new position end -- Ix'DRK spawn randomiser @@ -97,7 +98,7 @@ zoneObject.onGameHour = function(zone) qmDrk:hideNPC(30) local qmDrkPos = math.random(1, 4) qmDrk:setLocalVar('position', qmDrkPos) - qmDrk:setPos(unpack(ID.npc.QM_IXAERN_DRK_POS[qmDrkPos])) + qmDrk:setPos(unpack(gardenGlobal.qmPosDRKTable[qmDrkPos])) end end diff --git a/scripts/zones/The_Garden_of_RuHmet/globals.lua b/scripts/zones/The_Garden_of_RuHmet/globals.lua new file mode 100644 index 00000000000..40b8f10b0a4 --- /dev/null +++ b/scripts/zones/The_Garden_of_RuHmet/globals.lua @@ -0,0 +1,33 @@ +----------------------------------- +-- Area: The_Garden_of_RuHmet +-- Globals for Pop QMs for Sea NMs +----------------------------------- +local gardenGlobal = {} + +gardenGlobal.qmPosDRKTable = +{ + { -560, 5.00, 239 }, -- Taru-Mithra + { -600, 5.00, 440 }, -- Mithra-Hume + { -240, 5.00, 440 }, -- Hume-Elvaan + { -280, 5.00, 240 }, -- Elvaan-Galka +} + +gardenGlobal.qmPosFortTable = +{ + { -420.00, 0.00, 755.00 }, -- North / Hume tower. + { -43.00, 0.00, 460.00 }, -- NE / Elvaan tower. + { -260.00, 0.00, 44.821 }, -- SE / Galka tower. + { -580.00, 0.00, 43.00 }, -- SW / Tarutaru tower. + { -796.00, 0.00, 460.00 }, -- NW / Mithra tower. +} + +gardenGlobal.qmPosFaithTable = +{ + { -420.00, 0.00, -157.00 }, -- North / Hume tower. + { -157.00, 0.00, -340.00 }, -- NE / Elvaan tower. + { -260.00, 0.00, -643.00 }, -- SE / Galka tower. + { -580.00, 0.00, -644.00 }, -- SW / Tarutaru tower. + { -683.00, 0.00, -340.00 }, -- NW / Mithra tower. +} + +return gardenGlobal diff --git a/scripts/zones/The_Garden_of_RuHmet/mobs/Jailer_of_Faith.lua b/scripts/zones/The_Garden_of_RuHmet/mobs/Jailer_of_Faith.lua index 6ffae456412..1a0a75c1138 100644 --- a/scripts/zones/The_Garden_of_RuHmet/mobs/Jailer_of_Faith.lua +++ b/scripts/zones/The_Garden_of_RuHmet/mobs/Jailer_of_Faith.lua @@ -3,6 +3,7 @@ -- NM: Jailer of Faith ----------------------------------- local ID = zones[xi.zone.THE_GARDEN_OF_RUHMET] +local gardenGlobal = require('scripts/zones/The_Garden_of_RuHmet/globals') mixins = { require('scripts/mixins/job_special') } ----------------------------------- local entity = {} @@ -34,7 +35,7 @@ end entity.onMobDespawn = function(mob) -- Move QM to random location - GetNPCByID(ID.npc.QM_JAILER_OF_FAITH):setPos(unpack(ID.npc.QM_JAILER_OF_FAITH_POS[math.random(1, 5)])) + GetNPCByID(ID.npc.QM_JAILER_OF_FAITH):setPos(unpack(gardenGlobal.qmPosFaithTable[math.random(1, 5)])) end return entity diff --git a/scripts/zones/The_Garden_of_RuHmet/mobs/Jailer_of_Fortitude.lua b/scripts/zones/The_Garden_of_RuHmet/mobs/Jailer_of_Fortitude.lua index 2b5c8727781..ae05983b371 100644 --- a/scripts/zones/The_Garden_of_RuHmet/mobs/Jailer_of_Fortitude.lua +++ b/scripts/zones/The_Garden_of_RuHmet/mobs/Jailer_of_Fortitude.lua @@ -3,6 +3,7 @@ -- NM: Jailer of Fortitude ----------------------------------- local ID = zones[xi.zone.THE_GARDEN_OF_RUHMET] +local gardenGlobal = require('scripts/zones/The_Garden_of_RuHmet/globals') mixins = { require('scripts/mixins/job_special') } ----------------------------------- local entity = {} @@ -71,7 +72,7 @@ end entity.onMobDespawn = function(mob) -- Move QM to random location - GetNPCByID(ID.npc.QM_JAILER_OF_FORTITUDE):setPos(unpack(ID.npc.QM_JAILER_OF_FORTITUDE_POS[math.random(1, 5)])) + GetNPCByID(ID.npc.QM_JAILER_OF_FORTITUDE):setPos(unpack(gardenGlobal.qmPosFortTable[math.random(1, 5)])) end return entity diff --git a/scripts/zones/The_Garden_of_RuHmet/npcs/qm_ixaern_drk.lua b/scripts/zones/The_Garden_of_RuHmet/npcs/qm_ixaern_drk.lua index d5471650af0..995caa282cf 100644 --- a/scripts/zones/The_Garden_of_RuHmet/npcs/qm_ixaern_drk.lua +++ b/scripts/zones/The_Garden_of_RuHmet/npcs/qm_ixaern_drk.lua @@ -9,6 +9,7 @@ -- !pos -280 5.00 240 35 ----------------------------------- local ID = zones[xi.zone.THE_GARDEN_OF_RUHMET] +local gardenGlobal = require('scripts/zones/The_Garden_of_RuHmet/globals') ----------------------------------- local entity = {} @@ -43,7 +44,7 @@ entity.onTrigger = function(player, npc) -- move QM to random location, and reset animosity local pos = math.random(1, 4) - npcUtil.queueMove(npc, ID.npc.QM_IXAERN_DRK_POS[pos]) + npcUtil.queueMove(npc, gardenGlobal.qmPosDRKTable[pos]) npc:setLocalVar('position', pos) npc:setLocalVar('hatedPlayer', 0) npc:setLocalVar('hateTimer', 0)