Files
sweetgum-server/scripts/event/AreaBossTimer2.js
ronancpl 0203d45901 PNPC & Pmob + Events Wheel & P. Leave patch + Proper cash use deplete
Reworked cash item consume. It now depletes from the selected slot rather than from the first slot it appears on inventory.
Implemented PNPC and PMOB commands.
Solved an issue with some events finishing abruptly when players quit a party.
Added missing mandatory script functions to the event scripts.
Solved an interaction issue with Wheel of Destiny activation in event instances.
Added interaction with NPC Mom & Dad in the Engagement prequest.
Solved an issue with event maps being disposed while reactor's spray items activity is still in effect.
Fixed modifier scrolls such as Spikes on Shoes depleting a upgrade slot.
Added a server flag for avoiding compulsory consuming by pet autopot.
Added a cache for fetching mob names.
Implemented boss drop rate.
Smart protected commands system against command requests in burst by the same user.
Revised login handler, bringing disconnection checks before checking login state and preventing new client reattribution to already logged-in character objects.
Botched login handler sessions now properly gets closed.
2019-01-16 14:46:28 -02:00

94 lines
2.8 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 --------------------------------------------------------------------------------
Timer2 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
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 lostTime1 = em.getChannelServer().getMapFactory().getMap(220050000);
var timer2 = Packages.server.life.MapleLifeFactory.getMonster(5220003);
if(lostTime1.getMonsterById(5220003) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 1030;
posX = Math.floor((Math.random() * 1400) - 1000);
lostTime1.spawnMonsterOnGroundBelow(timer2, new Packages.java.awt.Point(posX, posY));
lostTime1.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------
function dispose() {}
function setup(eim, leaderid) {}
function monsterValue(eim, mobid) {return 0;}
function disbandParty(eim, player) {}
function playerDisconnected(eim, player) {}
function playerEntry(eim, player) {}
function monsterKilled(mob, eim) {}
function scheduledTimeout(eim) {}
function afterSetup(eim) {}
function changedLeader(eim, leader) {}
function playerExit(eim, player) {}
function leftParty(eim, player) {}
function clearPQ(eim) {}
function allMonstersDead(eim) {}
function playerUnregistered(eim, player) {}