diff --git a/build/built-jar.properties b/build/built-jar.properties
index 80ce4c53a0..5dc1e98207 100644
--- a/build/built-jar.properties
+++ b/build/built-jar.properties
@@ -1,4 +1,4 @@
-#Sat, 10 Jun 2017 23:52:41 -0300
+#Sun, 11 Jun 2017 10:57:26 -0300
C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2=
diff --git a/build/classes/client/MapleCharacter$1.class b/build/classes/client/MapleCharacter$1.class
index e4bf2b4550..453570547d 100644
Binary files a/build/classes/client/MapleCharacter$1.class and b/build/classes/client/MapleCharacter$1.class differ
diff --git a/build/classes/client/MapleCharacter$10.class b/build/classes/client/MapleCharacter$10.class
index 5f0ce40e27..98746842a6 100644
Binary files a/build/classes/client/MapleCharacter$10.class and b/build/classes/client/MapleCharacter$10.class differ
diff --git a/build/classes/client/MapleCharacter$11.class b/build/classes/client/MapleCharacter$11.class
index 7fd3b0df0b..f9aa6c0cfe 100644
Binary files a/build/classes/client/MapleCharacter$11.class and b/build/classes/client/MapleCharacter$11.class differ
diff --git a/build/classes/client/MapleCharacter$12.class b/build/classes/client/MapleCharacter$12.class
index ff52803678..9ae33780d7 100644
Binary files a/build/classes/client/MapleCharacter$12.class and b/build/classes/client/MapleCharacter$12.class differ
diff --git a/build/classes/client/MapleCharacter$13.class b/build/classes/client/MapleCharacter$13.class
index 929057fc15..bde7bd413a 100644
Binary files a/build/classes/client/MapleCharacter$13.class and b/build/classes/client/MapleCharacter$13.class differ
diff --git a/build/classes/client/MapleCharacter$14.class b/build/classes/client/MapleCharacter$14.class
index 528a878bb6..50f0ee568b 100644
Binary files a/build/classes/client/MapleCharacter$14.class and b/build/classes/client/MapleCharacter$14.class differ
diff --git a/build/classes/client/MapleCharacter$15.class b/build/classes/client/MapleCharacter$15.class
index 3b8820a150..fdfa3e4a56 100644
Binary files a/build/classes/client/MapleCharacter$15.class and b/build/classes/client/MapleCharacter$15.class differ
diff --git a/build/classes/client/MapleCharacter$16.class b/build/classes/client/MapleCharacter$16.class
index 332837dac9..786f72a22e 100644
Binary files a/build/classes/client/MapleCharacter$16.class and b/build/classes/client/MapleCharacter$16.class differ
diff --git a/build/classes/client/MapleCharacter$17.class b/build/classes/client/MapleCharacter$17.class
index b729093d33..817a5bd7d9 100644
Binary files a/build/classes/client/MapleCharacter$17.class and b/build/classes/client/MapleCharacter$17.class differ
diff --git a/build/classes/client/MapleCharacter$18.class b/build/classes/client/MapleCharacter$18.class
index 33992be8ca..1c874a4885 100644
Binary files a/build/classes/client/MapleCharacter$18.class and b/build/classes/client/MapleCharacter$18.class differ
diff --git a/build/classes/client/MapleCharacter$2.class b/build/classes/client/MapleCharacter$2.class
index c22f057807..3a69b7c1a8 100644
Binary files a/build/classes/client/MapleCharacter$2.class and b/build/classes/client/MapleCharacter$2.class differ
diff --git a/build/classes/client/MapleCharacter$3.class b/build/classes/client/MapleCharacter$3.class
index 1ce930e54f..a96000beca 100644
Binary files a/build/classes/client/MapleCharacter$3.class and b/build/classes/client/MapleCharacter$3.class differ
diff --git a/build/classes/client/MapleCharacter$4.class b/build/classes/client/MapleCharacter$4.class
index 71dee6a07a..a6f160f42d 100644
Binary files a/build/classes/client/MapleCharacter$4.class and b/build/classes/client/MapleCharacter$4.class differ
diff --git a/build/classes/client/MapleCharacter$5.class b/build/classes/client/MapleCharacter$5.class
index b4335bf396..048794eaf3 100644
Binary files a/build/classes/client/MapleCharacter$5.class and b/build/classes/client/MapleCharacter$5.class differ
diff --git a/build/classes/client/MapleCharacter$6.class b/build/classes/client/MapleCharacter$6.class
index b0abe9ad97..3264c802e8 100644
Binary files a/build/classes/client/MapleCharacter$6.class and b/build/classes/client/MapleCharacter$6.class differ
diff --git a/build/classes/client/MapleCharacter$7.class b/build/classes/client/MapleCharacter$7.class
index b9fcbc8260..41710b5734 100644
Binary files a/build/classes/client/MapleCharacter$7.class and b/build/classes/client/MapleCharacter$7.class differ
diff --git a/build/classes/client/MapleCharacter$8.class b/build/classes/client/MapleCharacter$8.class
index a0c8e524bb..3c53eda8b1 100644
Binary files a/build/classes/client/MapleCharacter$8.class and b/build/classes/client/MapleCharacter$8.class differ
diff --git a/build/classes/client/MapleCharacter$9.class b/build/classes/client/MapleCharacter$9.class
index d53c17dda8..1f3ced3200 100644
Binary files a/build/classes/client/MapleCharacter$9.class and b/build/classes/client/MapleCharacter$9.class differ
diff --git a/build/classes/client/MapleCharacter$FameStatus.class b/build/classes/client/MapleCharacter$FameStatus.class
index bcecb9a9b7..65755cb3dc 100644
Binary files a/build/classes/client/MapleCharacter$FameStatus.class and b/build/classes/client/MapleCharacter$FameStatus.class differ
diff --git a/build/classes/client/MapleCharacter$MapleBuffStatValueHolder.class b/build/classes/client/MapleCharacter$MapleBuffStatValueHolder.class
index 32023e20f8..71ac2054c5 100644
Binary files a/build/classes/client/MapleCharacter$MapleBuffStatValueHolder.class and b/build/classes/client/MapleCharacter$MapleBuffStatValueHolder.class differ
diff --git a/build/classes/client/MapleCharacter$MapleCoolDownValueHolder.class b/build/classes/client/MapleCharacter$MapleCoolDownValueHolder.class
index e22e6a87f1..2685700530 100644
Binary files a/build/classes/client/MapleCharacter$MapleCoolDownValueHolder.class and b/build/classes/client/MapleCharacter$MapleCoolDownValueHolder.class differ
diff --git a/build/classes/client/MapleCharacter$SkillEntry.class b/build/classes/client/MapleCharacter$SkillEntry.class
index 6719195663..121ed4546f 100644
Binary files a/build/classes/client/MapleCharacter$SkillEntry.class and b/build/classes/client/MapleCharacter$SkillEntry.class differ
diff --git a/build/classes/client/MapleCharacter.class b/build/classes/client/MapleCharacter.class
index 7d7e200152..2e6e076ea5 100644
Binary files a/build/classes/client/MapleCharacter.class and b/build/classes/client/MapleCharacter.class differ
diff --git a/build/classes/scripting/event/EventInstanceManager$3.class b/build/classes/scripting/event/EventInstanceManager$3.class
index c3f99bea73..13a9ea440b 100644
Binary files a/build/classes/scripting/event/EventInstanceManager$3.class and b/build/classes/scripting/event/EventInstanceManager$3.class differ
diff --git a/build/classes/scripting/event/EventInstanceManager.class b/build/classes/scripting/event/EventInstanceManager.class
index d8348a07f1..956b7b3376 100644
Binary files a/build/classes/scripting/event/EventInstanceManager.class and b/build/classes/scripting/event/EventInstanceManager.class differ
diff --git a/build/classes/server/MapleStatEffect.class b/build/classes/server/MapleStatEffect.class
index 0bfbc621fb..c63a0e0565 100644
Binary files a/build/classes/server/MapleStatEffect.class and b/build/classes/server/MapleStatEffect.class differ
diff --git a/dist/MapleSolaxia.jar b/dist/MapleSolaxia.jar
index d5d15ea421..058b9e37c3 100644
Binary files a/dist/MapleSolaxia.jar and b/dist/MapleSolaxia.jar differ
diff --git a/feature_list.txt b/feature_list.txt
index a6dab82f79..40eb5f935b 100644
--- a/feature_list.txt
+++ b/feature_list.txt
@@ -8,7 +8,7 @@ Working features:
---------------------------
PQs/Quests:
-* HPQ/KPQ/LPQ/LMPQ/EllinPQ/PiratePQ 100%
+* HPQ/KPQ/LPQ/LMPQ/OPQ/EllinPQ/PiratePQ 100%
* BalrogPQ semi-functional
* Brand-new PQ: Boss Rush PQ 100%
* Doll house quest 100%
diff --git a/mychanges_ptbr.txt b/mychanges_ptbr.txt
index 4a9ce0f5a9..666f830175 100644
--- a/mychanges_ptbr.txt
+++ b/mychanges_ptbr.txt
@@ -302,4 +302,8 @@ Corrigidos exploits relacionados a algumas das skills do empowerme.
Corrigido possivel loop infinito no sistema de EXP.
07 - 10 Junho 2016,
-Implementação da OPQ.
\ No newline at end of file
+Implementação da OPQ.
+
+11 Junho 2016,
+Correção de alguns bugs vindos com o commit da OPQ.
+Incrementada a documentação referente aos métodos usados nos scripts de eventos.
\ No newline at end of file
diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml
index 9911a7db4b..d46f8d4da1 100644
--- a/nbproject/private/private.xml
+++ b/nbproject/private/private.xml
@@ -12,31 +12,10 @@
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/portal/party3_room8.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/portal/party3_jailin.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2013001.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/command/Commands.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/2001002.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/2002017.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/AreaBossDyle.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/AbstractPlayerInteraction.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/2006001.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/2002014.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2040044.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2013002.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/1012005.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2040045.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/portal/party3_gardenin.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/tools/MaplePacketCreator.java
file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/OrbisPQ.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/2001016.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/LudiPQ.js
+ file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/0_EXAMPLE.js
file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/BossRushPQ.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/event/EventInstanceManager.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2013000.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleMap.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleCharacter.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/PiratePQ.js
+ file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/event/EventManager.java
diff --git a/scripts/event/0_EXAMPLE.js b/scripts/event/0_EXAMPLE.js
index 5d8de9a5d4..a6643b47b3 100644
--- a/scripts/event/0_EXAMPLE.js
+++ b/scripts/event/0_EXAMPLE.js
@@ -1,17 +1,73 @@
+// Event-instantiation variables
+var isPq = true;
+var minPlayers, maxPlayers; // Range of party members for this event instance.
+var minLevel, maxLevel; // Level range of eligible team members for this event instance.
+var entryMap; // Initial map, where players all moved into at the event startup.
+var exitMap; // Upon failing to complete the event, players may be moved to this map.
+var recruitMap; // Map where players must be before staring this event.
+var clearMap; // Upon event clearing, players may be moved to this map.
+
+var minMapId; // Event takes place inside these map id interval. Players found out is instantly dropped from the event.
+var maxMapId;
+
+var eventTime; // Max time alloted for the event, in minutes.
+
+var lobbyRange = [0, 0]; // Range of concurrent lobbies (min range is 0, max range is 7).
+
function init() {
// After loading, ChannelServer
}
+function setLobbyRange() {
+ return lobbyRange;
+}
+
+function setEventRequirements() {
+ // sets requirement info about the event to be displayed at the recruitment area.
+}
+
+function setEventExclusives(eim) {
+ // sets all items that should exist only for the event instance, and that should be removed from inventory at the end of the run.
+}
+
+function setEventRewards(eim) {
+ // sets all possible treasures that can be given, randomly, to a player at the end of the event.
+}
+
+function getEligibleParty(party) {
+ // selects, from the given party, the team that is allowed to attempt this event
+}
+
function setup(eim, leaderid) {
// Setup the instance when invoked, EG : start PQ
}
+function afterSetup(eim) {
+ // Happens after the event instance is initialized and all players have been assigned for the event instance, but before entrying players.
+}
+
+function respawnStages(eim) {
+ // Defines which maps inside the event are allowed to respawn. This function should create a new task at the end of it's body calling itself at a given respawn rate.
+}
+
function playerEntry(eim, player) {
// Warp player in etc..
}
+function playerUnregistered(eim, player) {
+ // Do something with the player that is about to unregister right before unregistering he/she.
+}
+
+function playerExit(eim, player) {
+ // Do something with the player right before disbanding the event instance.
+}
+
function changedMap(eim, player, mapid) {
- // What to do when player've changed map, based on the mapid
+ // What to do when player've changed map, based on the mapid.
+}
+
+function changedLeader(eim, leader) {
+ // Do something if the party leader has been changed.
}
function scheduledTimeout(eim) {
@@ -57,6 +113,18 @@ function monsterValue(eim, mobid) {
// return x amount for this player - "Saved Points"
}
+function end(eim) {
+ // Happens when the party fails to complete the event instance.
+}
+
+function giveRandomEventReward(eim, player) {
+ // Selects randomly a reward to give from the reward pool.
+}
+
+function clearPQ(eim) {
+ // Happens when the party succeeds on completing the event instance.
+}
+
function leftParty(eim, player) {
// Happens when a player left the party
}
@@ -65,10 +133,6 @@ function disbandParty(eim, player) {
// Happens when the party is disbanded by the leader.
}
-function clearPQ(eim) {
- // Happens when the function EventInstanceManager.clearPQ() is invoked by NPC/Reactor script
-}
-
function removePlayer(eim, player) {
// Happens when the funtion NPCConversationalManager.removePlayerFromInstance() is invoked
}
@@ -82,4 +146,9 @@ function onMapLoad(eim, player) {
}
function cancelSchedule() {
+ // Finishes ongoing schedules.
+}
+
+function dispose() {
+ // Finishes the event instance.
}
\ No newline at end of file
diff --git a/scripts/event/4jberserk.js b/scripts/event/4jberserk.js
index f53862519d..b14a750398 100644
--- a/scripts/event/4jberserk.js
+++ b/scripts/event/4jberserk.js
@@ -137,6 +137,8 @@ function disbandParty(eim) {
eim.dispose();
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
diff --git a/scripts/event/4jrush.js b/scripts/event/4jrush.js
index ae337d0ab4..d01104215a 100644
--- a/scripts/event/4jrush.js
+++ b/scripts/event/4jrush.js
@@ -103,6 +103,8 @@ function disbandParty(eim) {
eim.dispose();
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
diff --git a/scripts/event/BossRushPQ.js b/scripts/event/BossRushPQ.js
index e4bd7e0075..b4c83d0cdb 100644
--- a/scripts/event/BossRushPQ.js
+++ b/scripts/event/BossRushPQ.js
@@ -122,6 +122,8 @@ function scheduledTimeout(eim) {
end(eim);
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
diff --git a/scripts/event/CWKPQ.js b/scripts/event/CWKPQ.js
index 8eb68edb2e..374f779e71 100644
--- a/scripts/event/CWKPQ.js
+++ b/scripts/event/CWKPQ.js
@@ -162,6 +162,8 @@ function monsterValue(eim, mobId) {
return 1;
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.broadcastPlayerMsg(5, "[Expedition] " + player.getName() + " has left the map.");
eim.unregisterPlayer(player);
diff --git a/scripts/event/CathedralWedding.js b/scripts/event/CathedralWedding.js
index f6c4768617..cf61b0b07c 100644
--- a/scripts/event/CathedralWedding.js
+++ b/scripts/event/CathedralWedding.js
@@ -99,6 +99,8 @@ function leftParty(eim, player) { //this doesnt fucking matter...
function disbandParty(eim) {
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
diff --git a/scripts/event/DollHouse.js b/scripts/event/DollHouse.js
index 7df693d36a..b5fb34344f 100644
--- a/scripts/event/DollHouse.js
+++ b/scripts/event/DollHouse.js
@@ -44,6 +44,8 @@ function playerEntry(eim, player) {
eim.startEventTimer(eventTime * 60000);
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
eim.dispose();
diff --git a/scripts/event/EllinPQ.js b/scripts/event/EllinPQ.js
index 46daee1c11..8add53530d 100644
--- a/scripts/event/EllinPQ.js
+++ b/scripts/event/EllinPQ.js
@@ -127,6 +127,8 @@ function scheduledTimeout(eim) {
end(eim);
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
diff --git a/scripts/event/GuildQuest.js b/scripts/event/GuildQuest.js
index f685fc4ce0..92530b9295 100644
--- a/scripts/event/GuildQuest.js
+++ b/scripts/event/GuildQuest.js
@@ -144,6 +144,8 @@ function leftParty(eim, player) { //ignore for GQ
function disbandParty(eim) { //ignore for GQ
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
diff --git a/scripts/event/Hak.js b/scripts/event/Hak.js
index 24c52a347f..e99036f018 100644
--- a/scripts/event/Hak.js
+++ b/scripts/event/Hak.js
@@ -39,6 +39,8 @@ function timeOut(eim) {
end(eim);
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player, success) {
eim.unregisterPlayer(player);
player.changeMap(success ? exitMap.getId() : returnMap.getId(), 0);
diff --git a/scripts/event/HenesysPQ.js b/scripts/event/HenesysPQ.js
index 4510d49cf0..c49068f6d3 100644
--- a/scripts/event/HenesysPQ.js
+++ b/scripts/event/HenesysPQ.js
@@ -122,6 +122,8 @@ function scheduledTimeout(eim) {
}
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
diff --git a/scripts/event/HorntailFight.js b/scripts/event/HorntailFight.js
index 4e4e48c143..bf1ceb2d04 100644
--- a/scripts/event/HorntailFight.js
+++ b/scripts/event/HorntailFight.js
@@ -95,10 +95,11 @@ function monsterValue(eim, mobId) {
return 1;
}
-function leftParty(eim,player) {
-}
-function disbandParty(eim) {
-}
+function leftParty(eim,player) {}
+
+function disbandParty(eim) {}
+
+function playerUnregistered(eim, player) {}
function playerExit(eim,player) {
eim.unregisterPlayer(player);
diff --git a/scripts/event/KerningPQ.js b/scripts/event/KerningPQ.js
index c3bba270ba..c015bd20e0 100644
--- a/scripts/event/KerningPQ.js
+++ b/scripts/event/KerningPQ.js
@@ -109,6 +109,8 @@ function scheduledTimeout(eim) {
end(eim);
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
diff --git a/scripts/event/LudiMazePQ.js b/scripts/event/LudiMazePQ.js
index 7b3b380d87..f7dce81094 100644
--- a/scripts/event/LudiMazePQ.js
+++ b/scripts/event/LudiMazePQ.js
@@ -110,6 +110,8 @@ function scheduledTimeout(eim) {
end(eim);
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
diff --git a/scripts/event/LudiPQ.js b/scripts/event/LudiPQ.js
index b01c54eaf7..eae7ce0e3a 100644
--- a/scripts/event/LudiPQ.js
+++ b/scripts/event/LudiPQ.js
@@ -146,6 +146,8 @@ function scheduledTimeout(eim) {
}
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
@@ -233,4 +235,3 @@ function allMonstersDead(eim) {}
function cancelSchedule() {}
function dispose(eim) {}
-
diff --git a/scripts/event/OrbisPQ.js b/scripts/event/OrbisPQ.js
index 2e7b9856b1..044efdeb03 100644
--- a/scripts/event/OrbisPQ.js
+++ b/scripts/event/OrbisPQ.js
@@ -93,6 +93,7 @@ function setup(level, lobbyid) {
eim.setProperty("statusStg6", -1);
eim.setProperty("statusStg7", -1);
eim.setProperty("statusStg8", -1);
+ eim.setProperty("statusStg2_c", 0);
eim.setProperty("statusStg7_c", 0);
eim.setProperty("statusStgBonus", 0);
@@ -161,6 +162,13 @@ function scheduledTimeout(eim) {
}
}
+function playerUnregistered(eim, player) {
+ player.cancelEffect(2022090);
+ player.cancelEffect(2022091);
+ player.cancelEffect(2022092);
+ player.cancelEffect(2022093);
+}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
@@ -245,4 +253,3 @@ function allMonstersDead(eim) {}
function cancelSchedule() {}
function dispose(eim) {}
-
diff --git a/scripts/event/OrbisPQ_old.js b/scripts/event/OrbisPQ_old.js
index 88451adc45..52b7c192e3 100644
--- a/scripts/event/OrbisPQ_old.js
+++ b/scripts/event/OrbisPQ_old.js
@@ -189,6 +189,8 @@ function disbandParty(eim) {
eim.dispose();
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.cancelAllBuffs(); //We don't want people going out with wonky blessing >=(
diff --git a/scripts/event/PiratePQ.js b/scripts/event/PiratePQ.js
index 4182dcfbb4..043f353638 100644
--- a/scripts/event/PiratePQ.js
+++ b/scripts/event/PiratePQ.js
@@ -183,6 +183,8 @@ function scheduledTimeout(eim) {
end(eim);
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
diff --git a/scripts/event/RockSpirit.js b/scripts/event/RockSpirit.js
index 1c32a64862..9b78e72b39 100644
--- a/scripts/event/RockSpirit.js
+++ b/scripts/event/RockSpirit.js
@@ -96,6 +96,8 @@ function leftParty(eim, player) {
function disbandParty(eim) {}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
diff --git a/scripts/event/ScargaBattle.js b/scripts/event/ScargaBattle.js
index 45e8251c61..e351695e69 100644
--- a/scripts/event/ScargaBattle.js
+++ b/scripts/event/ScargaBattle.js
@@ -92,6 +92,8 @@ function leftParty(eim,player) {
function disbandParty(eim) {
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim,player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
diff --git a/scripts/event/VIPRockSpirit.js b/scripts/event/VIPRockSpirit.js
index 400458b53a..0256bee2bc 100644
--- a/scripts/event/VIPRockSpirit.js
+++ b/scripts/event/VIPRockSpirit.js
@@ -96,6 +96,8 @@ function leftParty(eim, player) {
function disbandParty(eim) {}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
diff --git a/scripts/event/ZakumBattle.js b/scripts/event/ZakumBattle.js
index 66798beaf1..800d0e073b 100644
--- a/scripts/event/ZakumBattle.js
+++ b/scripts/event/ZakumBattle.js
@@ -108,6 +108,8 @@ function leftParty(eim,player) { // do nothing in Zakum
function disbandParty(eim) { // do nothing in Zakum
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim,player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
diff --git a/scripts/event/ZakumPQ.js b/scripts/event/ZakumPQ.js
index 2e14c3c4c4..bb66cda5ca 100644
--- a/scripts/event/ZakumPQ.js
+++ b/scripts/event/ZakumPQ.js
@@ -120,6 +120,8 @@ function disbandParty(eim) {
eim.dispose();
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
diff --git a/scripts/event/s4aWorld.js b/scripts/event/s4aWorld.js
index 7c141e8148..67693dcc23 100644
--- a/scripts/event/s4aWorld.js
+++ b/scripts/event/s4aWorld.js
@@ -68,6 +68,8 @@ function disbandParty(eim) {
em.setProperty("started", "false");
}
+function playerUnregistered(eim, player) {}
+
function playerExit(eim, player) {
eim.unregisterPlayer(player);
var map = eim.getMapFactory().getMap(105090200);
diff --git a/scripts/npc/2013001.js b/scripts/npc/2013001.js
index 40eea68279..d5e6773c80 100644
--- a/scripts/npc/2013001.js
+++ b/scripts/npc/2013001.js
@@ -269,7 +269,11 @@ function action(mode, type, selection) {
cm.sendNext("Please, find a way to defeat Papa Pixie! Once you've found the Dark Nependeath by placing seeds, you've found Papa Pixie! Defeat it, and get the Root of Life to save Minerva!!!");
break;
case 920010900:
- cm.sendNext("This is the jail of the tower. You may find some goodies here, just be sure to clear the puzzles ahead as fast as possible.");
+ if(eim.getProperty("statusStg8") == "1") {
+ cm.sendNext("This is the jail of the tower. You may find some goodies here, just be sure to clear the puzzles ahead as fast as possible.");
+ } else {
+ cm.sendNext("Down there you will not find any statue pieces. Go up the ladder to return to the center tower and search elsewhere. You can come back here to get the goodies that lies down there once you have saved Minerva.");
+ }
break;
case 920011000:
if(cm.getMap().countMonsters() > 0) {
diff --git a/scripts/npc/2013002.js b/scripts/npc/2013002.js
index 6ae2dc47ef..db0157f727 100644
--- a/scripts/npc/2013002.js
+++ b/scripts/npc/2013002.js
@@ -20,8 +20,8 @@
along with this program. If not, see .
*/
/**
- *2013002.js - Minevra the Goddess
- *@author Jvlaple
+ *2013002.js - Minerva the Goddess
+ *@author Ronan
*/
var status = 0;
diff --git a/scripts/reactor/2002003.js b/scripts/reactor/2002003.js
index 3d23911aac..adc06fb064 100644
--- a/scripts/reactor/2002003.js
+++ b/scripts/reactor/2002003.js
@@ -27,7 +27,5 @@ function act() {
rm.dropItems();
var eim = rm.getEventInstance();
- eim.giveEventPlayersExp(3500);
eim.setProperty("statusStg7", "1");
- eim.showClearEffect(true);
}
\ No newline at end of file
diff --git a/scripts/reactor/2006001.js b/scripts/reactor/2006001.js
index e572925ff0..39b485dd83 100644
--- a/scripts/reactor/2006001.js
+++ b/scripts/reactor/2006001.js
@@ -21,13 +21,16 @@
*/
/**
*2006001.js - Spawns Minerva
- *@author Jvlaple
+ *@author Ronan
*/
function act() {
rm.spawnNpc(2013002);
-
rm.getEventInstance().clearPQ();
+
rm.getEventInstance().setProperty("statusStg8", "1");
- rm.getEventInstance().startEventTimer(10 * 60000); //bonus time
+ eim.giveEventPlayersExp(3500);
+ eim.showClearEffect(true);
+
+ rm.getEventInstance().startEventTimer(5 * 60000); //bonus time
}
\ No newline at end of file
diff --git a/sql/db_drops.sql b/sql/db_drops.sql
index c843f2e88e..9a647f09aa 100644
--- a/sql/db_drops.sql
+++ b/sql/db_drops.sql
@@ -19272,24 +19272,24 @@
(2002014, 4004003, 1, -1),
(2002014, 4004000, 1, -1),
(2002014, 4004001, 1, -1),
- (2002014, 4005004, 5, -1),
- (2002014, 4005002, 5, -1),
- (2002014, 4005003, 5, -1),
- (2002014, 4005000, 5, -1),
- (2002014, 4005001, 5, -1),
+ (2002014, 4005004, 15, -1),
+ (2002014, 4005002, 15, -1),
+ (2002014, 4005003, 15, -1),
+ (2002014, 4005000, 15, -1),
+ (2002014, 4005001, 15, -1),
(2002014, 2000006, 1, -1),
- (2002014, 2000004, 2, -1),
- (2002014, 2000005, 2, -1),
- (2002014, 2020013, 5, -1),
- (2002014, 2020014, 5, -1),
- (2002014, 2020015, 5, -1),
- (2002014, 1082096, 25, -1),
- (2002014, 1082104, 25, -1),
- (2002014, 1082107, 25, -1),
- (2002014, 1082099, 25, -1),
- (2002014, 1082098, 25, -1),
- (2002014, 1082093, 25, -1),
- (2002014, 1082204, 25, -1),
+ (2002014, 2000004, 5, -1),
+ (2002014, 2000005, 5, -1),
+ (2002014, 2020013, 15, -1),
+ (2002014, 2020014, 15, -1),
+ (2002014, 2020015, 15, -1),
+ (2002014, 1082096, 35, -1),
+ (2002014, 1082104, 35, -1),
+ (2002014, 1082107, 35, -1),
+ (2002014, 1082099, 35, -1),
+ (2002014, 1082098, 35, -1),
+ (2002014, 1082093, 35, -1),
+ (2002014, 1082204, 35, -1),
(2001002, 4001045, 1, -1),
(2001003, 4001045, 1, -1),
(2001004, 4001045, 1, -1),
diff --git a/src/client/MapleCharacter.java b/src/client/MapleCharacter.java
index 9770ef0b52..d871339d66 100644
--- a/src/client/MapleCharacter.java
+++ b/src/client/MapleCharacter.java
@@ -719,7 +719,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
}
}
- public void setLastCombo(long time) {;
+ public void setLastCombo(long time) {
lastcombo = time;
}
@@ -1128,8 +1128,6 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
}
public void changeMap(int map, int portal) {
- eventChangedMap(map);
-
MapleMap warpMap;
if (getEventInstance() != null) {
warpMap = getEventInstance().getMapInstance(map);
@@ -1141,8 +1139,6 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
}
public void changeMap(int map, String portal) {
- eventChangedMap(map);
-
MapleMap warpMap;
if (getEventInstance() != null) {
warpMap = getEventInstance().getMapInstance(map);
@@ -1154,8 +1150,6 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
}
public void changeMap(int map, MaplePortal portal) {
- eventChangedMap(map);
-
MapleMap warpMap;
if (getEventInstance() != null) {
warpMap = getEventInstance().getMapInstance(map);
@@ -1171,6 +1165,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
}
public void changeMap(final MapleMap to, final MaplePortal pto) {
+ eventChangedMap(to.getId());
changeMapInternal(to, pto.getPosition(), MaplePacketCreator.getWarpToMap(to, pto.getId(), this));
}
diff --git a/src/scripting/event/EventInstanceManager.java b/src/scripting/event/EventInstanceManager.java
index d59c5ede0b..52d584ccff 100644
--- a/src/scripting/event/EventInstanceManager.java
+++ b/src/scripting/event/EventInstanceManager.java
@@ -303,6 +303,12 @@ public class EventInstanceManager {
public void unregisterPlayer(MapleCharacter chr) {
wL.lock();
try {
+ try {
+ em.getIv().invokeFunction("playerUnregistered", EventInstanceManager.this, chr);
+ } catch (ScriptException | NoSuchMethodException ex) {
+ Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
+ }
+
chars.remove(chr);
gridRemove(chr);
dropExclusiveItems(chr);
@@ -554,12 +560,8 @@ public class EventInstanceManager {
return props;
}
- public Integer getIntProperty(String key) {
- try {
- return Integer.parseInt(props.getProperty(key));
- } catch(Exception e) {
- return null;
- }
+ public int getIntProperty(String key) {
+ return Integer.parseInt(props.getProperty(key));
}
public void leftParty(MapleCharacter chr) {