Lower-bracket equip levelup & Channel/World capacity patch

Rebalanced the low level section of the equipment level up system.
Fixed EQUIP_EXP_RATE not acting as expected to be.
Changed chscroll system, now using a new flag instead of the SCROLL_CHANCE_RATE.
Optimized PlayerStorage, now using a proper name map when searching for a character name.
Tweaked some aspects of the BalrogPQ.
Improved the channel capacity bar and world server capacity checks throughout the source.
This commit is contained in:
ronancpl
2018-04-25 12:01:24 -03:00
parent b7a259e2c4
commit 7d448cce4f
31 changed files with 446 additions and 90 deletions

View File

@@ -117,13 +117,13 @@ function releaseLeftClaw(eim) {
function spawnBalrog(eim) {
var mapObj = eim.getInstanceMap(entryMap);
mapObj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830000), new Packages.java.awt.Point(412, 258));
mapObj.spawnFakeMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830000), new Packages.java.awt.Point(412, 258));
mapObj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830002), new Packages.java.awt.Point(412, 258));
mapObj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830006), new Packages.java.awt.Point(412, 258));
}
function spawnSealedBalrog(eim) {
eim.getInstanceMap(entryMap).spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830003), new Packages.java.awt.Point(412, 258));
eim.getInstanceMap(entryMap).spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(bossMobId), new Packages.java.awt.Point(412, 258));
}
function playerEntry(eim, player) {
@@ -239,8 +239,14 @@ function monsterKilled(mob, eim) {
eim.showClearEffect();
eim.clearPQ();
eim.dispatchUpdateQuestMobCount(bossMobId, entryMap);
mob.getMap().broadcastBalrogVictory(eim.getLeader().getName());
} else {
if(count == 1) {
var mapobj = eim.getInstanceMap(entryMap);
mapobj.makeMonsterReal(mapobj.getMonsterById(8830000));
}
eim.setIntProperty("boss", count + 1);
}

View File

@@ -117,13 +117,13 @@ function releaseLeftClaw(eim) {
function spawnBalrog(eim) {
var mapObj = eim.getInstanceMap(entryMap);
mapObj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830007), new Packages.java.awt.Point(412, 258));
mapObj.spawnFakeMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830007), new Packages.java.awt.Point(412, 258));
mapObj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830009), new Packages.java.awt.Point(412, 258));
mapObj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830013), new Packages.java.awt.Point(412, 258));
}
function spawnSealedBalrog(eim) {
eim.getInstanceMap(entryMap).spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830010), new Packages.java.awt.Point(412, 258));
eim.getInstanceMap(entryMap).spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(bossMobId), new Packages.java.awt.Point(412, 258));
}
function playerEntry(eim, player) {
@@ -239,8 +239,13 @@ function monsterKilled(mob, eim) {
eim.showClearEffect();
eim.clearPQ();
eim.dispatchUpdateQuestMobCount(bossMobId, entryMap);
mob.getMap().broadcastBalrogVictory(eim.getLeader().getName());
} else {
if(count == 1) {
var mapobj = eim.getInstanceMap(entryMap);
mapobj.makeMonsterReal(mapobj.getMonsterById(8830007));
}
eim.setIntProperty("boss", count + 1);
}

View File

@@ -0,0 +1,102 @@
/*
This file is part of the HeavenMS (MapleSolaxiaV2) MapleStory Server
Copyleft (L) 2017 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 - Balrog Quest
**/
importPackage(Packages.tools);
var entryMap = 910520000;
var exitMap = 105100100;
var minMapId = 910520000;
var maxMapId = 910520000;
var eventTime = 10; //10 minutes
var lobbyRange = [0, 0];
function setLobbyRange() {
return lobbyRange;
}
function init() {
em.setProperty("noEntry","false");
}
function respawnStages(eim) {}
function afterSetup(eim) {}
function playerEntry(eim, player) {
var mapObj = eim.getInstanceMap(entryMap);
mapObj.resetPQ(1);
mapObj.instanceMapForceRespawn();
mapObj.closeMapSpawnPoints();
respawnStages(eim);
player.changeMap(entryMap, 1);
em.setProperty("noEntry","true");
player.getClient().getSession().write(MaplePacketCreator.getClock(eventTime * 60));
eim.startEventTimer(eventTime * 60000);
}
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
}
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 isBalrog(mob) {
return mob.getId() == 9300326;
}
function monsterKilled(mob, eim) {
if(isBalrog(mob)) {
eim.spawnNpc(1061015, new java.awt.Point(0, 115), mob.getMap());
}
}
function monsterValue(eim, mobId) {
return 1;
}
function allMonstersDead(eim) {}
function cancelSchedule() {}
function dispose() {}

View File

@@ -0,0 +1,17 @@
importPackage(java.util);
function enter(pi) {
if(pi.isQuestStarted(2224) || pi.isQuestStarted(2226) || pi.isQuestCompleted(2227)) {
var hourDay = pi.getHourOfDay();
if(!((hourDay >= 0 && hourDay < 7) || hourDay >= 17)) {
pi.getPlayer().dropMessage(5, "You cannot access this area right now.");
return false;
} else {
pi.playPortalSound(); pi.warp(pi.isQuestCompleted(2227) ? 910100001 : 910100000,"out00");
return true;
}
}
pi.getPlayer().dropMessage(5, "You cannot access this area.");
return false;
}

View File

@@ -25,8 +25,6 @@
Quest ID: 2214
*/
importPackage(java.util);
var status = -1;
function end(mode, type, selection) {
@@ -44,7 +42,7 @@ function end(mode, type, selection) {
status--;
if (status == 0) {
var hourDay = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
var hourDay = qm.getHourOfDay();
if(!(hourDay >= 17 && hourDay < 20)) {
qm.sendNext("(Hmm, I'm searching the trash can but can't find the #t4031894# JM was talking about, maybe it's not time yet...)");
qm.dispose();

View File

@@ -25,8 +25,6 @@
Quest ID: 2215
*/
importPackage(java.util);
var status = -1;
function end(mode, type, selection) {
@@ -44,7 +42,7 @@ function end(mode, type, selection) {
status--;
if (status == 0) {
var hourDay = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
var hourDay = qm.getHourOfDay();
if(!(hourDay >= 17 && hourDay < 20)) {
qm.sendNext("(Hmm, I'm searching the trash can but can't find the #t4031894# JM was talking about, maybe it's not time yet...)");
qm.dispose();

46
scripts/quest/2228.js Normal file
View File

@@ -0,0 +1,46 @@
/*
This file is part of the HeavenMS (MapleSolaxiaV2) MapleStory Server
Copyleft (L) 2017 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/>.
*/
var status = -1;
function start(mode, type, selection) {
if (mode == -1) {
qm.dispose();
} else {
if(mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
qm.sendNext("Thank you for defeating #rFaust#k. That will finally settle my spirit to rest.");
} else {
qm.gainFame(8);
qm.forceCompleteQuest();
qm.dispose();
}
}
}

59
scripts/quest/2238.js Normal file
View File

@@ -0,0 +1,59 @@
/*
This file is part of the HeavenMS (MapleSolaxiaV2) MapleStory Server
Copyleft (L) 2017 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/>.
*/
var status = -1;
function start(mode, type, selection) {
if (mode == -1) {
qm.dispose();
} else {
if(mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
em = qm.getEventManager("BalrogQuest");
if (em == null) {
qm.sendOk("Sorry, but the BalrogQuest is closed.");
qm.dispose();
return;
}
if (em.getProperty("noEntry") == "false") {
var eim = em.newInstance("BalrogQuest");
eim.registerPlayer(qm.getPlayer());
eim.startEvent();
qm.forceStartQuest();
qm.dispose();
}
else {
qm.sendOk("There is currently someone in this map, come back later.");
qm.dispose();
}
}
}
}