diff --git a/scripts/event/AmoriaPQ.js b/scripts/event/AmoriaPQ.js index c45b0e8ae7..5b6c7c3832 100644 --- a/scripts/event/AmoriaPQ.js +++ b/scripts/event/AmoriaPQ.js @@ -148,9 +148,9 @@ function setup(level, lobbyid) { var mapObj = eim.getInstanceMap(670010700); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mobObj = MapleLifeFactory.getMonster(9400536); + var mobObj = LifeFactory.getMonster(9400536); mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(942, 478)); respawnStages(eim); diff --git a/scripts/event/AreaBossBamboo.js b/scripts/event/AreaBossBamboo.js index c4d3a49c09..7d1543ab18 100644 --- a/scripts/event/AreaBossBamboo.js +++ b/scripts/event/AreaBossBamboo.js @@ -40,9 +40,9 @@ function cancelSchedule() { } function start() { - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); var mapObj = em.getChannelServer().getMapFactory().getMap(800020120); // original mapid was 251010101 - var mobObj = MapleLifeFactory.getMonster(6090002); + var mobObj = LifeFactory.getMonster(6090002); if(mapObj.getMonsterById(6090002) != null) { em.schedule("start", 3 * 60 *60 * 1000); diff --git a/scripts/event/AreaBossCentipede.js b/scripts/event/AreaBossCentipede.js index 4df057c579..ea4a48ab8f 100644 --- a/scripts/event/AreaBossCentipede.js +++ b/scripts/event/AreaBossCentipede.js @@ -47,11 +47,11 @@ function start() { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); const PacketCreator = Java.type('tools.PacketCreator'); - var gcent = MapleLifeFactory.getMonster(5220004); + var gcent = LifeFactory.getMonster(5220004); herbGarden.spawnMonsterOnGroundBelow(gcent, new Point(560, 50)); herbGarden.broadcastMessage(PacketCreator.serverNotice(6, "From the mists surrounding the herb garden, the gargantuous Giant Centipede appears.")); em.schedule("start", 3 * 60 *60 * 1000); diff --git a/scripts/event/AreaBossDeo.js b/scripts/event/AreaBossDeo.js index 1a83b1128c..56969924b7 100644 --- a/scripts/event/AreaBossDeo.js +++ b/scripts/event/AreaBossDeo.js @@ -47,11 +47,11 @@ function start() { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); const PacketCreator = Java.type('tools.PacketCreator'); - var deo = MapleLifeFactory.getMonster(3220001); + var deo = LifeFactory.getMonster(3220001); royalCatthusDesert.spawnMonsterOnGroundBelow(deo, new Point(645, 275)); royalCatthusDesert.broadcastMessage(PacketCreator.serverNotice(6, "Deo slowly appeared out of the sand dust.")); em.schedule("start", 3 * 60 *60 * 1000); diff --git a/scripts/event/AreaBossDoor1.js b/scripts/event/AreaBossDoor1.js index dc4b01ddaf..d7f624014c 100644 --- a/scripts/event/AreaBossDoor1.js +++ b/scripts/event/AreaBossDoor1.js @@ -50,9 +50,9 @@ function start() { const Point = Java.type('java.awt.Point'); const PacketCreator = Java.type('tools.PacketCreator'); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); - var boss = MapleLifeFactory.getMonster(bossMobid); + var boss = LifeFactory.getMonster(bossMobid); var bossPos = new Point(467, 0); map.spawnMonsterOnGroundBelow(boss, bossPos); map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg)); diff --git a/scripts/event/AreaBossDoor2.js b/scripts/event/AreaBossDoor2.js index c230949dd8..4415f8c35f 100644 --- a/scripts/event/AreaBossDoor2.js +++ b/scripts/event/AreaBossDoor2.js @@ -48,11 +48,11 @@ function start() { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); const PacketCreator = Java.type('tools.PacketCreator'); - var boss = MapleLifeFactory.getMonster(bossMobid); + var boss = LifeFactory.getMonster(bossMobid); var bossPos = new Point(201, 80); map.spawnMonsterOnGroundBelow(boss, bossPos); map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg)); diff --git a/scripts/event/AreaBossDoor3.js b/scripts/event/AreaBossDoor3.js index a872cb42a1..9efa3f4f00 100644 --- a/scripts/event/AreaBossDoor3.js +++ b/scripts/event/AreaBossDoor3.js @@ -48,11 +48,11 @@ function start() { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); const PacketCreator = Java.type('tools.PacketCreator'); - var boss = MapleLifeFactory.getMonster(bossMobid); + var boss = LifeFactory.getMonster(bossMobid); var bossPos = new Point(251, -841); map.spawnMonsterOnGroundBelow(boss, bossPos); map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg)); diff --git a/scripts/event/AreaBossDoor4.js b/scripts/event/AreaBossDoor4.js index 7fa3b0b079..f1b041965e 100644 --- a/scripts/event/AreaBossDoor4.js +++ b/scripts/event/AreaBossDoor4.js @@ -48,11 +48,11 @@ function start() { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); const PacketCreator = Java.type('tools.PacketCreator'); - var boss = MapleLifeFactory.getMonster(bossMobid); + var boss = LifeFactory.getMonster(bossMobid); var bossPos = new Point(842, 0); map.spawnMonsterOnGroundBelow(boss, bossPos); map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg)); diff --git a/scripts/event/AreaBossDoor5.js b/scripts/event/AreaBossDoor5.js index e2844d77f5..eef81a4c82 100644 --- a/scripts/event/AreaBossDoor5.js +++ b/scripts/event/AreaBossDoor5.js @@ -48,11 +48,11 @@ function start() { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); const PacketCreator = Java.type('tools.PacketCreator'); - var boss = MapleLifeFactory.getMonster(bossMobid); + var boss = LifeFactory.getMonster(bossMobid); var bossPos = new Point(461, 61); map.spawnMonsterOnGroundBelow(boss, bossPos); map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg)); diff --git a/scripts/event/AreaBossDoor6.js b/scripts/event/AreaBossDoor6.js index 61b406a0ec..c65388ab2e 100644 --- a/scripts/event/AreaBossDoor6.js +++ b/scripts/event/AreaBossDoor6.js @@ -48,11 +48,11 @@ function start() { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); const PacketCreator = Java.type('tools.PacketCreator'); - var boss = MapleLifeFactory.getMonster(bossMobid); + var boss = LifeFactory.getMonster(bossMobid); var bossPos = new Point(171, 50); map.spawnMonsterOnGroundBelow(boss, bossPos); map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg)); diff --git a/scripts/event/AreaBossDyle.js b/scripts/event/AreaBossDyle.js index bbb6e882e3..dd772c3e0f 100644 --- a/scripts/event/AreaBossDyle.js +++ b/scripts/event/AreaBossDyle.js @@ -47,11 +47,11 @@ function start() { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const PacketCreator = Java.type('tools.PacketCreator'); const Point = Java.type('java.awt.Point'); const spawnpoint = new Point(90, 119); - dangeroudCroko1.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(6220000), spawnpoint); + dangeroudCroko1.spawnMonsterOnGroundBelow(LifeFactory.getMonster(6220000), spawnpoint); dangeroudCroko1.broadcastMessage(PacketCreator.serverNotice(6, "The huge crocodile Dyle has come out from the swamp.")); setupTask = em.schedule("start", 3 * 60 * 60 * 1000); } diff --git a/scripts/event/AreaBossEliza1.js b/scripts/event/AreaBossEliza1.js index df74a9b2bb..b26fc09a5e 100644 --- a/scripts/event/AreaBossEliza1.js +++ b/scripts/event/AreaBossEliza1.js @@ -43,8 +43,8 @@ function cancelSchedule() { } function start() { - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var eliza = MapleLifeFactory.getMonster(8220000); + const LifeFactory = Java.type('server.life.LifeFactory'); + var eliza = LifeFactory.getMonster(8220000); var stairwayToTheSky2 = em.getChannelServer().getMapFactory().getMap(200010300); if(stairwayToTheSky2.getMonsterById(8220000) != null) { diff --git a/scripts/event/AreaBossFaust1.js b/scripts/event/AreaBossFaust1.js index b30dc16c83..fb06ac593e 100644 --- a/scripts/event/AreaBossFaust1.js +++ b/scripts/event/AreaBossFaust1.js @@ -47,11 +47,11 @@ function start() { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const PacketCreator = Java.type('tools.PacketCreator'); const Point = Java.type('java.awt.Point'); - var faust1 = MapleLifeFactory.getMonster(5220002); + var faust1 = LifeFactory.getMonster(5220002); const spawnpoint = new Point(456, 278); theForestOfEvil1.spawnMonsterOnGroundBelow(faust1, spawnpoint); theForestOfEvil1.broadcastMessage(PacketCreator.serverNotice(6, "Faust appeared amidst the blue fog.")); diff --git a/scripts/event/AreaBossFaust2.js b/scripts/event/AreaBossFaust2.js index 311734bb90..b2da4f3743 100644 --- a/scripts/event/AreaBossFaust2.js +++ b/scripts/event/AreaBossFaust2.js @@ -41,9 +41,9 @@ function cancelSchedule() { } function start() { - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); var theForestOfEvil2 = em.getChannelServer().getMapFactory().getMap(100040106); - var faust2 = MapleLifeFactory.getMonster(5220002); + var faust2 = LifeFactory.getMonster(5220002); if(theForestOfEvil2.getMonsterById(5220002) != null) { em.schedule("start", 3 * 60 *60 * 1000); diff --git a/scripts/event/AreaBossKimera.js b/scripts/event/AreaBossKimera.js index 2a50671430..83539eabc3 100644 --- a/scripts/event/AreaBossKimera.js +++ b/scripts/event/AreaBossKimera.js @@ -41,9 +41,9 @@ function cancelSchedule() { } function start() { - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); var labSecretBasementPath = em.getChannelServer().getMapFactory().getMap(261030000); - var chimera = MapleLifeFactory.getMonster(8220002); + var chimera = LifeFactory.getMonster(8220002); if(labSecretBasementPath.getMonsterById(8220002) != null) { em.schedule("start", 3 * 60 *60 * 1000); diff --git a/scripts/event/AreaBossKingClang.js b/scripts/event/AreaBossKingClang.js index da7bceb2fe..91a3737c00 100644 --- a/scripts/event/AreaBossKingClang.js +++ b/scripts/event/AreaBossKingClang.js @@ -49,8 +49,8 @@ function start() { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var kingClang = MapleLifeFactory.getMonster(5220001); + const LifeFactory = Java.type('server.life.LifeFactory'); + var kingClang = LifeFactory.getMonster(5220001); var posX; var posY = 140; posX = Math.floor((Math.random() * 2400) - 1600); diff --git a/scripts/event/AreaBossKingSageCat.js b/scripts/event/AreaBossKingSageCat.js index 11b487772c..1950f8f4b7 100644 --- a/scripts/event/AreaBossKingSageCat.js +++ b/scripts/event/AreaBossKingSageCat.js @@ -42,8 +42,8 @@ function cancelSchedule() { function start() { var goblinForest2 = em.getChannelServer().getMapFactory().getMap(250010504); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var kingSageCat = MapleLifeFactory.getMonster(7220002); + const LifeFactory = Java.type('server.life.LifeFactory'); + var kingSageCat = LifeFactory.getMonster(7220002); if(goblinForest2.getMonsterById(7220002) != null) { em.schedule("start", 3 * 60 *60 * 1000); diff --git a/scripts/event/AreaBossLeviathan.js b/scripts/event/AreaBossLeviathan.js index 4a2a6b64b6..b20e18db76 100644 --- a/scripts/event/AreaBossLeviathan.js +++ b/scripts/event/AreaBossLeviathan.js @@ -42,8 +42,8 @@ function cancelSchedule() { function start() { var leviathansCanyon = em.getChannelServer().getMapFactory().getMap(240040401); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var leviathan = MapleLifeFactory.getMonster(8220003); + const LifeFactory = Java.type('server.life.LifeFactory'); + var leviathan = LifeFactory.getMonster(8220003); if(leviathansCanyon.getMonsterById(8220003) != null) { em.schedule("start", 3 * 60 *60 * 1000); return; diff --git a/scripts/event/AreaBossMano.js b/scripts/event/AreaBossMano.js index 3e46eb9248..64aad889a5 100644 --- a/scripts/event/AreaBossMano.js +++ b/scripts/event/AreaBossMano.js @@ -41,8 +41,8 @@ function cancelSchedule() { function start() { var thicketAroundTheBeach3 = em.getChannelServer().getMapFactory().getMap(104000400); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var mano = MapleLifeFactory.getMonster(2220000); + const LifeFactory = Java.type('server.life.LifeFactory'); + var mano = LifeFactory.getMonster(2220000); if(thicketAroundTheBeach3.getMonsterById(2220000) != null) { em.schedule("start", 3 * 60 * 60 * 1000); return; diff --git a/scripts/event/AreaBossNineTailedFox.js b/scripts/event/AreaBossNineTailedFox.js index cda001496a..550d9a2843 100644 --- a/scripts/event/AreaBossNineTailedFox.js +++ b/scripts/event/AreaBossNineTailedFox.js @@ -42,8 +42,8 @@ function cancelSchedule() { function start() { var moonRidge = em.getChannelServer().getMapFactory().getMap(222010310); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var nineTailedFox = MapleLifeFactory.getMonster(7220001); + const LifeFactory = Java.type('server.life.LifeFactory'); + var nineTailedFox = LifeFactory.getMonster(7220001); if(moonRidge.getMonsterById(7220001) != null) { em.schedule("start", 3 * 60 *60 * 1000); return; diff --git a/scripts/event/AreaBossSeruf.js b/scripts/event/AreaBossSeruf.js index e6eed006d6..b78a9c347b 100644 --- a/scripts/event/AreaBossSeruf.js +++ b/scripts/event/AreaBossSeruf.js @@ -43,8 +43,8 @@ function cancelSchedule() { function start() { var theSeaweedTower = em.getChannelServer().getMapFactory().getMap(230020100); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var seruf = MapleLifeFactory.getMonster(4220001); + const LifeFactory = Java.type('server.life.LifeFactory'); + var seruf = LifeFactory.getMonster(4220001); if(theSeaweedTower.getMonsterById(4220001) != null) { em.schedule("start", 3 * 60 * 60 * 1000); diff --git a/scripts/event/AreaBossSnackBar.js b/scripts/event/AreaBossSnackBar.js index 316505b2b3..93cf601be7 100644 --- a/scripts/event/AreaBossSnackBar.js +++ b/scripts/event/AreaBossSnackBar.js @@ -50,11 +50,11 @@ function start() { var setPos = [[-626, -604], [735, -600]]; var rndPos = setPos[Math.floor(Math.random() * setPos.length)]; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); const PacketCreator = Java.type('tools.PacketCreator'); - var snackBar = MapleLifeFactory.getMonster(8220008); + var snackBar = LifeFactory.getMonster(8220008); snackBarMap.spawnMonsterOnGroundBelow(snackBar, new Point(rndPos[0], rndPos[1])); snackBarMap.broadcastMessage(PacketCreator.serverNotice(6, "Slowly, a suspicious food stand opens up on a strangely remote place.")); em.schedule("start", 3 * 60 * 60 * 1000); diff --git a/scripts/event/AreaBossStumpy.js b/scripts/event/AreaBossStumpy.js index 90f991354a..7fba0bbfad 100644 --- a/scripts/event/AreaBossStumpy.js +++ b/scripts/event/AreaBossStumpy.js @@ -42,8 +42,8 @@ function cancelSchedule() { function start() { var eastRockyMountain5 = em.getChannelServer().getMapFactory().getMap(101030404); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var stumpy = MapleLifeFactory.getMonster(3220000); + const LifeFactory = Java.type('server.life.LifeFactory'); + var stumpy = LifeFactory.getMonster(3220000); if(eastRockyMountain5.getMonsterById(3220000) != null) { em.schedule("start", 3 * 60 * 60 * 1000); diff --git a/scripts/event/AreaBossTaeRoon.js b/scripts/event/AreaBossTaeRoon.js index 5a0f881ca0..b1899ed2cf 100644 --- a/scripts/event/AreaBossTaeRoon.js +++ b/scripts/event/AreaBossTaeRoon.js @@ -42,8 +42,8 @@ function cancelSchedule() { function start() { var territoryOfWanderingBear = em.getChannelServer().getMapFactory().getMap(250010304); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var taeRoon = MapleLifeFactory.getMonster(7220000); + const LifeFactory = Java.type('server.life.LifeFactory'); + var taeRoon = LifeFactory.getMonster(7220000); if(territoryOfWanderingBear.getMonsterById(7220000) != null) { em.schedule("start", 3 * 60 * 60 * 1000); diff --git a/scripts/event/AreaBossTimer1.js b/scripts/event/AreaBossTimer1.js index 3ead99a478..97ccda3549 100644 --- a/scripts/event/AreaBossTimer1.js +++ b/scripts/event/AreaBossTimer1.js @@ -41,8 +41,8 @@ function cancelSchedule() { function start() { var whirlpoolOfTime = em.getChannelServer().getMapFactory().getMap(220050100); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var timer1 = MapleLifeFactory.getMonster(5220003); + const LifeFactory = Java.type('server.life.LifeFactory'); + var timer1 = LifeFactory.getMonster(5220003); if(whirlpoolOfTime.getMonsterById(5220003) != null) { em.schedule("start", 3 * 60 * 60 * 1000); diff --git a/scripts/event/AreaBossTimer2.js b/scripts/event/AreaBossTimer2.js index aa762ce1d8..cbcfd55a78 100644 --- a/scripts/event/AreaBossTimer2.js +++ b/scripts/event/AreaBossTimer2.js @@ -42,8 +42,8 @@ function cancelSchedule() { function start() { var lostTime1 = em.getChannelServer().getMapFactory().getMap(220050000); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var timer2 = MapleLifeFactory.getMonster(5220003); + const LifeFactory = Java.type('server.life.LifeFactory'); + var timer2 = LifeFactory.getMonster(5220003); if(lostTime1.getMonsterById(5220003) != null) { em.schedule("start", 3 * 60 * 60 * 1000); diff --git a/scripts/event/AreaBossTimer3.js b/scripts/event/AreaBossTimer3.js index a0bbb09fc3..23aefeca26 100644 --- a/scripts/event/AreaBossTimer3.js +++ b/scripts/event/AreaBossTimer3.js @@ -43,8 +43,8 @@ function cancelSchedule() { function start() { var lostTime2 = em.getChannelServer().getMapFactory().getMap(220050200); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var timer3 = MapleLifeFactory.getMonster(5220003); + const LifeFactory = Java.type('server.life.LifeFactory'); + var timer3 = LifeFactory.getMonster(5220003); if(lostTime2.getMonsterById(5220003) != null) { em.schedule("start", 3 * 60 * 60 * 1000); diff --git a/scripts/event/AreaBossZeno.js b/scripts/event/AreaBossZeno.js index fe808f1104..a6a3ac9018 100644 --- a/scripts/event/AreaBossZeno.js +++ b/scripts/event/AreaBossZeno.js @@ -47,11 +47,11 @@ function start() { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); const PacketCreator = Java.type('tools.PacketCreator'); - var zeno = MapleLifeFactory.getMonster(6220001); + var zeno = LifeFactory.getMonster(6220001); graysPrairie.spawnMonsterOnGroundBelow(zeno, new Point(-4224, 776)); graysPrairie.broadcastMessage(PacketCreator.serverNotice(6, "Zeno has appeared with a heavy sound of machinery.")); em.schedule("start", 3 * 60 * 60 * 1000); diff --git a/scripts/event/BalrogBattle.js b/scripts/event/BalrogBattle.js index b17d925670..2b79d2bff9 100644 --- a/scripts/event/BalrogBattle.js +++ b/scripts/event/BalrogBattle.js @@ -135,16 +135,16 @@ function releaseLeftClaw(eim) { function spawnBalrog(eim) { var mapObj = eim.getInstanceMap(entryMap); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - mapObj.spawnFakeMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830000), new Point(412, 258)); - mapObj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830002), new Point(412, 258)); - mapObj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830006), new Point(412, 258)); + mapObj.spawnFakeMonsterOnGroundBelow(LifeFactory.getMonster(8830000), new Point(412, 258)); + mapObj.spawnMonsterOnGroundBelow(LifeFactory.getMonster(8830002), new Point(412, 258)); + mapObj.spawnMonsterOnGroundBelow(LifeFactory.getMonster(8830006), new Point(412, 258)); } function spawnSealedBalrog(eim) { const Point = Java.type('java.awt.Point'); - eim.getInstanceMap(entryMap).spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(bossMobId), new Point(412, 258)); + eim.getInstanceMap(entryMap).spawnMonsterOnGroundBelow(LifeFactory.getMonster(bossMobId), new Point(412, 258)); } function playerEntry(eim, player) { diff --git a/scripts/event/BalrogBattle_Easy.js b/scripts/event/BalrogBattle_Easy.js index 579b1442ed..ac0ebec18e 100644 --- a/scripts/event/BalrogBattle_Easy.js +++ b/scripts/event/BalrogBattle_Easy.js @@ -135,16 +135,16 @@ function releaseLeftClaw(eim) { function spawnBalrog(eim) { var mapObj = eim.getInstanceMap(entryMap); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - mapObj.spawnFakeMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830007), new Point(412, 258)); - mapObj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830009), new Point(412, 258)); - mapObj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830013), new Point(412, 258)); + mapObj.spawnFakeMonsterOnGroundBelow(LifeFactory.getMonster(8830007), new Point(412, 258)); + mapObj.spawnMonsterOnGroundBelow(LifeFactory.getMonster(8830009), new Point(412, 258)); + mapObj.spawnMonsterOnGroundBelow(LifeFactory.getMonster(8830013), new Point(412, 258)); } function spawnSealedBalrog(eim) { const Point = Java.type('java.awt.Point'); - eim.getInstanceMap(entryMap).spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(bossMobId), new Point(412, 258)); + eim.getInstanceMap(entryMap).spawnMonsterOnGroundBelow(LifeFactory.getMonster(bossMobId), new Point(412, 258)); } function playerEntry(eim, player) { diff --git a/scripts/event/Boats.js b/scripts/event/Boats.js index cbcab79119..b989c74895 100644 --- a/scripts/event/Boats.js +++ b/scripts/event/Boats.js @@ -95,17 +95,17 @@ function approach() { } function invasion() { - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); var map1 = Boat_to_Ellinia; var pos1 = new java.awt.Point(-538, 143); - map1.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8150000), pos1); - map1.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8150000), pos1); + map1.spawnMonsterOnGroundBelow(LifeFactory.getMonster(8150000), pos1); + map1.spawnMonsterOnGroundBelow(LifeFactory.getMonster(8150000), pos1); var map2 = Boat_to_Orbis; var pos2 = new java.awt.Point(339, 148); - map2.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8150000), pos2); - map2.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8150000), pos2); + map2.spawnMonsterOnGroundBelow(LifeFactory.getMonster(8150000), pos2); + map2.spawnMonsterOnGroundBelow(LifeFactory.getMonster(8150000), pos2); } function cancelSchedule() {} diff --git a/scripts/event/HolidayPQ_1.js b/scripts/event/HolidayPQ_1.js index 255947270e..42490321ab 100644 --- a/scripts/event/HolidayPQ_1.js +++ b/scripts/event/HolidayPQ_1.js @@ -304,9 +304,9 @@ function snowmanEvolve(eim, curLevel) { eim.setIntProperty("snowmanLevel", curLevel + 2); // increment by 2 to decrement by 1 on friendlyKilled mapobj.killMonster(snowman, null, false, 2); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var snowman = MapleLifeFactory.getMonster(9400317 + (5 * difficulty) + curLevel); + var snowman = LifeFactory.getMonster(9400317 + (5 * difficulty) + curLevel); mapobj.spawnMonsterOnGroundBelow(snowman, new Point(-180, 15)); if(curLevel >= 4) { diff --git a/scripts/event/HolidayPQ_2.js b/scripts/event/HolidayPQ_2.js index 002de505a3..fd5798c850 100644 --- a/scripts/event/HolidayPQ_2.js +++ b/scripts/event/HolidayPQ_2.js @@ -304,9 +304,9 @@ function snowmanEvolve(eim, curLevel) { eim.setIntProperty("snowmanLevel", curLevel + 2); // increment by 2 to decrement by 1 on friendlyKilled mapobj.killMonster(snowman, null, false, 2); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var snowman = MapleLifeFactory.getMonster(9400317 + (5 * difficulty) + curLevel); + var snowman = LifeFactory.getMonster(9400317 + (5 * difficulty) + curLevel); mapobj.spawnMonsterOnGroundBelow(snowman, new Point(-180, 15)); if(curLevel >= 4) { diff --git a/scripts/event/HolidayPQ_3.js b/scripts/event/HolidayPQ_3.js index 4a31818dc2..5aeef36b51 100644 --- a/scripts/event/HolidayPQ_3.js +++ b/scripts/event/HolidayPQ_3.js @@ -304,9 +304,9 @@ function snowmanEvolve(eim, curLevel) { eim.setIntProperty("snowmanLevel", curLevel + 2); // increment by 2 to decrement by 1 on friendlyKilled mapobj.killMonster(snowman, null, false, 2); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var snowman = MapleLifeFactory.getMonster(9400317 + (5 * difficulty) + curLevel); + var snowman = LifeFactory.getMonster(9400317 + (5 * difficulty) + curLevel); mapobj.spawnMonsterOnGroundBelow(snowman, new Point(-180, 15)); if(curLevel >= 4) { diff --git a/scripts/event/HorntailBattle.js b/scripts/event/HorntailBattle.js index cd2dc1d052..538efa49d6 100644 --- a/scripts/event/HorntailBattle.js +++ b/scripts/event/HorntailBattle.js @@ -96,15 +96,15 @@ function setup(channel) { eim.getInstanceMap(240060100).resetPQ(level); eim.getInstanceMap(240060200).resetPQ(level); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); var map, mob; map = eim.getInstanceMap(240060000); - mob = MapleLifeFactory.getMonster(8810000); + mob = LifeFactory.getMonster(8810000); map.spawnMonsterOnGroundBelow(mob, new Point(960, 120)); map = eim.getInstanceMap(240060100); - mob = MapleLifeFactory.getMonster(8810001); + mob = LifeFactory.getMonster(8810001); map.spawnMonsterOnGroundBelow(mob, new Point(-420, 120)); eim.startEventTimer(eventTime * 60000); diff --git a/scripts/event/MK_PrimeMinister.js b/scripts/event/MK_PrimeMinister.js index a26144cabb..b086aacec1 100644 --- a/scripts/event/MK_PrimeMinister.js +++ b/scripts/event/MK_PrimeMinister.js @@ -63,9 +63,9 @@ function respawn(eim){ var weddinghall = eim.getMapInstance(entryMap); weddinghall.getPortal(1).setPortalState(false); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - weddinghall.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new Point(292, 143)); + weddinghall.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(292, 143)); } else { eim.schedule("respawn", 10000); } diff --git a/scripts/event/MK_PrimeMinister2.js b/scripts/event/MK_PrimeMinister2.js index b1ceb9b43c..3e3a13f748 100644 --- a/scripts/event/MK_PrimeMinister2.js +++ b/scripts/event/MK_PrimeMinister2.js @@ -54,9 +54,9 @@ function respawn(eim){ var weddinghall = eim.getMapInstance(entryMap); weddinghall.getPortal(1).setPortalState(false); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - weddinghall.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new Point(292, 143)); + weddinghall.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(292, 143)); } else { eim.schedule("respawn", 10000); } diff --git a/scripts/event/MagatiaPQ_A.js b/scripts/event/MagatiaPQ_A.js index d732c0dfda..1759126853 100644 --- a/scripts/event/MagatiaPQ_A.js +++ b/scripts/event/MagatiaPQ_A.js @@ -244,16 +244,16 @@ function respawnStages(eim) { var mapobj = eim.getMapInstance(926110401); var mobcount = mapobj.countMonster(9300150); var mobobj; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); if(mobcount == 0) { - mobobj = MapleLifeFactory.getMonster(9300150); + mobobj = LifeFactory.getMonster(9300150); mapobj.spawnMonsterOnGroundBelow(mobobj, new Point(-278, -126)); - mobobj = MapleLifeFactory.getMonster(9300150); + mobobj = LifeFactory.getMonster(9300150); mapobj.spawnMonsterOnGroundBelow(mobobj, new Point(-542, -126)); } else if(mobcount == 1) { - mobobj = MapleLifeFactory.getMonster(9300150); + mobobj = LifeFactory.getMonster(9300150); mapobj.spawnMonsterOnGroundBelow(mobobj, new Point(-542, -126)); } } @@ -313,12 +313,12 @@ function yuleteAction(eim) { mapobj.destroyNPC(2112010); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); var mobobj1, mobobj2; for(var i = 0; i < 5; i++) { - mobobj1 = MapleLifeFactory.getMonster(mob1); - mobobj2 = MapleLifeFactory.getMonster(mob2); + mobobj1 = LifeFactory.getMonster(mob1); + mobobj2 = LifeFactory.getMonster(mob2); mapobj.spawnMonsterOnGroundBelow(mobobj1, new Point(-455, 135)); mapobj.spawnMonsterOnGroundBelow(mobobj2, new Point(-455, 135)); @@ -326,8 +326,8 @@ function yuleteAction(eim) { for(var i = 0; i < 5; i++) { - mobobj1 = MapleLifeFactory.getMonster(mob1); - mobobj2 = MapleLifeFactory.getMonster(mob2); + mobobj1 = LifeFactory.getMonster(mob1); + mobobj2 = LifeFactory.getMonster(mob2); mapobj.spawnMonsterOnGroundBelow(mobobj1, new Point(0, 135)); mapobj.spawnMonsterOnGroundBelow(mobobj2, new Point(0, 135)); @@ -335,8 +335,8 @@ function yuleteAction(eim) { for(var i = 0; i < 5; i++) { - mobobj1 = MapleLifeFactory.getMonster(mob1); - mobobj2 = MapleLifeFactory.getMonster(mob2); + mobobj1 = LifeFactory.getMonster(mob1); + mobobj2 = LifeFactory.getMonster(mob2); mapobj.spawnMonsterOnGroundBelow(mobobj1, new Point(360, 135)); mapobj.spawnMonsterOnGroundBelow(mobobj2, new Point(360, 135)); diff --git a/scripts/event/MagatiaPQ_Z.js b/scripts/event/MagatiaPQ_Z.js index 14fb5421b4..38c8134b9c 100644 --- a/scripts/event/MagatiaPQ_Z.js +++ b/scripts/event/MagatiaPQ_Z.js @@ -244,16 +244,16 @@ function respawnStages(eim) { var mapobj = eim.getMapInstance(926100401); var mobcount = mapobj.countMonster(9300150); var mobobj; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); if(mobcount == 0) { - mobobj = MapleLifeFactory.getMonster(9300150); + mobobj = LifeFactory.getMonster(9300150); mapobj.spawnMonsterOnGroundBelow(mobobj, new Point(-278, -126)); - mobobj = MapleLifeFactory.getMonster(9300150); + mobobj = LifeFactory.getMonster(9300150); mapobj.spawnMonsterOnGroundBelow(mobobj, new Point(-542, -126)); } else if(mobcount == 1) { - mobobj = MapleLifeFactory.getMonster(9300150); + mobobj = LifeFactory.getMonster(9300150); mapobj.spawnMonsterOnGroundBelow(mobobj, new Point(-542, -126)); } } @@ -313,12 +313,12 @@ function yuleteAction(eim) { mapobj.destroyNPC(2112000); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); var mobobj1, mobobj2; for(var i = 0; i < 5; i++) { - mobobj1 = MapleLifeFactory.getMonster(mob1); - mobobj2 = MapleLifeFactory.getMonster(mob2); + mobobj1 = LifeFactory.getMonster(mob1); + mobobj2 = LifeFactory.getMonster(mob2); mapobj.spawnMonsterOnGroundBelow(mobobj1, new Point(-455, 135)); mapobj.spawnMonsterOnGroundBelow(mobobj2, new Point(-455, 135)); @@ -326,8 +326,8 @@ function yuleteAction(eim) { for(var i = 0; i < 5; i++) { - mobobj1 = MapleLifeFactory.getMonster(mob1); - mobobj2 = MapleLifeFactory.getMonster(mob2); + mobobj1 = LifeFactory.getMonster(mob1); + mobobj2 = LifeFactory.getMonster(mob2); mapobj.spawnMonsterOnGroundBelow(mobobj1, new Point(0, 135)); mapobj.spawnMonsterOnGroundBelow(mobobj2, new Point(0, 135)); @@ -335,8 +335,8 @@ function yuleteAction(eim) { for(var i = 0; i < 5; i++) { - mobobj1 = MapleLifeFactory.getMonster(mob1); - mobobj2 = MapleLifeFactory.getMonster(mob2); + mobobj1 = LifeFactory.getMonster(mob1); + mobobj2 = LifeFactory.getMonster(mob2); mapobj.spawnMonsterOnGroundBelow(mobobj1, new Point(360, 135)); mapobj.spawnMonsterOnGroundBelow(mobobj2, new Point(360, 135)); diff --git a/scripts/event/PinkBeanBattle.js b/scripts/event/PinkBeanBattle.js index e9574c775c..ce8a5d1722 100644 --- a/scripts/event/PinkBeanBattle.js +++ b/scripts/event/PinkBeanBattle.js @@ -102,9 +102,9 @@ function setup(channel) { eim.getInstanceMap(270050200).resetPQ(level); eim.getInstanceMap(270050300).resetPQ(level); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(8820000); + var mob = LifeFactory.getMonster(8820000); mob.disableDrops(); eim.getInstanceMap(270050100).spawnMonsterOnGroundBelow(mob, new Point(0, -42)); @@ -234,8 +234,8 @@ function spawnJrBoss(mobObj, gotKilled) { spawnid = mobObj.getId() - 17; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var mob = MapleLifeFactory.getMonster(spawnid); + const LifeFactory = Java.type('server.life.LifeFactory'); + var mob = LifeFactory.getMonster(spawnid); mobObj.getMap().spawnMonsterOnGroundBelow(mob, mobObj.getPosition()); } diff --git a/scripts/event/WeddingCathedral.js b/scripts/event/WeddingCathedral.js index d052d9bb88..9a91bb6384 100644 --- a/scripts/event/WeddingCathedral.js +++ b/scripts/event/WeddingCathedral.js @@ -72,9 +72,9 @@ function setEventRewards(eim) { function spawnCakeBoss(eim) { var mapObj = eim.getMapInstance(680000400); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mobObj = MapleLifeFactory.getMonster(9400606); + var mobObj = LifeFactory.getMonster(9400606); mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(777, -177)); } diff --git a/scripts/event/WeddingChapel.js b/scripts/event/WeddingChapel.js index 0cd6b8407f..e43c6de466 100644 --- a/scripts/event/WeddingChapel.js +++ b/scripts/event/WeddingChapel.js @@ -72,9 +72,9 @@ function setEventRewards(eim) { function spawnCakeBoss(eim) { var mapObj = eim.getMapInstance(680000400); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mobObj = MapleLifeFactory.getMonster(9400606); + var mobObj = LifeFactory.getMonster(9400606); mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(777, -177)); } diff --git a/scripts/map/onUserEnter/100000006.js b/scripts/map/onUserEnter/100000006.js index b518cd8c62..015c5372d5 100644 --- a/scripts/map/onUserEnter/100000006.js +++ b/scripts/map/onUserEnter/100000006.js @@ -9,8 +9,8 @@ function start(ms){ return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new Point(-1027, 216)); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(-1027, 216)); } } \ No newline at end of file diff --git a/scripts/map/onUserEnter/108010101.js b/scripts/map/onUserEnter/108010101.js index f4d843eb71..9f0ce09a0a 100644 --- a/scripts/map/onUserEnter/108010101.js +++ b/scripts/map/onUserEnter/108010101.js @@ -16,8 +16,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/108010201.js b/scripts/map/onUserEnter/108010201.js index f4d843eb71..9f0ce09a0a 100644 --- a/scripts/map/onUserEnter/108010201.js +++ b/scripts/map/onUserEnter/108010201.js @@ -16,8 +16,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/108010301.js b/scripts/map/onUserEnter/108010301.js index f4d843eb71..9f0ce09a0a 100644 --- a/scripts/map/onUserEnter/108010301.js +++ b/scripts/map/onUserEnter/108010301.js @@ -16,8 +16,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/108010401.js b/scripts/map/onUserEnter/108010401.js index f4d843eb71..9f0ce09a0a 100644 --- a/scripts/map/onUserEnter/108010401.js +++ b/scripts/map/onUserEnter/108010401.js @@ -16,8 +16,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/108010501.js b/scripts/map/onUserEnter/108010501.js index f4d843eb71..9f0ce09a0a 100644 --- a/scripts/map/onUserEnter/108010501.js +++ b/scripts/map/onUserEnter/108010501.js @@ -16,8 +16,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/677000001.js b/scripts/map/onUserEnter/677000001.js index d8f70ac43f..8af02ac694 100644 --- a/scripts/map/onUserEnter/677000001.js +++ b/scripts/map/onUserEnter/677000001.js @@ -11,7 +11,7 @@ function start(ms) { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos); + const LifeFactory = Java.type('server.life.LifeFactory'); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos); player.message(mobName + " has appeared!"); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/677000003.js b/scripts/map/onUserEnter/677000003.js index 706dcb82e3..db5a2edd34 100644 --- a/scripts/map/onUserEnter/677000003.js +++ b/scripts/map/onUserEnter/677000003.js @@ -11,7 +11,7 @@ function start(ms) { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos); + const LifeFactory = Java.type('server.life.LifeFactory'); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos); player.message(mobName + " has appeared!"); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/677000005.js b/scripts/map/onUserEnter/677000005.js index 1c2bf6e8ab..b6fcf1f90d 100644 --- a/scripts/map/onUserEnter/677000005.js +++ b/scripts/map/onUserEnter/677000005.js @@ -11,7 +11,7 @@ function start(ms) { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos); + const LifeFactory = Java.type('server.life.LifeFactory'); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos); player.message(mobName + " has appeared!"); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/677000007.js b/scripts/map/onUserEnter/677000007.js index 82201272d2..5e713d868d 100644 --- a/scripts/map/onUserEnter/677000007.js +++ b/scripts/map/onUserEnter/677000007.js @@ -11,7 +11,7 @@ function start(ms) { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos); + const LifeFactory = Java.type('server.life.LifeFactory'); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos); player.message(mobName + " has appeared!"); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/677000009.js b/scripts/map/onUserEnter/677000009.js index 10b8d80202..ea4672ddd1 100644 --- a/scripts/map/onUserEnter/677000009.js +++ b/scripts/map/onUserEnter/677000009.js @@ -11,7 +11,7 @@ function start(ms) { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos); + const LifeFactory = Java.type('server.life.LifeFactory'); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos); player.message(mobName + " has appeared!"); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/677000012.js b/scripts/map/onUserEnter/677000012.js index 8e02c37a80..2b0236ecf4 100644 --- a/scripts/map/onUserEnter/677000012.js +++ b/scripts/map/onUserEnter/677000012.js @@ -11,7 +11,7 @@ function start(ms) { return; } - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos); + const LifeFactory = Java.type('server.life.LifeFactory'); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), pos); player.message(mobName + " has appeared!"); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/910510000.js b/scripts/map/onUserEnter/910510000.js index a3373b5dd8..7d73d3df97 100644 --- a/scripts/map/onUserEnter/910510000.js +++ b/scripts/map/onUserEnter/910510000.js @@ -2,15 +2,15 @@ function start(ms) { var player = ms.getPlayer(); var map = player.getMap(); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); if (player.isCygnus()) { if (ms.isQuestStarted(20730) && ms.getQuestProgressInt(20730, 9300285) == 0) { - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300285), new Point(680, 258)); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300285), new Point(680, 258)); } } else { if (ms.isQuestStarted(21731) && ms.getQuestProgressInt(21731, 9300344) == 0) { - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300344), new Point(680, 258)); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300344), new Point(680, 258)); } } } \ No newline at end of file diff --git a/scripts/map/onUserEnter/925040100.js b/scripts/map/onUserEnter/925040100.js index 1ac603c642..f3a36a7691 100644 --- a/scripts/map/onUserEnter/925040100.js +++ b/scripts/map/onUserEnter/925040100.js @@ -3,8 +3,8 @@ function start(ms){ var map = player.getMap(); if(ms.isQuestStarted(21747) && ms.getQuestProgressInt(21747, 9300351) == 0) { - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300351), new Point(897, 51)); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300351), new Point(897, 51)); } } \ No newline at end of file diff --git a/scripts/map/onUserEnter/926000000.js b/scripts/map/onUserEnter/926000000.js index 65c8f2de66..379dba8698 100644 --- a/scripts/map/onUserEnter/926000000.js +++ b/scripts/map/onUserEnter/926000000.js @@ -3,7 +3,7 @@ function start(ms) { map.resetPQ(1); if(map.countMonster(9100013) == 0) { - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9100013), new java.awt.Point(82, 200)); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9100013), new java.awt.Point(82, 200)); } return(true); diff --git a/scripts/map/onUserEnter/pepeking_effect.js b/scripts/map/onUserEnter/pepeking_effect.js index 78df65aa76..f61eb6c8d2 100644 --- a/scripts/map/onUserEnter/pepeking_effect.js +++ b/scripts/map/onUserEnter/pepeking_effect.js @@ -3,7 +3,7 @@ function start(ms){ var player = ms.getPlayer(); var map = player.getMap(); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new Point(-28, -67)); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(-28, -67)); } \ No newline at end of file diff --git a/scripts/npc/1032109.js b/scripts/npc/1032109.js index 450b9f56f8..2bee5dd172 100644 --- a/scripts/npc/1032109.js +++ b/scripts/npc/1032109.js @@ -35,14 +35,14 @@ function action(mode, type, selection){ var player = cm.getPlayer(); var map = player.getMap(); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); for(var i = 0; i < 10; i++) - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new Point(117, 183)); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(117, 183)); for(var i = 0; i < 10; i++) - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new Point(4, 183)); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(4, 183)); for(var i = 0; i < 10; i++) - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new Point(-109, 183)); + map.spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), new Point(-109, 183)); cm.completeQuest(20718, 1103003); cm.gainExp(4000 * cm.getPlayer().getExpRate()); diff --git a/scripts/npc/1063017.js b/scripts/npc/1063017.js index 1597b528ad..080e4a17b5 100644 --- a/scripts/npc/1063017.js +++ b/scripts/npc/1063017.js @@ -31,7 +31,7 @@ function action(mode, type, selection) { } else { const MapleLifeFactoroy = Java.type('server.life.MapleLifeFactoroy'); const Point = Java.type('java.awt.Point'); - cm.getWarpMap(910510202).spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300346), new Point(95, 200)); + cm.getWarpMap(910510202).spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300346), new Point(95, 200)); cm.warp(910510202, 0); } diff --git a/scripts/npc/1104002.js b/scripts/npc/1104002.js index 52134cb4cc..8ec461eb7d 100644 --- a/scripts/npc/1104002.js +++ b/scripts/npc/1104002.js @@ -34,9 +34,9 @@ function action(mode, type, selection) { if (mode == 0 && type > 0) { cm.getPlayer().dropMessage(5, "Eleanor: Oh, lost the Empress and still challenging us? Now you've done it! Prepare yourself!!!"); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - mapobj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9001010), new Point(850, 0)); + mapobj.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9001010), new Point(850, 0)); mapobj.destroyNPC(1104002); cm.dispose(); diff --git a/scripts/npc/1104100.js b/scripts/npc/1104100.js index 4a0a663049..01483a6148 100644 --- a/scripts/npc/1104100.js +++ b/scripts/npc/1104100.js @@ -63,8 +63,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/npc/1104101.js b/scripts/npc/1104101.js index b6be6958fe..ee9ee252df 100644 --- a/scripts/npc/1104101.js +++ b/scripts/npc/1104101.js @@ -63,8 +63,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/npc/1104102.js b/scripts/npc/1104102.js index c78f05607e..81f249e484 100644 --- a/scripts/npc/1104102.js +++ b/scripts/npc/1104102.js @@ -63,8 +63,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/npc/1104103.js b/scripts/npc/1104103.js index 1ad5d6543a..5cfb08437f 100644 --- a/scripts/npc/1104103.js +++ b/scripts/npc/1104103.js @@ -63,8 +63,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/npc/1104104.js b/scripts/npc/1104104.js index 5ee093086f..129ab86998 100644 --- a/scripts/npc/1104104.js +++ b/scripts/npc/1104104.js @@ -63,8 +63,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/npc/2112000.js b/scripts/npc/2112000.js index 44054dc213..cff92a9965 100644 --- a/scripts/npc/2112000.js +++ b/scripts/npc/2112000.js @@ -90,7 +90,7 @@ function action(mode, type, selection) { } else { var state = eim.getIntProperty("yuletePassed"); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); if(state == -1) { cm.sendOk("Behold! The pinnacle of Magatia's alchemy studies! Hahahahahahaha..."); @@ -99,7 +99,7 @@ function action(mode, type, selection) { eim.dropMessage(5, "Yulete: I present you my newest weapon, brought by the finest alchemy, Frankenroid!"); var mapobj = eim.getMapInstance(926100401); - var bossobj = MapleLifeFactory.getMonster(9300139); + var bossobj = LifeFactory.getMonster(9300139); //mapobj.spawnMonsterWithEffect(bossobj, 13, new Packages.java.awt.Point(250, 100)); mapobj.spawnMonsterOnGroundBelow(bossobj, new Point(250, 100)); @@ -111,7 +111,7 @@ function action(mode, type, selection) { eim.dropMessage(5, "Yulete: I present you my newest weapon, brought by the finest combined alchemy of Alcadno's and Zenumist's, those that the boring people of Magatia societies have banned to bring along, the mighty Frankenroid!!"); var mapobj = eim.getMapInstance(926100401); - var bossobj = MapleLifeFactory.getMonster(9300140); + var bossobj = LifeFactory.getMonster(9300140); //mapobj.spawnMonsterWithEffect(bossobj, 14, new Packages.java.awt.Point(250, 100)); mapobj.spawnMonsterOnGroundBelow(bossobj, new Point(250, 100)); diff --git a/scripts/npc/2112010.js b/scripts/npc/2112010.js index bbde5fcd92..7a1e226dd3 100644 --- a/scripts/npc/2112010.js +++ b/scripts/npc/2112010.js @@ -90,7 +90,7 @@ function action(mode, type, selection) { } else { var state = eim.getIntProperty("yuletePassed"); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); if(state == -1) { cm.sendOk("Behold! The pinnacle of Magatia's alchemy studies! Hahahahahahaha..."); @@ -99,7 +99,7 @@ function action(mode, type, selection) { eim.dropMessage(5, "Yulete: I present you my newest weapon, brought by the finest alchemy, Frankenroid!"); var mapobj = eim.getMapInstance(926110401); - var bossobj = MapleLifeFactory.getMonster(9300151); + var bossobj = LifeFactory.getMonster(9300151); mapobj.spawnMonsterOnGroundBelow(bossobj, new Point(250, 100)); eim.setIntProperty("statusStg7", 1); @@ -109,7 +109,7 @@ function action(mode, type, selection) { eim.dropMessage(5, "Yulete: I present you my newest weapon, brought by the finest combined alchemy of Alcadno's and Zenumist's, those that the boring people of Magatia societies have banned to bring along, the mighty Frankenroid!!"); var mapobj = eim.getMapInstance(926110401); - var bossobj = MapleLifeFactory.getMonster(9300152); + var bossobj = LifeFactory.getMonster(9300152); mapobj.spawnMonsterOnGroundBelow(bossobj, new Point(250, 100)); eim.setIntProperty("statusStg7", 2); diff --git a/scripts/npc/9040006.js b/scripts/npc/9040006.js index 8ddaff03ec..40c2584222 100644 --- a/scripts/npc/9040006.js +++ b/scripts/npc/9040006.js @@ -211,8 +211,8 @@ function randX() { } function spawnMob(id, x, y, map) { - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/npc/9105004.js b/scripts/npc/9105004.js index a5acf4577f..772198f428 100644 --- a/scripts/npc/9105004.js +++ b/scripts/npc/9105004.js @@ -129,7 +129,7 @@ function insidePqAction(mode, type, selection) { } } } else if(status == 1) { - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); if(stg == -1) { @@ -140,7 +140,7 @@ function insidePqAction(mode, type, selection) { } mapobj.allowSummonState(true); - var snowman = MapleLifeFactory.getMonster(9400317 + (5 * difficulty)); + var snowman = LifeFactory.getMonster(9400317 + (5 * difficulty)); mapobj.spawnMonsterOnGroundBelow(snowman, new Point(-180, 15)); eim.setIntProperty("snowmanLevel", 1); eim.dropMessage(5, "The snowman appeared on the field! Protect it using all means necessary!"); @@ -158,7 +158,7 @@ function insidePqAction(mode, type, selection) { mapobj.broadcastStringMessage(5, "As the snowman grows to it's prime, the Scrooge appears!"); eim.getEm().getIv().invokeFunction("snowmanHeal", eim); - var boss = MapleLifeFactory.getMonster(9400318 + difficulty); + var boss = LifeFactory.getMonster(9400318 + difficulty); mapobj.spawnMonsterOnGroundBelow(boss, new Point(-180, 15)); eim.setProperty("spawnedBoss", "true"); diff --git a/scripts/npc/9201044.js b/scripts/npc/9201044.js index 2c2b724312..b39df0da47 100644 --- a/scripts/npc/9201044.js +++ b/scripts/npc/9201044.js @@ -37,7 +37,7 @@ function spawnMobs(maxSpawn) { var spawnPosY; var mapObj = cm.getMap(); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); if (stage == 2) { spawnPosX = [619, 299, 47, -140, -471]; @@ -45,9 +45,9 @@ function spawnMobs(maxSpawn) { for(var i = 0; i < 5; i++) { for(var j = 0; j < 2; j++) { - var mobObj1 = MapleLifeFactory.getMonster(9400515); - var mobObj2 = MapleLifeFactory.getMonster(9400516); - var mobObj3 = MapleLifeFactory.getMonster(9400517); + var mobObj1 = LifeFactory.getMonster(9400515); + var mobObj2 = LifeFactory.getMonster(9400516); + var mobObj3 = LifeFactory.getMonster(9400517); mapObj.spawnMonsterOnGroundBelow(mobObj1, new Point(spawnPosX[i], spawnPosY[i])); mapObj.spawnMonsterOnGroundBelow(mobObj2, new Point(spawnPosX[i], spawnPosY[i])); @@ -62,7 +62,7 @@ function spawnMobs(maxSpawn) { var rndMob = 9400519 + Math.floor(Math.random() * 4); var rndPos = Math.floor(Math.random() * 5); - var mobObj = MapleLifeFactory.getMonster(rndMob); + var mobObj = LifeFactory.getMonster(rndMob); mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(spawnPosX[rndPos], spawnPosY[rndPos])); } } diff --git a/scripts/npc/9201047.js b/scripts/npc/9201047.js index faa4730731..cb780bbcb1 100644 --- a/scripts/npc/9201047.js +++ b/scripts/npc/9201047.js @@ -66,9 +66,9 @@ function action(mode, type, selection) { var mapObj = cm.getMap(); mapObj.toggleDrops(); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mobObj = MapleLifeFactory.getMonster(9400518); + var mobObj = LifeFactory.getMonster(9400518); mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(-245, 810)); cm.sendOk("The fierry appeared! Defeat it to get the #b#t4031596##k!"); diff --git a/scripts/npc/scroll_generator.js b/scripts/npc/scroll_generator.js index d82de3489f..41fc0e9f69 100644 --- a/scripts/npc/scroll_generator.js +++ b/scripts/npc/scroll_generator.js @@ -244,9 +244,9 @@ function getPlayerCardTierPower() { countTier[ceTier] += ce.getValue(); if (ceTier >= 8) { // is special card - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const MapleItemInformationProvider = Java.type('server.MapleItemInformationProvider'); - var mobLevel = MapleLifeFactory.getMonsterLevel(MapleItemInformationProvider.getInstance().getCardMobId(cardid)); + var mobLevel = LifeFactory.getMonsterLevel(MapleItemInformationProvider.getInstance().getCardMobId(cardid)); var mobTier = getLevelTier(mobLevel) - 1; countTier[mobTier] += (ce.getValue() * 1.2); diff --git a/scripts/portal/davy_next4.js b/scripts/portal/davy_next4.js index a7cfc46440..6bf9207c57 100644 --- a/scripts/portal/davy_next4.js +++ b/scripts/portal/davy_next4.js @@ -7,10 +7,10 @@ function enter(pi) { var chests = parseInt(eim.getProperty("openedChests")); var boss; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - if(chests == 0) boss = MapleLifeFactory.getMonster(9300119); //lord pirate - else if(chests == 1) boss = MapleLifeFactory.getMonster(9300105); //angry lord pirate - else boss = MapleLifeFactory.getMonster(9300106); //enraged lord pirate + const LifeFactory = Java.type('server.life.LifeFactory'); + if(chests == 0) boss = LifeFactory.getMonster(9300119); //lord pirate + else if(chests == 1) boss = LifeFactory.getMonster(9300105); //angry lord pirate + else boss = LifeFactory.getMonster(9300106); //enraged lord pirate boss.changeDifficulty(level, true); diff --git a/scripts/portal/enterInfo.js b/scripts/portal/enterInfo.js index aedd9c1f75..6b6026054b 100644 --- a/scripts/portal/enterInfo.js +++ b/scripts/portal/enterInfo.js @@ -1,9 +1,9 @@ function enter(pi) { var mapobj = pi.getWarpMap(104000004); if(pi.isQuestActive(21733) && pi.getQuestProgressInt(21733, 9300345) == 0 && mapobj.countMonsters() == 0) { - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - mapobj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300345), new Point(0, 0)); + mapobj.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300345), new Point(0, 0)); pi.setQuestProgress(21733, 21762, 2); } diff --git a/scripts/portal/enterMCave.js b/scripts/portal/enterMCave.js index 34d720b36f..51189a3ef8 100644 --- a/scripts/portal/enterMCave.js +++ b/scripts/portal/enterMCave.js @@ -34,8 +34,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/portal/enterNepenthes.js b/scripts/portal/enterNepenthes.js index 7a5f1393b2..1a673381bb 100644 --- a/scripts/portal/enterNepenthes.js +++ b/scripts/portal/enterNepenthes.js @@ -7,9 +7,9 @@ function enter(pi) { mapobj1.resetPQ(1); mapobj2.resetPQ(1); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - mapobj2.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300348), new Point(591, -34)); + mapobj2.spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300348), new Point(591, -34)); pi.playPortalSound(); pi.warp(920030000,2); return true; diff --git a/scripts/portal/enterPort.js b/scripts/portal/enterPort.js index d162cc1529..2bc63eee5b 100644 --- a/scripts/portal/enterPort.js +++ b/scripts/portal/enterPort.js @@ -42,8 +42,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/quest/21401.js b/scripts/quest/21401.js index 380cc7a6aa..f939cfd9d5 100644 --- a/scripts/quest/21401.js +++ b/scripts/quest/21401.js @@ -75,8 +75,8 @@ function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); const Point = Java.type('java.awt.Point'); - var mob = MapleLifeFactory.getMonster(id); + var mob = LifeFactory.getMonster(id); map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/reactor/2708000.js b/scripts/reactor/2708000.js index f25f3db81a..0ddc2a77be 100644 --- a/scripts/reactor/2708000.js +++ b/scripts/reactor/2708000.js @@ -24,8 +24,8 @@ function spawnJrBoss(mobObj) { mobObj.getMap().killMonster(mobObj.getId()); var spawnid = mobObj.getId() - 17; - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); - var mob = MapleLifeFactory.getMonster(spawnid); + const LifeFactory = Java.type('server.life.LifeFactory'); + var mob = LifeFactory.getMonster(spawnid); mobObj.getMap().spawnMonsterOnGroundBelow(mob, mobObj.getPosition()); } diff --git a/scripts/reactor/6701000.js b/scripts/reactor/6701000.js index 2f873daa13..918e523ad7 100644 --- a/scripts/reactor/6701000.js +++ b/scripts/reactor/6701000.js @@ -30,9 +30,9 @@ function act(){ var startId = 9400523; var mobObj, mapObj = rm.getMap(); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); for(var i = 0; i < 7; i++) { - mobObj = MapleLifeFactory.getMonster(startId + Math.floor(Math.random() * 3)); + mobObj = LifeFactory.getMonster(startId + Math.floor(Math.random() * 3)); mapObj.spawnMonsterOnGroundBelow(mobObj, rm.getReactor().getPosition()); } } \ No newline at end of file diff --git a/scripts/reactor/6701001.js b/scripts/reactor/6701001.js index 2f873daa13..918e523ad7 100644 --- a/scripts/reactor/6701001.js +++ b/scripts/reactor/6701001.js @@ -30,9 +30,9 @@ function act(){ var startId = 9400523; var mobObj, mapObj = rm.getMap(); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); for(var i = 0; i < 7; i++) { - mobObj = MapleLifeFactory.getMonster(startId + Math.floor(Math.random() * 3)); + mobObj = LifeFactory.getMonster(startId + Math.floor(Math.random() * 3)); mapObj.spawnMonsterOnGroundBelow(mobObj, rm.getReactor().getPosition()); } } \ No newline at end of file diff --git a/scripts/reactor/6701002.js b/scripts/reactor/6701002.js index 2f873daa13..918e523ad7 100644 --- a/scripts/reactor/6701002.js +++ b/scripts/reactor/6701002.js @@ -30,9 +30,9 @@ function act(){ var startId = 9400523; var mobObj, mapObj = rm.getMap(); - const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const LifeFactory = Java.type('server.life.LifeFactory'); for(var i = 0; i < 7; i++) { - mobObj = MapleLifeFactory.getMonster(startId + Math.floor(Math.random() * 3)); + mobObj = LifeFactory.getMonster(startId + Math.floor(Math.random() * 3)); mapObj.spawnMonsterOnGroundBelow(mobObj, rm.getReactor().getPosition()); } } \ No newline at end of file diff --git a/src/main/java/client/command/commands/gm2/BombCommand.java b/src/main/java/client/command/commands/gm2/BombCommand.java index c8987a6820..9ba92f3274 100644 --- a/src/main/java/client/command/commands/gm2/BombCommand.java +++ b/src/main/java/client/command/commands/gm2/BombCommand.java @@ -27,7 +27,7 @@ import client.Character; import client.Client; import client.command.Command; import net.server.Server; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import tools.PacketCreator; public class BombCommand extends Command { @@ -41,13 +41,13 @@ public class BombCommand extends Command { if (params.length > 0) { Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]); if (victim != null) { - victim.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300166), victim.getPosition()); + victim.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300166), victim.getPosition()); Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(5, player.getName() + " used !bomb on " + victim.getName())); } else { player.message("Player '" + params[0] + "' could not be found on this world."); } } else { - player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300166), player.getPosition()); + player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300166), player.getPosition()); } } } diff --git a/src/main/java/client/command/commands/gm3/NpcCommand.java b/src/main/java/client/command/commands/gm3/NpcCommand.java index a8489592da..192b08a55b 100644 --- a/src/main/java/client/command/commands/gm3/NpcCommand.java +++ b/src/main/java/client/command/commands/gm3/NpcCommand.java @@ -26,7 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import server.life.MapleNPC; import tools.PacketCreator; @@ -42,7 +42,7 @@ public class NpcCommand extends Command { player.yellowMessage("Syntax: !npc "); return; } - MapleNPC npc = MapleLifeFactory.getNPC(Integer.parseInt(params[0])); + MapleNPC npc = LifeFactory.getNPC(Integer.parseInt(params[0])); if (npc != null) { npc.setPosition(player.getPosition()); npc.setCy(player.getPosition().y); diff --git a/src/main/java/client/command/commands/gm3/SpawnCommand.java b/src/main/java/client/command/commands/gm3/SpawnCommand.java index 695f42fcc4..cd43ea1809 100644 --- a/src/main/java/client/command/commands/gm3/SpawnCommand.java +++ b/src/main/java/client/command/commands/gm3/SpawnCommand.java @@ -26,7 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import server.life.MapleMonster; public class SpawnCommand extends Command { @@ -42,16 +42,16 @@ public class SpawnCommand extends Command { return; } - MapleMonster monster = MapleLifeFactory.getMonster(Integer.parseInt(params[0])); + MapleMonster monster = LifeFactory.getMonster(Integer.parseInt(params[0])); if (monster == null) { return; } if (params.length == 2) { for (int i = 0; i < Integer.parseInt(params[1]); i++) { - player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(Integer.parseInt(params[0])), player.getPosition()); + player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(Integer.parseInt(params[0])), player.getPosition()); } } else { - player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(Integer.parseInt(params[0])), player.getPosition()); + player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(Integer.parseInt(params[0])), player.getPosition()); } } } diff --git a/src/main/java/client/command/commands/gm4/CakeCommand.java b/src/main/java/client/command/commands/gm4/CakeCommand.java index 16d37b99e4..366a31994e 100644 --- a/src/main/java/client/command/commands/gm4/CakeCommand.java +++ b/src/main/java/client/command/commands/gm4/CakeCommand.java @@ -26,7 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import server.life.MapleMonster; public class CakeCommand extends Command { @@ -37,7 +37,7 @@ public class CakeCommand extends Command { @Override public void execute(Client c, String[] params) { Character player = c.getPlayer(); - MapleMonster monster = MapleLifeFactory.getMonster(9400606); + MapleMonster monster = LifeFactory.getMonster(9400606); if (params.length == 1) { double mobHp = Double.parseDouble(params[0]); int newHp = (mobHp <= 0) ? Integer.MAX_VALUE : ((mobHp > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) mobHp); diff --git a/src/main/java/client/command/commands/gm4/PapCommand.java b/src/main/java/client/command/commands/gm4/PapCommand.java index e423d0ba14..e89a01b1d1 100644 --- a/src/main/java/client/command/commands/gm4/PapCommand.java +++ b/src/main/java/client/command/commands/gm4/PapCommand.java @@ -26,7 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; public class PapCommand extends Command { { @@ -38,6 +38,6 @@ public class PapCommand extends Command { Character player = c.getPlayer(); // thanks Conrad for noticing mobid typo here - player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8500001), player.getPosition()); + player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(8500001), player.getPosition()); } } diff --git a/src/main/java/client/command/commands/gm4/PianusCommand.java b/src/main/java/client/command/commands/gm4/PianusCommand.java index 0159e7229f..4c498c6ba8 100644 --- a/src/main/java/client/command/commands/gm4/PianusCommand.java +++ b/src/main/java/client/command/commands/gm4/PianusCommand.java @@ -26,7 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; public class PianusCommand extends Command { { @@ -36,6 +36,6 @@ public class PianusCommand extends Command { @Override public void execute(Client c, String[] params) { Character player = c.getPlayer(); - player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8510000), player.getPosition()); + player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(8510000), player.getPosition()); } } diff --git a/src/main/java/client/command/commands/gm4/PinkbeanCommand.java b/src/main/java/client/command/commands/gm4/PinkbeanCommand.java index 5b365f6f8c..e1bb7655e0 100644 --- a/src/main/java/client/command/commands/gm4/PinkbeanCommand.java +++ b/src/main/java/client/command/commands/gm4/PinkbeanCommand.java @@ -26,7 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; public class PinkbeanCommand extends Command { { @@ -36,7 +36,7 @@ public class PinkbeanCommand extends Command { @Override public void execute(Client c, String[] params) { Character player = c.getPlayer(); - player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8820001), player.getPosition()); + player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(8820001), player.getPosition()); } } diff --git a/src/main/java/client/command/commands/gm4/PmobCommand.java b/src/main/java/client/command/commands/gm4/PmobCommand.java index b352294b62..5b24f724e9 100644 --- a/src/main/java/client/command/commands/gm4/PmobCommand.java +++ b/src/main/java/client/command/commands/gm4/PmobCommand.java @@ -27,7 +27,7 @@ import client.Character; import client.Client; import client.command.Command; import net.server.channel.Channel; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import server.life.MapleMonster; import server.maps.MapleMap; import tools.DatabaseConnection; @@ -60,7 +60,7 @@ public class PmobCommand extends Command { int ypos = checkpos.y; int fh = player.getMap().getFootholds().findBelow(checkpos).getId(); - MapleMonster mob = MapleLifeFactory.getMonster(mobId); + MapleMonster mob = LifeFactory.getMonster(mobId); if (mob != null && !mob.getName().equals("MISSINGNO")) { mob.setPosition(checkpos); mob.setCy(ypos); diff --git a/src/main/java/client/command/commands/gm4/PnpcCommand.java b/src/main/java/client/command/commands/gm4/PnpcCommand.java index 6058c74def..8d89737811 100644 --- a/src/main/java/client/command/commands/gm4/PnpcCommand.java +++ b/src/main/java/client/command/commands/gm4/PnpcCommand.java @@ -27,7 +27,7 @@ import client.Character; import client.Client; import client.command.Command; import net.server.channel.Channel; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import server.life.MapleNPC; import server.maps.MapleMap; import tools.DatabaseConnection; @@ -59,7 +59,7 @@ public class PnpcCommand extends Command { return; } - MapleNPC npc = MapleLifeFactory.getNPC(npcId); + MapleNPC npc = LifeFactory.getNPC(npcId); Point checkpos = player.getMap().getGroundBelow(player.getPosition()); int xpos = checkpos.x; @@ -85,7 +85,7 @@ public class PnpcCommand extends Command { ps.executeUpdate(); for (Channel ch : player.getWorldServer().getChannels()) { - npc = MapleLifeFactory.getNPC(npcId); + npc = LifeFactory.getNPC(npcId); npc.setPosition(checkpos); npc.setCy(ypos); npc.setRx0(xpos + 50); diff --git a/src/main/java/client/command/commands/gm4/ZakumCommand.java b/src/main/java/client/command/commands/gm4/ZakumCommand.java index 2360a14314..6d647acc08 100644 --- a/src/main/java/client/command/commands/gm4/ZakumCommand.java +++ b/src/main/java/client/command/commands/gm4/ZakumCommand.java @@ -26,7 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; public class ZakumCommand extends Command { { @@ -36,9 +36,9 @@ public class ZakumCommand extends Command { @Override public void execute(Client c, String[] params) { Character player = c.getPlayer(); - player.getMap().spawnFakeMonsterOnGroundBelow(MapleLifeFactory.getMonster(8800000), player.getPosition()); + player.getMap().spawnFakeMonsterOnGroundBelow(LifeFactory.getMonster(8800000), player.getPosition()); for (int x = 8800003; x < 8800011; x++) { - player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(x), player.getPosition()); + player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(x), player.getPosition()); } } } diff --git a/src/main/java/net/server/channel/handlers/AdminCommandHandler.java b/src/main/java/net/server/channel/handlers/AdminCommandHandler.java index 31cf55d49a..f88edddd59 100644 --- a/src/main/java/net/server/channel/handlers/AdminCommandHandler.java +++ b/src/main/java/net/server/channel/handlers/AdminCommandHandler.java @@ -29,7 +29,7 @@ import client.inventory.manipulator.InventoryManipulator; import net.AbstractPacketHandler; import net.packet.InPacket; import server.MapleItemInformationProvider; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import server.life.MapleMonster; import server.maps.MapleMapObject; import server.maps.MapleMapObjectType; @@ -55,7 +55,7 @@ public final class AdminCommandHandler extends AbstractPacketHandler { int[][] toSpawn = MapleItemInformationProvider.getInstance().getSummonMobs(p.readInt()); for (int[] toSpawnChild : toSpawn) { if (Randomizer.nextInt(100) < toSpawnChild[1]) { - c.getPlayer().getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(toSpawnChild[0]), c.getPlayer().getPosition()); + c.getPlayer().getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(toSpawnChild[0]), c.getPlayer().getPosition()); } } c.sendPacket(PacketCreator.enableActions()); @@ -141,7 +141,7 @@ public final class AdminCommandHandler extends AbstractPacketHandler { int mobId = p.readInt(); int quantity = p.readInt(); for (int i = 0; i < quantity; i++) { - c.getPlayer().getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), c.getPlayer().getPosition()); + c.getPlayer().getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), c.getPlayer().getPosition()); } break; case 0x18: // Maple & Mobhp diff --git a/src/main/java/net/server/channel/handlers/MobBanishPlayerHandler.java b/src/main/java/net/server/channel/handlers/MobBanishPlayerHandler.java index c944ce530a..69e4f30081 100644 --- a/src/main/java/net/server/channel/handlers/MobBanishPlayerHandler.java +++ b/src/main/java/net/server/channel/handlers/MobBanishPlayerHandler.java @@ -23,7 +23,7 @@ import client.Character; import client.Client; import net.AbstractPacketHandler; import net.packet.InPacket; -import server.life.MapleLifeFactory.BanishInfo; +import server.life.LifeFactory.BanishInfo; import server.life.MapleMonster; public final class MobBanishPlayerHandler extends AbstractPacketHandler { diff --git a/src/main/java/net/server/channel/handlers/MonsterCarnivalHandler.java b/src/main/java/net/server/channel/handlers/MonsterCarnivalHandler.java index ed71ea960f..aa106a10c4 100644 --- a/src/main/java/net/server/channel/handlers/MonsterCarnivalHandler.java +++ b/src/main/java/net/server/channel/handlers/MonsterCarnivalHandler.java @@ -28,7 +28,7 @@ import net.AbstractPacketHandler; import net.packet.InPacket; import net.server.world.Party; import net.server.world.PartyCharacter; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import server.life.MapleMonster; import server.partyquest.MapleCarnivalFactory; import server.partyquest.MapleCarnivalFactory.MCSkill; @@ -62,7 +62,7 @@ public final class MonsterCarnivalHandler extends AbstractPacketHandler { return; } - final MapleMonster mob = MapleLifeFactory.getMonster(mobs.get(num).left); + final MapleMonster mob = LifeFactory.getMonster(mobs.get(num).left); MonsterCarnival mcpq = c.getPlayer().getMonsterCarnival(); if (mcpq != null) { if (!mcpq.canSummonR() && c.getPlayer().getTeam() == 0 || !mcpq.canSummonB() && c.getPlayer().getTeam() == 1) { diff --git a/src/main/java/net/server/channel/handlers/TakeDamageHandler.java b/src/main/java/net/server/channel/handlers/TakeDamageHandler.java index 6bfdbc9729..390135c6d3 100644 --- a/src/main/java/net/server/channel/handlers/TakeDamageHandler.java +++ b/src/main/java/net/server/channel/handlers/TakeDamageHandler.java @@ -36,7 +36,7 @@ import constants.skills.Aran; import net.AbstractPacketHandler; import net.packet.InPacket; import server.MapleStatEffect; -import server.life.MapleLifeFactory.loseItem; +import server.life.LifeFactory.loseItem; import server.life.*; import server.maps.MapleMap; import server.maps.MapleMapObject; diff --git a/src/main/java/net/server/channel/handlers/UseSummonBagHandler.java b/src/main/java/net/server/channel/handlers/UseSummonBagHandler.java index 23e8eae0d5..ab4e3b8633 100644 --- a/src/main/java/net/server/channel/handlers/UseSummonBagHandler.java +++ b/src/main/java/net/server/channel/handlers/UseSummonBagHandler.java @@ -28,7 +28,7 @@ import client.inventory.manipulator.InventoryManipulator; import net.AbstractPacketHandler; import net.packet.InPacket; import server.MapleItemInformationProvider; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import tools.PacketCreator; import tools.Randomizer; @@ -54,7 +54,7 @@ public final class UseSummonBagHandler extends AbstractPacketHandler { int[][] toSpawn = MapleItemInformationProvider.getInstance().getSummonMobs(itemId); for (int[] toSpawnChild : toSpawn) { if (Randomizer.nextInt(100) < toSpawnChild[1]) { - c.getPlayer().getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(toSpawnChild[0]), c.getPlayer().getPosition()); + c.getPlayer().getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(toSpawnChild[0]), c.getPlayer().getPosition()); } } } diff --git a/src/main/java/scripting/AbstractPlayerInteraction.java b/src/main/java/scripting/AbstractPlayerInteraction.java index e6ba14bba5..1f3717effc 100644 --- a/src/main/java/scripting/AbstractPlayerInteraction.java +++ b/src/main/java/scripting/AbstractPlayerInteraction.java @@ -948,7 +948,7 @@ public class AbstractPlayerInteraction { } public void spawnNpc(int npcId, Point pos, MapleMap map) { - MapleNPC npc = MapleLifeFactory.getNPC(npcId); + MapleNPC npc = LifeFactory.getNPC(npcId); if (npc != null) { npc.setPosition(pos); npc.setCy(pos.y); @@ -961,13 +961,13 @@ public class AbstractPlayerInteraction { } public void spawnMonster(int id, int x, int y) { - MapleMonster monster = MapleLifeFactory.getMonster(id); + MapleMonster monster = LifeFactory.getMonster(id); monster.setPosition(new Point(x, y)); getPlayer().getMap().spawnMonster(monster); } public MapleMonster getMonsterLifeFactory(int mid) { - return MapleLifeFactory.getMonster(mid); + return LifeFactory.getMonster(mid); } public MobSkill getMobSkill(int skill, int level) { diff --git a/src/main/java/scripting/event/EventInstanceManager.java b/src/main/java/scripting/event/EventInstanceManager.java index 8f2c9b40e5..0cf9343689 100644 --- a/src/main/java/scripting/event/EventInstanceManager.java +++ b/src/main/java/scripting/event/EventInstanceManager.java @@ -41,7 +41,7 @@ import server.MapleStatEffect; import server.ThreadManager; import server.TimerManager; import server.expeditions.Expedition; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import server.life.MapleMonster; import server.life.MapleNPC; import server.maps.MapleMap; @@ -849,7 +849,7 @@ public class EventInstanceManager { } public void spawnNpc(int npcId, Point pos, MapleMap map) { - MapleNPC npc = MapleLifeFactory.getNPC(npcId); + MapleNPC npc = LifeFactory.getNPC(npcId); if (npc != null) { npc.setPosition(pos); npc.setCy(pos.y); @@ -877,7 +877,7 @@ public class EventInstanceManager { } public MapleMonster getMonster(int mid) { - return(MapleLifeFactory.getMonster(mid)); + return(LifeFactory.getMonster(mid)); } private List convertToIntegerList(List objects) { diff --git a/src/main/java/scripting/event/EventManager.java b/src/main/java/scripting/event/EventManager.java index 138ed7209f..68a65a69de 100644 --- a/src/main/java/scripting/event/EventManager.java +++ b/src/main/java/scripting/event/EventManager.java @@ -38,7 +38,7 @@ import scripting.event.scheduler.EventScriptScheduler; import server.MapleMarriage; import server.ThreadManager; import server.expeditions.Expedition; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import server.life.MapleMonster; import server.maps.MapleMap; import server.quest.MapleQuest; @@ -738,7 +738,7 @@ public class EventManager { } public MapleMonster getMonster(int mid) { - return(MapleLifeFactory.getMonster(mid)); + return(LifeFactory.getMonster(mid)); } private void exportReadyGuild(Integer guildId) { diff --git a/src/main/java/scripting/npc/NPCConversationManager.java b/src/main/java/scripting/npc/NPCConversationManager.java index 5d2dc8815d..01f7bdb309 100644 --- a/src/main/java/scripting/npc/NPCConversationManager.java +++ b/src/main/java/scripting/npc/NPCConversationManager.java @@ -49,7 +49,7 @@ import server.expeditions.Expedition; import server.expeditions.ExpeditionType; import server.gachapon.MapleGachapon; import server.gachapon.MapleGachapon.MapleGachaponItem; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import server.life.MaplePlayerNPC; import server.maps.MapleMap; import server.maps.MapleMapManager; @@ -87,7 +87,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction { private String getDefaultTalk(int npcid) { String talk = npcDefaultTalks.get(npcid); if (talk == null) { - talk = MapleLifeFactory.getNPCDefaultTalk(npcid); + talk = LifeFactory.getNPCDefaultTalk(npcid); npcDefaultTalks.put(npcid, talk); } diff --git a/src/main/java/scripting/reactor/ReactorActionManager.java b/src/main/java/scripting/reactor/ReactorActionManager.java index 3fab4cf961..28e867cd0d 100644 --- a/src/main/java/scripting/reactor/ReactorActionManager.java +++ b/src/main/java/scripting/reactor/ReactorActionManager.java @@ -31,7 +31,7 @@ import constants.inventory.ItemConstants; import scripting.AbstractPlayerInteraction; import server.MapleItemInformationProvider; import server.TimerManager; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import server.life.MapleMonster; import server.maps.MapMonitor; import server.maps.MapleMap; @@ -262,7 +262,7 @@ public class ReactorActionManager extends AbstractPlayerInteraction { public void spawnMonster(int id, int qty, Point pos) { for (int i = 0; i < qty; i++) { - reactor.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(id), pos); + reactor.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(id), pos); } } @@ -304,7 +304,7 @@ public class ReactorActionManager extends AbstractPlayerInteraction { } public void spawnFakeMonster(int id) { - reactor.getMap().spawnFakeMonsterOnGroundBelow(MapleLifeFactory.getMonster(id), getPosition()); + reactor.getMap().spawnFakeMonsterOnGroundBelow(LifeFactory.getMonster(id), getPosition()); } /** diff --git a/src/main/java/server/MapleItemInformationProvider.java b/src/main/java/server/MapleItemInformationProvider.java index f6a4a6a3de..feb57e1100 100644 --- a/src/main/java/server/MapleItemInformationProvider.java +++ b/src/main/java/server/MapleItemInformationProvider.java @@ -35,7 +35,7 @@ import net.server.Server; import provider.*; import provider.wz.WZFiles; import server.MakerItemFactory.MakerItemCreateEntry; -import server.life.MapleLifeFactory; +import server.life.LifeFactory; import server.life.MapleMonsterInformationProvider; import tools.*; @@ -1913,7 +1913,7 @@ public class MapleItemInformationProvider { try (ResultSet rs = ps.executeQuery()) { if (rs.next()) { int dropperid = rs.getInt("dropperid"); - itemid = getCrystalForLevel(MapleLifeFactory.getMonsterLevel(dropperid) - 1); + itemid = getCrystalForLevel(LifeFactory.getMonsterLevel(dropperid) - 1); } } } diff --git a/src/main/java/server/life/MapleLifeFactory.java b/src/main/java/server/life/LifeFactory.java similarity index 94% rename from src/main/java/server/life/MapleLifeFactory.java rename to src/main/java/server/life/LifeFactory.java index cb510eefc4..5dfa0a86ae 100644 --- a/src/main/java/server/life/MapleLifeFactory.java +++ b/src/main/java/server/life/LifeFactory.java @@ -34,26 +34,25 @@ import java.awt.*; import java.util.List; import java.util.*; -public class MapleLifeFactory { - - private static DataProvider data = DataProviderFactory.getDataProvider(WZFiles.MOB); +public class LifeFactory { + private static final DataProvider data = DataProviderFactory.getDataProvider(WZFiles.MOB); private final static DataProvider stringDataWZ = DataProviderFactory.getDataProvider(WZFiles.STRING); - private static Data mobStringData = stringDataWZ.getData("Mob.img"); - private static Data npcStringData = stringDataWZ.getData("Npc.img"); - private static Map monsterStats = new HashMap<>(); - private static Set hpbarBosses = getHpBarBosses(); + private static final Data mobStringData = stringDataWZ.getData("Mob.img"); + private static final Data npcStringData = stringDataWZ.getData("Npc.img"); + private static final Map monsterStats = new HashMap<>(); + private static final Set hpbarBosses = getHpBarBosses(); private static Set getHpBarBosses() { Set ret = new HashSet<>(); - + DataProvider uiDataWZ = DataProviderFactory.getDataProvider(WZFiles.UI); for (Data bossData : uiDataWZ.getData("UIWindow.img").getChildByPath("MobGage/Mob").getChildren()) { ret.add(Integer.valueOf(bossData.getName())); } - + return ret; } - + public static AbstractLoadedLife getLife(int id, String type) { if (type.equalsIgnoreCase("n")) { return getNPC(id); @@ -70,7 +69,7 @@ public class MapleLifeFactory { protected int mpCon; protected int coolTime; protected int animationTime; - + protected MobAttackInfoHolder(int attackPos, int mpCon, int coolTime, int animationTime) { this.attackPos = attackPos; this.mpCon = mpCon; @@ -78,7 +77,7 @@ public class MapleLifeFactory { this.animationTime = animationTime; } } - + private static void setMonsterAttackInfo(int mid, List attackInfos) { if (!attackInfos.isEmpty()) { MapleMonsterInformationProvider mi = MapleMonsterInformationProvider.getInstance(); @@ -89,28 +88,28 @@ public class MapleLifeFactory { } } } - + private static Pair> getMonsterStats(int mid) { Data monsterData = data.getData(StringUtil.getLeftPaddedStr(mid + ".img", '0', 11)); if (monsterData == null) { return null; } Data monsterInfoData = monsterData.getChildByPath("info"); - + List attackInfos = new LinkedList<>(); MapleMonsterStats stats = new MapleMonsterStats(); - + int linkMid = DataTool.getIntConvert("link", monsterInfoData, 0); if (linkMid != 0) { Pair> linkStats = getMonsterStats(linkMid); if (linkStats == null) { return null; } - + // thanks resinate for noticing non-propagable infos such as revives getting retrieved attackInfos.addAll(linkStats.getRight()); } - + stats.setHp(DataTool.getIntConvert("maxHP", monsterInfoData)); stats.setFriendly(DataTool.getIntConvert("damagedByMob", monsterInfoData, stats.isFriendly() ? 1 : 0) == 1); stats.setPADamage(DataTool.getIntConvert("PADamage", monsterInfoData)); @@ -157,12 +156,12 @@ public class MapleLifeFactory { } stats.setFirstAttack(firstAttack > 0); stats.setDropPeriod(DataTool.getIntConvert("dropItemPeriod", monsterInfoData, stats.getDropPeriod() / 10000) * 10000); - + // thanks yuxaij, Riizade, Z1peR, Anesthetic for noticing some bosses crashing players due to missing requirements boolean hpbarBoss = stats.isBoss() && hpbarBosses.contains(mid); stats.setTagColor(hpbarBoss ? DataTool.getIntConvert("hpTagColor", monsterInfoData, 0) : 0); stats.setTagBgColor(hpbarBoss ? DataTool.getIntConvert("hpTagBgcolor", monsterInfoData, 0) : 0); - + for (Data idata : monsterData) { if (!idata.getName().equals("info")) { int delay = 0; @@ -226,7 +225,7 @@ public class MapleLifeFactory { if (banishData != null) { stats.setBanishInfo(new BanishInfo(DataTool.getString("banMsg", banishData), DataTool.getInt("banMap/0/field", banishData, -1), DataTool.getString("banMap/0/portal", banishData, "sp"))); } - + int noFlip = DataTool.getInt("noFlip", monsterInfoData, 0); if (noFlip > 0) { Point origin = DataTool.getPoint("stand/0/origin", monsterData, null); @@ -234,10 +233,10 @@ public class MapleLifeFactory { stats.setFixedStance(origin.getX() < 1 ? 5 : 4); // fixed left/right } } - + return new Pair<>(stats, attackInfos); } - + public static MapleMonster getMonster(int mid) { try { MapleMonsterStats stats = monsterStats.get(mid); @@ -245,19 +244,19 @@ public class MapleLifeFactory { Pair> mobStats = getMonsterStats(mid); stats = mobStats.getLeft(); setMonsterAttackInfo(mid, mobStats.getRight()); - + monsterStats.put(mid, stats); } MapleMonster ret = new MapleMonster(mid, stats); return ret; - } catch(NullPointerException npe) { + } catch (NullPointerException npe) { System.out.println("[SEVERE] MOB " + mid + " failed to load. Issue: " + npe.getMessage() + "\n\n"); npe.printStackTrace(); - + return null; } } - + public static int getMonsterLevel(int mid) { try { MapleMonsterStats stats = monsterStats.get(mid); @@ -271,11 +270,11 @@ public class MapleLifeFactory { } else { return stats.getLevel(); } - } catch(NullPointerException npe) { + } catch (NullPointerException npe) { System.out.println("[SEVERE] MOB " + mid + " failed to load. Issue: " + npe.getMessage() + "\n\n"); npe.printStackTrace(); } - + return -1; } @@ -288,15 +287,16 @@ public class MapleLifeFactory { public static MapleNPC getNPC(int nid) { return new MapleNPC(nid, new MapleNPCStats(DataTool.getString(nid + "/name", npcStringData, "MISSINGNO"))); } - + public static String getNPCDefaultTalk(int nid) { return DataTool.getString(nid + "/d0", npcStringData, "(...)"); } public static class BanishInfo { - private int map; - private String portal, msg; + private final int map; + private final String portal; + private final String msg; public BanishInfo(String msg, int map, String portal) { this.msg = msg; @@ -319,8 +319,9 @@ public class MapleLifeFactory { public static class loseItem { - private int id; - private byte chance, x; + private final int id; + private final byte chance; + private final byte x; public loseItem(int id, byte chance, byte x) { this.id = id; @@ -343,9 +344,9 @@ public class MapleLifeFactory { public static class selfDestruction { - private byte action; - private int removeAfter; - private int hp; + private final byte action; + private final int removeAfter; + private final int hp; public selfDestruction(byte action, int removeAfter, int hp) { this.action = action; @@ -356,7 +357,7 @@ public class MapleLifeFactory { public int getHp() { return hp; } - + public byte getAction() { return action; } diff --git a/src/main/java/server/life/MapleMonster.java b/src/main/java/server/life/MapleMonster.java index 8afa91a49e..24f109d133 100644 --- a/src/main/java/server/life/MapleMonster.java +++ b/src/main/java/server/life/MapleMonster.java @@ -44,7 +44,7 @@ import net.server.world.PartyCharacter; import scripting.event.EventInstanceManager; import server.MapleStatEffect; import server.TimerManager; -import server.life.MapleLifeFactory.BanishInfo; +import server.life.LifeFactory.BanishInfo; import server.loot.MapleLootManager; import server.maps.AbstractAnimatedMapleMapObject; import server.maps.MapleMap; @@ -779,7 +779,7 @@ public class MapleMonster extends AbstractLoadedLife { boolean aggro = lastController.getRight(); for (Integer mid : toSpawn) { - final MapleMonster mob = MapleLifeFactory.getMonster(mid); + final MapleMonster mob = LifeFactory.getMonster(mid); mob.setPosition(getPosition()); mob.setFh(getFh()); mob.setParentMobOid(getObjectId()); diff --git a/src/main/java/server/life/MapleMonsterInformationProvider.java b/src/main/java/server/life/MapleMonsterInformationProvider.java index 41755c34e6..12a581b505 100644 --- a/src/main/java/server/life/MapleMonsterInformationProvider.java +++ b/src/main/java/server/life/MapleMonsterInformationProvider.java @@ -248,7 +248,7 @@ public class MapleMonsterInformationProvider { Boolean boss = mobBossCache.get(id); if (boss == null) { try { - boss = MapleLifeFactory.getMonster(id).isBoss(); + boss = LifeFactory.getMonster(id).isBoss(); } catch (NullPointerException npe) { boss = false; } catch (Exception e) { //nonexistant mob diff --git a/src/main/java/server/life/MapleMonsterStats.java b/src/main/java/server/life/MapleMonsterStats.java index 0e03ccb26e..5f58b70a1c 100644 --- a/src/main/java/server/life/MapleMonsterStats.java +++ b/src/main/java/server/life/MapleMonsterStats.java @@ -21,9 +21,9 @@ */ package server.life; -import server.life.MapleLifeFactory.BanishInfo; -import server.life.MapleLifeFactory.loseItem; -import server.life.MapleLifeFactory.selfDestruction; +import server.life.LifeFactory.BanishInfo; +import server.life.LifeFactory.loseItem; +import server.life.LifeFactory.selfDestruction; import tools.Pair; import java.lang.reflect.Field; diff --git a/src/main/java/server/life/MobSkill.java b/src/main/java/server/life/MobSkill.java index c2c11135d1..b99d72aafb 100644 --- a/src/main/java/server/life/MobSkill.java +++ b/src/main/java/server/life/MobSkill.java @@ -254,7 +254,7 @@ public class MobSkill { Collections.shuffle(summons); for (Integer mobId : summons.subList(0, summonLimit)) { - MapleMonster toSpawn = MapleLifeFactory.getMonster(mobId); + MapleMonster toSpawn = LifeFactory.getMonster(mobId); if (toSpawn != null) { if (bossRushMap) { toSpawn.disableDrops(); // no littering on BRPQ pls diff --git a/src/main/java/server/life/SpawnPoint.java b/src/main/java/server/life/SpawnPoint.java index 21514ccdc2..5afd74025c 100644 --- a/src/main/java/server/life/SpawnPoint.java +++ b/src/main/java/server/life/SpawnPoint.java @@ -75,7 +75,7 @@ public class SpawnPoint { } public MapleMonster getMonster() { - MapleMonster mob = new MapleMonster(MapleLifeFactory.getMonster(monster)); + MapleMonster mob = new MapleMonster(LifeFactory.getMonster(monster)); mob.setPosition(new Point(pos)); mob.setTeam(team); mob.setFh(fh); diff --git a/src/main/java/server/maps/MapleMap.java b/src/main/java/server/maps/MapleMap.java index 2a8213efdb..1d26bc6037 100644 --- a/src/main/java/server/maps/MapleMap.java +++ b/src/main/java/server/maps/MapleMap.java @@ -58,7 +58,7 @@ import server.MapleStatEffect; import server.TimerManager; import server.events.gm.*; import server.life.*; -import server.life.MapleLifeFactory.selfDestruction; +import server.life.LifeFactory.selfDestruction; import server.partyquest.GuardianSpawnPoint; import server.partyquest.MapleCarnivalFactory; import server.partyquest.MapleCarnivalFactory.MCSkill; @@ -1813,7 +1813,7 @@ public class MapleMap { } public void spawnMonsterOnGroundBelow(int id, int x, int y) { - MapleMonster mob = MapleLifeFactory.getMonster(id); + MapleMonster mob = LifeFactory.getMonster(id); spawnMonsterOnGroundBelow(mob, new Point(x, y)); } @@ -4039,10 +4039,10 @@ public class MapleMap { } public void spawnHorntailOnGroundBelow(final Point targetPoint) { // ayy lmao - MapleMonster htIntro = MapleLifeFactory.getMonster(8810026); + MapleMonster htIntro = LifeFactory.getMonster(8810026); spawnMonsterOnGroundBelow(htIntro, targetPoint); // htintro spawn animation converting into horntail detected thanks to Arnah - final MapleMonster ht = MapleLifeFactory.getMonster(8810018); + final MapleMonster ht = LifeFactory.getMonster(8810018); ht.setParentMobOid(htIntro.getObjectId()); ht.addListener(new MonsterListener() { @Override @@ -4061,7 +4061,7 @@ public class MapleMap { spawnMonsterOnGroundBelow(ht, targetPoint); for (int x = 8810002; x <= 8810009; x++) { - MapleMonster m = MapleLifeFactory.getMonster(x); + MapleMonster m = LifeFactory.getMonster(x); m.setParentMobOid(htIntro.getObjectId()); m.addListener(new MonsterListener() { diff --git a/src/main/java/server/maps/MapleMapFactory.java b/src/main/java/server/maps/MapleMapFactory.java index 7586ea63e2..ea104bbfcc 100644 --- a/src/main/java/server/maps/MapleMapFactory.java +++ b/src/main/java/server/maps/MapleMapFactory.java @@ -339,7 +339,7 @@ public class MapleMapFactory { } private static AbstractLoadedLife loadLife(int id, String type, int cy, int f, int fh, int rx0, int rx1, int x, int y, int hide) { - AbstractLoadedLife myLife = MapleLifeFactory.getLife(id, type); + AbstractLoadedLife myLife = LifeFactory.getLife(id, type); myLife.setCy(cy); myLife.setF(f); myLife.setFh(fh); diff --git a/src/main/java/tools/mapletools/MonsterStatFetcher.java b/src/main/java/tools/mapletools/MonsterStatFetcher.java index 89a78107a7..d99c76b766 100644 --- a/src/main/java/tools/mapletools/MonsterStatFetcher.java +++ b/src/main/java/tools/mapletools/MonsterStatFetcher.java @@ -5,9 +5,9 @@ import provider.wz.DataType; import provider.wz.WZFiles; import server.life.Element; import server.life.ElementalEffectiveness; -import server.life.MapleLifeFactory.BanishInfo; -import server.life.MapleLifeFactory.loseItem; -import server.life.MapleLifeFactory.selfDestruction; +import server.life.LifeFactory.BanishInfo; +import server.life.LifeFactory.loseItem; +import server.life.LifeFactory.selfDestruction; import server.life.MapleMonsterStats; import tools.Pair;