Convert event scripts to Graal

This commit is contained in:
P0nk
2021-04-17 19:43:00 +02:00
parent a18a1cb8ce
commit 3458d1c7b3
56 changed files with 273 additions and 237 deletions

View File

@@ -1,6 +1,3 @@
importPackage(Packages.tools);
importPackage(Packages.server.life);
var eventTime = 10 * 60 * 1000; // 10 minutes
var entryMap = 106021600;
var exitMap = 106021402;
@@ -66,7 +63,9 @@ function respawn(eim){
var weddinghall = eim.getMapInstance(entryMap);
weddinghall.getPortal(1).setPortalState(false);
weddinghall.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new java.awt.Point(292, 143));
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
weddinghall.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new Point(292, 143));
} else {
eim.schedule("respawn", 10000);
}