Convert remaining scripts to Graal

Mainly missed scripts that use Nashorn's "Packages"
This commit is contained in:
P0nk
2021-04-17 21:55:32 +02:00
parent d2c7023e7b
commit fcd879f97c
74 changed files with 350 additions and 195 deletions

View File

@@ -147,8 +147,11 @@ function setup(level, lobbyid) {
eim.getInstanceMap(670010800).shuffleReactors(); eim.getInstanceMap(670010800).shuffleReactors();
var mapObj = eim.getInstanceMap(670010700); var mapObj = eim.getInstanceMap(670010700);
var mobObj = Packages.server.life.MapleLifeFactory.getMonster(9400536);
mapObj.spawnMonsterOnGroundBelow(mobObj, new Packages.java.awt.Point(942, 478)); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
var mobObj = MapleLifeFactory.getMonster(9400536);
mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(942, 478));
respawnStages(eim); respawnStages(eim);

View File

@@ -40,16 +40,19 @@ function cancelSchedule() {
} }
function start() { function start() {
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
var mapObj = em.getChannelServer().getMapFactory().getMap(800020120); // original mapid was 251010101 var mapObj = em.getChannelServer().getMapFactory().getMap(800020120); // original mapid was 251010101
var mobObj = Packages.server.life.MapleLifeFactory.getMonster(6090002); var mobObj = MapleLifeFactory.getMonster(6090002);
if(mapObj.getMonsterById(6090002) != null) { if(mapObj.getMonsterById(6090002) != null) {
em.schedule("start", 3 * 60 *60 * 1000); em.schedule("start", 3 * 60 *60 * 1000);
return; return;
} }
mapObj.spawnMonsterOnGroundBelow(mobObj, new Packages.java.awt.Point(560, 50)); const Point = Java.type('java.awt.Point');
mapObj.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "From amongst the ruins shrouded by the mists, Bamboo Warrior appears.")); const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(560, 50));
mapObj.broadcastMessage(MaplePacketCreator.serverNotice(6, "From amongst the ruins shrouded by the mists, Bamboo Warrior appears."));
em.schedule("start", 3 * 60 *60 * 1000); em.schedule("start", 3 * 60 *60 * 1000);
} }

View File

@@ -41,15 +41,19 @@ function cancelSchedule() {
function start() { function start() {
var herbGarden = em.getChannelServer().getMapFactory().getMap(251010102); var herbGarden = em.getChannelServer().getMapFactory().getMap(251010102);
var gcent = Packages.server.life.MapleLifeFactory.getMonster(5220004);
if(herbGarden.getMonsterById(5220004) != null) { if(herbGarden.getMonsterById(5220004) != null) {
em.schedule("start", 3 * 60 *60 * 1000); em.schedule("start", 3 * 60 *60 * 1000);
return; return;
} }
herbGarden.spawnMonsterOnGroundBelow(gcent, new Packages.java.awt.Point(560, 50)); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
herbGarden.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "From the mists surrounding the herb garden, the gargantuous Giant Centipede appears.")); const Point = Java.type('java.awt.Point');
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
var gcent = MapleLifeFactory.getMonster(5220004);
herbGarden.spawnMonsterOnGroundBelow(gcent, new Point(560, 50));
herbGarden.broadcastMessage(MaplePacketCreator.serverNotice(6, "From the mists surrounding the herb garden, the gargantuous Giant Centipede appears."));
em.schedule("start", 3 * 60 *60 * 1000); em.schedule("start", 3 * 60 *60 * 1000);
} }

View File

@@ -41,15 +41,19 @@ function cancelSchedule() {
function start() { function start() {
var royalCatthusDesert = em.getChannelServer().getMapFactory().getMap(260010201); var royalCatthusDesert = em.getChannelServer().getMapFactory().getMap(260010201);
var deo = Packages.server.life.MapleLifeFactory.getMonster(3220001);
if(royalCatthusDesert.getMonsterById(3220001) != null) { if(royalCatthusDesert.getMonsterById(3220001) != null) {
em.schedule("start", 3 * 60 *60 * 1000); em.schedule("start", 3 * 60 *60 * 1000);
return; return;
} }
royalCatthusDesert.spawnMonsterOnGroundBelow(deo, new Packages.java.awt.Point(645, 275)); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
royalCatthusDesert.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Deo slowly appeared out of the sand dust.")); const Point = Java.type('java.awt.Point');
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
var deo = MapleLifeFactory.getMonster(3220001);
royalCatthusDesert.spawnMonsterOnGroundBelow(deo, new Point(645, 275));
royalCatthusDesert.broadcastMessage(MaplePacketCreator.serverNotice(6, "Deo slowly appeared out of the sand dust."));
em.schedule("start", 3 * 60 *60 * 1000); em.schedule("start", 3 * 60 *60 * 1000);
} }

View File

@@ -41,7 +41,6 @@ function start() {
var bossMobid = 9400610; var bossMobid = 9400610;
var bossMapid = 677000003; var bossMapid = 677000003;
var bossMsg = "Amdusias has appeared!"; var bossMsg = "Amdusias has appeared!";
var bossPos = new Packages.java.awt.Point(467, 0);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid); var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) { if (map.getMonsterById(bossMobid) != null) {
@@ -49,9 +48,14 @@ function start() {
return; return;
} }
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid); const Point = Java.type('java.awt.Point');
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
var boss = MapleLifeFactory.getMonster(bossMobid);
var bossPos = new Point(467, 0);
map.spawnMonsterOnGroundBelow(boss, bossPos); map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg)); map.broadcastMessage(MaplePacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000); em.schedule("start", 3 * 60 * 60 * 1000);
} }

View File

@@ -41,7 +41,6 @@ function start() {
var bossMobid = 9400609; var bossMobid = 9400609;
var bossMapid = 677000005; var bossMapid = 677000005;
var bossMsg = "Andras has appeared!"; var bossMsg = "Andras has appeared!";
var bossPos = new Packages.java.awt.Point(201, 80);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid); var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) { if (map.getMonsterById(bossMobid) != null) {
@@ -49,9 +48,14 @@ function start() {
return; return;
} }
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
var boss = MapleLifeFactory.getMonster(bossMobid);
var bossPos = new Point(201, 80);
map.spawnMonsterOnGroundBelow(boss, bossPos); map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg)); map.broadcastMessage(MaplePacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000); em.schedule("start", 3 * 60 * 60 * 1000);
} }

View File

@@ -41,7 +41,6 @@ function start() {
var bossMobid = 9400613; var bossMobid = 9400613;
var bossMapid = 677000009; var bossMapid = 677000009;
var bossMsg = "Valefor has appeared!"; var bossMsg = "Valefor has appeared!";
var bossPos = new Packages.java.awt.Point(251, -841);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid); var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) { if (map.getMonsterById(bossMobid) != null) {
@@ -49,9 +48,14 @@ function start() {
return; return;
} }
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
var boss = MapleLifeFactory.getMonster(bossMobid);
var bossPos = new Point(251, -841);
map.spawnMonsterOnGroundBelow(boss, bossPos); map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg)); map.broadcastMessage(MaplePacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000); em.schedule("start", 3 * 60 * 60 * 1000);
} }

View File

@@ -41,7 +41,6 @@ function start() {
var bossMobid = 9400633; var bossMobid = 9400633;
var bossMapid = 677000012; var bossMapid = 677000012;
var bossMsg = "Astaroth has appeared!"; var bossMsg = "Astaroth has appeared!";
var bossPos = new Packages.java.awt.Point(842, 0);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid); var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) { if (map.getMonsterById(bossMobid) != null) {
@@ -49,9 +48,14 @@ function start() {
return; return;
} }
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
var boss = MapleLifeFactory.getMonster(bossMobid);
var bossPos = new Point(842, 0);
map.spawnMonsterOnGroundBelow(boss, bossPos); map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg)); map.broadcastMessage(MaplePacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000); em.schedule("start", 3 * 60 * 60 * 1000);
} }

View File

@@ -41,7 +41,6 @@ function start() {
var bossMobid = 9400612; var bossMobid = 9400612;
var bossMapid = 677000001; var bossMapid = 677000001;
var bossMsg = "Marbas has appeared!"; var bossMsg = "Marbas has appeared!";
var bossPos = new Packages.java.awt.Point(461, 61);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid); var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) { if (map.getMonsterById(bossMobid) != null) {
@@ -49,9 +48,14 @@ function start() {
return; return;
} }
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
var boss = MapleLifeFactory.getMonster(bossMobid);
var bossPos = new Point(461, 61);
map.spawnMonsterOnGroundBelow(boss, bossPos); map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg)); map.broadcastMessage(MaplePacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000); em.schedule("start", 3 * 60 * 60 * 1000);
} }

View File

@@ -41,7 +41,6 @@ function start() {
var bossMobid = 9400611; var bossMobid = 9400611;
var bossMapid = 677000007; var bossMapid = 677000007;
var bossMsg = "Crocell has appeared!"; var bossMsg = "Crocell has appeared!";
var bossPos = new Packages.java.awt.Point(171, 50);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid); var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) { if (map.getMonsterById(bossMobid) != null) {
@@ -49,9 +48,14 @@ function start() {
return; return;
} }
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
var boss = MapleLifeFactory.getMonster(bossMobid);
var bossPos = new Point(171, 50);
map.spawnMonsterOnGroundBelow(boss, bossPos); map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg)); map.broadcastMessage(MaplePacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000); em.schedule("start", 3 * 60 * 60 * 1000);
} }

View File

@@ -41,9 +41,8 @@ function cancelSchedule() {
function start() { function start() {
var snackBarMap = em.getChannelServer().getMapFactory().getMap(105090310); var snackBarMap = em.getChannelServer().getMapFactory().getMap(105090310);
var snackBar = Packages.server.life.MapleLifeFactory.getMonster(8220008);
if(snackBarMap.getMonsterById(8220008) != null || snackBarMap.getMonsterById(8220009) != null) { if (snackBarMap.getMonsterById(8220008) != null || snackBarMap.getMonsterById(8220009) != null) {
em.schedule("start", 3 * 60 * 60 * 1000); em.schedule("start", 3 * 60 * 60 * 1000);
return; return;
} }
@@ -51,9 +50,14 @@ function start() {
var setPos = [[-626, -604], [735, -600]]; var setPos = [[-626, -604], [735, -600]];
var rndPos = setPos[Math.floor(Math.random() * setPos.length)]; var rndPos = setPos[Math.floor(Math.random() * setPos.length)];
snackBarMap.spawnMonsterOnGroundBelow(snackBar, new Packages.java.awt.Point(rndPos[0], rndPos[1])); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
snackBarMap.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Slowly, a suspicious food stand opens up on a strangely remote place.")); const Point = Java.type('java.awt.Point');
em.schedule("start", 3 * 60 *60 * 1000); const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
var snackBar = MapleLifeFactory.getMonster(8220008);
snackBarMap.spawnMonsterOnGroundBelow(snackBar, new Point(rndPos[0], rndPos[1]));
snackBarMap.broadcastMessage(MaplePacketCreator.serverNotice(6, "Slowly, a suspicious food stand opens up on a strangely remote place."));
em.schedule("start", 3 * 60 * 60 * 1000);
} }
// ---------- FILLER FUNCTIONS ---------- // ---------- FILLER FUNCTIONS ----------

View File

@@ -41,15 +41,19 @@ function cancelSchedule() {
function start() { function start() {
var graysPrairie = em.getChannelServer().getMapFactory().getMap(221040301); var graysPrairie = em.getChannelServer().getMapFactory().getMap(221040301);
var zeno = Packages.server.life.MapleLifeFactory.getMonster(6220001);
if(graysPrairie.getMonsterById(6220001) != null) { if(graysPrairie.getMonsterById(6220001) != null) {
em.schedule("start", 3 * 60 * 60 * 1000); em.schedule("start", 3 * 60 * 60 * 1000);
return; return;
} }
graysPrairie.spawnMonsterOnGroundBelow(zeno, new Packages.java.awt.Point(-4224, 776)); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
graysPrairie.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Zeno has appeared with a heavy sound of machinery.")); const Point = Java.type('java.awt.Point');
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
var zeno = MapleLifeFactory.getMonster(6220001);
graysPrairie.spawnMonsterOnGroundBelow(zeno, new Point(-4224, 776));
graysPrairie.broadcastMessage(MaplePacketCreator.serverNotice(6, "Zeno has appeared with a heavy sound of machinery."));
em.schedule("start", 3 * 60 * 60 * 1000); em.schedule("start", 3 * 60 * 60 * 1000);
} }

View File

@@ -250,7 +250,8 @@ function friendlyItemDrop(eim, mob) {
var cakes = eim.getIntProperty("bunnyCake") + 1; var cakes = eim.getIntProperty("bunnyCake") + 1;
eim.setIntProperty("bunnyCake", cakes); eim.setIntProperty("bunnyCake", cakes);
mob.getMap().broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "The Moon Bunny made rice cake number " + cakes + ".")); const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
mob.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "The Moon Bunny made rice cake number " + cakes + "."));
} }
} }
@@ -258,7 +259,8 @@ function friendlyDamaged(eim, mob) {
if (mob.getId() == 9300061) { if (mob.getId() == 9300061) {
var bunnyDamage = eim.getIntProperty("bunnyDamaged") + 1; var bunnyDamage = eim.getIntProperty("bunnyDamaged") + 1;
if (bunnyDamage > 5) { if (bunnyDamage > 5) {
broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "The Moon Bunny is feeling sick. Please protect it so it can make delicious rice cakes.")); const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
broadcastMessage(MaplePacketCreator.serverNotice(6, "The Moon Bunny is feeling sick. Please protect it so it can make delicious rice cakes."));
eim.setIntProperty("bunnyDamaged", 0); eim.setIntProperty("bunnyDamaged", 0);
} }
} }

View File

@@ -71,9 +71,11 @@ function setEventRewards(eim) {
function spawnCakeBoss(eim) { function spawnCakeBoss(eim) {
var mapObj = eim.getMapInstance(680000400); var mapObj = eim.getMapInstance(680000400);
var mobObj = Packages.server.life.MapleLifeFactory.getMonster(9400606);
mapObj.spawnMonsterOnGroundBelow(mobObj, new Packages.java.awt.Point(777, -177)); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
var mobObj = MapleLifeFactory.getMonster(9400606);
mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(777, -177));
} }
function setup(level, lobbyid) { function setup(level, lobbyid) {
@@ -125,10 +127,11 @@ function stopBlessings(eim) {
function sendWeddingAction(eim, type) { function sendWeddingAction(eim, type) {
var chr = eim.getLeader(); var chr = eim.getLeader();
const Wedding = Java.type('tools.packets.Wedding');
if(chr.getGender() == 0) { if(chr.getGender() == 0) {
chr.getMap().broadcastMessage(Packages.tools.packets.Wedding.OnWeddingProgress(type == 2, eim.getIntProperty("groomId"), eim.getIntProperty("brideId"), type + 1)); chr.getMap().broadcastMessage(Wedding.OnWeddingProgress(type == 2, eim.getIntProperty("groomId"), eim.getIntProperty("brideId"), type + 1));
} else { } else {
chr.getMap().broadcastMessage(Packages.tools.packets.Wedding.OnWeddingProgress(type == 2, eim.getIntProperty("brideId"), eim.getIntProperty("groomId"), type + 1)); chr.getMap().broadcastMessage(Wedding.OnWeddingProgress(type == 2, eim.getIntProperty("brideId"), eim.getIntProperty("groomId"), type + 1));
} }
} }
@@ -137,12 +140,14 @@ function hidePriestMsg(eim) {
} }
function showStartMsg(eim) { function showStartMsg(eim) {
eim.getMapInstance(entryMap + 10).broadcastMessage(Packages.tools.packets.Wedding.OnWeddingProgress(false, 0, 0, 0)); const Wedding = Java.type('tools.packets.Wedding');
eim.getMapInstance(entryMap + 10).broadcastMessage(Wedding.OnWeddingProgress(false, 0, 0, 0));
eim.schedule("hidePriestMsg", forceHideMsgTime * 1000); eim.schedule("hidePriestMsg", forceHideMsgTime * 1000);
} }
function showBlessMsg(eim) { function showBlessMsg(eim) {
eim.getMapInstance(entryMap + 10).broadcastMessage(Packages.tools.packets.Wedding.OnWeddingProgress(false, 0, 0, 1)); const Wedding = Java.type('tools.packets.Wedding');
eim.getMapInstance(entryMap + 10).broadcastMessage(Wedding.OnWeddingProgress(false, 0, 0, 1));
eim.setIntProperty("guestBlessings", 1); eim.setIntProperty("guestBlessings", 1);
eim.schedule("hidePriestMsg", forceHideMsgTime * 1000); eim.schedule("hidePriestMsg", forceHideMsgTime * 1000);
} }

View File

@@ -71,9 +71,11 @@ function setEventRewards(eim) {
function spawnCakeBoss(eim) { function spawnCakeBoss(eim) {
var mapObj = eim.getMapInstance(680000400); var mapObj = eim.getMapInstance(680000400);
var mobObj = Packages.server.life.MapleLifeFactory.getMonster(9400606);
mapObj.spawnMonsterOnGroundBelow(mobObj, new Packages.java.awt.Point(777, -177)); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
var mobObj = MapleLifeFactory.getMonster(9400606);
mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(777, -177));
} }
function setup(level, lobbyid) { function setup(level, lobbyid) {
@@ -125,10 +127,12 @@ function stopBlessings(eim) {
function sendWeddingAction(eim, type) { function sendWeddingAction(eim, type) {
var chr = eim.getLeader(); var chr = eim.getLeader();
const Wedding = Java.type('tools.packets.Wedding');
if(chr.getGender() == 0) { if(chr.getGender() == 0) {
chr.getMap().broadcastMessage(Packages.tools.packets.Wedding.OnWeddingProgress(type == 2, eim.getIntProperty("groomId"), eim.getIntProperty("brideId"), type + 1)); chr.getMap().broadcastMessage(Wedding.OnWeddingProgress(type == 2, eim.getIntProperty("groomId"), eim.getIntProperty("brideId"), type + 1));
} else { } else {
chr.getMap().broadcastMessage(Packages.tools.packets.Wedding.OnWeddingProgress(type == 2, eim.getIntProperty("brideId"), eim.getIntProperty("groomId"), type + 1)); chr.getMap().broadcastMessage(Wedding.OnWeddingProgress(type == 2, eim.getIntProperty("brideId"), eim.getIntProperty("groomId"), type + 1));
} }
} }
@@ -137,12 +141,14 @@ function hidePriestMsg(eim) {
} }
function showStartMsg(eim) { function showStartMsg(eim) {
eim.getMapInstance(entryMap + 10).broadcastMessage(Packages.tools.packets.Wedding.OnWeddingProgress(false, 0, 0, 0)); const Wedding = Java.type('tools.packets.Wedding');
eim.getMapInstance(entryMap + 10).broadcastMessage(Wedding.OnWeddingProgress(false, 0, 0, 0));
eim.schedule("hidePriestMsg", forceHideMsgTime * 1000); eim.schedule("hidePriestMsg", forceHideMsgTime * 1000);
} }
function showBlessMsg(eim) { function showBlessMsg(eim) {
eim.getMapInstance(entryMap + 10).broadcastMessage(Packages.tools.packets.Wedding.OnWeddingProgress(false, 0, 0, 1)); const Wedding = Java.type('tools.packets.Wedding');
eim.getMapInstance(entryMap + 10).broadcastMessage(Wedding.OnWeddingProgress(false, 0, 0, 1));
eim.setIntProperty("guestBlessings", 1); eim.setIntProperty("guestBlessings", 1);
eim.schedule("hidePriestMsg", forceHideMsgTime * 1000); eim.schedule("hidePriestMsg", forceHideMsgTime * 1000);
} }

View File

@@ -19,7 +19,8 @@
*/ */
var npcid = 1104100; var npcid = 1104100;
var spawnPos = new Packages.java.awt.Point(2830, 78); const Point = Java.type('java.awt.Point');
var spawnPos = new Point(2830, 78);
function start(ms) { function start(ms) {
var mapobj = ms.getMap(); var mapobj = ms.getMap();

View File

@@ -19,7 +19,8 @@
*/ */
var npcid = 1104101; var npcid = 1104101;
var spawnPos = new Packages.java.awt.Point(3395, -322); const Point = Java.type('java.awt.Point');
var spawnPos = new Point(3395, -322);
function start(ms) { function start(ms) {
var mapobj = ms.getMap(); var mapobj = ms.getMap();

View File

@@ -19,7 +19,8 @@
*/ */
var npcid = 1104102; var npcid = 1104102;
var spawnPos = new Packages.java.awt.Point(500, -522); const Point = Java.type('java.awt.Point');
var spawnPos = new Point(500, -522);
function start(ms) { function start(ms) {
var mapobj = ms.getMap(); var mapobj = ms.getMap();

View File

@@ -19,7 +19,8 @@
*/ */
var npcid = 1104103; var npcid = 1104103;
var spawnPos = new Packages.java.awt.Point(-2263, -582); const Point = Java.type('java.awt.Point');
var spawnPos = new Point(-2263, -582);
function start(ms) { function start(ms) {
var mapobj = ms.getMap(); var mapobj = ms.getMap();

View File

@@ -19,7 +19,8 @@
*/ */
var npcid = 1104104; var npcid = 1104104;
var spawnPos = new Packages.java.awt.Point(372, 70); const Point = Java.type('java.awt.Point');
var spawnPos = new Point(372, 70);
function start(ms) { function start(ms) {
var mapobj = ms.getMap(); var mapobj = ms.getMap();

View File

@@ -34,7 +34,8 @@ spawnPnpcFee = 7000000;
jobType = 3; jobType = 3;
function start() { function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) { const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true; spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?"; var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -93,7 +94,9 @@ function action(mode, type, selection) {
return; return;
} }
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) { const MaplePlayerNPC = Java.type('server.life.MaplePlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if(MaplePlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it."); cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee); cm.gainMeso(-spawnPnpcFee);
} else { } else {

View File

@@ -35,7 +35,8 @@ spawnPnpcFee = 7000000;
jobType = 1; jobType = 1;
function start() { function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) { const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true; spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?"; var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -94,7 +95,9 @@ function action(mode, type, selection) {
return; return;
} }
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) { const MaplePlayerNPC = Java.type('server.life.MaplePlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if(MaplePlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it."); cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee); cm.gainMeso(-spawnPnpcFee);
} else { } else {

View File

@@ -116,6 +116,7 @@ function action(mode, type, selection) {
if(!cm.hasItem(itemToUse) && vp > 0) if(!cm.hasItem(itemToUse) && vp > 0)
useVP = true; useVP = true;
const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
if(choice == 0) { if(choice == 0) {
// VP Exchange // VP Exchange
if(!cm.canHold(itemToUse)) { if(!cm.canHold(itemToUse)) {
@@ -135,11 +136,12 @@ function action(mode, type, selection) {
cm.gainItem(itemToUse, -1); cm.gainItem(itemToUse, -1);
cm.getPlayer().getCashShop().gainCash(1, nxAmount); cm.getPlayer().getCashShop().gainCash(1, nxAmount);
cm.getPlayer().announce(Packages.tools.MaplePacketCreator.earnTitleMessage("You have earned " + nxAmount + " NX")); const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
cm.getPlayer().announce(MaplePacketCreator.earnTitleMessage("You have earned " + nxAmount + " NX"));
cm.logLeaf(nxAmount + " NX"); cm.logLeaf(nxAmount + " NX");
cm.dispose(); cm.dispose();
} else if(choice == 2) { } else if(choice == 2) {
if(!cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.SETUP).isFull(chairAmount)) { if(!cm.getPlayer().getInventory(MapleInventoryType.SETUP).isFull(chairAmount)) {
var chairStr = ""; var chairStr = "";
for(var i = 0; i < chairAmount; i++) { for(var i = 0; i < chairAmount; i++) {
@@ -159,7 +161,7 @@ function action(mode, type, selection) {
cm.sendOk("Please make sure you have enough space to hold the items!"); cm.sendOk("Please make sure you have enough space to hold the items!");
} }
} else if(choice == 3) { } else if(choice == 3) {
if(!cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.EQUIP).isFull(weaponAmount)) { if(!cm.getPlayer().getInventory(MapleInventoryType.EQUIP).isFull(weaponAmount)) {
var weaponStr = ""; var weaponStr = "";
for(var i = 0; i < weaponAmount; i++) { for(var i = 0; i < weaponAmount; i++) {
@@ -179,7 +181,7 @@ function action(mode, type, selection) {
cm.sendOk("Please make sure you have enough space to hold the items!"); cm.sendOk("Please make sure you have enough space to hold the items!");
} }
} else if(choice == 4) { } else if(choice == 4) {
if(!cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.USE).isFull(2)) { if(!cm.getPlayer().getInventory(MapleInventoryType.USE).isFull(2)) {
cm.gainItem(buff1ID, buffAmount, true); cm.gainItem(buff1ID, buffAmount, true);
cm.gainItem(buff2ID, buffAmount, true); cm.gainItem(buff2ID, buffAmount, true);
cm.gainItem(itemToUse, -1); cm.gainItem(itemToUse, -1);
@@ -190,7 +192,7 @@ function action(mode, type, selection) {
} }
} else if(choice == 5) { } else if(choice == 5) {
if(!cm.haveItem(5030000, 1)) { if(!cm.haveItem(5030000, 1)) {
if(!cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.CASH).isFull(1)){ if(!cm.getPlayer().getInventory(MapleInventoryType.CASH).isFull(1)){
cm.gainItem(5030000, 1, false, true, 1000 * 60 * 60 * 24 * hiredMerchantLength); cm.gainItem(5030000, 1, false, true, 1000 * 60 * 60 * 24 * hiredMerchantLength);
if(useVP) if(useVP)

View File

@@ -35,7 +35,8 @@ spawnPnpcFee = 7000000;
jobType = 2; jobType = 2;
function start() { function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) { const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true; spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?"; var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -94,7 +95,9 @@ function action(mode, type, selection) {
return; return;
} }
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) { const MaplePlayerNPC = Java.type('server.life.MaplePlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if(MaplePlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it."); cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee); cm.gainMeso(-spawnPnpcFee);
} else { } else {

View File

@@ -34,7 +34,8 @@ spawnPnpcFee = 7000000;
jobType = 4; jobType = 4;
function start() { function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) { const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true; spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?"; var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -95,7 +96,9 @@ function action(mode, type, selection) {
return; return;
} }
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) { const MaplePlayerNPC = Java.type('server.life.MaplePlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if(MaplePlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it."); cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee); cm.gainMeso(-spawnPnpcFee);
} else { } else {

View File

@@ -34,7 +34,8 @@ function start() {
cm.gainItem(4031025,10); cm.gainItem(4031025,10);
} else { } else {
if(cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.ETC).getNumFreeSlot() < 1) { const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
if(cm.getPlayer().getInventory(MapleInventoryType.ETC).getNumFreeSlot() < 1) {
cm.sendNext("Check for a available slot on your ETC inventory."); cm.sendNext("Check for a available slot on your ETC inventory.");
cm.dispose(); cm.dispose();
return; return;

View File

@@ -34,7 +34,8 @@ function start() {
cm.gainItem(4031026,20); cm.gainItem(4031026,20);
} else { } else {
if(cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.ETC).getNumFreeSlot() < 1) { const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
if(cm.getPlayer().getInventory(MapleInventoryType.ETC).getNumFreeSlot() < 1) {
cm.sendNext("Check for a available slot on your ETC inventory."); cm.sendNext("Check for a available slot on your ETC inventory.");
cm.dispose(); cm.dispose();
return; return;

View File

@@ -34,7 +34,8 @@ function start() {
cm.gainItem(4031028,30); cm.gainItem(4031028,30);
} else { } else {
if(cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.ETC).getNumFreeSlot() < 1) { const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
if(cm.getPlayer().getInventory(MapleInventoryType.ETC).getNumFreeSlot() < 1) {
cm.sendNext("Check for a available slot on your ETC inventory."); cm.sendNext("Check for a available slot on your ETC inventory.");
cm.dispose(); cm.dispose();
return; return;

View File

@@ -29,7 +29,9 @@ function action(mode, type, selection) {
if(cm.getClient().getChannelServer().getMapFactory().getMap(925020010).getCharacters().size() > 0) { if(cm.getClient().getChannelServer().getMapFactory().getMap(925020010).getCharacters().size() > 0) {
cm.sendOk("Someone is already challenging the Master. Try again later."); cm.sendOk("Someone is already challenging the Master. Try again later.");
} else { } else {
cm.getWarpMap(910510202).spawnMonsterOnGroundBelow(Packages.server.life.MapleLifeFactory.getMonster(9300346), new java.awt.Point(95, 200)); const MapleLifeFactoroy = Java.type('server.life.MapleLifeFactoroy');
const Point = Java.type('java.awt.Point');
cm.getWarpMap(910510202).spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300346), new Point(95, 200));
cm.warp(910510202, 0); cm.warp(910510202, 0);
} }

View File

@@ -35,6 +35,7 @@ jobType = 5;
var advQuest = 0; var advQuest = 0;
function start() { function start() {
const GameConstants = Java.type('constants.game.GameConstants');
if (cm.isQuestStarted(6330)) { if (cm.isQuestStarted(6330)) {
if (cm.getEventInstance() != null) { // missing script for skill test found thanks to Jade™ if (cm.getEventInstance() != null) { // missing script for skill test found thanks to Jade™
advQuest = 5; // string visibility thanks to iPunchEm & Glvelturall advQuest = 5; // string visibility thanks to iPunchEm & Glvelturall
@@ -63,7 +64,7 @@ function start() {
cm.sendNext("Congratulations. You have managed to pass my test. I'll teach you a new skill called \"Battleship\".\r\n\r\n #s5221006# #b#q5221006##k"); cm.sendNext("Congratulations. You have managed to pass my test. I'll teach you a new skill called \"Battleship\".\r\n\r\n #s5221006# #b#q5221006##k");
} }
} else if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) { } else if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true; spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?"; var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -142,7 +143,9 @@ function action(mode, type, selection) {
return; return;
} }
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) { const MaplePlayerNPC = Java.type('server.life.MaplePlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if(MaplePlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it."); cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee); cm.gainMeso(-spawnPnpcFee);
} else { } else {

View File

@@ -19,6 +19,7 @@
*/ */
function start() { function start() {
Packages.server.MapleShopFactory.getInstance().getShop(11000).sendShop(cm.getClient()); const MapleShopFactory = Java.type('server.MapleShopFactory');
MapleShopFactory.getInstance().getShop(11000).sendShop(cm.getClient());
cm.dispose(); cm.dispose();
} }

View File

@@ -33,7 +33,8 @@ var maxJobType = 15;
function start() { function start() {
var jobType = parseInt(cm.getJobId() / 100); var jobType = parseInt(cm.getJobId() / 100);
if (jobType >= minJobType && jobType <= maxJobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) { const GameConstants = Java.type('constants.game.GameConstants');
if (jobType >= minJobType && jobType <= maxJobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true; spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?"; var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -64,7 +65,9 @@ function action(mode, type, selection) {
return; return;
} }
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) { const MaplePlayerNPC = Java.type('server.life.MaplePlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if(MaplePlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it."); cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee); cm.gainMeso(-spawnPnpcFee);
} else { } else {

View File

@@ -34,7 +34,9 @@ function action(mode, type, selection) {
if (mode == 0 && type > 0) { if (mode == 0 && type > 0) {
cm.getPlayer().dropMessage(5, "Eleanor: Oh, lost the Empress and still challenging us? Now you've done it! Prepare yourself!!!"); cm.getPlayer().dropMessage(5, "Eleanor: Oh, lost the Empress and still challenging us? Now you've done it! Prepare yourself!!!");
mapobj.spawnMonsterOnGroundBelow(Packages.server.life.MapleLifeFactory.getMonster(9001010), new Packages.java.awt.Point(850, 0)); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
mapobj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9001010), new Point(850, 0));
mapobj.destroyNPC(1104002); mapobj.destroyNPC(1104002);
cm.dispose(); cm.dispose();

View File

@@ -5,7 +5,8 @@ var spawnPnpcFee = 7000000;
var jobType = 21; var jobType = 21;
function start() { function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) { const GameConstants = Java.type('constants.game.GameConstants');
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true; spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?"; var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -36,7 +37,9 @@ function action(mode, type, selection) {
return; return;
} }
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) { const MaplePlayerNPC = Java.type('server.life.MaplePlayerNPC');
const GameConstants = Java.type('constants.game.GameConstants');
if(MaplePlayerNPC.spawnPlayerNPC(GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it."); cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee); cm.gainMeso(-spawnPnpcFee);
} else { } else {

View File

@@ -142,7 +142,8 @@ function action(mode, type, selection){
if (cm.getPlayer().getLevel() >= 50){ if (cm.getPlayer().getLevel() >= 50){
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead."); cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200); if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201); const YamlConfig = Java.type('config.YamlConfig');
if(YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else }else
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me."); cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose(); cm.dispose();

View File

@@ -114,7 +114,8 @@ function action(mode, type, selection){
if (cm.getPlayer().getLevel() >= 50){ if (cm.getPlayer().getLevel() >= 50){
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead."); cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200); if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201); const YamlConfig = Java.type('config.YamlConfig');
if(YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else }else
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me."); cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose(); cm.dispose();

View File

@@ -115,7 +115,8 @@ function action(mode, type, selection){
if (cm.getPlayer().getLevel() >= 50){ if (cm.getPlayer().getLevel() >= 50){
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead."); cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200); if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201); const YamlConfig = Java.type('config.YamlConfig');
if(YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else }else
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me."); cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose(); cm.dispose();

View File

@@ -114,7 +114,8 @@ function action(mode, type, selection){
if (cm.getPlayer().getLevel() >= 50){ if (cm.getPlayer().getLevel() >= 50){
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead."); cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200); if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201); const YamlConfig = Java.type('config.YamlConfig');
if(YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else }else
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me."); cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose(); cm.dispose();

View File

@@ -113,7 +113,8 @@ function action(mode, type, selection){
if (cm.getPlayer().getLevel() >= 50){ if (cm.getPlayer().getLevel() >= 50){
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead."); cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200); if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201); const YamlConfig = Java.type('config.YamlConfig');
if(YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else }else
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me."); cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose(); cm.dispose();

View File

@@ -30,8 +30,9 @@ var feeMultiplier = 7.0;
function start() { function start() {
status = -1; status = -1;
if (!Packages.config.YamlConfig.config.server.USE_CPQ) { const YamlConfig = Java.type('config.YamlConfig');
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) { if (!YamlConfig.config.server.USE_CPQ) {
if (YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
status = 0; status = 0;
action(1, 0, 4); action(1, 0, 4);
} else { } else {
@@ -58,6 +59,7 @@ function action(mode, type, selection) {
else else
status--; status--;
const YamlConfig = Java.type('config.YamlConfig');
if (cm.getPlayer().getMapId() == 980000010) { if (cm.getPlayer().getMapId() == 980000010) {
if (status == 0) { if (status == 0) {
cm.sendNext("I hope you had fun at the Monster Carnival!"); cm.sendNext("I hope you had fun at the Monster Carnival!");
@@ -221,9 +223,9 @@ function action(mode, type, selection) {
} }
} else { } else {
var party = cm.getParty().getMembers(); var party = cm.getParty().getMembers();
if ((selection >= 0 && selection <= 3) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) { if ((selection >= 0 && selection <= 3) && party.size() < (YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
cm.sendOk("You need at least 2 players to participate in the battle!"); cm.sendOk("You need at least 2 players to participate in the battle!");
} else if ((selection >= 4 && selection <= 5) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) { } else if ((selection >= 4 && selection <= 5) && party.size() < (YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
cm.sendOk("You need at least 3 players to participate in the battle!"); cm.sendOk("You need at least 3 players to participate in the battle!");
} else { } else {
cm.cpqLobby(selection); cm.cpqLobby(selection);
@@ -236,7 +238,7 @@ function action(mode, type, selection) {
} else { } else {
if (status == 0) { if (status == 0) {
var talk = "What would you like to do? If you have never participate in the Monster Carnival, you will need to know a few things before participating! \r\n#b#L0# Go to the Monster Carnival 1.#l \r\n#L3# Go to the Monster Carnival 2.#l \r\n#L1# Learn about the Monster Carnival.#l\r\n#L2# Trade #t4001129#.#l"; var talk = "What would you like to do? If you have never participate in the Monster Carnival, you will need to know a few things before participating! \r\n#b#L0# Go to the Monster Carnival 1.#l \r\n#L3# Go to the Monster Carnival 2.#l \r\n#L1# Learn about the Monster Carnival.#l\r\n#L2# Trade #t4001129#.#l";
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) { if (YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
talk += "\r\n#L4# ... Can I just refine my ores?#l"; talk += "\r\n#L4# ... Can I just refine my ores?#l";
} }
cm.sendSimple(talk); cm.sendSimple(talk);
@@ -498,7 +500,8 @@ function refineItems(refineType) {
var refineFees = [[300,300,300,500,500,500,800,270],[500,500,500,500,500,500,500,1000,3000],[5000,5000,5000,5000,1000000]]; var refineFees = [[300,300,300,500,500,500,800,270],[500,500,500,500,500,500,500,1000,3000],[5000,5000,5000,5000,1000000]];
var itemCount = {}; var itemCount = {};
var iter = cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.ETC).iterator(); const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
var iter = cm.getPlayer().getInventory(MapleInventoryType.ETC).iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
var it = iter.next(); var it = iter.next();
var itemid = it.getItemId(); var itemid = it.getItemId();
@@ -551,7 +554,8 @@ function refineRockItems() {
var rockItems = [4011007, 4021009]; var rockItems = [4011007, 4021009];
var rockFees = [10000, 15000]; var rockFees = [10000, 15000];
var iter = cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.ETC).iterator(); const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
var iter = cm.getPlayer().getInventory(MapleInventoryType.ETC).iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
var it = iter.next(); var it = iter.next();
var itemid = it.getItemId(); var itemid = it.getItemId();

View File

@@ -29,8 +29,9 @@ var feeMultiplier = 7.0;
function start() { function start() {
status = -1; status = -1;
if (!Packages.config.YamlConfig.config.server.USE_CPQ) { const YamlConfig = Java.type('config.YamlConfig');
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) { if (!YamlConfig.config.server.USE_CPQ) {
if (YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
status = 0; status = 0;
action(1, 0, 4); action(1, 0, 4);
} else { } else {
@@ -57,6 +58,7 @@ function action(mode, type, selection) {
else else
status--; status--;
const YamlConfig = Java.type('config.YamlConfig');
if (cm.getPlayer().getMapId() == 980000010) { if (cm.getPlayer().getMapId() == 980000010) {
if (status == 0) { if (status == 0) {
cm.sendNext("I hope you had fun at the Monster Carnival!"); cm.sendNext("I hope you had fun at the Monster Carnival!");
@@ -220,9 +222,9 @@ function action(mode, type, selection) {
} }
} else { } else {
var party = cm.getParty().getMembers(); var party = cm.getParty().getMembers();
if ((selection >= 0 && selection <= 3) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) { if ((selection >= 0 && selection <= 3) && party.size() < (YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
cm.sendOk("You need at least 2 players to participate in the battle!"); cm.sendOk("You need at least 2 players to participate in the battle!");
} else if ((selection >= 4 && selection <= 5) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) { } else if ((selection >= 4 && selection <= 5) && party.size() < (YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
cm.sendOk("You need at least 3 players to participate in the battle!"); cm.sendOk("You need at least 3 players to participate in the battle!");
} else { } else {
cm.cpqLobby(selection); cm.cpqLobby(selection);
@@ -235,7 +237,7 @@ function action(mode, type, selection) {
} else { } else {
if (status == 0) { if (status == 0) {
var talk = "What would you like to do? If you have never participate in the Monster Carnival, you will need to know a few things before participating! \r\n#b#L0# Go to the Monster Carnival 1.#l \r\n#L3# Go to the Monster Carnival 2.#l \r\n#L1# Learn about the Monster Carnival.#l\r\n#L2# Trade #t4001129#.#l"; var talk = "What would you like to do? If you have never participate in the Monster Carnival, you will need to know a few things before participating! \r\n#b#L0# Go to the Monster Carnival 1.#l \r\n#L3# Go to the Monster Carnival 2.#l \r\n#L1# Learn about the Monster Carnival.#l\r\n#L2# Trade #t4001129#.#l";
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) { if (YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
talk += "\r\n#L4# ... Can I just refine my ores?#l"; talk += "\r\n#L4# ... Can I just refine my ores?#l";
} }
cm.sendSimple(talk); cm.sendSimple(talk);
@@ -497,7 +499,8 @@ function refineItems(refineType) {
var refineFees = [[300,300,300,500,500,500,800,270],[500,500,500,500,500,500,500,1000,3000],[5000,5000,5000,5000,1000000]]; var refineFees = [[300,300,300,500,500,500,800,270],[500,500,500,500,500,500,500,1000,3000],[5000,5000,5000,5000,1000000]];
var itemCount = {}; var itemCount = {};
var iter = cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.ETC).iterator(); const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
var iter = cm.getPlayer().getInventory(MapleInventoryType.ETC).iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
var it = iter.next(); var it = iter.next();
var itemid = it.getItemId(); var itemid = it.getItemId();
@@ -550,7 +553,8 @@ function refineRockItems() {
var rockItems = [4011007, 4021009]; var rockItems = [4011007, 4021009];
var rockFees = [10000, 15000]; var rockFees = [10000, 15000];
var iter = cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.ETC).iterator(); const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
var iter = cm.getPlayer().getInventory(MapleInventoryType.ETC).iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
var it = iter.next(); var it = iter.next();
var itemid = it.getItemId(); var itemid = it.getItemId();

View File

@@ -29,8 +29,9 @@ var feeMultiplier = 7.0;
function start() { function start() {
status = -1; status = -1;
if (!Packages.config.YamlConfig.config.server.USE_CPQ) { const YamlConfig = Java.type('config.YamlConfig');
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) { if (!YamlConfig.config.server.USE_CPQ) {
if (YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
status = 0; status = 0;
action(1, 0, 4); action(1, 0, 4);
} else { } else {
@@ -235,7 +236,9 @@ function action(mode, type, selection) {
} else { } else {
if (status == 0) { if (status == 0) {
var talk = "What would you like to do? If you have never participate in the Monster Carnival, you will need to know a few things before participating! \r\n#b#L0# Go to the Monster Carnival 1.#l \r\n#L3# Go to the Monster Carnival 2.#l \r\n#L1# Learn about the Monster Carnival.#l\r\n#L2# Trade #t4001129#.#l"; var talk = "What would you like to do? If you have never participate in the Monster Carnival, you will need to know a few things before participating! \r\n#b#L0# Go to the Monster Carnival 1.#l \r\n#L3# Go to the Monster Carnival 2.#l \r\n#L1# Learn about the Monster Carnival.#l\r\n#L2# Trade #t4001129#.#l";
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
const YamlConfig = Java.type('config.YamlConfig');
if (YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
talk += "\r\n#L4# ... Can I just refine my ores?#l"; talk += "\r\n#L4# ... Can I just refine my ores?#l";
} }
cm.sendSimple(talk); cm.sendSimple(talk);
@@ -497,7 +500,8 @@ function refineItems(refineType) {
var refineFees = [[300,300,300,500,500,500,800,270],[500,500,500,500,500,500,500,1000,3000],[5000,5000,5000,5000,1000000]]; var refineFees = [[300,300,300,500,500,500,800,270],[500,500,500,500,500,500,500,1000,3000],[5000,5000,5000,5000,1000000]];
var itemCount = {}; var itemCount = {};
var iter = cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.ETC).iterator(); const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
var iter = cm.getPlayer().getInventory(MapleInventoryType.ETC).iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
var it = iter.next(); var it = iter.next();
var itemid = it.getItemId(); var itemid = it.getItemId();
@@ -550,7 +554,8 @@ function refineRockItems() {
var rockItems = [4011007, 4021009]; var rockItems = [4011007, 4021009];
var rockFees = [10000, 15000]; var rockFees = [10000, 15000];
var iter = cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.ETC).iterator(); const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
var iter = cm.getPlayer().getInventory(MapleInventoryType.ETC).iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
var it = iter.next(); var it = iter.next();
var itemid = it.getItemId(); var itemid = it.getItemId();

View File

@@ -77,9 +77,10 @@ function action(mode, type, selection) {
} }
} else { } else {
var party = cm.getParty().getMembers(); var party = cm.getParty().getMembers();
if ((selection === 0 || selection === 1 ) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) { const YamlConfig = Java.type('config.YamlConfig');
if ((selection === 0 || selection === 1 ) && party.size() < (YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
cm.sendOk("You need at least 2 players to participate in the battle!"); cm.sendOk("You need at least 2 players to participate in the battle!");
} else if ((selection === 2 ) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) { } else if ((selection === 2 ) && party.size() < (YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
cm.sendOk("You need at least 3 players to participate in the battle!"); cm.sendOk("You need at least 3 players to participate in the battle!");
} else { } else {
cm.cpqLobby2(selection); cm.cpqLobby2(selection);

View File

@@ -39,7 +39,8 @@ function action(mode, type, selection) {
status--; status--;
if(status == 0) { if(status == 0) {
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) { const YamlConfig = Java.type('config.YamlConfig');
if (YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
cm.openShopNPC(2082014); cm.openShopNPC(2082014);
} else if (cm.isQuestStarted(3749)) { } else if (cm.isQuestStarted(3749)) {
cm.sendOk("We've already located the enemy's ultimate weapon! Follow along the ship's bow area ahead and you will find my sister #b#p2082013##k. Report to her for futher instructions on the mission."); cm.sendOk("We've already located the enemy's ultimate weapon! Follow along the ship's bow area ahead and you will find my sister #b#p2082013##k. Report to her for futher instructions on the mission.");

View File

@@ -43,9 +43,10 @@ function action(mode, type, selection) {
else else
status--; status--;
if (status == 0) { if (status == 0) {
const YamlConfig = Java.type('config.YamlConfig');
if(cm.haveItem(4001086)) { if(cm.haveItem(4001086)) {
cm.sendYesNo("Do you want to access #b#m240050400##k right now?"); cm.sendYesNo("Do you want to access #b#m240050400##k right now?");
} else if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS) { } else if(YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS) {
if(canBypassHTPQ()) { if(canBypassHTPQ()) {
cm.sendYesNo("Do you want to access #b#m240050400##k right now?"); cm.sendYesNo("Do you want to access #b#m240050400##k right now?");
} else { } else {

View File

@@ -29,6 +29,7 @@ function action(mode, type, selection) {
return; return;
} }
const GameConstants = Java.type('constants.game.GameConstants');
if (cm.getPlayer().getMapId() == 980010100 || cm.getPlayer().getMapId() == 980010200 || cm.getPlayer().getMapId() == 980010300) { if (cm.getPlayer().getMapId() == 980010100 || cm.getPlayer().getMapId() == 980010200 || cm.getPlayer().getMapId() == 980010300) {
if (cm.getPlayer().getMapId() == 980010100) { if (cm.getPlayer().getMapId() == 980010100) {
exped = MapleExpeditionType.ARIANT; exped = MapleExpeditionType.ARIANT;
@@ -113,7 +114,7 @@ function action(mode, type, selection) {
status = 2; status = 2;
} }
} }
} else if (Packages.constants.game.GameConstants.isAriantColiseumArena(cm.getPlayer().getMapId())) { } else if (GameConstants.isAriantColiseumArena(cm.getPlayer().getMapId())) {
if (cm.getPlayer().getMapId() == 980010101) { if (cm.getPlayer().getMapId() == 980010101) {
exped = MapleExpeditionType.ARIANT; exped = MapleExpeditionType.ARIANT;
expedicao = cm.getExpedition(exped); expedicao = cm.getExpedition(exped);

View File

@@ -51,7 +51,8 @@ function action(mode, type, selection) {
} }
if (status == 0) { if (status == 0) {
if (!Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) { const YamlConfig = Java.type('config.YamlConfig');
if (!YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
cm.sendOk("Hi, I'm #b#p" + cm.getNpc() + "##k."); cm.sendOk("Hi, I'm #b#p" + cm.getNpc() + "##k.");
cm.dispose(); cm.dispose();
return; return;

View File

@@ -19,13 +19,15 @@ function action(mode, type, selection) {
status--; status--;
if(status == 0) { if(status == 0) {
if(cm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.ETC).getNumFreeSlot() < 1) { const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
if(cm.getPlayer().getInventory(MapleInventoryType.ETC).getNumFreeSlot() < 1) {
cm.sendNext("Check for a available slot on your ETC inventory."); cm.sendNext("Check for a available slot on your ETC inventory.");
cm.dispose(); cm.dispose();
return; return;
} }
cm.getClient().announce(Packages.tools.MaplePacketCreator.openRPSNPC()); const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
cm.getClient().announce(MaplePacketCreator.openRPSNPC());
cm.dispose(); cm.dispose();
} }
} }

View File

@@ -39,7 +39,8 @@ var equip;
var maxEqp = 0; var maxEqp = 0;
function start() { function start() {
if (!Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) { const YamlConfig = Java.type('config.YamlConfig');
if (!YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
cm.sendOk("Hi, I'm #b#p" + cm.getNpc() + "##k."); cm.sendOk("Hi, I'm #b#p" + cm.getNpc() + "##k.");
cm.dispose(); cm.dispose();
return; return;

View File

@@ -42,7 +42,8 @@ function action(mode, type, selection) {
} }
if (status == 0) { if (status == 0) {
if (!Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) { const YamlConfig = Java.type('config.YamlConfig');
if (!YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
cm.sendOk("The medal ranking system is currently unavailable..."); cm.sendOk("The medal ranking system is currently unavailable...");
cm.dispose(); cm.dispose();
return; return;

View File

@@ -26,7 +26,8 @@
function start() { function start() {
status = -1; status = -1;
if (!Packages.config.YamlConfig.config.server.USE_REBIRTH_SYSTEM) { const YamlConfig = Java.type('config.YamlConfig');
if (!YamlConfig.config.server.USE_REBIRTH_SYSTEM) {
cm.sendOk("... I came from distant planes to assist the fight against the #rBlack Magician#k. Right now I search my master, have you seen him?"); cm.sendOk("... I came from distant planes to assist the fight against the #rBlack Magician#k. Right now I search my master, have you seen him?");
cm.dispose(); cm.dispose();
return; return;

View File

@@ -66,8 +66,10 @@ function action(mode, type, selection) {
var mapObj = cm.getMap(); var mapObj = cm.getMap();
mapObj.toggleDrops(); mapObj.toggleDrops();
var mobObj = Packages.server.life.MapleLifeFactory.getMonster(9400518); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
mapObj.spawnMonsterOnGroundBelow(mobObj, new Packages.java.awt.Point(-245, 810)); const Point = Java.type('java.awt.Point');
var mobObj = MapleLifeFactory.getMonster(9400518);
mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(-245, 810));
cm.sendOk("The fierry appeared! Defeat it to get the #b#t4031596##k!"); cm.sendOk("The fierry appeared! Defeat it to get the #b#t4031596##k!");
} else { } else {

View File

@@ -4,7 +4,8 @@
*/ */
function start() { function start() {
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) { const YamlConfig = Java.type('config.YamlConfig');
if (YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
cm.openShopNPC(9201101); cm.openShopNPC(9201101);
} else { } else {
//cm.sendOk("The patrol in New Leaf City is always ready. No creatures are able to break through to the city."); //cm.sendOk("The patrol in New Leaf City is always ready. No creatures are able to break through to the city.");

View File

@@ -21,7 +21,8 @@ function action(mode, type, selection){
else if(status == 1){ else if(status == 1){
if(cm.getText() == cm.getQuestProgress(3360)){ if(cm.getText() == cm.getQuestProgress(3360)){
cm.setQuestProgress(3360, 1); cm.setQuestProgress(3360, 1);
cm.getPlayer().announce(Packages.tools.MaplePacketCreator.playPortalSound()); const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
cm.getPlayer().announce(MaplePacketCreator.playPortalSound());
cm.warp(261030000, "sp_" + ((cm.getMapId() == 261010000) ? "jenu" : "alca")); cm.warp(261030000, "sp_" + ((cm.getMapId() == 261010000) ? "jenu" : "alca"));
} }
else { else {

View File

@@ -46,7 +46,9 @@ function action(mode, type, selection) {
cm.sendGetText("Please input your desired name below."); cm.sendGetText("Please input your desired name below.");
} else if(status == 2) { } else if(status == 2) {
var text = cm.getText(); var text = cm.getText();
var canCreate = Packages.client.MapleCharacter.canCreateChar(text);
const MapleCharacter = Java.type('client.MapleCharacter');
var canCreate = MapleCharacter.canCreateChar(text);
if(canCreate) { if(canCreate) {
cm.getPlayer().setName(text); cm.getPlayer().setName(text);
cm.sendOk("Your name has been changed to #b" + text + "#k. You will have to login again for this to take effect.", 1); cm.sendOk("Your name has been changed to #b" + text + "#k. You will have to login again for this to take effect.", 1);

View File

@@ -27,8 +27,9 @@ var status;
var gachaMessages; var gachaMessages;
function start() { function start() {
gachaMessages = Packages.server.gachapon.MapleGachapon.Gachapon.getLootInfo(); const MapleGachapon = Java.type('server.gachapon.MapleGachapon');
gachas = Packages.server.gachapon.MapleGachapon.Gachapon.values(); gachaMessages = MapleGachapon.Gachapon.getLootInfo();
gachas = MapleGachapon.Gachapon.values();
status = -1; status = -1;
action(1, 0, 0); action(1, 0, 0);

View File

@@ -24,7 +24,8 @@
var status; var status;
function start() { function start() {
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) { const YamlConfig = Java.type('config.YamlConfig');
if (YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
cm.dispose(); cm.dispose();
cm.openNpc(9201088, "scroll_generator"); cm.openNpc(9201088, "scroll_generator");
return; return;

View File

@@ -1,7 +1,9 @@
function enter(pi) { function enter(pi) {
var mapobj = pi.getWarpMap(104000004); var mapobj = pi.getWarpMap(104000004);
if(pi.isQuestActive(21733) && pi.getQuestProgressInt(21733, 9300345) == 0 && mapobj.countMonsters() == 0) { if(pi.isQuestActive(21733) && pi.getQuestProgressInt(21733, 9300345) == 0 && mapobj.countMonsters() == 0) {
mapobj.spawnMonsterOnGroundBelow(Packages.server.life.MapleLifeFactory.getMonster(9300345), new java.awt.Point(0, 0)); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
mapobj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300345), new Point(0, 0));
pi.setQuestProgress(21733, 21762, 2); pi.setQuestProgress(21733, 21762, 2);
} }

View File

@@ -7,7 +7,9 @@ function enter(pi) {
mapobj1.resetPQ(1); mapobj1.resetPQ(1);
mapobj2.resetPQ(1); mapobj2.resetPQ(1);
mapobj2.spawnMonsterOnGroundBelow(Packages.server.life.MapleLifeFactory.getMonster(9300348), new Packages.java.awt.Point(591, -34)); const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
mapobj2.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300348), new Point(591, -34));
pi.playPortalSound(); pi.warp(920030000,2); pi.playPortalSound(); pi.warp(920030000,2);
return true; return true;

View File

@@ -1,6 +1,7 @@
function enter(pi) { function enter(pi) {
if (pi.getPlayer().getMapId() != 777777777) { if (pi.getPlayer().getMapId() != 777777777) {
if(!Packages.net.server.Server.getInstance().canEnterDeveloperRoom()) { const Server = Java.type('net.server.Server');
if(!Server.getInstance().canEnterDeveloperRoom()) {
pi.message("The next room is currently unavailable."); pi.message("The next room is currently unavailable.");
return false; return false;
} }

View File

@@ -54,7 +54,8 @@ function end(mode, type, selection) {
} }
qm.gainItem(4032096, -30); qm.gainItem(4032096, -30);
qm.gainItem(1142067, 1); qm.gainItem(1142067, 1);
qm.getPlayer().changeJob(Packages.client.MapleJob.DAWNWARRIOR2); const MapleJob = Java.type('client.MapleJob');
qm.getPlayer().changeJob(MapleJob.DAWNWARRIOR2);
qm.completeQuest(); qm.completeQuest();
} }
qm.sendNext("You are a Knight-in-Training no more. You are now an official knight of the Cygnus Knights."); qm.sendNext("You are a Knight-in-Training no more. You are now an official knight of the Cygnus Knights.");

View File

@@ -54,7 +54,8 @@ function end(mode, type, selection) {
} }
qm.gainItem(4032097, -30); qm.gainItem(4032097, -30);
qm.gainItem(1142067, 1); qm.gainItem(1142067, 1);
qm.getPlayer().changeJob(Packages.client.MapleJob.BLAZEWIZARD2); const MapleJob = Java.type('client.MapleJob');
qm.getPlayer().changeJob(MapleJob.BLAZEWIZARD2);
qm.completeQuest(); qm.completeQuest();
} }
qm.sendNext("You are no longer a Knight-in-Training. You are now an official Cygnus Knight!"); qm.sendNext("You are no longer a Knight-in-Training. You are now an official Cygnus Knight!");

View File

@@ -54,7 +54,8 @@ function end(mode, type, selection) {
} }
qm.gainItem(4032098, -30); qm.gainItem(4032098, -30);
qm.gainItem(1142067, 1); qm.gainItem(1142067, 1);
qm.getPlayer().changeJob(Packages.client.MapleJob.WINDARCHER2); const MapleJob = Java.type('client.MapleJob');
qm.getPlayer().changeJob(MapleJob.WINDARCHER2);
qm.completeQuest(); qm.completeQuest();
} }
qm.sendNext("You are no longer a Knight-in-Training. You are now officially a Cygnus Knight."); qm.sendNext("You are no longer a Knight-in-Training. You are now officially a Cygnus Knight.");

View File

@@ -54,7 +54,8 @@ function end(mode, type, selection) {
} }
qm.gainItem(4032099, -30); qm.gainItem(4032099, -30);
qm.gainItem(1142067, 1); qm.gainItem(1142067, 1);
qm.getPlayer().changeJob(Packages.client.MapleJob.NIGHTWALKER2); const MapleJob = Java.type('client.MapleJob');
qm.getPlayer().changeJob(MapleJob.NIGHTWALKER2);
qm.completeQuest(); qm.completeQuest();
} }
qm.sendNext("You are no longer a Knight-in-Training. You have officially become a Cygnus Knight."); qm.sendNext("You are no longer a Knight-in-Training. You have officially become a Cygnus Knight.");

View File

@@ -54,7 +54,8 @@ function end(mode, type, selection) {
} }
qm.gainItem(4032100, -30); qm.gainItem(4032100, -30);
qm.gainItem(1142067, 1); qm.gainItem(1142067, 1);
qm.getPlayer().changeJob(Packages.client.MapleJob.THUNDERBREAKER2); const MapleJob = Java.type('client.MapleJob');
qm.getPlayer().changeJob(MapleJob.THUNDERBREAKER2);
qm.completeQuest(); qm.completeQuest();
} }
qm.sendNext("You are now no longer a Knight-in-Training. You have now officially become a Cygnus Knight."); qm.sendNext("You are now no longer a Knight-in-Training. You have now officially become a Cygnus Knight.");

View File

@@ -54,7 +54,8 @@ function start(mode, type, selection) {
} else { } else {
qm.completeQuest(); qm.completeQuest();
qm.gainItem(1142068, 1); qm.gainItem(1142068, 1);
qm.getPlayer().changeJob(Packages.client.MapleJob.DAWNWARRIOR3); const MapleJob = Java.type('client.MapleJob');
qm.getPlayer().changeJob(MapleJob.DAWNWARRIOR3);
qm.sendOk("#h #, as of this moment, you are an Advanced Knight. From this moment on, you shall carry yourself with dignity and respect befitting your new title, an Advanced Knight of Cygnus Knights. May your glory continue to shine as bright as this moment."); qm.sendOk("#h #, as of this moment, you are an Advanced Knight. From this moment on, you shall carry yourself with dignity and respect befitting your new title, an Advanced Knight of Cygnus Knights. May your glory continue to shine as bright as this moment.");
} }
} }

View File

@@ -54,7 +54,8 @@ function start(mode, type, selection) {
} else { } else {
qm.completeQuest(); qm.completeQuest();
qm.gainItem(1142068, 1); qm.gainItem(1142068, 1);
qm.getPlayer().changeJob(Packages.client.MapleJob.BLAZEWIZARD3); const MapleJob = Java.type('client.MapleJob');
qm.getPlayer().changeJob(MapleJob.BLAZEWIZARD3);
qm.sendOk("#h #, as of this moment, you are an Advanced Knight. From this moment on, you will train yourself with fervor as you will lead your group of Knights for the safety of this world. That fervor will provide you with plenty of courage."); qm.sendOk("#h #, as of this moment, you are an Advanced Knight. From this moment on, you will train yourself with fervor as you will lead your group of Knights for the safety of this world. That fervor will provide you with plenty of courage.");
} }
} }

View File

@@ -54,7 +54,8 @@ function start(mode, type, selection) {
} else { } else {
qm.completeQuest(); qm.completeQuest();
qm.gainItem(1142068, 1); qm.gainItem(1142068, 1);
qm.getPlayer().changeJob(Packages.client.MapleJob.WINDARCHER3); const MapleJob = Java.type('client.MapleJob');
qm.getPlayer().changeJob(MapleJob.WINDARCHER3);
qm.sendOk("#h #, as of this moment, you are an Advanced Knight. From this moment on, you will be carrying a while lot of responsibility befitting your new title as an Advanced Knight of Cygnus Knights. You may view the world in a carefree mode, but please remember what your mission is."); qm.sendOk("#h #, as of this moment, you are an Advanced Knight. From this moment on, you will be carrying a while lot of responsibility befitting your new title as an Advanced Knight of Cygnus Knights. You may view the world in a carefree mode, but please remember what your mission is.");
} }
} }

View File

@@ -53,7 +53,8 @@ function start(mode, type, selection) {
qm.sendNext("If you wish to receive the medal befitting the title, you may want to make some room in your equipment inventory."); qm.sendNext("If you wish to receive the medal befitting the title, you may want to make some room in your equipment inventory.");
} else { } else {
qm.gainItem(1142068, 1); qm.gainItem(1142068, 1);
qm.getPlayer().changeJob(Packages.client.MapleJob.NIGHTWALKER3); const MapleJob = Java.type('client.MapleJob');
qm.getPlayer().changeJob(MapleJob.NIGHTWALKER3);
qm.completeQuest(); qm.completeQuest();
qm.sendOk("#h #, from here on out, you are an Advanced Knight of Cygnus Knights. The title comes with a newfound broad view on everything. You may encounter temptations here and there, but I want you to keep your faith and beliefs intact and do not succumb to the darkness."); qm.sendOk("#h #, from here on out, you are an Advanced Knight of Cygnus Knights. The title comes with a newfound broad view on everything. You may encounter temptations here and there, but I want you to keep your faith and beliefs intact and do not succumb to the darkness.");
} }

View File

@@ -53,7 +53,8 @@ function start(mode, type, selection) {
qm.sendNext("If you wish to receive the medal befitting the title, you may want to make some room in your equipment inventory."); qm.sendNext("If you wish to receive the medal befitting the title, you may want to make some room in your equipment inventory.");
} else { } else {
qm.gainItem(1142068, 1); qm.gainItem(1142068, 1);
qm.getPlayer().changeJob(Packages.client.MapleJob.THUNDERBREAKER3); const MapleJob = Java.type('client.MapleJob');
qm.getPlayer().changeJob(MapleJob.THUNDERBREAKER3);
qm.completeQuest(); qm.completeQuest();
qm.sendOk("#h #, from here on out, you will become an Advanced Knight of the Knights of Cygnus! As your standing rises, so does the difficulty of the tasks you will be receiving. But challenge is good, right? You have to enjoy life. Enjoy what's given to you!"); qm.sendOk("#h #, from here on out, you will become an Advanced Knight of the Knights of Cygnus! As your standing rises, so does the difficulty of the tasks you will be receiving. But challenge is good, right? You have to enjoy life. Enjoy what's given to you!");
} }

View File

@@ -23,10 +23,10 @@ function start(mode, type, selection) {
} }
if (status == 0) if (status == 0)
qm.sendAcceptDecline("I think i've heard of a potion that breaks these kinds of barriers. I think it's called #bKiller Mushroom Spores#k? Hmmm... outside, you'll find the Mushroom Scholar #bScarrs#k waiting outside. #bScarrs#k is an expert on mushrooms, so go talk to him."); qm.sendAcceptDecline("I think i've heard of a potion that breaks these kinds of barriers. I think it's called #bKiller Mushroom Spores#k? Hmmm... outside, you'll find the Mushroom Scholar #bScarrs#k waiting outside. #bScarrs#k is an expert on mushrooms, so go talk to him.");
else if (status == 1){ else if (status == 1) {
qm.forceStartQuest(); qm.forceStartQuest();
qm.sendOk("I am confident #kScarrs#k will do everything to help you."); qm.sendOk("I am confident #kScarrs#k will do everything to help you.");
else if (status == 2){ } else if (status == 2){
qm.dispose(); qm.dispose();
} }
} }

View File

@@ -4,19 +4,21 @@ function end(mode, type, selection) {
if (mode == -1) { if (mode == -1) {
qm.dispose(); qm.dispose();
} else { } else {
if(mode == 0 && type > 0) { if (mode == 0 && type > 0) {
qm.dispose(); qm.dispose();
return; return;
} }
if (mode == 1) if (mode == 1) {
status++; status++;
else } else {
status--; status--;
}
if (status == 0) { if (status == 0) {
if(qm.haveItem(4031092, 10)) { if (qm.haveItem(4031092, 10)) {
if(qm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.USE).getNumFreeSlot() >= 1) { const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
if (qm.getPlayer().getInventory(MapleInventoryType.USE).getNumFreeSlot() >= 1) {
qm.sendOk("Well done! You brought back all the #t4031092# that were missing. Here, take this scroll as a token of my gratitude..."); qm.sendOk("Well done! You brought back all the #t4031092# that were missing. Here, take this scroll as a token of my gratitude...");
} else { } else {
qm.sendOk("Free a space on your USE inventory before receiving your prize."); qm.sendOk("Free a space on your USE inventory before receiving your prize.");
@@ -32,10 +34,15 @@ function end(mode, type, selection) {
qm.gainItem(4031092, -10); qm.gainItem(4031092, -10);
rnd = Math.floor(Math.random() * 4); rnd = Math.floor(Math.random() * 4);
if(rnd == 0) qm.gainItem(2040704, 1); if (rnd == 0) {
else if(rnd == 1) qm.gainItem(2040705, 1); qm.gainItem(2040704, 1);
else if(rnd == 2) qm.gainItem(2040707, 1); } else if (rnd == 1) {
else qm.gainItem(2040708, 1); qm.gainItem(2040705, 1);
} else if (rnd == 2) {
qm.gainItem(2040707, 1);
} else {
qm.gainItem(2040708, 1);
}
qm.gainExp(2700); qm.gainExp(2700);
qm.forceCompleteQuest(); qm.forceCompleteQuest();

View File

@@ -13,7 +13,8 @@ function end(mode, type, selection) {
if(status == 0) { if(status == 0) {
qm.sendNext("What the? Are you telling me you've already taken out 150 #o4230120#s? And these ... yes, these really are 120 #t4000122#s. I was wondering how you were going to complete this mission all by yourself, but you took care of it just fine. Alright, here ... this is a very important item for me, but please take it."); qm.sendNext("What the? Are you telling me you've already taken out 150 #o4230120#s? And these ... yes, these really are 120 #t4000122#s. I was wondering how you were going to complete this mission all by yourself, but you took care of it just fine. Alright, here ... this is a very important item for me, but please take it.");
} else if(status == 1) { } else if(status == 1) {
if(qm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.EQUIP).getNumFreeSlot() < 1) { const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
if(qm.getPlayer().getInventory(MapleInventoryType.EQUIP).getNumFreeSlot() < 1) {
qm.sendOk("Please free a EQUIP inventory slot to receive the reward."); qm.sendOk("Please free a EQUIP inventory slot to receive the reward.");
qm.dispose(); qm.dispose();
return; return;

View File

@@ -44,7 +44,8 @@ function end(mode, type, selection) {
status--; status--;
if (status == 0) { if (status == 0) {
if(qm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.ETC).getNumFreeSlot() < 1) { const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
if(qm.getPlayer().getInventory(MapleInventoryType.ETC).getNumFreeSlot() < 1) {
qm.sendOk("Make room on your ETC inventory first."); qm.sendOk("Make room on your ETC inventory first.");
qm.dispose(); qm.dispose();
return; return;