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.
57 lines
2.1 KiB
JavaScript
57 lines
2.1 KiB
JavaScript
/*
|
|
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);
|
|
} |