Files
sweetgum-server/scripts/event/3rdJob_mount.js
ronancpl 2b44b4baa2 Code Coupons + Worldmap update + Mini-games + Player Interaction wrap
Fixed several cases on the Cash Shop that would freeze some player actions when triggered, requiring exit Cash Shop to unstuck.
Implemented Code Coupons, supporting several items bundled on the same code, and also devised a way to automate code generation.
Added a current status on-demand option on the Buyback command. Info such as "current fee" or "time remaining" are available now.
Reviewed several cases where non-owned items would get stacked with owner-tagged items.
Added Door support for Happyville, Crimsonwood Keep.
Added worldmap tooltip support for some maps in Masteria's C. Keep and H. House.
Added Masteria region to the world map.
C. Keep interiors no longer relocates players to entrance after actions such as logout.
Overhauled minigame mechanics: from player boxes tooltip and in-match improvements to deploy different minigame types, accordingly with item description or player choice.
Fixed Amoria outskirts not relocating players to city after getting KO'ed.
Fixed issues with pets, rings and cash items being assigned the same cash unique ids leading to some quirks on the cash shop inventory.
Fixed an issue with the recently added HP/MP ratio update, arbitrarily taking off 1 point in certain cases.
Answer positions on the explorer's 3rd job quiz are now randomed.
Fixed several issues that showed up when the bcrypt system is disabled.
DOT from maps such as El Nath and Aqua Road now procs at a 5sec interval, GMS-like.
Improved performance of Whodrops and Search commands.
Concurrently protected player interaction handlers, thus mitigating several exploits on these lines.
Adjusted several expedition timers, such as Horntail, now having a more sane deadline.
Concurrently protected chair modules.
Fixed "seduce" debuff not working on chairs.
2018-10-09 22:39:36 -03:00

126 lines
3.1 KiB
JavaScript

/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
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 - Kenta's Mount Quest
**/
importPackage(Packages.tools);
var entryMap = 923010000;
var exitMap = 923010100;
var minMapId = 923010000;
var maxMapId = 923010000;
var eventMaps = [923010000];
var eventTime = 5; //5 minutes
var lobbyRange = [0, 0];
function setLobbyRange() {
return lobbyRange;
}
function init() {
em.setProperty("noEntry","false");
}
function respawnStages(eim) {
var i;
for (i = 0; i < eventMaps.length; i++) {
eim.getInstanceMap(eventMaps[i]).instanceMapRespawn();
}
eim.schedule("respawnStages", 10 * 1000);
}
function playerEntry(eim, player) {
var mapObj = eim.getInstanceMap(entryMap);
mapObj.resetPQ(1);
mapObj.instanceMapForceRespawn();
respawnStages(eim);
player.changeMap(entryMap, 0);
em.setProperty("noEntry","true");
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
eim.startEventTimer(eventTime * 60000);
}
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
var api = player.getClient().getAbstractPlayerInteraction();
api.removeAll(4031507);
api.removeAll(4031508);
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
}
function scheduledTimeout(eim) {
var player = eim.getPlayers().get(0);
playerExit(eim, player);
player.changeMap(exitMap);
}
function playerDisconnected(eim, player) {
playerExit(eim, player);
}
function changedMap(eim, chr, mapid) {
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
var player = eim.getPlayers().get(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
eim.dispose();
em.setProperty("noEntry","false");
}
function monsterKilled(mob, eim) {}
function monsterValue(eim, mobId) {
return 1;
}
function friendlyKilled(mob, eim) {
if(em.getProperty("noEntry") != "false") {
var player = eim.getPlayers().get(0);
playerExit(eim, player);
player.changeMap(exitMap);
}
}
function allMonstersDead(eim) {}
function cancelSchedule() {}
function dispose() {}