Using Java ThreadPool + Mob Skills & Event Instance patch + Eqp Merge
Server source now uses Java ThreadPool, recycling used thread resources for next uses. Added Grenade visual effect for other players. Implemented an attempt towards unsynced mob behavior, where reportedly players were able to pin same mob in different sections of the map. Solved several deadlock issues, mostly regarding character synchronized methods, event instance scripts and player/item vision-unvision. Solved an issue where mobs would not cast some skills of it's skillset. Frequent behavior on low-leveled mobs. Fixed a bug on 2nd Maker quest where players could complete it by merely disassembling an equipment. New custom mechanic: equipment merge. Similarly to the Bazaar NPC, every equipment after the selected one is used up, and a fraction of their stat amounts are used as stat gains on the currently equipped items. If restrictions are enabled, players must be high-leveled and Maker lv3 to use it. Skill Storm Break no longer uses up arrows. Added a server flag to allow access for all Aran job skills from the beginning. Implemented Battleship and Super Transformation questline scripts. Fixed a desynchronization within pet position and cash inventory position, that could potentially lead to some inventory issues until relogin. Improved timestamp handling in some handler classes. Spam detection is entirely a server-side matter, hence removed usage of client-sided timestamp content. Refactored some pet response packets, improving some of their behaviors. Fixed some quest issues: Maker lv1 and Omega Sector meteorite one.
This commit is contained in:
138
scripts/event/4jship.js
Normal file
138
scripts/event/4jship.js
Normal file
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
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/>.
|
||||
*/
|
||||
/**
|
||||
* @Author Ronan
|
||||
* Event - Kyrin's Test Quest
|
||||
**/
|
||||
|
||||
var entryMap = 912010000;
|
||||
var exitMap = 120000101;
|
||||
|
||||
var minMapId = 912010000;
|
||||
var maxMapId = 912010200;
|
||||
|
||||
var eventTime = 4; //4 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
}
|
||||
|
||||
function init() {
|
||||
em.setProperty("noEntry","false");
|
||||
}
|
||||
|
||||
function setup(level, lobbyid) {
|
||||
var eim = em.newInstance("4jship_" + lobbyid);
|
||||
eim.setProperty("level", level);
|
||||
eim.setProperty("boss", "0");
|
||||
eim.setProperty("canLeave", "0");
|
||||
|
||||
eim.getInstanceMap(entryMap).resetPQ(level);
|
||||
|
||||
respawnStages(eim);
|
||||
eim.startEventTimer(eventTime * 60000);
|
||||
eim.schedule("playerCanLeave", 1 * 60000);
|
||||
eim.schedule("playerSurvived", 2 * 60000);
|
||||
return eim;
|
||||
}
|
||||
|
||||
function afterSetup(eim) {}
|
||||
|
||||
function respawnStages(eim) {}
|
||||
|
||||
function playerCanLeave(eim) {
|
||||
eim.setIntProperty("canLeave", 1);
|
||||
}
|
||||
|
||||
function playerSurvived(eim) {
|
||||
if (eim.getLeader().isAlive()) {
|
||||
eim.setIntProperty("canLeave", 2);
|
||||
eim.dropMessage(5, "Kyrin: You have passed the test. Now for the closing part... Are you able reach the exit over there?");
|
||||
} else {
|
||||
eim.dropMessage(5, "Kyrin: You have failed the test. Aww, don't have such a sad face, just try it again later, ok?");
|
||||
}
|
||||
}
|
||||
|
||||
function playerEntry(eim, player) {
|
||||
var map = eim.getMapInstance(entryMap);
|
||||
player.changeMap(map, map.getPortal(0));
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
eim.dispose();
|
||||
em.setProperty("noEntry","false");
|
||||
}
|
||||
|
||||
function playerLeft(eim, player) {}
|
||||
|
||||
function scheduledTimeout(eim) {
|
||||
var player = eim.getPlayers().get(0);
|
||||
playerExit(eim, player);
|
||||
player.changeMap(exitMap);
|
||||
}
|
||||
|
||||
function playerDisconnected(eim, player) {
|
||||
playerExit(eim, player);
|
||||
}
|
||||
|
||||
function changedMap(eim, chr, mapid) {
|
||||
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
|
||||
}
|
||||
|
||||
function clearPQ(eim) {
|
||||
eim.stopEventTimer();
|
||||
eim.setEventCleared();
|
||||
|
||||
var player = eim.getPlayers().get(0);
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap);
|
||||
|
||||
eim.dispose();
|
||||
em.setProperty("noEntry","false");
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function leftParty(eim, player) {}
|
||||
|
||||
function disbandParty(eim) {}
|
||||
|
||||
function monsterValue(eim, mobId) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
function friendlyKilled(mob, eim) {
|
||||
if(em.getProperty("noEntry") != "false") {
|
||||
var player = eim.getPlayers().get(0);
|
||||
playerExit(eim, player);
|
||||
player.changeMap(exitMap);
|
||||
}
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function dispose() {}
|
||||
140
scripts/event/4jsuper.js
Normal file
140
scripts/event/4jsuper.js
Normal file
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
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/>.
|
||||
*/
|
||||
/**
|
||||
* @Author Ronan
|
||||
* Event - Kyrin's Test Quest
|
||||
**/
|
||||
|
||||
var entryMap = 912010100;
|
||||
var exitMap = 120000101;
|
||||
|
||||
var minMapId = 912010100;
|
||||
var maxMapId = 912010200;
|
||||
|
||||
var eventTime = 4; //4 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
}
|
||||
|
||||
function init() {
|
||||
em.setProperty("noEntry","false");
|
||||
}
|
||||
|
||||
function setup(level, lobbyid) {
|
||||
var eim = em.newInstance("4jsuper_" + lobbyid);
|
||||
eim.setProperty("level", level);
|
||||
eim.setProperty("boss", "0");
|
||||
eim.setProperty("canLeave", "0");
|
||||
|
||||
eim.getInstanceMap(entryMap).resetPQ(level);
|
||||
|
||||
respawnStages(eim);
|
||||
eim.startEventTimer(eventTime * 60000);
|
||||
eim.schedule("playerCanLeave", 1 * 60000);
|
||||
eim.schedule("playerSurvived", 2 * 60000);
|
||||
return eim;
|
||||
}
|
||||
|
||||
function afterSetup(eim) {}
|
||||
|
||||
function respawnStages(eim) {}
|
||||
|
||||
function playerCanLeave(eim) {
|
||||
eim.setIntProperty("canLeave", 1);
|
||||
}
|
||||
|
||||
function playerSurvived(eim) {
|
||||
if (eim.getLeader().isAlive()) {
|
||||
eim.setIntProperty("canLeave", 2);
|
||||
eim.dropMessage(5, "Kyrin: You have passed the test. Now for the closing part... Are you able reach the exit over there?");
|
||||
} else {
|
||||
eim.dropMessage(5, "Kyrin: You have failed the test. Aww, don't have such a sad face, just try it again later, ok?");
|
||||
}
|
||||
}
|
||||
|
||||
function playerEntry(eim, player) {
|
||||
var map = eim.getMapInstance(entryMap);
|
||||
player.changeMap(map, map.getPortal(0));
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
eim.dispose();
|
||||
em.setProperty("noEntry","false");
|
||||
}
|
||||
|
||||
function playerLeft(eim, player) {}
|
||||
|
||||
function scheduledTimeout(eim) {
|
||||
var player = eim.getPlayers().get(0);
|
||||
playerExit(eim, player);
|
||||
player.changeMap(exitMap);
|
||||
}
|
||||
|
||||
function playerDisconnected(eim, player) {
|
||||
playerExit(eim, player);
|
||||
}
|
||||
|
||||
function changedMap(eim, chr, mapid) {
|
||||
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
|
||||
}
|
||||
|
||||
function changedLeader(eim, leader) {}
|
||||
|
||||
function clearPQ(eim) {
|
||||
eim.stopEventTimer();
|
||||
eim.setEventCleared();
|
||||
|
||||
var player = eim.getPlayers().get(0);
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap);
|
||||
|
||||
eim.dispose();
|
||||
em.setProperty("noEntry","false");
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function leftParty(eim, player) {}
|
||||
|
||||
function disbandParty(eim) {}
|
||||
|
||||
function monsterValue(eim, mobId) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
function friendlyKilled(mob, eim) {
|
||||
if(em.getProperty("noEntry") != "false") {
|
||||
var player = eim.getPlayers().get(0);
|
||||
playerExit(eim, player);
|
||||
player.changeMap(exitMap);
|
||||
}
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function dispose() {}
|
||||
@@ -3,6 +3,7 @@ var maps = [104000000, 102000000, 100000000, 103000000, 120000000];
|
||||
var cost = [1000, 1000, 1000, 1000, 800];
|
||||
var selectedMap = -1;
|
||||
var mesos;
|
||||
var hasCoupon = false;
|
||||
|
||||
function start() {
|
||||
cm.sendNext("Hello, I drive the Regular Cab. If you want to go from town to town safely and fast, then ride our cab. We'll glady take you to your destination with an affordable price.");
|
||||
@@ -33,22 +34,33 @@ function action(mode, type, selection) {
|
||||
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
|
||||
cm.sendSimple(selStr);
|
||||
} else if (status == 2) {
|
||||
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
||||
if (maps[selection] == 100000000 && cm.getMapId() == 101000000 && cm.haveItem(4032288)) {
|
||||
cm.sendYesNo("Hmm, I see you have been recommended by Neinheart to come to Victoria Island to improve your knightly skills. Well, just this time the ride will be free of charges. Will you take the ride?");
|
||||
hasCoupon = true;
|
||||
} else {
|
||||
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
||||
}
|
||||
|
||||
selectedMap = selection;
|
||||
} else if (status == 3) {
|
||||
if (cm.getJobId() == 0) {
|
||||
mesos = cost[selectedMap] / 10;
|
||||
if (!hasCoupon) {
|
||||
if (cm.getJobId() == 0) {
|
||||
mesos = cost[selectedMap] / 10;
|
||||
} else {
|
||||
mesos = cost[selectedMap];
|
||||
}
|
||||
|
||||
if (cm.getMeso() < mesos) {
|
||||
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.gainMeso(-mesos);
|
||||
} else {
|
||||
mesos = cost[selectedMap];
|
||||
cm.gainItem(4032288, -1);
|
||||
}
|
||||
|
||||
if (cm.getMeso() < mesos) {
|
||||
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.gainMeso(-mesos);
|
||||
cm.warp(maps[selectedMap], 0);
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(status == 0) {
|
||||
hasCoin = cm.haveItem(coinId);
|
||||
cm.sendNext("This is the vending machine of the Internet Cafe. Place your erasers or #t" + coinId + "# earned throughout the quests to redeem a prize. You can place #bany amount of erasers#k, however take note that bigger shots improves the reward possibilities!");
|
||||
cm.sendNext("This is the vending machine of the Internet Cafe. Place your erasers or #t" + coinId + "# earned throughout the quests to redeem a prize. You can place #bany amount of erasers#k, however take note that placing #rdifferent erasers#k and #rbigger shots of any of them#k will improve the reward possibilities!");
|
||||
} else if(status == 1) {
|
||||
var sendStr;
|
||||
currentTier = getRewardTier();
|
||||
|
||||
@@ -33,8 +33,39 @@ spawnPnpc = false;
|
||||
spawnPnpcFee = 7000000;
|
||||
jobType = 5;
|
||||
|
||||
var advQuest = 0;
|
||||
function start() {
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
if (cm.isQuestStarted(6330)) {
|
||||
if (cm.getEventInstance() != null) { // missing script for skill test found thanks to Lost(tm)
|
||||
advQuest = 5; // string visibility thanks to iPunchEm & Glvelturall
|
||||
cm.sendNext("Not bad at all. Let's discuss this outside!");
|
||||
cm.setQuestProgress(6330, 0, 1);
|
||||
} else if (cm.getQuestProgress(6330, 0) == 0) {
|
||||
advQuest = 1;
|
||||
cm.sendNext("You're ready, right? Now try to withstand my attacks for 2 minutes. I won't go easy on you. Good luck, because you will need it.");
|
||||
} else {
|
||||
advQuest = 3;
|
||||
cm.teachSkill(5121003, 0, 10, -1);
|
||||
cm.forceCompleteQuest(6330);
|
||||
|
||||
cm.sendNext("Congratulations. You have managed to pass my test. I'll teach you a new skill called \"Super Transformation\".\r\n\r\n #s5221003# #b#q5221003##k");
|
||||
}
|
||||
} else if (cm.isQuestStarted(6370)) {
|
||||
if (cm.getEventInstance() != null) {
|
||||
advQuest = 6;
|
||||
cm.sendNext("Not bad at all. Let's discuss this outside!");
|
||||
cm.setQuestProgress(6370, 0, 1);
|
||||
} else if (cm.getQuestProgress(6370, 0) == 0) {
|
||||
advQuest = 2;
|
||||
cm.sendNext("You're ready, right? Now try to withstand my attacks for 2 minutes. I won't go easy on you. Good luck, because you will need it.");
|
||||
} else {
|
||||
advQuest = 4;
|
||||
cm.teachSkill(5221006, 0, 10, -1);
|
||||
cm.forceCompleteQuest(6370);
|
||||
|
||||
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.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?";
|
||||
@@ -82,7 +113,24 @@ function action(mode, type, selection) {
|
||||
start();
|
||||
return;
|
||||
} else {
|
||||
if(spawnPnpc) {
|
||||
if (advQuest > 0) {
|
||||
if (advQuest < 3) {
|
||||
var em = cm.getEventManager(advQuest == 1 ? "4jship" : "4jsuper");
|
||||
if(!em.startInstance(cm.getPlayer())) {
|
||||
cm.sendOk("Someone is already challenging the test. Please try again later.");
|
||||
}
|
||||
} else if (advQuest < 5) {
|
||||
if (advQuest == 3) {
|
||||
cm.sendOk("It is similar to that of 'Transformation', but it's much more powerful than that. Keep training, and hope to see you around.");
|
||||
} else {
|
||||
cm.sendOk("Unlike most of the other skills you used as a Pirate, this one definitely is different. You can actually ride the 'Battleship' and attack enemies with it. Your DEF level will increase for the time you're on board, so that'll help you tremendously in combat situations. May you become the best Gunslinger out there...");
|
||||
}
|
||||
} else {
|
||||
cm.warp(120000101);
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
} else if(spawnPnpc) {
|
||||
if(mode > 0) {
|
||||
if(cm.getMeso() < spawnPnpcFee) {
|
||||
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
|
||||
|
||||
@@ -12,12 +12,8 @@
|
||||
var menu = new Array("Victoria Island");
|
||||
var method;
|
||||
|
||||
var hasCoupon = false;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
if(cm.haveItem(4032288)) hasCoupon = true;
|
||||
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
@@ -36,22 +32,13 @@ function action(mode, type, selection) {
|
||||
}
|
||||
status++;
|
||||
if (status == 0) {
|
||||
if(!hasCoupon) {
|
||||
var display = "";
|
||||
for(var i=0; i < menu.length; i++) {
|
||||
display += "\r\n#L"+i+"##b Victoria Island (1000 mesos)#k";
|
||||
}
|
||||
cm.sendSimple("Eh, Hello...again. Do you want to leave Ereve and go somewhere else? If so, you've come to the right place. I operate a ferry that goes from #bEreve#k to #bVictoria Island#k, I can take you to #bVictoria Island#k if you want... You'll have to pay a fee of #b1000#k Mesos.\r\n"+display);
|
||||
} else {
|
||||
cm.sendYesNo("Hmm, hi there. I see you have been recommended by Neinheart to go to Victoria Island to improve your knightly skills. Well, just this time the ride will be free of charges. Will you embark?");
|
||||
}
|
||||
|
||||
var display = "";
|
||||
for(var i=0; i < menu.length; i++) {
|
||||
display += "\r\n#L"+i+"##b Victoria Island (1000 mesos)#k";
|
||||
}
|
||||
cm.sendSimple("Eh, Hello...again. Do you want to leave Ereve and go somewhere else? If so, you've come to the right place. I operate a ferry that goes from #bEreve#k to #bVictoria Island#k, I can take you to #bVictoria Island#k if you want... You'll have to pay a fee of #b1000#k Mesos.\r\n"+display);
|
||||
} else if(status == 1) {
|
||||
if(hasCoupon) {
|
||||
cm.gainItem(4032288, -1);
|
||||
cm.warp(200090031);
|
||||
cm.dispose();
|
||||
} else if(cm.getMeso() < 1000) {
|
||||
if(cm.getMeso() < 1000) {
|
||||
cm.sendNext("Hmm... Are you sure you have #b1000#k Mesos? Check your Inventory and make sure you have enough. You must pay the fee or I can't let you get on...");
|
||||
cm.dispose();
|
||||
} else {
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
**/
|
||||
|
||||
function start() {
|
||||
cm.sendOk("Ah, such lovely winds. This should be a perfect voyage as long as no stupid customer falls off for attempting some weird skill. Of course, I'm talking about you. Please refain from using your skills.");
|
||||
cm.sendOk("Ah, such lovely winds. This should be a perfect voyage as long as no stupid customer falls off for attempting some weird skill. Of course, I'm talking about you. Please refrain from using your skills.");
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -1,11 +1,15 @@
|
||||
/*
|
||||
NPC Name: Divine Bird
|
||||
Map(s): Erev
|
||||
Description: Buff
|
||||
Description: 3rd job KoC Buff
|
||||
*/
|
||||
importPackage(Packages.constants);
|
||||
|
||||
function start() {
|
||||
cm.useItem(2022458);
|
||||
if (cm.getPlayer().isCygnus() && GameConstants.getJobBranch(cm.getJob()) > 2) {
|
||||
cm.useItem(2022458);
|
||||
}
|
||||
|
||||
cm.sendOk("Don't stop training. Every ounce of your energy is required to protect the world of Maple....");
|
||||
cm.dispose();
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -49,18 +49,24 @@ function action(mode, type, selection) {
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
if (!Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
cm.sendOk("The Monster Carnival is currently unavailable.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
var selStr = "The Monster Carnival is currently unavailable, but instead I offer a steadfast #bore refining#k service for you, taxing #r" + ((feeMultiplier * 100) | 0) + "%#k over the usual fee to synthetize them. What will you do?#b";
|
||||
|
||||
var options = new Array("Refine mineral ores","Refine jewel ores");
|
||||
if(refineCrystals) {
|
||||
options.push("Refine crystal ores");
|
||||
options.push("Refine crystal ores");
|
||||
}
|
||||
if(refineRocks) {
|
||||
options.push("Refine plates/jewels");
|
||||
options.push("Refine plates/jewels");
|
||||
}
|
||||
|
||||
for (var i = 0; i < options.length; i++){
|
||||
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
|
||||
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
|
||||
}
|
||||
|
||||
cm.sendSimple(selStr);
|
||||
|
||||
@@ -47,10 +47,14 @@ function action(mode, type, selection) {
|
||||
|
||||
var progress = cm.getQuestProgress(3421, 0);
|
||||
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
if (cm.canHold(4031117, 1)) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
} else {
|
||||
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,10 +47,14 @@ function action(mode, type, selection) {
|
||||
|
||||
var progress = cm.getQuestProgress(3421, 0);
|
||||
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
if (cm.canHold(4031117, 1)) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
} else {
|
||||
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,10 +47,14 @@ function action(mode, type, selection) {
|
||||
|
||||
var progress = cm.getQuestProgress(3421, 0);
|
||||
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
if (cm.canHold(4031117, 1)) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
} else {
|
||||
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,10 +47,14 @@ function action(mode, type, selection) {
|
||||
|
||||
var progress = cm.getQuestProgress(3421, 0);
|
||||
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
if (cm.canHold(4031117, 1)) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
} else {
|
||||
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,10 +47,14 @@ function action(mode, type, selection) {
|
||||
|
||||
var progress = cm.getQuestProgress(3421, 0);
|
||||
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
if (cm.canHold(4031117, 1)) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
} else {
|
||||
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,10 +47,14 @@ function action(mode, type, selection) {
|
||||
|
||||
var progress = cm.getQuestProgress(3421, 0);
|
||||
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
if (cm.canHold(4031117, 1)) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
} else {
|
||||
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,26 +25,27 @@
|
||||
* @Map(s): Dojo Hall
|
||||
*/
|
||||
importPackage(Packages.server.maps);
|
||||
importPackage(Packages.constants);
|
||||
|
||||
var disabled = false;
|
||||
var belts = Array(1132000, 1132001, 1132002, 1132003, 1132004);
|
||||
var belt_level = Array(25, 35, 45, 60, 75);
|
||||
var belt_on_inventory;
|
||||
|
||||
/* var belt_points = Array(200, 1800, 4000, 9200, 17000); */
|
||||
var belt_points = Array(10, 90, 200, 460, 850); /* Watered down version */
|
||||
var belt_points;
|
||||
|
||||
var status = -1;
|
||||
var selectedMenu = -1;
|
||||
var dojoWarp = 0;
|
||||
|
||||
function start() {
|
||||
if(disabled) {
|
||||
if (disabled) {
|
||||
cm.sendOk("My master has requested that the dojo be #rclosed#k at this time so I can't let you in.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
belt_points = ServerConstants.USE_FAST_DOJO_UPGRADE ? Array(10, 90, 200, 460, 850) : Array(200, 1800, 4000, 9200, 17000);
|
||||
|
||||
belt_on_inventory = new Array();
|
||||
for (var i = 0; i < belts.length; i++) {
|
||||
belt_on_inventory.push(cm.haveItemWithId(belts[i], true));
|
||||
|
||||
@@ -14,7 +14,7 @@ function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (status == 0 && mode == 0) {
|
||||
if (mode == 0) {
|
||||
cm.sendNext("Aye...are you scared of speed or heights? You can't trust my flying skills? Trust me, I've worked out all the kinks!");
|
||||
cm.dispose();
|
||||
return;
|
||||
@@ -26,7 +26,7 @@ function action(mode, type, selection) {
|
||||
if(status == 0){
|
||||
cm.sendNext("I don't know how you found out about this, but you came to the right place! For those that wandered around Nihal Desert and are getting homesick, I am offering a flight straight to Victorial Island, non-stop! Don't worry about the flying ship--it's only fallen once or twice! Don't you feel claustrophobic being in a long flight on that small ship?");
|
||||
} else if(status == 1){
|
||||
cm.sendAcceptDecline("Please remember two things. One, this line is actually for overseas shipping, so #rI cannot gurantee exactly which town you'll land#k. Two, since I am putting you in this special flight, it'll be a bit expensive. The service charge is #e#b10,000 mesos#n#k. There's a flight thats about to take off. Are you interested in this direct flight?");
|
||||
cm.sendYesNo("Please remember two things. One, this line is actually for overseas shipping, so #rI cannot gurantee exactly which town you'll land#k. Two, since I am putting you in this special flight, it'll be a bit expensive. The service charge is #e#b10,000 mesos#n#k. There's a flight thats about to take off. Are you interested in this direct flight?");
|
||||
} else if(status == 2){
|
||||
cm.sendNext("Okay, ready to takeoff~");
|
||||
} else if(status == 3){
|
||||
|
||||
@@ -51,6 +51,12 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
if (!Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
cm.sendOk("Hi, I'm #b#p" + cm.getNpc() + "##k.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
var selStr = "Hey traveler! Come, come closer... We offer a #bhuge opportunity of business#k to you. If you want to know what it is, keep listening...";
|
||||
cm.sendNext(selStr);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,12 @@ var equip;
|
||||
var maxEqp = 0;
|
||||
|
||||
function start() {
|
||||
if (!Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
cm.sendOk("Hi, I'm #b#p" + cm.getNpc() + "##k.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.getPlayer().setCS(true);
|
||||
var selStr = "Hello, I am the #bAccessory NPC Crafter#k! My works are widely recognized to be too fine, up to the point at which all my items mimic not only the appearance but too the attributes of them! Everything I charge is some 'ingredients' to make them and, of course, a fee for my services. On what kind of equipment are you interessed?#b";
|
||||
var options = ["Pendants","Face accessories","Eye accessories","Belts & medals","Rings"/*,"#t4032496#"*/];
|
||||
@@ -56,7 +62,7 @@ function action(mode, type, selection) {
|
||||
if (status == 0) {
|
||||
if (selection == 0) { //pendants
|
||||
var selStr = "Well, I've got these pendants on my repertoire:#b";
|
||||
items = [1122018,1122007,1122001,1122002,1122003,1122004,1122005,1122006,1122058];
|
||||
items = [1122018,1122007,1122001,1122003,1122004,1122006,1122002,1122005,1122058];
|
||||
for (var i = 0; i < items.length; i++)
|
||||
selStr += "\r\n#L" + i + "##t" + items[i] + "##b";
|
||||
}else if (selection == 1) { //face accessory
|
||||
@@ -103,9 +109,9 @@ function action(mode, type, selection) {
|
||||
if (selectedType != 3) selectedItem = selection;
|
||||
|
||||
if (selectedType == 0) { //pendant refine
|
||||
var matSet = [[4003004, 4030012, 4001356, 4000026], [4000026, 4001356, 4000073, 4001006], [4001344, 4003001, 4003004, 4003005], [4001344, 4003001, 4003004, 4003005], [4001344, 4003001, 4003004, 4003005], [4001344, 4003001, 4003004, 4003005], [4001344, 4003001, 4003004, 4003005], [4001344, 4003001, 4003004, 4003005], [1122007, 4003002, 4000413]];
|
||||
var matQtySet = [[20, 20, 5, 1], [5, 5, 10, 1], [10, 4, 20, 4], [20, 8, 20, 8], [10, 4, 20, 4], [15, 6, 30, 6], [20, 8, 40, 8], [15, 6, 30, 6], [1, 1, 1]];
|
||||
var costSet = [150000, 500000, 200000, 400000, 200000, 300000, 400000, 300000, 2500000];
|
||||
var matSet = [[4003004, 4030012, 4001356, 4000026], [4000026, 4001356, 4000073, 4001006], [4001343, 4011002, 4003004, 4003005], [4001343, 4011006, 4003004, 4003005], [4000091, 4011005, 4003004, 4003005], [4000091, 4011001, 4003004, 4003005], [4000469, 4011000, 4003004, 4003005], [4000469, 4011004, 4003004, 4003005], [1122007, 4003002, 4000413]];
|
||||
var matQtySet = [[20, 20, 5, 1], [5, 5, 10, 1], [10, 2, 20, 4], [10, 1, 20, 4], [15, 3, 30, 6], [15, 3, 30, 6], [20, 5, 20, 8], [20, 4, 40, 8], [1, 1, 1]];
|
||||
var costSet = [150000, 500000, 200000, 200000, 300000, 300000, 400000, 400000, 2500000];
|
||||
}else if (selectedType == 1) { //face accessory refine
|
||||
var matSet = [[4006000, 4003004],[4006000, 4003004,4000026],[4006000, 4003004,4000026,4000082,4003002],[4006000, 4003005],[4006000, 4003005,4000026],[4006000, 4003005,4000026,4000082,4003002],[4001006, 4011008],[4001006, 4011008],[4001006, 4011008],[4001006, 4011008]];
|
||||
var matQtySet = [[5,5],[5,5,5],[5,5,5,5,1],[5,5],[5,5,5],[5,5,5,5,1],[1,1],[1,1],[1,1],[1,1]];
|
||||
@@ -145,9 +151,9 @@ function action(mode, type, selection) {
|
||||
var prompt = "You want me to make ";
|
||||
if(selectedType != 3) {
|
||||
if (qty == 1)
|
||||
prompt += "a #t" + item + "#?";
|
||||
prompt += "a #b#t" + item + "##k?";
|
||||
else
|
||||
prompt += qty + " #t" + item + "#?";
|
||||
prompt += "#b" + qty + " #t" + item + "##k?";
|
||||
}
|
||||
else prompt += "a #bbelt#k or a #bmedal#k?";
|
||||
|
||||
|
||||
@@ -19,31 +19,72 @@
|
||||
*/
|
||||
/* Dalair
|
||||
Medal NPC.
|
||||
|
||||
NPC Equipment Merger:
|
||||
* @author Ronan Lana
|
||||
*/
|
||||
|
||||
importPackage(Packages.client.processor);
|
||||
importPackage(Packages.constants);
|
||||
|
||||
var status;
|
||||
|
||||
var mergeFee = 50000;
|
||||
var name;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
cm.sendOk("The medal ranking system is currently unavailable.");
|
||||
cm.dispose();
|
||||
}
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
if (!Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
cm.sendOk("The medal ranking system is currently unavailable...");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
var levelLimit = !cm.getPlayer().isCygnus() ? 160 : 110;
|
||||
var selStr = "The medal ranking system is currently unavailable... Therefore, I am providing the #bEquipment Merge#k service! ";
|
||||
|
||||
if (!ServerConstants.USE_STARTER_MERGE && (cm.getPlayer().getLevel() < levelLimit || MakerProcessor.getMakerSkillLevel(cm.getPlayer()) < 3)) {
|
||||
selStr += "However, you must have #rMaker level 3#k and at least #rlevel 110#k (Cygnus Knight), #rlevel 160#k (other classes) and a fund of #r" + cm.numberWithCommas(mergeFee) + " mesos#k to use the service.";
|
||||
cm.sendOk(selStr);
|
||||
cm.dispose();
|
||||
} else if (cm.getMeso() < mergeFee) {
|
||||
selStr += "I'm sorry, but this service tax is of #r" + cm.numberWithCommas(mergeFee) + " mesos#k, which it seems you unfortunately don't have right now... Please, stop by again later.";
|
||||
cm.sendOk(selStr);
|
||||
cm.dispose();
|
||||
} else {
|
||||
selStr += "For the fee of #r" + cm.numberWithCommas(mergeFee) + "#k mesos, merge unnecessary equipments in your inventory into your currently equipped gears to get stat boosts into them, statups based on the attributes of the items used on the merge!";
|
||||
cm.sendNext(selStr);
|
||||
}
|
||||
} else if(status == 1) {
|
||||
selStr = "#rWARNING#b: Make sure you have your items ready to merge at the slots #rAFTER#b the item you have selected to merge.#k Any items #bunder#k the item selected will be merged thoroughly.\r\n\r\nNote that equipments receiving bonuses from merge are going to become #rUntradeable#k thereon, and equipments that already received the merge bonus #rcannot be used for merge#k.\r\n\r\n";
|
||||
cm.sendGetText(selStr);
|
||||
} else if(status == 2) {
|
||||
name = cm.getText();
|
||||
|
||||
if (cm.getPlayer().mergeAllItemsFromName(name)) {
|
||||
cm.gainMeso(-mergeFee);
|
||||
cm.sendOk("Merging complete! Thanks for using the service and enjoy your new equipment stats.");
|
||||
} else {
|
||||
cm.sendOk("There is no #b'" + name + "'#k in your #bEQUIP#k inventory!");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,12 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
if (!Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
cm.sendOk("The medal ranking system is currently unavailable...");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
var selStr = "Hello, I am the #bBazaar NPC#k! Sell to me any item on your inventory you don't need. #rWARNING#b: Make sure you have your items ready to sell at the slots #rAFTER#b the item you have selected to sell.#k Any items #bunder#k the item selected will be sold thoroughly.";
|
||||
for (var i = 0; i < options.length; i++)
|
||||
selStr += "\r\n#L" + i + "# " + options[i] + "#l";
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
var status = 0;
|
||||
var goToMansion = false;
|
||||
var fee = 15000;
|
||||
|
||||
function start() {
|
||||
@@ -37,19 +36,11 @@ function action(mode, type, selection) {
|
||||
else {
|
||||
status++;
|
||||
if (cm.getPlayer().getMapId() == 682000000) {
|
||||
if (status == 0)
|
||||
cm.sendSimple("Where to, boss? \r\n#b#L0#New Leaf City (" + fee + " mesos)#l\r\n#L1#Haunted Mansion#l#k");
|
||||
else if (status == 1) {
|
||||
if (status == 0) {
|
||||
if (selection == 0)
|
||||
cm.sendYesNo("You want to go to New Leaf City?");
|
||||
else {
|
||||
goToMansion = true;
|
||||
cm.sendYesNo("You're sure you want to enter the Mansion?");
|
||||
}
|
||||
} else if (status == 2) {
|
||||
if(goToMansion) {
|
||||
cm.warp(682000100, 0);
|
||||
} else if(cm.getMeso() >= fee) {
|
||||
cm.sendYesNo("Would you like to return back to #bcivilization#k? The fee is " + fee + " mesos.");
|
||||
} else if (status == 1) {
|
||||
if(cm.getMeso() >= fee) {
|
||||
cm.gainMeso(-fee);
|
||||
cm.warp(600000000);
|
||||
} else {
|
||||
|
||||
@@ -98,6 +98,7 @@ function writeFeatureTab_CashItems() {
|
||||
addFeature("Storage with 'Arrange Items' feature functional.");
|
||||
addFeature("Close-quarters evaluation mode for items.");
|
||||
addFeature("Reviewed Karma scissors & Untradeable items.");
|
||||
addFeature("Reviewed an pet position issue within CASH inventory.");
|
||||
addFeature("Scroll for Spikes on Shoes.");
|
||||
addFeature("Scroll for Cold Protection.");
|
||||
addFeature("Vega's spell.");
|
||||
@@ -187,6 +188,7 @@ function writeFeatureTab_Serverpotentials() {
|
||||
addFeature("Delete Character.");
|
||||
addFeature("Smooth view-all-char, now showing all account chars.");
|
||||
addFeature("Centralized servertime, boosting handler performance.");
|
||||
addFeature("Centralized timestamping, unused rcvd timestamps.");
|
||||
addFeature("Autosaver (periodically saves player's data on DB).");
|
||||
addFeature("Fixed and randomized HP/MP growth rate available.");
|
||||
addFeature("Players' MaxHP/MaxMP method accounting equip gain.");
|
||||
@@ -211,6 +213,7 @@ function writeFeatureTab_CustomNPCs() {
|
||||
addFeature("Asia: scroll & rarities shop NPC.");
|
||||
addFeature("Abdula: lists droppers of needed skill/mastery books.");
|
||||
addFeature("Agent E: accessory crafter.");
|
||||
addFeature("Dalair: automatized equipment-merger.");
|
||||
addFeature("Donation Box: automatized item-buyer.");
|
||||
addFeature("Coco & Ace of Hearts: C. scroll crafters.");
|
||||
}
|
||||
@@ -240,6 +243,7 @@ function writeFeatureTab_Project() {
|
||||
addFeature("Protected many flaws with login management system.");
|
||||
addFeature("Developed a robust anti-exploit login coordinator.");
|
||||
addFeature("Usage of HikariCP to improve DB connection calls.");
|
||||
addFeature("Usage of Java Threadpool to improve runnable calls.");
|
||||
addFeature("Developed many survey tools for content profiling.");
|
||||
addFeature("ThreadTracker: runtime tool for deadlock detection.");
|
||||
addFeature("Channel, World and Server-wide timer management.");
|
||||
|
||||
@@ -33,7 +33,7 @@ function enter(pi) {
|
||||
}
|
||||
|
||||
if(pi.haveItem(4032101 + jobtype, 1)) {
|
||||
pi.message("You have already challenged the Master of Disguise, report your success to Neinheart.");
|
||||
pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ function enter(pi) {
|
||||
}
|
||||
|
||||
if(pi.haveItem(4032101 + jobtype, 1)) {
|
||||
pi.message("You have already challenged the Master of Disguise, report your success to Neinheart.");
|
||||
pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ function enter(pi) {
|
||||
}
|
||||
|
||||
if(pi.haveItem(4032101 + jobtype, 1)) {
|
||||
pi.message("You have already challenged the Master of Disguise, report your success to Neinheart.");
|
||||
pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ function enter(pi) {
|
||||
}
|
||||
|
||||
if(pi.haveItem(4032101 + jobtype, 1)) {
|
||||
pi.message("You have already challenged the Master of Disguise, report your success to Neinheart.");
|
||||
pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ function enter(pi) {
|
||||
}
|
||||
|
||||
if(pi.haveItem(4032101 + jobtype, 1)) {
|
||||
pi.message("You have already challenged the Master of Disguise, report your success to Neinheart.");
|
||||
pi.message("You have already challenged the Master of Disguise, report your success to the Chief Knight.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
32
scripts/portal/s4ship_out.js
Normal file
32
scripts/portal/s4ship_out.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
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/>.
|
||||
*/
|
||||
function enter(pi) {
|
||||
var exit = pi.getEventInstance().getIntProperty("canLeave");
|
||||
if (exit == 0) {
|
||||
pi.message("You have to wait one minute before you can leave this place.");
|
||||
return false;
|
||||
} else if (exit == 2) {
|
||||
pi.warp(912010200);
|
||||
return true;
|
||||
} else {
|
||||
pi.warp(120000101);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
32
scripts/portal/s4super_out.js
Normal file
32
scripts/portal/s4super_out.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
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/>.
|
||||
*/
|
||||
function enter(pi) {
|
||||
var exit = pi.getEventInstance().getIntProperty("canLeave");
|
||||
if (exit == 0) {
|
||||
pi.message("You have to wait one minute before you can leave this place.");
|
||||
return false;
|
||||
} else if (exit == 2) {
|
||||
pi.warp(912010200);
|
||||
return true;
|
||||
} else {
|
||||
pi.warp(120000101);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
importPackage(Packages.client);
|
||||
importPackage(Packages.constants);
|
||||
|
||||
status = -1;
|
||||
|
||||
@@ -47,8 +48,10 @@ function start(mode, type, selection) {
|
||||
qm.changeJobById(2100);
|
||||
qm.resetStats();
|
||||
|
||||
//qm.teachSkill(21000000, 0, 10, -1); //learned later...
|
||||
//qm.teachSkill(21001003, 0, 20, -1); //learned later...
|
||||
if (ServerConstants.USE_FULL_ARAN_SKILLSET) {
|
||||
qm.teachSkill(21000000, 0, 10, -1); //combo ability
|
||||
qm.teachSkill(21001003, 0, 20, -1); //polearm booster
|
||||
}
|
||||
|
||||
qm.completeQuest();
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
importPackage(Packages.client);
|
||||
importPackage(Packages.constants);
|
||||
|
||||
var status = -1;
|
||||
|
||||
@@ -65,6 +66,13 @@ function end(mode, type, selection) {
|
||||
|
||||
qm.gainItem(1142130, true);
|
||||
qm.changeJobById(2110);
|
||||
|
||||
if (ServerConstants.USE_FULL_ARAN_SKILLSET) {
|
||||
qm.teachSkill(21100000, 0, 20, -1); //polearm mastery
|
||||
qm.teachSkill(21100002, 0, 30, -1); //final charge
|
||||
qm.teachSkill(21100004, 0, 20, -1); //combo smash
|
||||
qm.teachSkill(21100005, 0, 20, -1); //combo drain
|
||||
}
|
||||
|
||||
qm.completeQuest();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
importPackage(Packages.client);
|
||||
importPackage(Packages.constants);
|
||||
|
||||
var status = -1;
|
||||
|
||||
@@ -49,6 +50,10 @@ function end(mode, type, selection) {
|
||||
|
||||
qm.gainItem(1142131, true);
|
||||
qm.changeJobById(2111);
|
||||
|
||||
if (ServerConstants.USE_FULL_ARAN_SKILLSET) {
|
||||
qm.teachSkill(21110002, 0, 20, -1); //full swing
|
||||
}
|
||||
|
||||
qm.completeQuest();
|
||||
}
|
||||
|
||||
@@ -1,30 +1,45 @@
|
||||
importPackage(Packages.tools);
|
||||
var status = -1;
|
||||
|
||||
function end(mode, type, selection) {
|
||||
var rnd;
|
||||
|
||||
if (mode != 1) {
|
||||
if (mode == -1) {
|
||||
qm.dispose();
|
||||
} else {
|
||||
if(qm.haveItem(4031092, 10)) {
|
||||
if(qm.canHold(4031092)) {
|
||||
qm.sendOk("Well done! You brought back all the #t4031092# that were missing. Here, get this scroll as a token of my gratitude...");
|
||||
qm.gainItem(4031092, -10);
|
||||
|
||||
rnd = Math.floor(Math.random() * 4);
|
||||
if(rnd == 0) qm.gainItem(2040704, 1);
|
||||
else if(rnd == 1) qm.gainItem(2040705, 1);
|
||||
else if(rnd == 2) qm.gainItem(2040707, 1);
|
||||
else qm.gainItem(2040708, 1);
|
||||
|
||||
qm.gainExp(2700);
|
||||
qm.forceCompleteQuest();
|
||||
if(mode == 0 && type > 0) {
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
if(qm.haveItem(4031092, 10)) {
|
||||
if(qm.getPlayer().getInventory(Packages.client.inventory.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...");
|
||||
} else {
|
||||
qm.sendOk("Free a space on your USE inventory before receiving your prize.");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
qm.sendOk("Free a space on your USE inventory before receiving your prize.");
|
||||
}
|
||||
}
|
||||
|
||||
qm.dispose();
|
||||
} else {
|
||||
qm.sendOk("Please return me 10 #t4031092# that went missing on this room.");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
} else if (status == 1) {
|
||||
qm.gainItem(4031092, -10);
|
||||
|
||||
rnd = Math.floor(Math.random() * 4);
|
||||
if(rnd == 0) qm.gainItem(2040704, 1);
|
||||
else if(rnd == 1) qm.gainItem(2040705, 1);
|
||||
else if(rnd == 2) qm.gainItem(2040707, 1);
|
||||
else qm.gainItem(2040708, 1);
|
||||
|
||||
qm.gainExp(2700);
|
||||
qm.forceCompleteQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ function end(mode, type, selection) {
|
||||
qm.sendNextPrev("And remember this: the maxima of #bExchange#k, the area of the fundamentals of Alchemy where the total amount of the material does not change, is that no item can be created from nothing. Understood?");
|
||||
} else if (status == 5) {
|
||||
qm.gainMeso(-10000);
|
||||
|
||||
|
||||
qm.forceCompleteQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user