Level/exp on all equips + Player stats overhaul + Chair handler patch

Implemented a massive overhaul on Character.wz, adding in equipment level-related nodes in order to make equipments level/EXP info available for anyone to check.
Implemented a major overhaul on the player stat management throughout the source, properly encapsulating and concurrency protecting it's mechanics.
Reviewed several MoveLifeHandler aspects, some of them trying to prevent mobs from falling from footholds in certain circumstances.
Fixed MP Recovery instant killing players when they run out of HP to use.
Fixed some chairs arbitrarily disconnecting players upon HP/MP recovery.
Fixed Puppets sticking to maps in certain scenarios.
Cached data and added concurrency protection for EXP gain on equipments.
Reworked Chair Mastery skill, now with recovering amounts based on a player's base HP/MP pool.
Fixed several deadlock issues revolving rate coupons and character inventory.
Improved overall autopot handler performance.
Reworked door bosses (such as Crocell), now spawning each 3 hours instead of upon player's demand.
Fixed alliances not saving rank names on DB at creation time.
Fixed alliances retaining disbanded guild info on DB.
Added Mystic Door support for the Mushroom Castle area.
This commit is contained in:
ronancpl
2018-09-23 22:37:00 -03:00
parent c3e3c6dfbb
commit 5480035005
255 changed files with 9576 additions and 7850 deletions

View File

@@ -0,0 +1,57 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var bossMobid = 9400610;
var bossMapid = 677000003;
var bossMsg = "Amdusias has appeared!";
var bossPos = new Packages.java.awt.Point(467, 0);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid);
map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -0,0 +1,57 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var bossMobid = 9400609;
var bossMapid = 677000005;
var bossMsg = "Andras has appeared!";
var bossPos = new Packages.java.awt.Point(201, 80);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid);
map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -0,0 +1,57 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var bossMobid = 9400613;
var bossMapid = 677000009;
var bossMsg = "Valefor has appeared!";
var bossPos = new Packages.java.awt.Point(251, -841);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid);
map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -0,0 +1,57 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var bossMobid = 9400633;
var bossMapid = 677000012;
var bossMsg = "Astaroth has appeared!";
var bossPos = new Packages.java.awt.Point(842, 0);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid);
map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -0,0 +1,57 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var bossMobid = 9400612;
var bossMapid = 677000001;
var bossMsg = "Marbas has appeared!";
var bossPos = new Packages.java.awt.Point(461, 61);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid);
map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -0,0 +1,57 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var bossMobid = 9400611;
var bossMapid = 677000007;
var bossMsg = "Crocell has appeared!";
var bossPos = new Packages.java.awt.Point(171, 50);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid);
map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -40,10 +40,7 @@ function scheduledTimeout(eim){
}
function playerRevive(eim, player){
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(entryMap);
player.respawn(eim, entryMap);
return false;
}

View File

@@ -36,10 +36,7 @@ function scheduledTimeout(eim){
}
function playerRevive(eim, player){
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
player.respawn(eim, exitMap);
return false;
}

View File

@@ -254,16 +254,11 @@ function playerDead(eim, player) {
function playerRevive(eim, player) { // player presses ok on the death pop up.
if(eim.getIntProperty("canRevive") == 0) {
if (eim.isEventTeamLackingNow(true, minPlayers, player) && eim.getIntProperty("canJoin") == 0) {
eim.unregisterPlayer(player);
player.setHp(50);
player.changeMap(exitMap);
player.respawn(eim, exitMap);
end(eim);
}
else {
eim.unregisterPlayer(player);
player.setHp(50);
player.changeMap(exitMap);
player.respawn(eim, exitMap);
}
return false;

View File

@@ -39,10 +39,7 @@ function scheduledTimeout(eim){
}
function playerRevive(eim, player){
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(entryMap);
player.respawn(eim, entryMap);
return false;
}

View File

@@ -50,10 +50,7 @@ function scheduledTimeout(eim){
}
function playerRevive(eim, player){
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(entryMap);
player.respawn(eim, entryMap);
return false;
}

View File

@@ -34,10 +34,7 @@ function scheduledTimeout(eim){
}
function playerRevive(eim, player){
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
player.respawn(eim, exitMap);
return false;
}

View File

@@ -61,10 +61,7 @@ function playerEntry(eim, player) {
}
function playerRevive(eim, player) {
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
player.respawn(eim, exitMap);
return false;
}
@@ -136,9 +133,9 @@ function timeOut(eim) {
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()){
var player = pIter.next();
var player = pIter.next();
playerExit(eim, player);
}
}
}
eim.dispose();
}

View File

@@ -57,14 +57,11 @@ function respawn(eim) {
function playerEntry(eim, player) {
var amplifierMap = eim.getMapInstance(startMap.getId());
player.changeMap(amplifierMap);
eim.schedule("timeOut", timer);
eim.schedule("timeOut", timer);
}
function playerRevive(eim, player) {
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
player.respawn(eim, exitMap);
return false;
}
@@ -136,9 +133,9 @@ function timeOut(eim) {
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()){
var player = pIter.next();
var player = pIter.next();
playerExit(eim, player);
}
}
}
eim.dispose();
}

View File

@@ -81,6 +81,7 @@ function writeFeatureTab_PlayerSocialNetwork() {
addFeature("Protected and improved face expression system.");
addFeature("Automated support for Player NPCs and Hall of Fame.");
addFeature("Engagement & Wedding system.");
addFeature("Equipments displays to everyone it's level & EXP info.");
}
function writeFeatureTab_CashItems() {
@@ -112,6 +113,9 @@ function writeFeatureTab_MonstersMapsReactors() {
addFeature("Every skill/mastery book is now obtainable.");
addFeature("Mobs now can drop more than one of the same equip.");
addFeature("Mobs only drop items collectable by the player/party.");
addFeature("Mobs shouldn't fall from foothold too often now.");
addFeature("Properly applying MP cost on non-skill mob moves.");
addFeature("Implemented banish mob skill move.");
addFeature("Redesigned HT mechanics: assemble & dmg taken.");
addFeature("Implemented Zombify disease status.");
addFeature("Added Boss HP Bar for dozens of bosses.");
@@ -126,7 +130,7 @@ function writeFeatureTab_MonstersMapsReactors() {
addFeature("Uncovered missing portal SFX on scripted portals.");
addFeature("PQ boxes sprays items when opened, GMS-like.");
addFeature("Reactors pick items up smartly from the field.");
addFeature("Updated scripted portals now with proper portal SFX.");
addFeature("Updated scripted portals, now with proper portal SFX.");
addFeature("Reviewed Masteria, W. Tour, N. Desert and Neo City.");
addFeature("Added world maps for M. Castle, W. Tour & Ellin areas.");
addFeature("Giant Cake boss drops s. bags and Maple items.");
@@ -232,6 +236,7 @@ function writeFeatureTab_Project() {
addFeature("Developed many survey tools for content profiling.");
addFeature("ThreadTracker: runtime tool for deadlock detection.");
addFeature("Channel, World and Server-wide timer management.");
addFeature("Thoroughly reviewed encapsulation for player stats.");
addFeature("Heavily reviewed future task management, spawning much less threads and relieving task overload on the TimerManager.");
}

View File

@@ -49,9 +49,8 @@ function start(mode, type, selection) {
else if (status == 2)
qm.sendAcceptDecline("So..... Let me just do this for fun! Abaracadabra~!");
else if (status == 3) {
if (qm.c.getPlayer().getHp() >= 50) {
qm.c.getPlayer().setHp(25);
qm.c.getPlayer().updateSingleStat(MapleStat.HP, 25);
if (qm.getPlayer().getHp() >= 50) {
qm.getPlayer().updateHp(25);
}
if (!qm.haveItem(2010007)) {

View File

@@ -46,9 +46,8 @@ function start(mode, type, selection) {
} else if (status == 3) {
qm.sendAcceptDecline("Oh, but it seems our hero has become very weak since the Black Mage's curse. It's only makes sense, considering that the hero has been asleep for hundreds of years. #bHere, I'll give you a HP Recovery Potion.#k");//nexon probably forgot to remove the '.' before '#k', lol
} else if (status == 4) {
if (qm.c.getPlayer().getHp() >= 50) {
qm.c.getPlayer().setHp(25);
qm.c.getPlayer().updateSingleStat(MapleStat.HP, 25);
if (qm.getPlayer().getHp() >= 50) {
qm.getPlayer().updateHp(25);
}
if (!qm.isQuestStarted(21010) && !qm.isQuestCompleted(21010)) {
qm.gainItem(2000022, 1);
@@ -59,8 +58,8 @@ function start(mode, type, selection) {
qm.sendNextPrev("#b(How do I drink the potion? I don't remember..)", 3);
} else if (status == 6) {
qm.guideHint(14);
qm.dispose();
}
qm.dispose();
}
}
function end(mode, type, selection) {