hey , im trying to make auto notice every X mins for my server.
this is the script: (event.js)
now the message isnt showing up in game and idk why, thanks for the help.
this is the script: (event.js)
Code:
importPackage(Packages.tools);
var setupTask;
function init() {
scheduleNew();
}
function scheduleNew() {
var cal = java.util.Calendar.getInstance();
cal.set(java.util.Calendar.HOUR, 0);
cal.set(java.util.Calendar.MINUTE, 0);
cal.set(java.util.Calendar.SECOND, 0);
var nextTime = cal.getTimeInMillis();
while (nextTime <= java.lang.System.currentTimeMillis()) {
nextTime += 1000 * 3600; //1 Hour
}
setupTask = em.scheduleAtTimestamp("start", nextTime);
}
function cancelSchedule() {
setupTask.cancel(true);
}
function start() {
scheduleNew();
em.getChannelServer().broadcastPacket(MaplePacketCreator.serverNotice(6, "message"));
}
now the message isnt showing up in game and idk why, thanks for the help.