Reformat and clean up event scripts
This commit is contained in:
@@ -20,11 +20,11 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||
Timer1 Spawner
|
||||
-- Edited by --------------------------------------------------------------------------------------
|
||||
ThreeStep - based on xQuasar's King Clang spawner
|
||||
**/
|
||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||
Timer1 Spawner
|
||||
-- Edited by --------------------------------------------------------------------------------------
|
||||
ThreeStep - based on xQuasar's King Clang spawner
|
||||
**/
|
||||
|
||||
function init() {
|
||||
scheduleNew();
|
||||
@@ -35,30 +35,31 @@ function scheduleNew() {
|
||||
}
|
||||
|
||||
function cancelSchedule() {
|
||||
if (setupTask != null)
|
||||
if (setupTask != null) {
|
||||
setupTask.cancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
var whirlpoolOfTime = em.getChannelServer().getMapFactory().getMap(220050100);
|
||||
const LifeFactory = Java.type('server.life.LifeFactory');
|
||||
var timer1 = LifeFactory.getMonster(5220003);
|
||||
|
||||
if(whirlpoolOfTime.getMonsterById(5220003) != null) {
|
||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (whirlpoolOfTime.getMonsterById(5220003) != null) {
|
||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||
return;
|
||||
}
|
||||
|
||||
var posX;
|
||||
var posY = 1030;
|
||||
posX = Math.floor((Math.random() * 770) - 770);
|
||||
posX = Math.floor((Math.random() * 770) - 770);
|
||||
const Point = Java.type('java.awt.Point');
|
||||
const spawnpoint = new Point(posX, posY);
|
||||
whirlpoolOfTime.spawnMonsterOnGroundBelow(timer1, spawnpoint);
|
||||
|
||||
const PacketCreator = Java.type('tools.PacketCreator');
|
||||
whirlpoolOfTime.broadcastMessage(PacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
|
||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||
}
|
||||
|
||||
// ---------- FILLER FUNCTIONS ----------
|
||||
|
||||
Reference in New Issue
Block a user