diff --git a/scripts/map/onUserEnter/100000006.js b/scripts/map/onUserEnter/100000006.js index 0c7e9cb355..b518cd8c62 100644 --- a/scripts/map/onUserEnter/100000006.js +++ b/scripts/map/onUserEnter/100000006.js @@ -1,5 +1,3 @@ -importPackage(Packages.server.life); - function start(ms){ if(ms.getQuestStatus(2175) == 1){ @@ -11,6 +9,8 @@ function start(ms){ return; } - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new java.awt.Point(-1027, 216)); + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const Point = Java.type('java.awt.Point'); + map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new Point(-1027, 216)); } } \ No newline at end of file diff --git a/scripts/map/onUserEnter/108010101.js b/scripts/map/onUserEnter/108010101.js index b6192327ac..f4d843eb71 100644 --- a/scripts/map/onUserEnter/108010101.js +++ b/scripts/map/onUserEnter/108010101.js @@ -1,6 +1,4 @@ -importPackage(Packages.server.life); - -function start(ms) { +function start(ms) { if(ms.getMapId() == 108010101) { // Archer spawnMob(188, 20, 9001002, ms.getPlayer().getMap()); } else if(ms.getMapId() == 108010301) { // Warrior @@ -17,7 +15,9 @@ function start(ms) { function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - + + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const Point = Java.type('java.awt.Point'); var mob = MapleLifeFactory.getMonster(id); - map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y)); + map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/108010201.js b/scripts/map/onUserEnter/108010201.js index b6192327ac..f4d843eb71 100644 --- a/scripts/map/onUserEnter/108010201.js +++ b/scripts/map/onUserEnter/108010201.js @@ -1,6 +1,4 @@ -importPackage(Packages.server.life); - -function start(ms) { +function start(ms) { if(ms.getMapId() == 108010101) { // Archer spawnMob(188, 20, 9001002, ms.getPlayer().getMap()); } else if(ms.getMapId() == 108010301) { // Warrior @@ -17,7 +15,9 @@ function start(ms) { function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - + + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const Point = Java.type('java.awt.Point'); var mob = MapleLifeFactory.getMonster(id); - map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y)); + map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/108010301.js b/scripts/map/onUserEnter/108010301.js index b6192327ac..f4d843eb71 100644 --- a/scripts/map/onUserEnter/108010301.js +++ b/scripts/map/onUserEnter/108010301.js @@ -1,6 +1,4 @@ -importPackage(Packages.server.life); - -function start(ms) { +function start(ms) { if(ms.getMapId() == 108010101) { // Archer spawnMob(188, 20, 9001002, ms.getPlayer().getMap()); } else if(ms.getMapId() == 108010301) { // Warrior @@ -17,7 +15,9 @@ function start(ms) { function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - + + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const Point = Java.type('java.awt.Point'); var mob = MapleLifeFactory.getMonster(id); - map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y)); + map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/108010401.js b/scripts/map/onUserEnter/108010401.js index b6192327ac..f4d843eb71 100644 --- a/scripts/map/onUserEnter/108010401.js +++ b/scripts/map/onUserEnter/108010401.js @@ -1,6 +1,4 @@ -importPackage(Packages.server.life); - -function start(ms) { +function start(ms) { if(ms.getMapId() == 108010101) { // Archer spawnMob(188, 20, 9001002, ms.getPlayer().getMap()); } else if(ms.getMapId() == 108010301) { // Warrior @@ -17,7 +15,9 @@ function start(ms) { function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - + + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const Point = Java.type('java.awt.Point'); var mob = MapleLifeFactory.getMonster(id); - map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y)); + map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/108010501.js b/scripts/map/onUserEnter/108010501.js index b6192327ac..f4d843eb71 100644 --- a/scripts/map/onUserEnter/108010501.js +++ b/scripts/map/onUserEnter/108010501.js @@ -1,6 +1,4 @@ -importPackage(Packages.server.life); - -function start(ms) { +function start(ms) { if(ms.getMapId() == 108010101) { // Archer spawnMob(188, 20, 9001002, ms.getPlayer().getMap()); } else if(ms.getMapId() == 108010301) { // Warrior @@ -17,7 +15,9 @@ function start(ms) { function spawnMob(x, y, id, map) { if(map.getMonsterById(id) != null) return; - + + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const Point = Java.type('java.awt.Point'); var mob = MapleLifeFactory.getMonster(id); - map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y)); + map.spawnMonsterOnGroundBelow(mob, new Point(x, y)); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/200090000.js b/scripts/map/onUserEnter/200090000.js index 0a346311d3..22fd6156a5 100644 --- a/scripts/map/onUserEnter/200090000.js +++ b/scripts/map/onUserEnter/200090000.js @@ -1,15 +1,14 @@ // Author: Ronan -importPackage(Packages.tools); - var mapId = 200090000; function start(ms) { var map = ms.getClient().getChannelServer().getMapFactory().getMap(mapId); if(map.getDocked()) { + const MaplePacketCreator = Java.type('tools.MaplePacketCreator'); ms.getClient().announce(MaplePacketCreator.musicChange("Bgm04/ArabPirate")); ms.getClient().announce(MaplePacketCreator.crogBoatPacket(true)); } - return(true); + return true; } \ No newline at end of file diff --git a/scripts/map/onUserEnter/200090010.js b/scripts/map/onUserEnter/200090010.js index bf114d894f..b72a54b86f 100644 --- a/scripts/map/onUserEnter/200090010.js +++ b/scripts/map/onUserEnter/200090010.js @@ -1,15 +1,14 @@ // Author: Ronan -importPackage(Packages.tools); - var mapId = 200090010; function start(ms) { var map = ms.getClient().getChannelServer().getMapFactory().getMap(mapId); if(map.getDocked()) { + const MaplePacketCreator = Java.type('tools.MaplePacketCreator'); ms.getClient().announce(MaplePacketCreator.musicChange("Bgm04/ArabPirate")); ms.getClient().announce(MaplePacketCreator.crogBoatPacket(true)); } - return(true); + return true; } \ No newline at end of file diff --git a/scripts/map/onUserEnter/677000001.js b/scripts/map/onUserEnter/677000001.js index 4e04309277..d8f70ac43f 100644 --- a/scripts/map/onUserEnter/677000001.js +++ b/scripts/map/onUserEnter/677000001.js @@ -1,9 +1,8 @@ -importPackage(Packages.server.life); - function start(ms) { - var pos = new java.awt.Point(461, 61); + const Point = Java.type('java.awt.Point'); + var pos = new Point(461, 61); var mobId = 9400612; - var mobName = "Marbas"; + var mobName = "Marbas"; var player = ms.getPlayer(); var map = player.getMap(); @@ -12,6 +11,7 @@ function start(ms) { return; } + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos); player.message(mobName + " has appeared!"); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/677000003.js b/scripts/map/onUserEnter/677000003.js index f4f036aece..706dcb82e3 100644 --- a/scripts/map/onUserEnter/677000003.js +++ b/scripts/map/onUserEnter/677000003.js @@ -1,9 +1,8 @@ -importPackage(Packages.server.life); - function start(ms) { - var pos = new java.awt.Point(467, 0); + const Point = Java.type('java.awt.Point'); + var pos = new Point(467, 0); var mobId = 9400610; - var mobName = "Amdusias"; + var mobName = "Amdusias"; var player = ms.getPlayer(); var map = player.getMap(); @@ -12,6 +11,7 @@ function start(ms) { return; } + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos); player.message(mobName + " has appeared!"); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/677000005.js b/scripts/map/onUserEnter/677000005.js index 81ce286bb8..1c2bf6e8ab 100644 --- a/scripts/map/onUserEnter/677000005.js +++ b/scripts/map/onUserEnter/677000005.js @@ -1,9 +1,8 @@ -importPackage(Packages.server.life); - function start(ms) { - var pos = new java.awt.Point(201, 80); + const Point = Java.type('java.awt.Point'); + var pos = new Point(201, 80); var mobId = 9400609; - var mobName = "Andras"; + var mobName = "Andras"; var player = ms.getPlayer(); var map = player.getMap(); @@ -12,6 +11,7 @@ function start(ms) { return; } + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos); player.message(mobName + " has appeared!"); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/677000007.js b/scripts/map/onUserEnter/677000007.js index d52195b309..82201272d2 100644 --- a/scripts/map/onUserEnter/677000007.js +++ b/scripts/map/onUserEnter/677000007.js @@ -1,9 +1,8 @@ -importPackage(Packages.server.life); - function start(ms) { - var pos = new java.awt.Point(171, 50); + const Point = Java.type('java.awt.Point'); + var pos = new Point(171, 50); var mobId = 9400611; - var mobName = "Crocell"; + var mobName = "Crocell"; var player = ms.getPlayer(); var map = player.getMap(); @@ -12,6 +11,7 @@ function start(ms) { return; } + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos); player.message(mobName + " has appeared!"); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/677000009.js b/scripts/map/onUserEnter/677000009.js index 23969e4b4b..10b8d80202 100644 --- a/scripts/map/onUserEnter/677000009.js +++ b/scripts/map/onUserEnter/677000009.js @@ -1,9 +1,8 @@ -importPackage(Packages.server.life); - function start(ms) { - var pos = new java.awt.Point(251, -841); + const Point = Java.type('java.awt.Point'); + var pos = new Point(251, -841); var mobId = 9400613; - var mobName = "Valefor"; + var mobName = "Valefor"; var player = ms.getPlayer(); var map = player.getMap(); @@ -12,6 +11,7 @@ function start(ms) { return; } + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos); player.message(mobName + " has appeared!"); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/677000012.js b/scripts/map/onUserEnter/677000012.js index 06180624c9..8e02c37a80 100644 --- a/scripts/map/onUserEnter/677000012.js +++ b/scripts/map/onUserEnter/677000012.js @@ -1,9 +1,8 @@ -importPackage(Packages.server.life); - function start(ms) { - var pos = new java.awt.Point(842, 0); + const Point = Java.type('java.awt.Point'); + var pos = new Point(842, 0); var mobId = 9400633; - var mobName = "Astaroth"; + var mobName = "Astaroth"; var player = ms.getPlayer(); var map = player.getMap(); @@ -12,6 +11,7 @@ function start(ms) { return; } + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), pos); player.message(mobName + " has appeared!"); } \ No newline at end of file diff --git a/scripts/map/onUserEnter/910510000.js b/scripts/map/onUserEnter/910510000.js index 51e18daa4b..a3373b5dd8 100644 --- a/scripts/map/onUserEnter/910510000.js +++ b/scripts/map/onUserEnter/910510000.js @@ -1,16 +1,16 @@ -importPackage(Packages.server.life); +function start(ms) { + var player = ms.getPlayer(); + var map = player.getMap(); -function start(ms){ - var player = ms.getPlayer(); - var map = player.getMap(); - - if(player.isCygnus()) { - if(ms.isQuestStarted(20730) && ms.getQuestProgressInt(20730, 9300285) == 0) { - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300285), new java.awt.Point(680, 258)); - } - } else { - if(ms.isQuestStarted(21731) && ms.getQuestProgressInt(21731, 9300344) == 0) { - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300344), new java.awt.Point(680, 258)); - } + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const Point = Java.type('java.awt.Point'); + if (player.isCygnus()) { + if (ms.isQuestStarted(20730) && ms.getQuestProgressInt(20730, 9300285) == 0) { + map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300285), new Point(680, 258)); } + } else { + if (ms.isQuestStarted(21731) && ms.getQuestProgressInt(21731, 9300344) == 0) { + map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300344), new Point(680, 258)); + } + } } \ No newline at end of file diff --git a/scripts/map/onUserEnter/925040100.js b/scripts/map/onUserEnter/925040100.js index 738b9c75ac..1ac603c642 100644 --- a/scripts/map/onUserEnter/925040100.js +++ b/scripts/map/onUserEnter/925040100.js @@ -1,10 +1,10 @@ -importPackage(Packages.server.life); - function start(ms){ var player = ms.getPlayer(); var map = player.getMap(); if(ms.isQuestStarted(21747) && ms.getQuestProgressInt(21747, 9300351) == 0) { - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300351), new java.awt.Point(897, 51)); + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const Point = Java.type('java.awt.Point'); + map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300351), new Point(897, 51)); } } \ No newline at end of file diff --git a/scripts/map/onUserEnter/pepeking_effect.js b/scripts/map/onUserEnter/pepeking_effect.js index 5fd8439196..78df65aa76 100644 --- a/scripts/map/onUserEnter/pepeking_effect.js +++ b/scripts/map/onUserEnter/pepeking_effect.js @@ -1,9 +1,9 @@ -importPackage(Packages.server.life); - function start(ms){ var mobId = 3300000 + (Math.floor(Math.random() * 3) + 5); var player = ms.getPlayer(); var map = player.getMap(); - map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new java.awt.Point(-28, -67)); + const MapleLifeFactory = Java.type('server.life.MapleLifeFactory'); + const Point = Java.type('java.awt.Point'); + map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new Point(-28, -67)); } \ No newline at end of file