Area boss G. Centipede + fixed Hak event

Added new script for area boss Giant Centipede. Fixed event Hak not
disposing players properly, which made character clients stuck until
logout.
This commit is contained in:
ronancpl
2017-04-18 23:46:59 -03:00
parent c17e4c93a3
commit 72ef73a949
11 changed files with 138 additions and 35 deletions

View File

@@ -122,6 +122,10 @@ property settings must follow these:
Alternatively, there is available the No-Damage Cap version of the MapleStory client. Just extract and use the
"localhost.exe" from the one package with the given name.
Important: should the client being refused to connect to the game server, it may be because firewall issues. Head to
the end of this file to proceed to enabling this connection with the computer's firewall. Alternatively, one can
deactivate the firewall and try opening the client again.
---- Important note about CLIENT EDITING ----
DO NOT USE the server's XMLs for reimporting into the client's WZ, it WILL generate some kind of bugs afterwards.
@@ -153,3 +157,30 @@ it's node contents, importing the XML causes no harm at all. However, try not to
as it may cause data losses. Use the HaRepacker's UI instead to make the changes.
Save the changes and overwrite the older WZ on the MapleStory client folder.
---- Portforwarding the SERVER ----
To use portforward, you will need to have permission to change things on the LAN router. Access yor router using the
Internet browser. URLs vary accordingly with the manufacturer. To discover it, open the command prompt and type
"ipconfig" and search for the "default gateway" field. The IP shown there is the URL needed to access the router.
Also, look for the IP given to your machine (aka "IPv4 address" field), which will be the server one.
The default login/password also varies, so use the link http://www.routerpasswords.com/ as reference. Usually, login
as "admin" and password as "password" completes the task well.
Now you have logged in the router system, find for anything related to portforwarding. Should the system prompts you
between portforwarding and portriggering, pick the first, it is what we will be using.
Now, it is needed to enable the right ports for the Internet. For MapleSolaxia, it is basically needed to open ports
7575 to 7575 + (number of channels) and port 8484. Create a new custom service which enables that range of ports for
the server's channel and opt to use TCP/UDP protocols. Finally, create a custom service now for using port 8484.
Optionally, if you want to host a webpage, portforward the port 80 (the HTTP port) as well.
It is not done yet, sometimes the firewalls will block connections between the LAN and the Internet. To overcome this,
it is needed to create some rules for the firewall to permit these connections. Search for the advanced options with
firewalls on your computer and, with it open, create two rules (one outbound and one inbound).
These rules must target "one application", "enable connections" and must target your MapleStory client (aka localhost).
After all these steps, the portforwarding process should now be complete.

View File

@@ -155,3 +155,8 @@ Implementa
17 Abril 2017,
Correção de bugs envolvendo reactors no PiratePQ, e potencialmente em outros pontos também.
18 Abril 2017,
Adição de area boss: giant centipede.
Correção do evento Hak: viajantes não estavam sendo devidamente liberados no fim do evento.
Adição de documentação para portforwarding do sistema.

View File

@@ -3,21 +3,16 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/C:/Nexon/MapleSolaxia/src/scripting/reactor/ReactorActionManager.java</file>
<file>file:/C:/Nexon/MapleSolaxia/scripts/reactor/2519003.js</file>
<file>file:/C:/Nexon/MapleSolaxia/src/tools/data/output/GenericLittleEndianWriter.java</file>
<file>file:/C:/Nexon/MapleSolaxia/scripts/reactor/2519002.js</file>
<file>file:/C:/Nexon/MapleSolaxia/scripts/reactor/2519001.js</file>
<file>file:/C:/Nexon/MapleSolaxia/src/server/maps/MapleMapFactory.java</file>
<file>file:/C:/Nexon/MapleSolaxia/src/client/command/Commands.java</file>
<file>file:/C:/Nexon/MapleSolaxia/src/scripting/event/EventManager.java</file>
<file>file:/C:/Nexon/MapleSolaxia/src/net/server/channel/Channel.java</file>
<file>file:/C:/Nexon/MapleSolaxia/scripts/npc/world0/2090005.js</file>
<file>file:/C:/Nexon/MapleSolaxia/scripts/event/Hak.js</file>
<file>file:/C:/Nexon/MapleSolaxia/src/net/server/PlayerStorage.java</file>
<file>file:/C:/Nexon/MapleSolaxia/scripts/event/PiratePQ.js</file>
<file>file:/C:/Nexon/MapleSolaxia/src/client/MapleCharacter.java</file>
<file>file:/C:/Nexon/MapleSolaxia/src/tools/MaplePacketCreator.java</file>
<file>file:/C:/Nexon/MapleSolaxia/scripts/reactor/2519000.js</file>
<file>file:/C:/Nexon/MapleSolaxia/src/server/life/SpawnPoint.java</file>
<file>file:/C:/Nexon/MapleSolaxia/src/server/maps/MapleReactorStats.java</file>
<file>file:/C:/Nexon/MapleSolaxia/src/scripting/reactor/ReactorScriptManager.java</file>
<file>file:/C:/Nexon/MapleSolaxia/src/constants/ServerConstants.java</file>
<file>file:/C:/Nexon/MapleSolaxia/src/server/maps/MapleReactor.java</file>
<file>file:/C:/Nexon/MapleSolaxia/src/client/command/Commands.java</file>
<file>file:/C:/Nexon/MapleSolaxia/src/scripting/event/EventInstanceManager.java</file>
<file>file:/C:/Nexon/MapleSolaxia/scripts/event/Boats.js</file>
<file>file:/C:/Nexon/MapleSolaxia/src/server/maps/MapleMap.java</file>
</group>
</open-files>

View File

@@ -0,0 +1,54 @@
/*
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 --------------------------------------------------------------------------------
Deo Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (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 herbGarden = em.getChannelServer().getMapFactory().getMap(251010102);
var gcent = Packages.server.life.MapleLifeFactory.getMonster(5220004);
if(herbGarden.getMonsterById(5220004) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
herbGarden.spawnMonsterOnGroundBelow(gcent, new Packages.java.awt.Point(560, 50));
herbGarden.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "From the mists surrounding the herb garden, the gargantuous Giant Centipede appears."));
em.schedule("start", 3 * 60 *60 * 1000);
}

View File

@@ -5,12 +5,13 @@ var rideTo = new Array(250000100, 200000141);
var birdRide = new Array(200090300, 200090310);
var myRide;
var returnMap;
var exitMap;
var map;
var docked;
var timeOnRide = 60; //Seconds
var onRide;
function init() {
}
function setup() {
@@ -24,7 +25,7 @@ function playerEntry(eim, player) {
} else {
myRide = 1;
}
docked = eim.getEm().getChannelServer().getMapFactory().getMap(rideTo[myRide]);
exitMap = eim.getEm().getChannelServer().getMapFactory().getMap(rideTo[myRide]);
returnMap = eim.getMapFactory().getMap(returnTo[myRide]);
onRide = eim.getMapFactory().getMap(birdRide[myRide]);
player.changeMap(onRide, onRide.getPortal(0));
@@ -32,19 +33,27 @@ function playerEntry(eim, player) {
eim.schedule("timeOut", timeOnRide * 1000);
}
function timeOut() {
onRide.warpEveryone(docked.getId());
function timeOut(eim) {
end(eim);
}
function playerExit(eim, player, success) {
eim.unregisterPlayer(player);
player.changeMap(success ? exitMap.getId() : returnMap.getId(), 0);
}
function end(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i), true);
}
eim.dispose();
}
function playerDisconnected(eim, player) {
return 0;
playerExit(eim, player, false);
}
function cancelSchedule() {}
function dispose() {
em.cancelSchedule();
}
function dispose(eim) {}

View File

@@ -61,7 +61,7 @@ function action(mode, type, selection) {
selectedType = selection;
var selStr;
if (selectedType == 0){ //Make a medicine
itemSet = new Array(2022145,2022146,2022147,2022148,2022149,2022150,2022178,4031554);
itemSet = new Array(2022145,2022146,2022147,2022148,2022149,2022150,2050004,4031554);
matSet = new Array(2022116,2022116,new Array(4000281,4000293),new Array(4000276,2002005),new Array(4000288,4000292),4000295,new Array(2022131,2022132),new Array(4000286,4000287,4000293));
matQtySet = new Array(3,3,new Array(10,10),new Array(20,1),new Array(20,20),10,new Array(1,1),new Array(20,20,20));
matQtyMeso = new Array(0,0,910,950,1940,600,700,1000);

View File

@@ -22,7 +22,7 @@
var status = 0;
var minLevel = 55;
var maxLevel = 100;
var minPlayers = 0;
var minPlayers = 2;
var maxPlayers = 6;
function start() {
@@ -84,7 +84,7 @@ function action(mode, type, selection) {
cm.dispose();
}
else {
cm.sendOk("Your party is not a party of six. Make sure all your members are present and qualified to participate in this quest. I see #b" + levelValid.toString() + " #kmembers are in the right level range, and #b" + inMap.toString() + "#k are in my map. If this seems wrong, #blog out and log back in,#k or reform the party.");
cm.sendOk("Your party is not a party of two to six members. Make sure all your members are present and qualified to participate in this quest. I see #b" + levelValid.toString() + " #kmembers are in the right level range, and #b" + inMap.toString() + "#k are in my map. If this seems wrong, #blog out and log back in,#k or reform the party.");
cm.dispose();
}
}

View File

@@ -18793,7 +18793,8 @@
(9300105, 4031551, 1, 1, 3829, 40000),
(9300106, 4031551, 1, 1, 3829, 40000),
(9300107, 4031551, 1, 1, 3829, 40000),
(9300119, 4031551, 1, 1, 3829, 40000);
(9300119, 4031551, 1, 1, 3829, 40000),
(9300119, 0, 801, 1199, 0, 400000);
# (dropperid, itemid, minqty, maxqty, questid, chance)

View File

@@ -1184,6 +1184,9 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
}, 10000);
}
}
else {
FilePrinter.printError(FilePrinter.MAPLE_MAP, "Character " + this.getName() + " got stuck when moving to map " + map.getId() + ".");
}
//alas, new map has been specified when a warping was being processed...
if(newWarpMap != -1) {

View File

@@ -643,6 +643,11 @@ public class Commands {
player.dropMessage("Current map position: (" + player.getPosition().getX() + ", " + player.getPosition().getY() + ").");
break;
}
case "mapcount":
if(ServerConstants.USE_DEBUG) {
player.dropMessage("Current map count: (" + player.getMap().getAllPlayers().size() + ").");
break;
}
default:
if (player.gmLevel() == 0) {

View File

@@ -98,7 +98,7 @@ public class PlayerStorage {
}
}
public int getSize(){
public int getSize() {
rlock.lock();
try {
return storage.size();