Convert remaining scripts to Graal
Mainly missed scripts that use Nashorn's "Packages"
This commit is contained in:
@@ -34,7 +34,8 @@ spawnPnpcFee = 7000000;
|
||||
jobType = 3;
|
||||
|
||||
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;
|
||||
|
||||
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?";
|
||||
@@ -92,8 +93,10 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
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.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -35,7 +35,8 @@ spawnPnpcFee = 7000000;
|
||||
jobType = 1;
|
||||
|
||||
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;
|
||||
|
||||
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,8 +94,10 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
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.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -115,7 +115,8 @@ function action(mode, type, selection) {
|
||||
var useVP = false;
|
||||
if(!cm.hasItem(itemToUse) && vp > 0)
|
||||
useVP = true;
|
||||
|
||||
|
||||
const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
|
||||
if(choice == 0) {
|
||||
// VP Exchange
|
||||
if(!cm.canHold(itemToUse)) {
|
||||
@@ -135,11 +136,12 @@ function action(mode, type, selection) {
|
||||
cm.gainItem(itemToUse, -1);
|
||||
|
||||
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.dispose();
|
||||
} 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 = "";
|
||||
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!");
|
||||
}
|
||||
} 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 = "";
|
||||
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!");
|
||||
}
|
||||
} 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(buff2ID, buffAmount, true);
|
||||
cm.gainItem(itemToUse, -1);
|
||||
@@ -190,7 +192,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
} else if(choice == 5) {
|
||||
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);
|
||||
|
||||
if(useVP)
|
||||
|
||||
@@ -35,7 +35,8 @@ spawnPnpcFee = 7000000;
|
||||
jobType = 2;
|
||||
|
||||
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;
|
||||
|
||||
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,8 +94,10 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
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.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -34,7 +34,8 @@ spawnPnpcFee = 7000000;
|
||||
jobType = 4;
|
||||
|
||||
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;
|
||||
|
||||
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,8 +95,10 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
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.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -34,7 +34,8 @@ function start() {
|
||||
|
||||
cm.gainItem(4031025,10);
|
||||
} 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.dispose();
|
||||
return;
|
||||
|
||||
@@ -34,7 +34,8 @@ function start() {
|
||||
|
||||
cm.gainItem(4031026,20);
|
||||
} 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.dispose();
|
||||
return;
|
||||
|
||||
@@ -34,7 +34,8 @@ function start() {
|
||||
|
||||
cm.gainItem(4031028,30);
|
||||
} 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.dispose();
|
||||
return;
|
||||
|
||||
@@ -29,8 +29,10 @@ function action(mode, type, selection) {
|
||||
if(cm.getClient().getChannelServer().getMapFactory().getMap(925020010).getCharacters().size() > 0) {
|
||||
cm.sendOk("Someone is already challenging the Master. Try again later.");
|
||||
} else {
|
||||
cm.getWarpMap(910510202).spawnMonsterOnGroundBelow(Packages.server.life.MapleLifeFactory.getMonster(9300346), new java.awt.Point(95, 200));
|
||||
cm.warp(910510202, 0);
|
||||
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.dispose();
|
||||
|
||||
@@ -35,6 +35,7 @@ jobType = 5;
|
||||
|
||||
var advQuest = 0;
|
||||
function start() {
|
||||
const GameConstants = Java.type('constants.game.GameConstants');
|
||||
if (cm.isQuestStarted(6330)) {
|
||||
if (cm.getEventInstance() != null) { // missing script for skill test found thanks to Jade™
|
||||
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");
|
||||
}
|
||||
} 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;
|
||||
|
||||
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?";
|
||||
@@ -141,8 +142,10 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
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.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,8 @@ var maxJobType = 15;
|
||||
|
||||
function start() {
|
||||
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;
|
||||
|
||||
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?";
|
||||
@@ -63,8 +64,10 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
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.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -33,8 +33,10 @@ function action(mode, type, selection) {
|
||||
|
||||
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!!!");
|
||||
|
||||
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);
|
||||
|
||||
cm.dispose();
|
||||
|
||||
@@ -5,7 +5,8 @@ var spawnPnpcFee = 7000000;
|
||||
var jobType = 21;
|
||||
|
||||
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;
|
||||
|
||||
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?";
|
||||
@@ -35,8 +36,10 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
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.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -142,7 +142,8 @@ function action(mode, type, selection){
|
||||
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.");
|
||||
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
|
||||
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();
|
||||
|
||||
@@ -114,7 +114,8 @@ function action(mode, type, selection){
|
||||
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.");
|
||||
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
|
||||
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();
|
||||
|
||||
@@ -115,7 +115,8 @@ function action(mode, type, selection){
|
||||
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.");
|
||||
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
|
||||
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();
|
||||
|
||||
@@ -114,7 +114,8 @@ function action(mode, type, selection){
|
||||
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.");
|
||||
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
|
||||
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();
|
||||
|
||||
@@ -113,7 +113,8 @@ function action(mode, type, selection){
|
||||
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.");
|
||||
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
|
||||
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();
|
||||
|
||||
@@ -29,9 +29,10 @@ var feeMultiplier = 7.0;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
|
||||
if (!Packages.config.YamlConfig.config.server.USE_CPQ) {
|
||||
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
|
||||
const YamlConfig = Java.type('config.YamlConfig');
|
||||
if (!YamlConfig.config.server.USE_CPQ) {
|
||||
if (YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
status = 0;
|
||||
action(1, 0, 4);
|
||||
} else {
|
||||
@@ -57,7 +58,8 @@ function action(mode, type, selection) {
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
|
||||
const YamlConfig = Java.type('config.YamlConfig');
|
||||
if (cm.getPlayer().getMapId() == 980000010) {
|
||||
if (status == 0) {
|
||||
cm.sendNext("I hope you had fun at the Monster Carnival!");
|
||||
@@ -221,9 +223,9 @@ function action(mode, type, selection) {
|
||||
}
|
||||
} else {
|
||||
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!");
|
||||
} 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!");
|
||||
} else {
|
||||
cm.cpqLobby(selection);
|
||||
@@ -236,7 +238,7 @@ function action(mode, type, selection) {
|
||||
} else {
|
||||
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";
|
||||
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";
|
||||
}
|
||||
cm.sendSimple(talk);
|
||||
@@ -497,8 +499,9 @@ 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 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()) {
|
||||
var it = iter.next();
|
||||
var itemid = it.getItemId();
|
||||
@@ -551,7 +554,8 @@ function refineRockItems() {
|
||||
var rockItems = [4011007, 4021009];
|
||||
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()) {
|
||||
var it = iter.next();
|
||||
var itemid = it.getItemId();
|
||||
|
||||
@@ -28,9 +28,10 @@ var feeMultiplier = 7.0;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
|
||||
if (!Packages.config.YamlConfig.config.server.USE_CPQ) {
|
||||
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
|
||||
const YamlConfig = Java.type('config.YamlConfig');
|
||||
if (!YamlConfig.config.server.USE_CPQ) {
|
||||
if (YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
status = 0;
|
||||
action(1, 0, 4);
|
||||
} else {
|
||||
@@ -56,7 +57,8 @@ function action(mode, type, selection) {
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
|
||||
const YamlConfig = Java.type('config.YamlConfig');
|
||||
if (cm.getPlayer().getMapId() == 980000010) {
|
||||
if (status == 0) {
|
||||
cm.sendNext("I hope you had fun at the Monster Carnival!");
|
||||
@@ -220,9 +222,9 @@ function action(mode, type, selection) {
|
||||
}
|
||||
} else {
|
||||
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!");
|
||||
} 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!");
|
||||
} else {
|
||||
cm.cpqLobby(selection);
|
||||
@@ -235,7 +237,7 @@ function action(mode, type, selection) {
|
||||
} else {
|
||||
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";
|
||||
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";
|
||||
}
|
||||
cm.sendSimple(talk);
|
||||
@@ -496,8 +498,9 @@ 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 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()) {
|
||||
var it = iter.next();
|
||||
var itemid = it.getItemId();
|
||||
@@ -550,7 +553,8 @@ function refineRockItems() {
|
||||
var rockItems = [4011007, 4021009];
|
||||
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()) {
|
||||
var it = iter.next();
|
||||
var itemid = it.getItemId();
|
||||
|
||||
@@ -29,8 +29,9 @@ var feeMultiplier = 7.0;
|
||||
function start() {
|
||||
status = -1;
|
||||
|
||||
if (!Packages.config.YamlConfig.config.server.USE_CPQ) {
|
||||
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
const YamlConfig = Java.type('config.YamlConfig');
|
||||
if (!YamlConfig.config.server.USE_CPQ) {
|
||||
if (YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
status = 0;
|
||||
action(1, 0, 4);
|
||||
} else {
|
||||
@@ -235,7 +236,9 @@ function action(mode, type, selection) {
|
||||
} else {
|
||||
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";
|
||||
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";
|
||||
}
|
||||
cm.sendSimple(talk);
|
||||
@@ -496,8 +499,9 @@ 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 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()) {
|
||||
var it = iter.next();
|
||||
var itemid = it.getItemId();
|
||||
@@ -550,7 +554,8 @@ function refineRockItems() {
|
||||
var rockItems = [4011007, 4021009];
|
||||
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()) {
|
||||
var it = iter.next();
|
||||
var itemid = it.getItemId();
|
||||
|
||||
@@ -77,9 +77,10 @@ function action(mode, type, selection) {
|
||||
}
|
||||
} else {
|
||||
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!");
|
||||
} 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!");
|
||||
} else {
|
||||
cm.cpqLobby2(selection);
|
||||
|
||||
@@ -39,7 +39,8 @@ function action(mode, type, selection) {
|
||||
status--;
|
||||
|
||||
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);
|
||||
} 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.");
|
||||
|
||||
@@ -43,9 +43,10 @@ function action(mode, type, selection) {
|
||||
else
|
||||
status--;
|
||||
if (status == 0) {
|
||||
const YamlConfig = Java.type('config.YamlConfig');
|
||||
if(cm.haveItem(4001086)) {
|
||||
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()) {
|
||||
cm.sendYesNo("Do you want to access #b#m240050400##k right now?");
|
||||
} else {
|
||||
|
||||
@@ -29,6 +29,7 @@ function action(mode, type, selection) {
|
||||
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) {
|
||||
exped = MapleExpeditionType.ARIANT;
|
||||
@@ -113,7 +114,7 @@ function action(mode, type, selection) {
|
||||
status = 2;
|
||||
}
|
||||
}
|
||||
} else if (Packages.constants.game.GameConstants.isAriantColiseumArena(cm.getPlayer().getMapId())) {
|
||||
} else if (GameConstants.isAriantColiseumArena(cm.getPlayer().getMapId())) {
|
||||
if (cm.getPlayer().getMapId() == 980010101) {
|
||||
exped = MapleExpeditionType.ARIANT;
|
||||
expedicao = cm.getExpedition(exped);
|
||||
|
||||
@@ -51,7 +51,8 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
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.dispose();
|
||||
return;
|
||||
|
||||
@@ -17,15 +17,17 @@ function action(mode, type, selection) {
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
|
||||
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.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.getClient().announce(Packages.tools.MaplePacketCreator.openRPSNPC());
|
||||
|
||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
||||
cm.getClient().announce(MaplePacketCreator.openRPSNPC());
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,8 @@ var equip;
|
||||
var maxEqp = 0;
|
||||
|
||||
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.dispose();
|
||||
return;
|
||||
|
||||
@@ -42,7 +42,8 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
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.dispose();
|
||||
return;
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
|
||||
function start() {
|
||||
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.dispose();
|
||||
return;
|
||||
|
||||
@@ -65,9 +65,11 @@ function action(mode, type, selection) {
|
||||
|
||||
var mapObj = cm.getMap();
|
||||
mapObj.toggleDrops();
|
||||
|
||||
var mobObj = Packages.server.life.MapleLifeFactory.getMonster(9400518);
|
||||
mapObj.spawnMonsterOnGroundBelow(mobObj, new Packages.java.awt.Point(-245, 810));
|
||||
|
||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||
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!");
|
||||
} else {
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
|
||||
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);
|
||||
} else {
|
||||
//cm.sendOk("The patrol in New Leaf City is always ready. No creatures are able to break through to the city.");
|
||||
|
||||
@@ -21,7 +21,8 @@ function action(mode, type, selection){
|
||||
else if(status == 1){
|
||||
if(cm.getText() == cm.getQuestProgress(3360)){
|
||||
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"));
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -46,7 +46,9 @@ function action(mode, type, selection) {
|
||||
cm.sendGetText("Please input your desired name below.");
|
||||
} else if(status == 2) {
|
||||
var text = cm.getText();
|
||||
var canCreate = Packages.client.MapleCharacter.canCreateChar(text);
|
||||
|
||||
const MapleCharacter = Java.type('client.MapleCharacter');
|
||||
var canCreate = MapleCharacter.canCreateChar(text);
|
||||
if(canCreate) {
|
||||
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);
|
||||
|
||||
@@ -27,8 +27,9 @@ var status;
|
||||
var gachaMessages;
|
||||
|
||||
function start() {
|
||||
gachaMessages = Packages.server.gachapon.MapleGachapon.Gachapon.getLootInfo();
|
||||
gachas = Packages.server.gachapon.MapleGachapon.Gachapon.values();
|
||||
const MapleGachapon = Java.type('server.gachapon.MapleGachapon');
|
||||
gachaMessages = MapleGachapon.Gachapon.getLootInfo();
|
||||
gachas = MapleGachapon.Gachapon.values();
|
||||
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
var status;
|
||||
|
||||
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.openNpc(9201088, "scroll_generator");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user