Convert remaining scripts to Graal

Mainly missed scripts that use Nashorn's "Packages"
This commit is contained in:
P0nk
2021-04-17 21:55:32 +02:00
parent d2c7023e7b
commit fcd879f97c
74 changed files with 350 additions and 195 deletions

View File

@@ -40,16 +40,19 @@ function cancelSchedule() {
}
function start() {
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
var mapObj = em.getChannelServer().getMapFactory().getMap(800020120); // original mapid was 251010101
var mobObj = Packages.server.life.MapleLifeFactory.getMonster(6090002);
var mobObj = MapleLifeFactory.getMonster(6090002);
if(mapObj.getMonsterById(6090002) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
mapObj.spawnMonsterOnGroundBelow(mobObj, new Packages.java.awt.Point(560, 50));
mapObj.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "From amongst the ruins shrouded by the mists, Bamboo Warrior appears."));
const Point = Java.type('java.awt.Point');
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(560, 50));
mapObj.broadcastMessage(MaplePacketCreator.serverNotice(6, "From amongst the ruins shrouded by the mists, Bamboo Warrior appears."));
em.schedule("start", 3 * 60 *60 * 1000);
}