Implemented AmoriaPQ. Fixed an issue with ItemIdSortHandler where empty vectors given to the sorting module would cause an exception thrown, wiping players inventory items. Thanks to Vcoc, revamped shop data for GMShop (shop id 1337). Mount quest for explorers now uses event script.
94 lines
2.4 KiB
JavaScript
94 lines
2.4 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/>.
|
|
*/
|
|
/**
|
|
* @Author Ronan
|
|
* 3rd Job Event - Bowman
|
|
**/
|
|
importPackage(Packages.tools);
|
|
|
|
var entryMap = 108010100;
|
|
var exitMap = 105040305;
|
|
|
|
var minMapId = 108010100;
|
|
var maxMapId = 108010101;
|
|
|
|
var eventTime = 20; //20 minutes
|
|
|
|
var lobbyRange = [0, 0];
|
|
|
|
function setLobbyRange() {
|
|
return lobbyRange;
|
|
}
|
|
|
|
function init() {
|
|
em.setProperty("noEntry","false");
|
|
}
|
|
|
|
function playerEntry(eim, player) {
|
|
eim.getInstanceMap(maxMapId).resetPQ(1);
|
|
|
|
player.changeMap(entryMap, 0);
|
|
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, eim.getPlayers().get(0));
|
|
player.changeMap(exitMap);
|
|
}
|
|
|
|
function playerDisconnected(eim, player) {
|
|
playerExit(eim, player);
|
|
}
|
|
|
|
function clear(eim) {
|
|
var player = eim.getPlayers().get(0);
|
|
eim.unregisterPlayer(player);
|
|
player.changeMap(exitMap);
|
|
|
|
eim.dispose();
|
|
em.setProperty("noEntry","false");
|
|
}
|
|
|
|
function changedMap(eim, chr, mapid) {
|
|
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
|
|
}
|
|
|
|
function monsterKilled(mob, eim) {}
|
|
|
|
function allMonstersDead(eim) {}
|
|
|
|
function cancelSchedule() {}
|
|
|
|
function dispose() {}
|