Rename and clean up MapleLifeFactory

This commit is contained in:
P0nk
2021-09-09 22:04:57 +02:00
parent 1f349d1dae
commit 38c700ca48
113 changed files with 309 additions and 308 deletions

View File

@@ -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());

View File

@@ -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);
}

View File

@@ -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();

View File

@@ -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));
}

View File

@@ -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));
}

View File

@@ -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));
}

View File

@@ -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));
}

View File

@@ -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));
}

View File

@@ -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));

View File

@@ -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);

View File

@@ -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));
}

View File

@@ -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");

View File

@@ -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]));
}
}

View File

@@ -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!");

View File

@@ -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);