diff --git a/README.txt b/README.txt
index 9ae27a48de..caed4a1a1b 100644
--- a/README.txt
+++ b/README.txt
@@ -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.
@@ -152,4 +156,31 @@ Take note that this is absolutely dangerous if done unwary. Once the MonsterBook
it's node contents, importing the XML causes no harm at all. However, try not to remove/reimport nodes from WZ files,
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.
\ No newline at end of file
+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.
\ No newline at end of file
diff --git a/mychanges_ptbr.txt b/mychanges_ptbr.txt
index 8e87b39dc0..cf707e70f8 100644
--- a/mychanges_ptbr.txt
+++ b/mychanges_ptbr.txt
@@ -154,4 +154,9 @@ Adi
Implementação do PiratePQ.
17 Abril 2017,
-Correção de bugs envolvendo reactors no PiratePQ, e potencialmente em outros pontos também.
\ No newline at end of file
+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.
\ No newline at end of file
diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml
index bf7c8c57d6..a8d24b8d6e 100644
--- a/nbproject/private/private.xml
+++ b/nbproject/private/private.xml
@@ -3,21 +3,16 @@
- file:/C:/Nexon/MapleSolaxia/src/scripting/reactor/ReactorActionManager.java
- file:/C:/Nexon/MapleSolaxia/scripts/reactor/2519003.js
- file:/C:/Nexon/MapleSolaxia/src/tools/data/output/GenericLittleEndianWriter.java
- file:/C:/Nexon/MapleSolaxia/scripts/reactor/2519002.js
- file:/C:/Nexon/MapleSolaxia/scripts/reactor/2519001.js
- file:/C:/Nexon/MapleSolaxia/src/server/maps/MapleMapFactory.java
- file:/C:/Nexon/MapleSolaxia/src/client/command/Commands.java
+ file:/C:/Nexon/MapleSolaxia/src/scripting/event/EventManager.java
+ file:/C:/Nexon/MapleSolaxia/src/net/server/channel/Channel.java
+ file:/C:/Nexon/MapleSolaxia/scripts/npc/world0/2090005.js
+ file:/C:/Nexon/MapleSolaxia/scripts/event/Hak.js
+ file:/C:/Nexon/MapleSolaxia/src/net/server/PlayerStorage.java
+ file:/C:/Nexon/MapleSolaxia/scripts/event/PiratePQ.js
file:/C:/Nexon/MapleSolaxia/src/client/MapleCharacter.java
- file:/C:/Nexon/MapleSolaxia/src/tools/MaplePacketCreator.java
- file:/C:/Nexon/MapleSolaxia/scripts/reactor/2519000.js
- file:/C:/Nexon/MapleSolaxia/src/server/life/SpawnPoint.java
- file:/C:/Nexon/MapleSolaxia/src/server/maps/MapleReactorStats.java
- file:/C:/Nexon/MapleSolaxia/src/scripting/reactor/ReactorScriptManager.java
- file:/C:/Nexon/MapleSolaxia/src/constants/ServerConstants.java
- file:/C:/Nexon/MapleSolaxia/src/server/maps/MapleReactor.java
+ file:/C:/Nexon/MapleSolaxia/src/client/command/Commands.java
+ file:/C:/Nexon/MapleSolaxia/src/scripting/event/EventInstanceManager.java
+ file:/C:/Nexon/MapleSolaxia/scripts/event/Boats.js
file:/C:/Nexon/MapleSolaxia/src/server/maps/MapleMap.java
diff --git a/scripts/event/AreaBossCentipede.js b/scripts/event/AreaBossCentipede.js
new file mode 100644
index 0000000000..087077cb89
--- /dev/null
+++ b/scripts/event/AreaBossCentipede.js
@@ -0,0 +1,54 @@
+/*
+ This file is part of the OdinMS Maple Story Server
+ Copyright (C) 2008 Patrick Huy
+ Matthias Butz
+ Jan Christian Meyer
+
+ 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 .
+*/
+/**
+-- 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);
+}
\ No newline at end of file
diff --git a/scripts/event/Hak.js b/scripts/event/Hak.js
index b0a792c654..bbb1d24f36 100644
--- a/scripts/event/Hak.js
+++ b/scripts/event/Hak.js
@@ -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,27 +25,35 @@ function playerEntry(eim, player) {
} else {
myRide = 1;
}
- docked = 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));
- player.getClient().getSession().write(MaplePacketCreator.getClock(timeOnRide));
- eim.schedule("timeOut", timeOnRide * 1000);
+ 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));
+ player.getClient().getSession().write(MaplePacketCreator.getClock(timeOnRide));
+ 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();
-}
\ No newline at end of file
+function dispose(eim) {}
\ No newline at end of file
diff --git a/scripts/npc/world0/2090004.js b/scripts/npc/world0/2090004.js
index 22be799b23..6759de5de9 100644
--- a/scripts/npc/world0/2090004.js
+++ b/scripts/npc/world0/2090004.js
@@ -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);
diff --git a/scripts/npc/world0/2094000.js b/scripts/npc/world0/2094000.js
index ecaf90c500..122f665534 100644
--- a/scripts/npc/world0/2094000.js
+++ b/scripts/npc/world0/2094000.js
@@ -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();
}
}
diff --git a/sql/db_drops.sql b/sql/db_drops.sql
index 3ff5494f9f..11d71bffdc 100644
--- a/sql/db_drops.sql
+++ b/sql/db_drops.sql
@@ -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)
diff --git a/src/client/MapleCharacter.java b/src/client/MapleCharacter.java
index eab8041c30..4a4549f736 100644
--- a/src/client/MapleCharacter.java
+++ b/src/client/MapleCharacter.java
@@ -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) {
diff --git a/src/client/command/Commands.java b/src/client/command/Commands.java
index 4c075230b9..fa83c536de 100644
--- a/src/client/command/Commands.java
+++ b/src/client/command/Commands.java
@@ -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) {
diff --git a/src/net/server/PlayerStorage.java b/src/net/server/PlayerStorage.java
index 907d6d2b1e..d760327708 100644
--- a/src/net/server/PlayerStorage.java
+++ b/src/net/server/PlayerStorage.java
@@ -98,7 +98,7 @@ public class PlayerStorage {
}
}
- public int getSize(){
+ public int getSize() {
rlock.lock();
try {
return storage.size();