Added pet flags recognition, such as the "pet speed same as owner" mechanic. Fixed repeatable quest "Remnants of HT..." not rewarding Dragon Stones. Refactored character object's check slots method, now using the same algorithm from the API class. Fixed a vunerability from before reviving/respawning players to towns, on where players would get their HP restored in area map before sending them back to safety. Fixed some NPC gates in Mushking Empire, allowing players to access bosses free of quest requirements. Improved dialog of NPCs for "permission to attempt Zakum expeds". Implemented (or rather improved) item scripts, now using NPC conversation methods as it was intended originally. Rehauled mob-skill "summon mobs" limit, now using the placeholders found in the wz to determine limit of concurrent underlings spawned, and "limit" now refers to total of underlings spawned from a mob. Revised IoSession closing mechanics in several login classes. Implemented automated loggedin account shutdown if another player has gained a pass from the DB to login. Improved the server-side check for teleport rocks. Fixed removeAfter from mobs being procced after they were disposed. Reviewed EIM start references on several scripts, minding the latest EIM setup implementations. Fixed equipments that were reused Scissors of Karma not not being able to sell on pshops/merchants. Fixed a bug where entering alliances would lead a player to see information from other guilds of past alliances until an update takes place. Padronized a few skillbook names. Reviewed player puppets not gaining priority properly on the recent aggro system. Improved "item sold" message of merchants, now displaying also quantity left of an item on store. Fixed a bug with itemid limits of weapons on server.
136 lines
3.4 KiB
JavaScript
136 lines
3.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 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/>.
|
|
*/
|
|
|
|
importPackage(Packages.tools);
|
|
|
|
var exitMap;
|
|
var entryMap;
|
|
var otherMap;
|
|
var minPlayers = 1;
|
|
var fightTime = 30;
|
|
var timer = 1000 * 60 * fightTime;
|
|
|
|
function init() {
|
|
exitMap = em.getChannelServer().getMapFactory().getMap(103040400);
|
|
entryMap = em.getChannelServer().getMapFactory().getMap(103040440);
|
|
otherMap = em.getChannelServer().getMapFactory().getMap(103040450);
|
|
}
|
|
|
|
function setup(level, lobbyid) {
|
|
var eim = em.newInstance("RockSpiritVIP_" + lobbyid);
|
|
eim.setProperty("level", level);
|
|
eim.setProperty("boss", "0");
|
|
|
|
respawn(eim);
|
|
eim.startEventTimer(timer);
|
|
return eim;
|
|
}
|
|
|
|
function afterSetup(eim) {}
|
|
|
|
function respawn(eim) {
|
|
var map = eim.getMapInstance(entryMap.getId());
|
|
var map2 = eim.getMapInstance(otherMap.getId());
|
|
map.allowSummonState(true);
|
|
map2.allowSummonState(true);
|
|
map.instanceMapRespawn();
|
|
map2.instanceMapRespawn();
|
|
eim.schedule("respawn", 10000);
|
|
}
|
|
|
|
|
|
function playerEntry(eim, player) {
|
|
var amplifierMap = eim.getMapInstance(entryMap.getId());
|
|
player.changeMap(amplifierMap);
|
|
eim.schedule("timeOut", timer);
|
|
}
|
|
|
|
function playerRevive(eim, player) {
|
|
player.respawn(eim, exitMap);
|
|
return false;
|
|
}
|
|
|
|
function playerDead(eim, player) {}
|
|
|
|
function playerDisconnected(eim, player) {
|
|
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
|
eim.unregisterPlayer(player);
|
|
end(eim);
|
|
}
|
|
else
|
|
eim.unregisterPlayer(player);
|
|
}
|
|
|
|
function changedMap(eim, player, mapid) {
|
|
if(mapid == exitMap.getId()) {
|
|
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
|
eim.unregisterPlayer(player);
|
|
end(eim);
|
|
}
|
|
else
|
|
eim.unregisterPlayer(player);
|
|
}
|
|
}
|
|
|
|
function monsterValue(eim,mobId) {
|
|
return -1;
|
|
}
|
|
|
|
function end(eim) {
|
|
var party = eim.getPlayers();
|
|
for (var i = 0; i < party.size(); i++) {
|
|
playerExit(eim, party.get(i));
|
|
}
|
|
eim.dispose();
|
|
}
|
|
|
|
function leftParty(eim, player) {}
|
|
|
|
function disbandParty(eim) {}
|
|
|
|
function playerUnregistered(eim, player) {}
|
|
|
|
function playerExit(eim, player) {
|
|
eim.unregisterPlayer(player);
|
|
player.changeMap(exitMap, exitMap.getPortal(0));
|
|
}
|
|
|
|
function cancelSchedule() {}
|
|
|
|
function dispose() {}
|
|
|
|
function clearPQ(eim) {}
|
|
|
|
function monsterKilled(mob, eim) {}
|
|
|
|
function allMonstersDead(eim) {}
|
|
|
|
function timeOut(eim) {
|
|
end(eim);
|
|
}
|
|
|
|
// ---------- FILLER FUNCTIONS ----------
|
|
|
|
function scheduledTimeout(eim) {}
|
|
|
|
function changedLeader(eim, leader) {}
|
|
|