Convert quest scripts to Graal

This commit is contained in:
P0nk
2021-04-17 20:22:49 +02:00
parent 542a7b7fd2
commit 256e5688e0
42 changed files with 116 additions and 181 deletions

View File

@@ -26,8 +26,6 @@
Map(s): Maple Road : Lower level of the Training Camp (2) Map(s): Maple Road : Lower level of the Training Camp (2)
Description: Quest - Roger's Apple Description: Quest - Roger's Apple
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -1,5 +1,3 @@
importPackage(Packages.client);
var item; var item;
var stance; var stance;
var status = -1; var status = -1;
@@ -17,7 +15,8 @@ function end(mode, type, selection) {
} }
else if(status == 1) { else if(status == 1) {
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.getPlayer().dropMessage(1, "USE inventory full."); qm.getPlayer().dropMessage(1, "USE inventory full.");
qm.dispose(); qm.dispose();
return; return;
@@ -25,11 +24,12 @@ function end(mode, type, selection) {
var talkStr = "Okay, now choose the scroll of your liking ... The odds of winning are 10% each. \r\n\r\n#rSELECT A ITEM\r\n#b"; var talkStr = "Okay, now choose the scroll of your liking ... The odds of winning are 10% each. \r\n\r\n#rSELECT A ITEM\r\n#b";
stance = qm.getPlayer().getJobStyle(); stance = qm.getPlayer().getJobStyle();
if(stance == Packages.client.MapleJob.WARRIOR || stance == Packages.client.MapleJob.BEGINNER) vecItem = new Array(2043002, 2043102, 2043202, 2044002, 2044102, 2044202, 2044402, 2044302); const MapleJob = Java.type('client.MapleJob');
else if(stance == Packages.client.MapleJob.MAGICIAN) vecItem = new Array(2043702, 2043802); if(stance == MapleJob.WARRIOR || stance == MapleJob.BEGINNER) vecItem = new Array(2043002, 2043102, 2043202, 2044002, 2044102, 2044202, 2044402, 2044302);
else if(stance == Packages.client.MapleJob.BOWMAN || stance == Packages.client.MapleJob.CROSSBOWMAN) vecItem = new Array(2044502, 2044602); else if(stance == MapleJob.MAGICIAN) vecItem = new Array(2043702, 2043802);
else if(stance == Packages.client.MapleJob.THIEF) vecItem = new Array(2043302, 2044702); else if(stance == MapleJob.BOWMAN || stance == MapleJob.CROSSBOWMAN) vecItem = new Array(2044502, 2044602);
else if(stance == MapleJob.THIEF) vecItem = new Array(2043302, 2044702);
else vecItem = new Array(2044802, 2044902); else vecItem = new Array(2044802, 2044902);
for (var i = 0; i < vecItem.length; i++) for (var i = 0; i < vecItem.length; i++)

View File

@@ -2,8 +2,6 @@
* Cygnus 1st Job advancement - Dawn Warrior * Cygnus 1st Job advancement - Dawn Warrior
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
var jobType = 1; var jobType = 1;
var canTryFirstJob = true; var canTryFirstJob = true;
@@ -39,6 +37,7 @@ function end(mode, type, selection) {
qm.gainItem(1302077, 1); qm.gainItem(1302077, 1);
qm.gainItem(1142066, 1); qm.gainItem(1142066, 1);
const MapleJob = Java.type('client.MapleJob');
qm.changeJob(MapleJob.DAWNWARRIOR1); qm.changeJob(MapleJob.DAWNWARRIOR1);
qm.getPlayer().resetStats(); qm.getPlayer().resetStats();
} }

View File

@@ -2,8 +2,6 @@
* Cygnus 1st Job advancement - Blaze Wizard * Cygnus 1st Job advancement - Blaze Wizard
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
var jobType = 2; var jobType = 2;
var canTryFirstJob = true; var canTryFirstJob = true;
@@ -39,6 +37,7 @@ function end(mode, type, selection) {
qm.gainItem(1372043, 1); qm.gainItem(1372043, 1);
qm.gainItem(1142066, 1); qm.gainItem(1142066, 1);
const MapleJob = Java.type('client.MapleJob');
qm.changeJob(MapleJob.BLAZEWIZARD1); qm.changeJob(MapleJob.BLAZEWIZARD1);
qm.getPlayer().resetStats(); qm.getPlayer().resetStats();
} }

View File

@@ -2,8 +2,6 @@
* Cygnus 1st Job advancement - Wind Archer * Cygnus 1st Job advancement - Wind Archer
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
var jobType = 3; var jobType = 3;
var canTryFirstJob = true; var canTryFirstJob = true;
@@ -40,6 +38,7 @@ function end(mode, type, selection) {
qm.gainItem(2060000, 2000); qm.gainItem(2060000, 2000);
qm.gainItem(1452051, 1); qm.gainItem(1452051, 1);
qm.gainItem(1142066, 1); qm.gainItem(1142066, 1);
const MapleJob = Java.type('client.MapleJob');
qm.changeJob(MapleJob.WINDARCHER1); qm.changeJob(MapleJob.WINDARCHER1);
qm.getPlayer().resetStats(); qm.getPlayer().resetStats();
} }

View File

@@ -2,8 +2,6 @@
* Cygnus 1st Job advancement - Night Walker * Cygnus 1st Job advancement - Night Walker
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
var jobType = 4; var jobType = 4;
var canTryFirstJob = true; var canTryFirstJob = true;
@@ -40,6 +38,7 @@ function end(mode, type, selection) {
qm.gainItem(1472061, 1); qm.gainItem(1472061, 1);
qm.gainItem(2070000, 800); qm.gainItem(2070000, 800);
qm.gainItem(1142066, 1); qm.gainItem(1142066, 1);
const MapleJob = Java.type('client.MapleJob');
qm.changeJob(MapleJob.NIGHTWALKER1); qm.changeJob(MapleJob.NIGHTWALKER1);
qm.getPlayer().resetStats(); qm.getPlayer().resetStats();
} }

View File

@@ -2,8 +2,6 @@
* Cygnus 1st Job advancement - Thunder Breaker * Cygnus 1st Job advancement - Thunder Breaker
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
var jobType = 5; var jobType = 5;
var canTryFirstJob = true; var canTryFirstJob = true;
@@ -39,6 +37,7 @@ function end(mode, type, selection) {
qm.gainItem(1482014, 1); qm.gainItem(1482014, 1);
qm.gainItem(1142066, 1); qm.gainItem(1142066, 1);
const MapleJob = Java.type('client.MapleJob');
qm.getPlayer().changeJob(MapleJob.THUNDERBREAKER1); qm.getPlayer().changeJob(MapleJob.THUNDERBREAKER1);
qm.getPlayer().resetStats(); qm.getPlayer().resetStats();
} }

View File

@@ -1,5 +1,3 @@
importPackage(Packages.client);
var item; var item;
var status = -1; var status = -1;
var item; var item;
@@ -16,29 +14,32 @@ function end(mode, type, selection) {
} }
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');
qm.sendOk("Please free a EQUIP inventory slot to receive the reward."); if(qm.getPlayer().getInventory(MapleInventoryType.EQUIP).getNumFreeSlot() < 1) {
qm.dispose(); qm.sendOk("Please free a EQUIP inventory slot to receive the reward.");
return; qm.dispose();
return;
} }
var stance = qm.getPlayer().getJobStyle(); var stance = qm.getPlayer().getJobStyle();
if(stance == Packages.client.MapleJob.WARRIOR) item = 1072003;
else if(stance == Packages.client.MapleJob.MAGICIAN) item = 1072077;
else if(stance == Packages.client.MapleJob.BOWMAN || stance == Packages.client.MapleJob.CROSSBOWMAN) item = 1072081;
else if(stance == Packages.client.MapleJob.THIEF) item = 1072035;
else if(stance == Packages.client.MapleJob.BRAWLER || stance == Packages.client.MapleJob.GUNSLINGER) item = 1072294;
else item = 1072018;
qm.gainItem(item, 1);
qm.gainItem(4000007, -150);
qm.gainExp(2200);
qm.completeQuest();
qm.sendOk("Alright, if you need work sometime down the road, feel free to come back and see me. This town sure can use a person like you for help~");
}
else if (status == 2) { const MapleJob = Java.type('client.MapleJob');
qm.dispose(); if(stance == MapleJob.WARRIOR) item = 1072003;
} else if(stance == MapleJob.MAGICIAN) item = 1072077;
else if(stance == MapleJob.BOWMAN || stance == MapleJob.CROSSBOWMAN) item = 1072081;
else if(stance == MapleJob.THIEF) item = 1072035;
else if(stance == MapleJob.BRAWLER || stance == MapleJob.GUNSLINGER) item = 1072294;
else item = 1072018;
qm.gainItem(item, 1);
qm.gainItem(4000007, -150);
qm.gainExp(2200);
qm.completeQuest();
qm.sendOk("Alright, if you need work sometime down the road, feel free to come back and see me. This town sure can use a person like you for help~");
}
else if (status == 2) {
qm.dispose();
}
} }

View File

@@ -20,9 +20,6 @@
// @Author Ronan // @Author Ronan
importPackage(Packages.constants.game);
importPackage(Packages.server);
function raiseOpen() { function raiseOpen() {
var chr = qm.getPlayer(); var chr = qm.getPlayer();
var questStatus = chr.getQuestStatus(qm.getQuest()); var questStatus = chr.getQuestStatus(qm.getQuest());
@@ -34,11 +31,13 @@ function raiseOpen() {
var diffExp = chr.getExp() - qm.getQuestProgressInt(20515, 1); var diffExp = chr.getExp() - qm.getQuestProgressInt(20515, 1);
var initLevel = qm.getQuestProgressInt(20515, 0); var initLevel = qm.getQuestProgressInt(20515, 0);
const ExpTable = Java.type('constants.game.ExpTable');
for (var i = initLevel; i < chr.getLevel(); i++) { for (var i = initLevel; i < chr.getLevel(); i++) {
diffExp += ExpTable.getExpNeededForLevel(i); diffExp += ExpTable.getExpNeededForLevel(i);
} }
if (diffExp > 0) { // thanks IxianMace for noticing Mimiana egg not following progress by EXP if (diffExp > 0) { // thanks IxianMace for noticing Mimiana egg not following progress by EXP
const MapleItemInformationProvider = Java.type('server.MapleItemInformationProvider');
var consItem = MapleItemInformationProvider.getInstance().getQuestConsumablesInfo(4220137); var consItem = MapleItemInformationProvider.getInstance().getQuestConsumablesInfo(4220137);
var exp = consItem.exp; var exp = consItem.exp;
var grade = consItem.grade; var grade = consItem.grade;

View File

@@ -26,8 +26,6 @@
Quest ID : 21000 Quest ID : 21000
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -22,7 +22,6 @@
/* /*
Author : kevintjuh93 Author : kevintjuh93
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;

View File

@@ -19,8 +19,6 @@
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
importPackage(Packages.client);
importPackage(Packages.config);
status = -1; status = -1;
@@ -47,7 +45,8 @@ function start(mode, type, selection) {
qm.changeJobById(2100); qm.changeJobById(2100);
qm.resetStats(); qm.resetStats();
const YamlConfig = Java.type('config.YamlConfig');
if (YamlConfig.config.server.USE_FULL_ARAN_SKILLSET) { if (YamlConfig.config.server.USE_FULL_ARAN_SKILLSET) {
qm.teachSkill(21000000, 0, 10, -1); //combo ability qm.teachSkill(21000000, 0, 10, -1); //combo ability
qm.teachSkill(21001003, 0, 20, -1); //polearm booster qm.teachSkill(21001003, 0, 20, -1); //polearm booster

View File

@@ -19,7 +19,6 @@
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;

View File

@@ -19,8 +19,6 @@
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
importPackage(Packages.client);
importPackage(Packages.config);
var status = -1; var status = -1;
@@ -65,7 +63,8 @@ function end(mode, type, selection) {
qm.gainItem(1142130, true); qm.gainItem(1142130, true);
qm.changeJobById(2110); qm.changeJobById(2110);
const YamlConfig = Java.type('config.YamlConfig');
if (YamlConfig.config.server.USE_FULL_ARAN_SKILLSET) { if (YamlConfig.config.server.USE_FULL_ARAN_SKILLSET) {
qm.teachSkill(21100000, 0, 20, -1); //polearm mastery qm.teachSkill(21100000, 0, 20, -1); //polearm mastery
qm.teachSkill(21100002, 0, 30, -1); //final charge qm.teachSkill(21100002, 0, 30, -1); //final charge

View File

@@ -19,8 +19,6 @@
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
importPackage(Packages.client);
importPackage(Packages.config);
var status = -1; var status = -1;
@@ -50,7 +48,8 @@ function end(mode, type, selection) {
qm.gainItem(1142131, true); qm.gainItem(1142131, true);
qm.changeJobById(2111); qm.changeJobById(2111);
const YamlConfig = Java.type('config.YamlConfig');
if (YamlConfig.config.server.USE_FULL_ARAN_SKILLSET) { if (YamlConfig.config.server.USE_FULL_ARAN_SKILLSET) {
qm.teachSkill(21110002, 0, 20, -1); //full swing qm.teachSkill(21110002, 0, 20, -1); //full swing
} }

View File

@@ -1,5 +1,3 @@
importPackage(Packages.server.life);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {
@@ -76,7 +74,9 @@ function end(mode, type, selection) {
function spawnMob(x, y, id, map) { function spawnMob(x, y, id, map) {
if(map.getMonsterById(id) != null) if(map.getMonsterById(id) != null)
return; return;
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
const Point = Java.type('java.awt.Point');
var mob = MapleLifeFactory.getMonster(id); var mob = MapleLifeFactory.getMonster(id);
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y)); map.spawnMonsterOnGroundBelow(mob, new Point(x, y));
} }

View File

@@ -1,5 +1,3 @@
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -18,8 +18,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
importPackage(Packages.constants.game);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {
@@ -60,6 +58,7 @@ function end(mode, type, selection) {
status--; status--;
if (status == 0) { if (status == 0) {
const GameConstants = Java.type('constants.game.GameConstants');
if(GameConstants.getJobBranch(qm.getPlayer().getJob()) == 1) { if(GameConstants.getJobBranch(qm.getPlayer().getJob()) == 1) {
qm.sendNext("Eh, didn't you get the #r2nd job advancement#k yet?"); qm.sendNext("Eh, didn't you get the #r2nd job advancement#k yet?");
qm.dispose(); qm.dispose();

View File

@@ -20,8 +20,6 @@
Description: The Last Song Description: The Last Song
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -8,8 +8,6 @@ Version 1.0 - Script Done.(18/7/2010)
============================================================= =============================================================
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -8,8 +8,6 @@ Version 1.0 - Script Done.(18/7/2010)
============================================================= =============================================================
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -8,8 +8,6 @@ Version 1.0 - Script Done.(18/7/2010)
============================================================= =============================================================
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -8,8 +8,6 @@ Version 1.0 - Script Done.(18/7/2010)
============================================================= =============================================================
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {
@@ -36,14 +34,14 @@ function start(mode, type, selection) {
function end(mode, type, selection) { function end(mode, type, selection) {
status++; status++;
if (mode != 1) { if (mode != 1) {
if(type == 1 && mode == 0) if(type == 1 && mode == 0) {
status -= 2; status -= 2;
else{ } else {
qm.dispose(); qm.dispose();
return; return;
} }
} }
if (status == 0) if (status == 0) {
qm.sendOk("Ah, so you're the explorer people were talking about. I'm #bScarrs, the Royal Mushroom Scholar#k representing the Kingdom of Mushroom. So you need some #kKiller Mushroom Spores#k?"); qm.sendOk("Ah, so you're the explorer people were talking about. I'm #bScarrs, the Royal Mushroom Scholar#k representing the Kingdom of Mushroom. So you need some #kKiller Mushroom Spores#k?");
} else if (status == 1){ } else if (status == 1){
qm.forceCompleteQuest(); qm.forceCompleteQuest();
@@ -51,6 +49,6 @@ function end(mode, type, selection) {
qm.sendOk("#kKiller Mushroom Spores#k... I think i've heard of them before..."); qm.sendOk("#kKiller Mushroom Spores#k... I think i've heard of them before...");
} else if (status == 2) { } else if (status == 2) {
qm.dispose(); qm.dispose();
} }
} }

View File

@@ -8,8 +8,6 @@ Version 1.0 - Script Done.(18/7/2010)
============================================================= =============================================================
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -8,8 +8,6 @@ Version 1.0 - Script Done.(18/7/2010)
============================================================= =============================================================
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -8,8 +8,6 @@ Version 1.0 - Script Done.(18/7/2010)
============================================================= =============================================================
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -8,8 +8,6 @@ Version 1.0 - Script Done.(18/7/2010)
============================================================= =============================================================
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -8,8 +8,6 @@ Version 1.0 - Script Done.(18/7/2010)
============================================================= =============================================================
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -8,8 +8,6 @@ Version 1.0 - Script Done.(18/7/2010)
============================================================= =============================================================
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -18,12 +18,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function isPillUsed(ch) { function isPillUsed(ch) {
return ch.getBuffSource(MapleBuffStat.HPREC) == 2022198; const MapleBuffStat = Java.type('client.MapleBuffStat');
return ch.getBuffSource(MapleBuffStat.HPREC) == 2022198;
} }
function end(mode, type, selection) { function end(mode, type, selection) {

View File

@@ -18,8 +18,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -18,8 +18,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {

View File

@@ -1,5 +1,3 @@
importPackage(Packages.client);
var item; var item;
var stance; var stance;
var status = -1; var status = -1;
@@ -17,7 +15,8 @@ function end(mode, type, selection) {
} }
else if(status == 1) { else if(status == 1) {
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.getPlayer().dropMessage(1, "USE inventory full."); qm.getPlayer().dropMessage(1, "USE inventory full.");
qm.dispose(); qm.dispose();
return; return;
@@ -25,11 +24,12 @@ function end(mode, type, selection) {
var talkStr = "Here, please select the scroll of your choice. All success rates are at 10%. \r\n\r\n#rSELECT A ITEM\r\n#b" var talkStr = "Here, please select the scroll of your choice. All success rates are at 10%. \r\n\r\n#rSELECT A ITEM\r\n#b"
stance = qm.getPlayer().getJobStyle(); stance = qm.getPlayer().getJobStyle();
if(stance == Packages.client.MapleJob.WARRIOR || stance == Packages.client.MapleJob.BEGINNER) vecItem = new Array(2043002, 2043102, 2043202, 2044002, 2044102, 2044202, 2044402, 2044302); const MapleJob = Java.type('client.MapleJob');
else if(stance == Packages.client.MapleJob.MAGICIAN) vecItem = new Array(2043702, 2043802); if(stance == MapleJob.WARRIOR || stance == MapleJob.BEGINNER) vecItem = new Array(2043002, 2043102, 2043202, 2044002, 2044102, 2044202, 2044402, 2044302);
else if(stance == Packages.client.MapleJob.BOWMAN || stance == Packages.client.MapleJob.CROSSBOWMAN) vecItem = new Array(2044502, 2044602); else if(stance == MapleJob.MAGICIAN) vecItem = new Array(2043702, 2043802);
else if(stance == Packages.client.MapleJob.THIEF) vecItem = new Array(2043302, 2044702); else if(stance == MapleJob.BOWMAN || stance == MapleJob.CROSSBOWMAN) vecItem = new Array(2044502, 2044602);
else if(stance == MapleJob.THIEF) vecItem = new Array(2043302, 2044702);
else vecItem = new Array(2044802, 2044902); else vecItem = new Array(2044802, 2044902);
for (var i = 0; i < vecItem.length; i++) for (var i = 0; i < vecItem.length; i++)

View File

@@ -1,5 +1,3 @@
importPackage(Packages.client);
var item; var item;
var stance; var stance;
var status = -1; var status = -1;
@@ -20,10 +18,11 @@ function end(mode, type, selection) {
var talkStr = "Here, please select the scroll of your choice. All success rates are at 10%. \r\n\r\n#rSELECT A ITEM\r\n#b" var talkStr = "Here, please select the scroll of your choice. All success rates are at 10%. \r\n\r\n#rSELECT A ITEM\r\n#b"
stance = qm.getPlayer().getJobStyle(); stance = qm.getPlayer().getJobStyle();
if(stance == Packages.client.MapleJob.WARRIOR || stance == Packages.client.MapleJob.BEGINNER) vecItem = new Array(2043002, 2043102, 2043202, 2044002, 2044102, 2044202, 2044402, 2044302); const MapleJob = Java.type('client.MapleJob');
else if(stance == Packages.client.MapleJob.MAGICIAN) vecItem = new Array(2043702, 2043802); if(stance == MapleJob.WARRIOR || stance == MapleJob.BEGINNER) vecItem = new Array(2043002, 2043102, 2043202, 2044002, 2044102, 2044202, 2044402, 2044302);
else if(stance == Packages.client.MapleJob.BOWMAN || stance == Packages.client.MapleJob.CROSSBOWMAN) vecItem = new Array(2044502, 2044602); else if(stance == MapleJob.MAGICIAN) vecItem = new Array(2043702, 2043802);
else if(stance == Packages.client.MapleJob.THIEF) vecItem = new Array(2043302, 2044702); else if(stance == MapleJob.BOWMAN || stance == MapleJob.CROSSBOWMAN) vecItem = new Array(2044502, 2044602);
else if(stance == MapleJob.THIEF) vecItem = new Array(2043302, 2044702);
else vecItem = new Array(2044802, 2044902); else vecItem = new Array(2044802, 2044902);
for (var i = 0; i < vecItem.length; i++) for (var i = 0; i < vecItem.length; i++)

View File

@@ -1,5 +1,3 @@
importPackage(Packages.client);
var item; var item;
var stance; var stance;
var status = -1; var status = -1;
@@ -24,11 +22,12 @@ function end(mode, type, selection) {
var talkStr = "Do you like the glove? I've kept this for a while, and I was planning on using it someday, but it looks much better on you. Please put it to good use; besides, I got so much stuff from the Sector, that I don't need it anymore."; var talkStr = "Do you like the glove? I've kept this for a while, and I was planning on using it someday, but it looks much better on you. Please put it to good use; besides, I got so much stuff from the Sector, that I don't need it anymore.";
stance = qm.getPlayer().getJobStyle(); stance = qm.getPlayer().getJobStyle();
if(stance == Packages.client.MapleJob.WARRIOR) item = 1082024; const MapleJob = Java.type('client.MapleJob');
else if(stance == Packages.client.MapleJob.MAGICIAN) item = 1082063; if(stance == MapleJob.WARRIOR) item = 1082024;
else if(stance == Packages.client.MapleJob.BOWMAN || stance == Packages.client.MapleJob.CROSSBOWMAN) item = 1082072; else if(stance == MapleJob.MAGICIAN) item = 1082063;
else if(stance == Packages.client.MapleJob.THIEF) item = 1082076; else if(stance == MapleJob.BOWMAN || stance == MapleJob.CROSSBOWMAN) item = 1082072;
else if(stance == Packages.client.MapleJob.BRAWLER || stance == Packages.client.MapleJob.GUNSLINGER) item = 1082195; else if(stance == MapleJob.THIEF) item = 1082076;
else if(stance == MapleJob.BRAWLER || stance == MapleJob.GUNSLINGER) item = 1082195;
else item = 1082149; else item = 1082149;
qm.sendNext(talkStr); qm.sendNext(talkStr);

View File

@@ -1,5 +1,3 @@
importPackage(Packages.tools);
var status = -1; var status = -1;
function end(mode, type, selection) { function end(mode, type, selection) {
@@ -12,7 +10,8 @@ function end(mode, type, selection) {
qm.sendNext("Take these #bMana Elixir Pills#k as a token of my gratitude."); qm.sendNext("Take these #bMana Elixir Pills#k as a token of my gratitude.");
} }
else if (status == 1) { else if (status == 1) {
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.gainItem(4000099, -1); qm.gainItem(4000099, -1);
qm.gainItem(2000011, 50); qm.gainItem(2000011, 50);
qm.gainExp(8000); qm.gainExp(8000);

View File

@@ -23,8 +23,6 @@
* The sorcerer who sells emotions * The sorcerer who sells emotions
*/ */
importPackage(Packages.client);
var status = -1; var status = -1;
function start(mode, type, selection) { function start(mode, type, selection) {
@@ -46,7 +44,8 @@ function start(mode, type, selection) {
} }
function usedPotion(ch) { function usedPotion(ch) {
return ch.getBuffSource(MapleBuffStat.HPREC) == 2022337; const MapleBuffStat = Java.type('client.MapleBuffStat');
return ch.getBuffSource(MapleBuffStat.HPREC) == 2022337;
} }
function end(mode, type, selection) { function end(mode, type, selection) {

View File

@@ -1,5 +1,3 @@
importPackage(Packages.tools);
var status = -1; var status = -1;
function end(mode, type, selection) { function end(mode, type, selection) {
@@ -10,50 +8,41 @@ function end(mode, type, selection) {
if (status == 0) { if (status == 0) {
qm.sendOk("Great! You managed to get the herb I need. As a #btoken of gratitude#k, take this item to help on your journey."); qm.sendOk("Great! You managed to get the herb I need. As a #btoken of gratitude#k, take this item to help on your journey.");
} else if (status == 1) { } else if (status == 1) {
if(qm.getPlayer().getInventory(Packages.client.inventory.MapleInventoryType.USE).getNumFreeSlot() >= 2) { const MapleInventoryType = Java.type('client.inventory.MapleInventoryType');
if(qm.haveItem(4000294, 1000)) { if (qm.getPlayer().getInventory(MapleInventoryType.USE).getNumFreeSlot() >= 2) {
qm.gainItem(4000294, -1000); if (qm.haveItem(4000294, 1000)) {
qm.gainItem(2040501, 1); qm.gainItem(4000294, -1000);
qm.gainItem(2000005, 50); qm.gainItem(2040501, 1);
qm.gainExp(54000); qm.gainItem(2000005, 50);
qm.forceCompleteQuest(); qm.gainExp(54000);
} qm.forceCompleteQuest();
} else if (qm.haveItem(4000294, 600)) {
else if(qm.haveItem(4000294, 600)) { qm.gainItem(4000294, -600);
qm.gainItem(4000294, -600); qm.gainItem(2020013, 50);
qm.gainItem(2020013, 50); qm.gainExp(54000);
qm.gainExp(54000); qm.forceCompleteQuest();
qm.forceCompleteQuest(); } else if (qm.haveItem(4000294, 500)) {
} qm.gainItem(4000294, -500);
qm.gainExp(54000);
qm.forceCompleteQuest();
} else if (qm.haveItem(4000294, 100)) {
qm.gainItem(4000294, -100);
qm.gainExp(45000);
qm.forceCompleteQuest();
} else if (qm.haveItem(4000294, 50)) {
qm.gainItem(4000294, -50);
qm.gainItem(2020007, 50);
qm.gainExp(10000);
qm.forceCompleteQuest();
} else if (qm.haveItem(4000294, 1)) {
qm.gainItem(4000294, -1);
qm.gainItem(2000000, 1);
qm.gainExp(10);
qm.forceCompleteQuest();
}
else if(qm.haveItem(4000294, 500)) { qm.dispose();
qm.gainItem(4000294, -500);
qm.gainExp(54000);
qm.forceCompleteQuest();
} }
else if(qm.haveItem(4000294, 100)) {
qm.gainItem(4000294, -100);
qm.gainExp(45000);
qm.forceCompleteQuest();
}
else if(qm.haveItem(4000294, 50)) {
qm.gainItem(4000294, -50);
qm.gainItem(2020007, 50);
qm.gainExp(10000);
qm.forceCompleteQuest();
}
else if(qm.haveItem(4000294, 1)) {
qm.gainItem(4000294, -1);
qm.gainItem(2000000, 1);
qm.gainExp(10);
qm.forceCompleteQuest();
}
qm.dispose();
}
else { else {
qm.sendOk("Could you make #b2 slots available#k on your USE inventory before receiving your reward?"); qm.sendOk("Could you make #b2 slots available#k on your USE inventory before receiving your reward?");
} }

View File

@@ -20,10 +20,9 @@
/* Steal queen's silk /* Steal queen's silk
*/ */
importPackage(Packages.client);
function isTigunMorphed(ch) { function isTigunMorphed(ch) {
return ch.getBuffSource(MapleBuffStat.MORPH) == 2210005; const MapleBuffStat = Java.type('client.MapleBuffStat');
return ch.getBuffSource(MapleBuffStat.MORPH) == 2210005;
} }
var status = -1; var status = -1;

View File

@@ -24,8 +24,6 @@
Map(s): New Leaf City Map(s): New Leaf City
Description: Quest - Pet Evolution Description: Quest - Pet Evolution
*/ */
importPackage(Packages.client.inventory.manipulator);
importPackage(Packages.server);
var status = -1; var status = -1;

View File

@@ -25,8 +25,6 @@
Description: Quest - Pet Evolution2 Description: Quest - Pet Evolution2
*/ */
importPackage (Packages.net.server.channel.handlers);
var status = -1; var status = -1;
function end(mode, type, selection) { function end(mode, type, selection) {

View File

@@ -24,7 +24,6 @@
Map(s): New Leaf City : Town Center Map(s): New Leaf City : Town Center
Description: Quest - Pet Re-Evolution Description: Quest - Pet Re-Evolution
*/ */
importPackage(Packages.server);
var status = -1; var status = -1;