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

@@ -31,8 +31,6 @@ var timer2;
var timer3;
var timer4;
importPackage(Packages.client);
function init() {
/*
if(em.getChannelServer().getId() == 1) { // Only run on channel 1.
@@ -58,15 +56,19 @@ function cancelSchedule() {
}
function start() {
var world = Packages.net.server.Server.getInstance().getWorld(em.getChannelServer().getWorld());
world.setExpRate(8);
world.broadcastPacket(Packages.tools.MaplePacketCreator.serverNotice(6, "The Bunny Onslaught Survival Scanner (BOSS) has detected an Easter Bunny onslaught soon! The GM team has activated the Emergency XP Pool (EXP) that doubles experience gained for the next two hours!"));
const Server = Java.type('net.server.Server');
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
var world = Server.getInstance().getWorld(em.getChannelServer().getWorld());
world.setExpRate(8);
world.broadcastPacket(MaplePacketCreator.serverNotice(6, "The Bunny Onslaught Survival Scanner (BOSS) has detected an Easter Bunny onslaught soon! The GM team has activated the Emergency XP Pool (EXP) that doubles experience gained for the next two hours!"));
}
function stop() {
var world = Packages.net.server.Server.getInstance().getWorld(em.getChannelServer().getWorld());
world.setExpRate(4);
world.broadcastPacket(Packages.tools.MaplePacketCreator.serverNotice(6, "Unfortunately the Emergency XP Pool (EXP) has run out of juice for now and needs to recharge causing the EXP rate to go back to normal."));
const Server = Java.type('net.server.Server');
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
var world = Server.getInstance().getWorld(em.getChannelServer().getWorld());
world.setExpRate(4);
world.broadcastPacket(MaplePacketCreator.serverNotice(6, "Unfortunately the Emergency XP Pool (EXP) has run out of juice for now and needs to recharge causing the EXP rate to go back to normal."));
}
// ---------- FILLER FUNCTIONS ----------