diff --git a/build/built-jar.properties b/build/built-jar.properties
index 2adb918f9f..ebf4d7f97a 100644
--- a/build/built-jar.properties
+++ b/build/built-jar.properties
@@ -1,4 +1,4 @@
-#Fri, 14 Jul 2017 20:30:46 -0300
+#Mon, 17 Jul 2017 14:21:39 -0300
C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2=
diff --git a/build/classes/client/command/Commands$1.class b/build/classes/client/command/Commands$1.class
index 666de64143..223ef8043b 100644
Binary files a/build/classes/client/command/Commands$1.class and b/build/classes/client/command/Commands$1.class differ
diff --git a/build/classes/client/command/Commands.class b/build/classes/client/command/Commands.class
index c11e79ce4a..67ce8b4a53 100644
Binary files a/build/classes/client/command/Commands.class and b/build/classes/client/command/Commands.class differ
diff --git a/build/classes/client/inventory/Equip$1.class b/build/classes/client/inventory/Equip$1.class
index 2bcd400266..f626cb9812 100644
Binary files a/build/classes/client/inventory/Equip$1.class and b/build/classes/client/inventory/Equip$1.class differ
diff --git a/build/classes/client/inventory/Equip.class b/build/classes/client/inventory/Equip.class
index 861599c61f..e24f2e4576 100644
Binary files a/build/classes/client/inventory/Equip.class and b/build/classes/client/inventory/Equip.class differ
diff --git a/build/classes/constants/ServerConstants.class b/build/classes/constants/ServerConstants.class
index f5707d1ae2..b64defcd09 100644
Binary files a/build/classes/constants/ServerConstants.class and b/build/classes/constants/ServerConstants.class differ
diff --git a/build/classes/net/server/channel/handlers/ChangeMapHandler.class b/build/classes/net/server/channel/handlers/ChangeMapHandler.class
index 2b69cd743c..db7df0b6a9 100644
Binary files a/build/classes/net/server/channel/handlers/ChangeMapHandler.class and b/build/classes/net/server/channel/handlers/ChangeMapHandler.class differ
diff --git a/build/classes/net/server/channel/handlers/DoorHandler.class b/build/classes/net/server/channel/handlers/DoorHandler.class
index 54a96b1ceb..88377230ce 100644
Binary files a/build/classes/net/server/channel/handlers/DoorHandler.class and b/build/classes/net/server/channel/handlers/DoorHandler.class differ
diff --git a/build/classes/net/server/channel/handlers/ItemIdSortHandler.class b/build/classes/net/server/channel/handlers/ItemIdSortHandler.class
index f167359b5b..d7e0ba5ffa 100644
Binary files a/build/classes/net/server/channel/handlers/ItemIdSortHandler.class and b/build/classes/net/server/channel/handlers/ItemIdSortHandler.class differ
diff --git a/build/classes/net/server/channel/handlers/ItemPickupHandler.class b/build/classes/net/server/channel/handlers/ItemPickupHandler.class
index 10e6edd005..498fa5ab07 100644
Binary files a/build/classes/net/server/channel/handlers/ItemPickupHandler.class and b/build/classes/net/server/channel/handlers/ItemPickupHandler.class differ
diff --git a/build/classes/net/server/channel/handlers/PairedQuicksort.class b/build/classes/net/server/channel/handlers/PairedQuicksort.class
index 80e6f467cd..423a93daab 100644
Binary files a/build/classes/net/server/channel/handlers/PairedQuicksort.class and b/build/classes/net/server/channel/handlers/PairedQuicksort.class differ
diff --git a/build/classes/net/server/channel/handlers/PetLootHandler.class b/build/classes/net/server/channel/handlers/PetLootHandler.class
index 0fffe1f80e..e14d0665d2 100644
Binary files a/build/classes/net/server/channel/handlers/PetLootHandler.class and b/build/classes/net/server/channel/handlers/PetLootHandler.class differ
diff --git a/build/classes/net/server/guild/MapleAlliance.class b/build/classes/net/server/guild/MapleAlliance.class
index 58407c52ec..c7f0035532 100644
Binary files a/build/classes/net/server/guild/MapleAlliance.class and b/build/classes/net/server/guild/MapleAlliance.class differ
diff --git a/build/classes/scripting/event/EventInstanceManager$1.class b/build/classes/scripting/event/EventInstanceManager$1.class
index 0f4ed955cc..bb957a29f1 100644
Binary files a/build/classes/scripting/event/EventInstanceManager$1.class and b/build/classes/scripting/event/EventInstanceManager$1.class differ
diff --git a/build/classes/scripting/event/EventInstanceManager$2.class b/build/classes/scripting/event/EventInstanceManager$2.class
index 276cb8f011..675d4a4b39 100644
Binary files a/build/classes/scripting/event/EventInstanceManager$2.class and b/build/classes/scripting/event/EventInstanceManager$2.class differ
diff --git a/build/classes/scripting/event/EventInstanceManager$3.class b/build/classes/scripting/event/EventInstanceManager$3.class
index 20466f0ca5..5fa44e05bb 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 10b989fe1a..eb26cb6ef3 100644
Binary files a/build/classes/scripting/event/EventInstanceManager.class and b/build/classes/scripting/event/EventInstanceManager.class differ
diff --git a/build/classes/scripting/reactor/ReactorActionManager$1.class b/build/classes/scripting/reactor/ReactorActionManager$1.class
index 40e4f65fcf..7739b1e96f 100644
Binary files a/build/classes/scripting/reactor/ReactorActionManager$1.class and b/build/classes/scripting/reactor/ReactorActionManager$1.class differ
diff --git a/build/classes/scripting/reactor/ReactorActionManager$2.class b/build/classes/scripting/reactor/ReactorActionManager$2.class
index f024c6e970..387dafe4c0 100644
Binary files a/build/classes/scripting/reactor/ReactorActionManager$2.class and b/build/classes/scripting/reactor/ReactorActionManager$2.class differ
diff --git a/build/classes/scripting/reactor/ReactorActionManager.class b/build/classes/scripting/reactor/ReactorActionManager.class
index fbedb443bc..df4fddabe3 100644
Binary files a/build/classes/scripting/reactor/ReactorActionManager.class and b/build/classes/scripting/reactor/ReactorActionManager.class differ
diff --git a/build/classes/server/MapleStatEffect$CancelEffectAction.class b/build/classes/server/MapleStatEffect$CancelEffectAction.class
index 051ce0b307..c7109f522e 100644
Binary files a/build/classes/server/MapleStatEffect$CancelEffectAction.class and b/build/classes/server/MapleStatEffect$CancelEffectAction.class differ
diff --git a/build/classes/server/MapleStatEffect.class b/build/classes/server/MapleStatEffect.class
index 4c852e6c2f..2b6e64f4d3 100644
Binary files a/build/classes/server/MapleStatEffect.class and b/build/classes/server/MapleStatEffect.class differ
diff --git a/build/classes/server/MapleTrade.class b/build/classes/server/MapleTrade.class
index 5b6481ce26..f1ca3fb5a1 100644
Binary files a/build/classes/server/MapleTrade.class and b/build/classes/server/MapleTrade.class differ
diff --git a/build/classes/server/life/MapleNPC.class b/build/classes/server/life/MapleNPC.class
index 3f178a32ad..433843e295 100644
Binary files a/build/classes/server/life/MapleNPC.class and b/build/classes/server/life/MapleNPC.class differ
diff --git a/build/classes/server/maps/MapleDoor.class b/build/classes/server/maps/MapleDoor.class
index 04e07faa13..9090f95fcd 100644
Binary files a/build/classes/server/maps/MapleDoor.class and b/build/classes/server/maps/MapleDoor.class differ
diff --git a/build/classes/server/maps/MapleMap$10.class b/build/classes/server/maps/MapleMap$10.class
index 50c631d5db..720ff0b49a 100644
Binary files a/build/classes/server/maps/MapleMap$10.class and b/build/classes/server/maps/MapleMap$10.class differ
diff --git a/build/classes/server/maps/MapleMap$11.class b/build/classes/server/maps/MapleMap$11.class
index b1a9c7f73d..95dee7959d 100644
Binary files a/build/classes/server/maps/MapleMap$11.class and b/build/classes/server/maps/MapleMap$11.class differ
diff --git a/build/classes/server/maps/MapleMap$12.class b/build/classes/server/maps/MapleMap$12.class
index f49cc7ae7f..53948d06d3 100644
Binary files a/build/classes/server/maps/MapleMap$12.class and b/build/classes/server/maps/MapleMap$12.class differ
diff --git a/build/classes/server/maps/MapleMap$13.class b/build/classes/server/maps/MapleMap$13.class
index 636f425bcd..8e8fba0361 100644
Binary files a/build/classes/server/maps/MapleMap$13.class and b/build/classes/server/maps/MapleMap$13.class differ
diff --git a/build/classes/server/maps/MapleMap$14.class b/build/classes/server/maps/MapleMap$14.class
index 51017f1996..0cab912c92 100644
Binary files a/build/classes/server/maps/MapleMap$14.class and b/build/classes/server/maps/MapleMap$14.class differ
diff --git a/build/classes/server/maps/MapleMap$15.class b/build/classes/server/maps/MapleMap$15.class
index d8d10c15d4..23853cdcc1 100644
Binary files a/build/classes/server/maps/MapleMap$15.class and b/build/classes/server/maps/MapleMap$15.class differ
diff --git a/build/classes/server/maps/MapleMap$16.class b/build/classes/server/maps/MapleMap$16.class
index 226f3e4f24..55f94acfc3 100644
Binary files a/build/classes/server/maps/MapleMap$16.class and b/build/classes/server/maps/MapleMap$16.class differ
diff --git a/build/classes/server/maps/MapleMap$17.class b/build/classes/server/maps/MapleMap$17.class
index 042431fdad..9f806727af 100644
Binary files a/build/classes/server/maps/MapleMap$17.class and b/build/classes/server/maps/MapleMap$17.class differ
diff --git a/build/classes/server/maps/MapleMap$18.class b/build/classes/server/maps/MapleMap$18.class
index bd9882c94f..34f579c6ba 100644
Binary files a/build/classes/server/maps/MapleMap$18.class and b/build/classes/server/maps/MapleMap$18.class differ
diff --git a/build/classes/server/maps/MapleMap$19.class b/build/classes/server/maps/MapleMap$19.class
index da2e22e432..703521d58c 100644
Binary files a/build/classes/server/maps/MapleMap$19.class and b/build/classes/server/maps/MapleMap$19.class differ
diff --git a/build/classes/server/maps/MapleMap$20.class b/build/classes/server/maps/MapleMap$20.class
index 4f1c639544..63687ca308 100644
Binary files a/build/classes/server/maps/MapleMap$20.class and b/build/classes/server/maps/MapleMap$20.class differ
diff --git a/build/classes/server/maps/MapleMap$21.class b/build/classes/server/maps/MapleMap$21.class
index f10c4d1e0d..c8e6dc0623 100644
Binary files a/build/classes/server/maps/MapleMap$21.class and b/build/classes/server/maps/MapleMap$21.class differ
diff --git a/build/classes/server/maps/MapleMap$22.class b/build/classes/server/maps/MapleMap$22.class
index 794fefd5ee..8f54b9cee0 100644
Binary files a/build/classes/server/maps/MapleMap$22.class and b/build/classes/server/maps/MapleMap$22.class differ
diff --git a/build/classes/server/maps/MapleMap$23.class b/build/classes/server/maps/MapleMap$23.class
index cc2bda0584..a4e35be459 100644
Binary files a/build/classes/server/maps/MapleMap$23.class and b/build/classes/server/maps/MapleMap$23.class differ
diff --git a/build/classes/server/maps/MapleMap$24.class b/build/classes/server/maps/MapleMap$24.class
index f5218b7275..7e6c9caea7 100644
Binary files a/build/classes/server/maps/MapleMap$24.class and b/build/classes/server/maps/MapleMap$24.class differ
diff --git a/build/classes/server/maps/MapleMap$25.class b/build/classes/server/maps/MapleMap$25.class
index b9b00d0732..eb3d7e3758 100644
Binary files a/build/classes/server/maps/MapleMap$25.class and b/build/classes/server/maps/MapleMap$25.class differ
diff --git a/build/classes/server/maps/MapleMap$26.class b/build/classes/server/maps/MapleMap$26.class
index a60b75f53c..63a6802ab2 100644
Binary files a/build/classes/server/maps/MapleMap$26.class and b/build/classes/server/maps/MapleMap$26.class differ
diff --git a/build/classes/server/maps/MapleMap$27.class b/build/classes/server/maps/MapleMap$27.class
index a1f3dbd8c9..f7f3ecc1a2 100644
Binary files a/build/classes/server/maps/MapleMap$27.class and b/build/classes/server/maps/MapleMap$27.class differ
diff --git a/build/classes/server/maps/MapleMap$28$1.class b/build/classes/server/maps/MapleMap$28$1.class
index 84be300174..b0d0ef5fca 100644
Binary files a/build/classes/server/maps/MapleMap$28$1.class and b/build/classes/server/maps/MapleMap$28$1.class differ
diff --git a/build/classes/server/maps/MapleMap$28.class b/build/classes/server/maps/MapleMap$28.class
index 16124c73eb..97c7fe0040 100644
Binary files a/build/classes/server/maps/MapleMap$28.class and b/build/classes/server/maps/MapleMap$28.class differ
diff --git a/build/classes/server/maps/MapleMap$29.class b/build/classes/server/maps/MapleMap$29.class
index 68bbbcaf24..b503864958 100644
Binary files a/build/classes/server/maps/MapleMap$29.class and b/build/classes/server/maps/MapleMap$29.class differ
diff --git a/build/classes/server/maps/MapleMap$3.class b/build/classes/server/maps/MapleMap$3.class
index 98cf65e435..8eb6a1abe5 100644
Binary files a/build/classes/server/maps/MapleMap$3.class and b/build/classes/server/maps/MapleMap$3.class differ
diff --git a/build/classes/server/maps/MapleMap$4.class b/build/classes/server/maps/MapleMap$4.class
index b251f8cf27..c82dc5f68d 100644
Binary files a/build/classes/server/maps/MapleMap$4.class and b/build/classes/server/maps/MapleMap$4.class differ
diff --git a/build/classes/server/maps/MapleMap$5.class b/build/classes/server/maps/MapleMap$5.class
index 17ed6da873..73a98bbe73 100644
Binary files a/build/classes/server/maps/MapleMap$5.class and b/build/classes/server/maps/MapleMap$5.class differ
diff --git a/build/classes/server/maps/MapleMap$6.class b/build/classes/server/maps/MapleMap$6.class
index e37f625f5d..25c47a8cbb 100644
Binary files a/build/classes/server/maps/MapleMap$6.class and b/build/classes/server/maps/MapleMap$6.class differ
diff --git a/build/classes/server/maps/MapleMap$7.class b/build/classes/server/maps/MapleMap$7.class
index 768cd0195a..ef080846e5 100644
Binary files a/build/classes/server/maps/MapleMap$7.class and b/build/classes/server/maps/MapleMap$7.class differ
diff --git a/build/classes/server/maps/MapleMap$8.class b/build/classes/server/maps/MapleMap$8.class
index 47dfd367da..dd2696dcf2 100644
Binary files a/build/classes/server/maps/MapleMap$8.class and b/build/classes/server/maps/MapleMap$8.class differ
diff --git a/build/classes/server/maps/MapleMap$9.class b/build/classes/server/maps/MapleMap$9.class
index 1d559ef453..c3ec8acd02 100644
Binary files a/build/classes/server/maps/MapleMap$9.class and b/build/classes/server/maps/MapleMap$9.class differ
diff --git a/build/classes/server/maps/MapleMap$ActivateItemReactor$1.class b/build/classes/server/maps/MapleMap$ActivateItemReactor$1.class
index 63f1525495..7fc2ef7515 100644
Binary files a/build/classes/server/maps/MapleMap$ActivateItemReactor$1.class and b/build/classes/server/maps/MapleMap$ActivateItemReactor$1.class differ
diff --git a/build/classes/server/maps/MapleMap$ActivateItemReactor.class b/build/classes/server/maps/MapleMap$ActivateItemReactor.class
index d54ec89ea1..c151440b42 100644
Binary files a/build/classes/server/maps/MapleMap$ActivateItemReactor.class and b/build/classes/server/maps/MapleMap$ActivateItemReactor.class differ
diff --git a/build/classes/server/maps/MapleMap$ExpireMapItemJob.class b/build/classes/server/maps/MapleMap$ExpireMapItemJob.class
index 54096ed509..13184ece7c 100644
Binary files a/build/classes/server/maps/MapleMap$ExpireMapItemJob.class and b/build/classes/server/maps/MapleMap$ExpireMapItemJob.class differ
diff --git a/build/classes/server/maps/MapleMap.class b/build/classes/server/maps/MapleMap.class
index 1e7f873e91..6081b2bb23 100644
Binary files a/build/classes/server/maps/MapleMap.class and b/build/classes/server/maps/MapleMap.class differ
diff --git a/build/classes/server/quest/actions/ItemAction$ItemData.class b/build/classes/server/quest/actions/ItemAction$ItemData.class
index bbef8dd355..5ef8e6638f 100644
Binary files a/build/classes/server/quest/actions/ItemAction$ItemData.class and b/build/classes/server/quest/actions/ItemAction$ItemData.class differ
diff --git a/build/classes/server/quest/actions/ItemAction.class b/build/classes/server/quest/actions/ItemAction.class
index 9754437172..0d1e1f4ad0 100644
Binary files a/build/classes/server/quest/actions/ItemAction.class and b/build/classes/server/quest/actions/ItemAction.class differ
diff --git a/build/classes/tools/MaplePacketCreator.class b/build/classes/tools/MaplePacketCreator.class
index a21048e017..a6c147efd6 100644
Binary files a/build/classes/tools/MaplePacketCreator.class and b/build/classes/tools/MaplePacketCreator.class differ
diff --git a/dist/MapleSolaxia.jar b/dist/MapleSolaxia.jar
index c339772c35..829103af93 100644
Binary files a/dist/MapleSolaxia.jar and b/dist/MapleSolaxia.jar differ
diff --git a/feature_list.txt b/feature_list.txt
index e81bdcd398..c1c6a1758c 100644
--- a/feature_list.txt
+++ b/feature_list.txt
@@ -8,9 +8,9 @@ Feature list:
---------------------------
PQs:
-* HPQ/KPQ/LPQ/LMPQ/OPQ/EllinPQ/PiratePQ 100%.
+* HPQ/KPQ/LPQ/LMPQ/OPQ/EllinPQ/PiratePQ/HorntailPQ 100%.
* CWKPQ as Expedition-based event 100%.
-* Expeditions: Scarga 100%.
+* Expeditions: Scarga/Horntail 100%.
* GuildPQ 100% + Guild queue with multi-lobby systems available.
* Brand-new PQ: Boss Rush PQ 100%.
* BalrogPQ semi-functional.
diff --git a/mychanges_ptbr.txt b/mychanges_ptbr.txt
index 5957ce62f8..da671ce082 100644
--- a/mychanges_ptbr.txt
+++ b/mychanges_ptbr.txt
@@ -373,4 +373,12 @@ Corrigido mapas em CBD/Singapore fazendo jogador "cair" do mapa.
Adicionado no sql lojas de NPCs de Malaysia.
Adicionado minidungeon "ByeBye station" (Malaysia).
Codificada expedição Scarlion/Targa.
-Corrigido exploit com mini-dungeons (toda party, independente de localização atual, movida para dentro da MD).
\ No newline at end of file
+Corrigido exploit com mini-dungeons (toda party, independente de localização atual, movida para dentro da MD).
+
+15 Julho 2017,
+Adicionado area boss Snack Bar.
+Corrigido bugs com "buffmap" desconectando players em certos casos.
+
+16 - 17 Julho 2017,
+Adicionados HTPQ e expedição Horntail.
+Corrigido bugs com levelup de equipamentos provocando Integer overflow (stats negativos) nos clientes.
\ No newline at end of file
diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml
index 9f8dd3d7bb..a747e8fe02 100644
--- a/nbproject/private/private.xml
+++ b/nbproject/private/private.xml
@@ -3,43 +3,10 @@
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2091005.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/expeditions/MapleExpeditionType.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MapleStatEffect.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/ScargaBattle.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/AbstractPlayerInteraction.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/KerningPQ.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/portal/captinsg00.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/GuildQuest.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/CWKPQ.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/9270033.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/event/EventInstanceManager.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/9201113.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2091005_old.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/reactor/5511001.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/PiratePQ.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/event/EventManager.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/reactor/ReactorActionManager.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/Channel.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/9270047.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/expeditions/MapleExpedition.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/5511000.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleReactor.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2133004.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/portal/MD_high.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/tools/MaplePacketCreator.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/life/MapleMonster.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/TimerManager.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/reactor/ReactorScriptManager.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/HenesysPQ.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/portal/MD_drakeroom.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/BossRushPQ.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/npc/NPCConversationManager.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/9020001.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/LatanicaBattle.js
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleClient.java
+ file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/Equip.java
+ file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/ItemFactory.java
+ file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/command/Commands.java
+ file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/constants/ServerConstants.java
diff --git a/scripts/event/AreaBossSnackBar.js b/scripts/event/AreaBossSnackBar.js
new file mode 100644
index 0000000000..fbb00f883c
--- /dev/null
+++ b/scripts/event/AreaBossSnackBar.js
@@ -0,0 +1,57 @@
+/*
+ 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 --------------------------------------------------------------------------------
+ Snack Bar Spawner
+-- Edited by --------------------------------------------------------------------------------------
+ Ronan (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 snackBarMap = em.getChannelServer().getMapFactory().getMap(105090310);
+ var snackBar = Packages.server.life.MapleLifeFactory.getMonster(8220008);
+
+ if(snackBarMap.getMonsterById(8220008) != null || snackBarMap.getMonsterById(8220009) != null) {
+ em.schedule("start", 3 * 60 * 60 * 1000);
+ return;
+ }
+
+ var setPos = [[-626, -604], [735, -600]];
+ var rndPos = setPos[Math.floor(Math.random() * setPos.length)];
+
+ snackBarMap.spawnMonsterOnGroundBelow(snackBar, new Packages.java.awt.Point(rndPos[0], rndPos[1]));
+ snackBarMap.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Slowly, a suspicious food stand opens up on a strangely remote place."));
+ em.schedule("start", 3 * 60 *60 * 1000);
+}
\ No newline at end of file
diff --git a/scripts/event/HorntailFight.js b/scripts/event/HorntailFight.js
index bf1ceb2d04..1931ef04cd 100644
--- a/scripts/event/HorntailFight.js
+++ b/scripts/event/HorntailFight.js
@@ -1,155 +1,209 @@
-/*
- * This file is part of the OdinMS Maple Story Server
- Copyright (C) 2008 Patrick Huy
- Matthias Butz
- Jan Christian Meyer
+/**
+ * @author: Ronan
+ * @event: Horntail Battle
+*/
- 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.
+importPackage(Packages.server.life);
- 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.
+var isPq = true;
+var minPlayers = 1, maxPlayers = 30;
+var minLevel = 100, maxLevel = 255;
+var entryMap = 240060000;
+var exitMap = 240050600;
+var recruitMap = 240050400;
+var clearMap = 240050600;
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
- */
+var minMapId = 240060000;
+var maxMapId = 240060200;
-/*
- * @Author SharpAceX(Alan)
- * Horntail fight
- */
+var eventTime = 15; // 15 minutes
-importPackage(Packages.server.expeditions);
+var lobbyRange = [0, 0];
-var exitMap;
-var minPlayers = 1;
-var fightTime = 60;
-
-var trial1; //Cave of Life - The Cave of Trial I
-var trial2; // Cave of Life - The Cave of Trial II
-var fightMap; // Cave of Life - Horntail's Cave
-var exitMap;
-
function init() {
- em.setProperty("shuffleReactors","false");
- trial1 = em.getChannelServer().getMapFactory().getMap(240060000); //Cave of Life - The Cave of Trial I
- trial2 = em.getChannelServer().getMapFactory().getMap(240060100); // Cave of Life - The Cave of Trial II
- fightMap = em.getChannelServer().getMapFactory().getMap(240060200); // Cave of Life - Horntail's Cave
- exitMap = em.getChannelServer().getMapFactory().getMap(211042300);
+ setEventRequirements();
}
+function setLobbyRange() {
+ return lobbyRange;
+}
+function setEventRequirements() {
+ var reqStr = "";
+
+ reqStr += "\r\n Number of players: ";
+ if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
+ else reqStr += minPlayers;
+
+ reqStr += "\r\n Level range: ";
+ if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
+ else reqStr += minLevel;
+
+ reqStr += "\r\n Time limit: ";
+ reqStr += eventTime + " minutes";
+
+ em.setProperty("party", reqStr);
+}
+function setEventExclusives(eim) {
+ var itemSet = [];
+ eim.setExclusiveItems(itemSet);
+}
-function setup() {
- var eim = em.newInstance("HorntailFight_" + em.getProperty("channel"));
- var timer = 1000 * 60 * fightTime;
- em.schedule("timeOut", eim, timer);
- eim.startEventTimer(timer);
- return eim;
+function setEventRewards(eim) {
+ var itemSet, itemQty, evLevel, expStages, mesoStages;
+
+ evLevel = 1; //Rewards at clear PQ
+ itemSet = [];
+ itemQty = [];
+ eim.setEventRewards(evLevel, itemSet, itemQty);
+
+ expStages = []; //bonus exp given on CLEAR stage signal
+ eim.setEventClearStageExp(expStages);
+
+ mesoStages = []; //bonus meso given on CLEAR stage signal
+ eim.setEventClearStageMeso(mesoStages);
}
function afterSetup(eim) {}
-function playerEntry(eim,player) {
- var map = eim.getMapInstance(trial1.getId());
- player.changeMap(map,map.getPortal(0));
- if (exitMap == null)
- debug(eim,"The exit map was not properly linked.");
+function setup(channel) {
+ var eim = em.newInstance("Scarga" + channel);
+ eim.setProperty("canJoin", 1);
+ eim.setProperty("defeatedBoss", 0);
+ eim.setProperty("defeatedHead", 0);
+
+ var level = 1;
+ eim.getInstanceMap(240060000).resetPQ(level);
+ eim.getInstanceMap(240060100).resetPQ(level);
+ eim.getInstanceMap(240060200).resetPQ(level);
+
+ var map, mob;
+ map = eim.getInstanceMap(240060000);
+ mob = MapleLifeFactory.getMonster(8810000);
+ map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(960, 120));
+
+ map = eim.getInstanceMap(240060100);
+ mob = MapleLifeFactory.getMonster(8810001);
+ map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(-420, 120));
+
+ eim.startEventTimer(eventTime * 60000);
+ setEventRewards(eim);
+ setEventExclusives(eim);
+
+ return eim;
}
-function playerRevive(eim,player) {
- player.setHp(500);
- player.setStance(0);
- eim.unregisterPlayer(player);
- player.changeMap(exitMap, exitMap.getPortal(0));
- var party = eim.getPlayers();
- if (party.size() < minPlayers)
- end(eim,"There are not enough players remaining, the Battle is over.");
- return false;
+function playerEntry(eim, player) {
+ eim.dropMessage(5, "[Expedition] " + player.getName() + " has entered the map.");
+ var map = eim.getMapInstance(entryMap);
+ player.changeMap(map, map.getPortal(0));
}
-function playerDead(eim,player) {
+function scheduledTimeout(eim) {
+ end(eim);
}
-function playerDisconnected(eim,player) {
- var party = eim.getPlayers();
- if (player.getName().equals(eim.getProperty("leader"))) {
- // tell members
- var iter = party.iterator();
- while (iter.hasNext())
- iter.next().getPlayer().dropMessage(6,"The leader of the instance has disconnected.");
- }
- // and, if the party is too small
- if (party.size() < minPlayers) {
- end(eim,"There are not enough players remaining. The Battle is over.");
+function changedMap(eim, player, mapid) {
+ if (mapid < minMapId || mapid > maxMapId) {
+ if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
+ eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
+ eim.unregisterPlayer(player);
+ end(eim);
+ }
+ else {
+ eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
+ eim.unregisterPlayer(player);
+ }
}
}
+function changedLeader(eim, leader) {}
+
+function playerDead(eim, player) {}
+
+function playerRevive(eim, player) {
+ if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
+ eim.unregisterPlayer(player);
+ eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
+ end(eim);
+ }
+ else {
+ eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
+ eim.unregisterPlayer(player);
+ }
+}
+
+function playerDisconnected(eim, player) {
+ if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
+ eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
+ eim.unregisterPlayer(player);
+ end(eim);
+ }
+ else {
+ eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
+ eim.unregisterPlayer(player);
+ }
+}
+
+function leftParty (eim, player) {}
+
+function disbandParty (eim) {}
+
function monsterValue(eim, mobId) {
return 1;
}
-function leftParty(eim,player) {}
-
-function disbandParty(eim) {}
-
function playerUnregistered(eim, player) {}
-function playerExit(eim,player) {
+function playerExit(eim, player) {
eim.unregisterPlayer(player);
- player.changeMap(exitMap,exitMap.getPortal(0));
- if (eim.getPlayers().size() < minPlayers)//not enough after someone left
- end(eim,"There are no longer enough players to continue, and those remaining shall be warped out.");
+ player.changeMap(exitMap, 0);
}
-function end(eim,msg) {
- var iter = eim.getPlayers().iterator();
- while (iter.hasNext()) {
- var player = iter.next();
- player.getPlayer().dropMessage(6,msg);
- eim.unregisterPlayer(player);
- if (player != null)
- player.changeMap(exitMap, exitMap.getPortal(0));
+function end(eim) {
+ var party = eim.getPlayers();
+ for (var i = 0; i < party.size(); i++) {
+ playerExit(eim, party.get(i));
}
eim.dispose();
}
-// for offline folk
-function removePlayer(eim,player) {
- eim.unregisterPlayer(player);
- player.getMap().removePlayer(player);
- player.setMap(exitMap);
+function giveRandomEventReward(eim, player) {
+ eim.giveEventReward(player);
}
-function clearPQ(eim) {}
+function clearPQ(eim) {
+ eim.stopEventTimer();
+ eim.setEventCleared();
+}
-function finish(eim) {
- var iter = eim.getPlayers().iterator();
- while (iter.hasNext()) {
- var player = iter.next();
- eim.unregisterPlayer(player);
- player.changeMap(exitMap, exitMap.getPortal(0));
+function isHorntailHead(mob) {
+ var mobid = mob.getId();
+ return (mobid == 8810000 || mobid == 8810001);
+}
+
+function isHorntail(mob) {
+ var mobid = mob.getId();
+ return (mobid == 8810018);
+}
+
+function monsterKilled(mob, eim) {
+ if(isHorntail(mob)) {
+ eim.setIntProperty("defeatedBoss", 1);
+ eim.showClearEffect(mob.getMap().getId());
+ eim.clearPQ();
+
+ mob.getMap().broadcastHorntailVictory();
+ } else if(isHorntailHead(mob)) {
+ var killed = eim.getIntProperty("defeatedHead");
+ eim.setIntProperty("defeatedHead", killed + 1);
+ eim.showClearEffect(mob.getMap().getId());
}
- eim.dispose();
}
-function monsterKilled(mob, eim) {}
-
function allMonstersDead(eim) {}
function cancelSchedule() {}
-function timeOut() {}
-
-function debug(eim,msg) {
- var iter = eim.getPlayers().iterator();
- while (iter.hasNext()) {
- iter.next().getClient().getSession().write(Packages.tools.MaplePacketCreator.serverNotice(6,msg));
- }
-}
\ No newline at end of file
+function dispose(eim) {}
diff --git a/scripts/event/HorntailPQ.js b/scripts/event/HorntailPQ.js
new file mode 100644
index 0000000000..8e466d81b2
--- /dev/null
+++ b/scripts/event/HorntailPQ.js
@@ -0,0 +1,213 @@
+/**
+ * @author: Ronan
+ * @event: Horntail PQ
+*/
+
+var isPq = true;
+var minPlayers = 1, maxPlayers = 6;
+var minLevel = 120, maxLevel = 255;
+var entryMap = 240050100;
+var exitMap = 240050500;
+var recruitMap = 240050000;
+var clearMap = 240050400;
+
+var minMapId = 240050100;
+var maxMapId = 240050310;
+
+var eventTime = 25; // 25 minutes
+
+var lobbyRange = [0, 0];
+
+function init() {
+ setEventRequirements();
+}
+
+function setLobbyRange() {
+ return lobbyRange;
+}
+
+function setEventRequirements() {
+ var reqStr = "";
+
+ reqStr += "\r\n Number of players: ";
+ if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
+ else reqStr += minPlayers;
+
+ reqStr += "\r\n Level range: ";
+ if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
+ else reqStr += minLevel;
+
+ reqStr += "\r\n Time limit: ";
+ reqStr += eventTime + " minutes";
+
+ em.setProperty("party", reqStr);
+}
+
+function setEventExclusives(eim) {
+ var itemSet = [4001087, 4001088, 4001089, 4001090, 4001091, 4001092, 4001093];
+ eim.setExclusiveItems(itemSet);
+}
+
+function setEventRewards(eim) {
+ var itemSet, itemQty, evLevel, expStages;
+
+ evLevel = 1; //Rewards at clear PQ
+ itemSet = [];
+ itemQty = [];
+ eim.setEventRewards(evLevel, itemSet, itemQty);
+
+ expStages = []; //bonus exp given on CLEAR stage signal
+ eim.setEventClearStageExp(expStages);
+}
+
+function getEligibleParty(party) { //selects, from the given party, the team that is allowed to attempt this event
+ var eligible = [];
+ var hasLeader = false;
+
+ if(party.size() > 0) {
+ var partyList = party.toArray();
+
+ for(var i = 0; i < party.size(); i++) {
+ var ch = partyList[i];
+
+ if(ch.getMapId() == recruitMap && ch.getLevel() >= minLevel && ch.getLevel() <= maxLevel) {
+ if(ch.isLeader()) hasLeader = true;
+ eligible.push(ch);
+ }
+ }
+ }
+
+ if(!(hasLeader && eligible.length >= minPlayers && eligible.length <= maxPlayers)) eligible = [];
+ return eligible;
+}
+
+function setup(level, lobbyid) {
+ var eim = em.newInstance("PreHorntail" + lobbyid);
+ eim.setProperty("level", level);
+
+ eim.getInstanceMap(240050000).resetPQ(level);
+ eim.getInstanceMap(240050100).resetPQ(level);
+ eim.getInstanceMap(240050101).resetPQ(level);
+ eim.getInstanceMap(240050102).resetPQ(level);
+ eim.getInstanceMap(240050103).resetPQ(level);
+ eim.getInstanceMap(240050104).resetPQ(level);
+ eim.getInstanceMap(240050105).resetPQ(level);
+ eim.getInstanceMap(240050200).resetPQ(level);
+ eim.getInstanceMap(240050300).resetPQ(level);
+ eim.getInstanceMap(240050310).resetPQ(level);
+
+ eim.getInstanceMap(240050101).getReactorByName("passKey1").setEventState(0);
+ eim.getInstanceMap(240050102).getReactorByName("passKey2").setEventState(1);
+ eim.getInstanceMap(240050103).getReactorByName("passKey3").setEventState(2);
+ eim.getInstanceMap(240050104).getReactorByName("passKey4").setEventState(3);
+
+ respawnStages(eim);
+
+ eim.startEventTimer(eventTime * 60000);
+ setEventRewards(eim);
+ setEventExclusives(eim);
+
+ return eim;
+}
+
+function afterSetup(eim) {}
+
+function respawnStages(eim) {}
+
+function playerEntry(eim, player) {
+ var map = eim.getMapInstance(entryMap);
+ player.changeMap(map, map.getPortal(0));
+}
+
+function scheduledTimeout(eim) {
+ end(eim);
+}
+
+function playerUnregistered(eim, player) {}
+
+function playerExit(eim, player) {
+ eim.unregisterPlayer(player);
+ player.changeMap(exitMap, 0);
+}
+
+function changedMap(eim, player, mapid) {
+ if (mapid < minMapId || mapid > maxMapId) {
+ if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
+ eim.unregisterPlayer(player);
+ end(eim);
+ }
+ else
+ eim.unregisterPlayer(player);
+ }
+}
+
+function changedLeader(eim, leader) {
+ var mapid = leader.getMapId();
+ if (!eim.isEventCleared() && (mapid < minMapId || mapid > maxMapId)) {
+ end(eim);
+ }
+}
+
+function playerDead(eim, player) {}
+
+function playerRevive(eim, player) { // player presses ok on the death pop up.
+ if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
+ eim.unregisterPlayer(player);
+ end(eim);
+ }
+ else
+ eim.unregisterPlayer(player);
+}
+
+function playerDisconnected(eim, player) {
+ if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
+ eim.unregisterPlayer(player);
+ end(eim);
+ }
+ else
+ eim.unregisterPlayer(player);
+}
+
+function leftParty(eim, player) {
+ if (eim.isEventTeamLackingNow(false, minPlayers, player)) {
+ eim.unregisterPlayer(player);
+ end(eim);
+ }
+ else
+ eim.unregisterPlayer(player);
+}
+
+function disbandParty(eim) {
+ end(eim);
+}
+
+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 giveRandomEventReward(eim, player) {
+ eim.giveEventReward(player);
+}
+
+function clearPQ(eim) {
+ eim.stopEventTimer();
+ eim.setEventCleared();
+
+ eim.warpEventTeam(clearMap);
+}
+
+function monsterKilled(mob, eim) {}
+
+function allMonstersDead(eim) {}
+
+function cancelSchedule() {}
+
+function dispose(eim) {}
diff --git a/scripts/event/ScargaBattle.js b/scripts/event/ScargaBattle.js
index ecb5f00600..0d8e7df0e6 100644
--- a/scripts/event/ScargaBattle.js
+++ b/scripts/event/ScargaBattle.js
@@ -68,7 +68,7 @@ function afterSetup(eim) {}
function setup(channel) {
var eim = em.newInstance("Scarga" + channel);
eim.setProperty("canJoin", 1);
- eim.setProperty("defeatedBoss", 1);
+ eim.setProperty("defeatedBoss", 0);
var level = 1;
eim.getInstanceMap(551030200).resetPQ(level);
diff --git a/scripts/npc/1012112.js b/scripts/npc/1012112.js
index c5e9747f6b..7eebfda51a 100644
--- a/scripts/npc/1012112.js
+++ b/scripts/npc/1012112.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/**
- * @author BubblesDev, Ronan
+ * @author BubblesDev
+ * @author Ronan
* @NPC Tory
*/
diff --git a/scripts/npc/1012113.js b/scripts/npc/1012113.js
index 7cb7b98421..542f6c75be 100644
--- a/scripts/npc/1012113.js
+++ b/scripts/npc/1012113.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/**
- * @author BubblesDev, Ronan
+ * @author BubblesDev
+ * @author Ronan
* @npc Tommy (HPQ)
*/
var status = 0;
diff --git a/scripts/npc/1012114.js b/scripts/npc/1012114.js
index bb2ddce7d7..f077c3a636 100644
--- a/scripts/npc/1012114.js
+++ b/scripts/npc/1012114.js
@@ -2,7 +2,7 @@
Growlie (that fatass uhh.. hungry lion or whatever)
FightDesign @RageZONE
- Ronan
+ @author Ronan
*/
var status = 0;
diff --git a/scripts/npc/2040034.js b/scripts/npc/2040034.js
index 3195432b52..3ac5efa29a 100644
--- a/scripts/npc/2040034.js
+++ b/scripts/npc/2040034.js
@@ -1,5 +1,6 @@
/**
- * @author: Eric, Ronan
+ * @author: Eric
+ * @author: Ronan
* @npc: Red Sign
* @map: 101st Floor Eos Tower (221024500)
* @func: Ludi PQ
diff --git a/scripts/npc/2040036.js b/scripts/npc/2040036.js
index c9136d6dd5..f313499239 100644
--- a/scripts/npc/2040036.js
+++ b/scripts/npc/2040036.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/*
-@ Author : Raz, Ronan
+@ Author : Raz
+@ Author : Ronan
@
@ NPC = Red Balloon
@ Map = Hidden-Street
diff --git a/scripts/npc/2040037.js b/scripts/npc/2040037.js
index 50862dc9f0..b67f4cc446 100644
--- a/scripts/npc/2040037.js
+++ b/scripts/npc/2040037.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/*
-@ Author : Raz, Ronan
+@ Author : Raz
+@ Author : Ronan
@
@ NPC = Orange Balloon
@ Map = Hidden-Street
diff --git a/scripts/npc/2040038.js b/scripts/npc/2040038.js
index bd88e83484..6a97ef8a25 100644
--- a/scripts/npc/2040038.js
+++ b/scripts/npc/2040038.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/*
-@ Author : Raz, Ronan
+@ Author : Raz
+@ Author : Ronan
@
@ NPC = Yellow Balloon
@ Map = Hidden-Street
diff --git a/scripts/npc/2040039.js b/scripts/npc/2040039.js
index fc3d6818aa..c16abba0fc 100644
--- a/scripts/npc/2040039.js
+++ b/scripts/npc/2040039.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/*
-@ Author : Raz, Ronan
+@ Author : Raz
+@ Author : Ronan
@
@ NPC = Lime Balloon
@ Map = Hidden-Street
diff --git a/scripts/npc/2040040.js b/scripts/npc/2040040.js
index a5a0fcd786..7f8c31c181 100644
--- a/scripts/npc/2040040.js
+++ b/scripts/npc/2040040.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/*
-@ Author : Raz, Ronan
+@ Author : Raz
+@ Author : Ronan
@
@ NPC = Green Balloon
@ Map = Hidden-Street
diff --git a/scripts/npc/2040042.js b/scripts/npc/2040042.js
index 5eb82c6803..772e9e7818 100644
--- a/scripts/npc/2040042.js
+++ b/scripts/npc/2040042.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/*
-@ Author : Raz, Ronan
+@ Author : Raz
+@ Author : Ronan
@
@ NPC = Sky-Blue Balloon
@ Map = Hidden-Street
diff --git a/scripts/npc/2040043.js b/scripts/npc/2040043.js
index 32d2610c39..698fbda291 100644
--- a/scripts/npc/2040043.js
+++ b/scripts/npc/2040043.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/*
-@ Author : Twdtwd, Ronan
+@ Author : Twdtwd
+@ Author : Ronan
@
@ NPC = Blue Balloon
@ Map = Hidden-Street
diff --git a/scripts/npc/2040044.js b/scripts/npc/2040044.js
index 28a96baeb5..20391b00ff 100644
--- a/scripts/npc/2040044.js
+++ b/scripts/npc/2040044.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/*
-@ Author : Twdtwd, Ronan
+@ Author : Twdtwd
+@ Author : Ronan
@
@ NPC = Violet Balloon
@ Map = Hidden-Street
diff --git a/scripts/npc/2040045.js b/scripts/npc/2040045.js
index f558771063..228077ff59 100644
--- a/scripts/npc/2040045.js
+++ b/scripts/npc/2040045.js
@@ -21,7 +21,8 @@
*/
/*
-@ Author : Raz, Ronan
+@ Author : Raz
+@ Author : Ronan
@
@ NPC = Pink Balloon
@ Map = Hidden-Street
diff --git a/scripts/npc/2040047.js b/scripts/npc/2040047.js
index 74ca88d203..956d702078 100644
--- a/scripts/npc/2040047.js
+++ b/scripts/npc/2040047.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/*
-@ Author : Raz, Ronan
+@ Author : Raz
+@ Author : Ronan
@
@ NPC = Sgt.Anderson
@ Map = Abandoned Tower
diff --git a/scripts/npc/2081005.js b/scripts/npc/2081005.js
index 1317992d2a..d35c1771ab 100644
--- a/scripts/npc/2081005.js
+++ b/scripts/npc/2081005.js
@@ -19,12 +19,25 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
-//Fixed by Moogra
+//Fixed by Moogra, Ronan
//Fixed grammar, javascript syntax
+
+importPackage(Packages.client);
+
var status = 0;
var price = 100000;
+function isTransformed(ch) {
+ return ch.getBuffSource(MapleBuffStat.MORPH) == 2210003;
+}
+
function start() {
+ if(!(isTransformed(cm.getPlayer()) || cm.haveItem(4001086))) {
+ cm.sendOk("This is the cave of the mighty Horntail, supreme ruler of the Leafre Canyons, outsiders are not welcome. Get lost!");
+ cm.dispose();
+ return;
+ }
+
cm.sendSimple("Welcome to Cave of Life - Entrance ! Would you like to go inside and fight #rHorntail#k ? If you want to fight him, you may might need some #b#v2000005##k, so you can recover some HP if you have been hit by #rHorntail#k.\r\n#L1#I would like to buy 10 for 100,000 Mesos!#l\r\n\#L2#No thanks, let me in now!#l");
}
@@ -32,12 +45,17 @@ function action(mode, type, selection) {
if (mode < 1)
cm.dispose();
else if (selection == 1) {
- if(cm.getMeso() >= price && cm.canHold(2000005)) {
- cm.gainMeso(-price);
- cm.gainItem(2000005, 10);
- cm.sendOk("Thank you for buying the potion. Use it as well!");
- } else
+ if(cm.getMeso() >= price) {
+ if(!cm.canHold(2000005)) {
+ cm.sendOk("Sorry, you don't have a slot on your inventory for the item!");
+ } else {
+ cm.gainMeso(-price);
+ cm.gainItem(2000005, 10);
+ cm.sendOk("Thank you for buying the potion. Use it as well!");
+ }
+ } else {
cm.sendOk("Sorry, you don't have enough mesos to buy them!");
+ }
cm.dispose();
} else if (selection == 2) {
if (cm.getLevel() > 99)
diff --git a/scripts/npc/2083000.js b/scripts/npc/2083000.js
index 0747a6a2af..20e50edf9c 100644
--- a/scripts/npc/2083000.js
+++ b/scripts/npc/2083000.js
@@ -47,68 +47,15 @@ function action(mode, type, selection) {
else
status--;
if (status == 0) {
- // Slate has no preamble, directly checks if you're in a party
- if (cm.getParty() == null) { // no party
- cm.sendOk("If you want to attempt the quest, try making a party and getting 6 People...");
+ if(cm.haveItem(4001086)) {
+ cm.sendYesNo("Do you want to access #b#m240050400##k right now?");
+ } else {
+ cm.sendOk("Those who don't have the #r#t4001086##k must prove their valor before challenging #bHorntail#k.");
cm.dispose();
- return;
- }
- if (!cm.isLeader()) { // not party leader
- cm.sendSimple("You are not the party leader.");
- cm.dispose();
- }
- else {
- // Check teh partyy
- var party = cm.getParty().getMembers();
- var mapId = cm.getPlayer().getMapId();
- var next = true;
- var levelValid = 0;
- var inMap = 0;
- // Temp removal for testing
- if (party.size() < minPlayers || party.size() > maxPlayers)
- next = false;
- else {
- for (var i = 0; i < party.size() && next; i++) {
- if ((party.get(i).getLevel() >= minLevel) && (party.get(i).getLevel() <= maxLevel))
- levelValid += 1;
- if (party.get(i).getMapId() == mapId)
- inMap += 1;
- }
- if (levelValid < party.size() || inMap < party.size())
- next = false;
- }
- if (next) {
- // Kick it into action. Slate says nothing here, just warps you in.
- var em = cm.getEventManager("HontalePQ");
- if (em == null) {
- cm.dispose();
- }
- else {
- // Begin the PQ.
- if(!em.startInstance(cm.getParty(),cm.getPlayer().getMap())) {
- cm.sendOk("A party in your name is already registered in this event.");
- cm.dispose();
- return;
- }
- //force the two scripts on portals in the map
- //eim = cm.getPlayer().getEventInstance();
- var map = eim.getMapInstance(240050100);
- var bulbMap = eim.getMapInstance(240050200);
- //map.getPortal(7).setScriptName("hontale_BtoB1");
- //map.getPortal(2).setScriptName("hontale_C");
- // Remove pass/coupons
- party = cm.getPlayer().getEventInstance().getPlayers();
- }
- 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.dispose();
- }
}
}
else {
- cm.sendOk("RAWR!?!?!?");
+ cm.warp(240050400);
cm.dispose();
}
}
diff --git a/scripts/npc/2083001.js b/scripts/npc/2083001.js
index fb72459359..fe0e0dbd73 100644
--- a/scripts/npc/2083001.js
+++ b/scripts/npc/2083001.js
@@ -1,25 +1,107 @@
-/*
- 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 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 .
+/**
+ * @author: Ronan
+ * @npc: Mark of the Squad
+ * @map: Cave of Life - Cave Entrance (240050000)
+ * @func: Horntail PQ
*/
+var status = 0;
+var price = 100000;
+var em = null;
+var hasPass;
+
+function isRecruitingMap(mapid) {
+ return mapid == 240050000;
+}
+
function start() {
- cm.warp(240050400);
- cm.dispose();
+ status = -1;
+ action(1, 0, 0);
+}
+
+function action(mode, type, selection) {
+ if (mode == -1) {
+ cm.dispose();
+ } else {
+ if (mode == 0 && status == 0) {
+ cm.dispose();
+ return;
+ }
+ if (mode == 1)
+ status++;
+ else
+ status--;
+
+ if(isRecruitingMap(cm.getMapId())) {
+ if (status == 0) {
+ em = cm.getEventManager("HorntailPQ");
+ if(em == null) {
+ cm.sendOk("The Horntail PQ has encountered an error.");
+ cm.dispose();
+ return;
+ }
+
+ cm.sendSimple("#e#b\r\n#k#n" + em.getProperty("party") + "\r\n\r\nThis is the path to Horntail's lair. If you want to face him, you and your team shall be tested on the trial grounds ahead.#b\r\n#L0#Let us pass to the trial grounds.\r\n#L1#I would like to hear more details.");
+ } else if (status == 1) {
+ if (selection == 0) {
+ if (cm.getParty() == null) {
+ cm.sendOk("You can participate in the party quest only if you are in a party.");
+ cm.dispose();
+ } else if(!cm.isLeader()) {
+ cm.sendOk("Your party leader must talk to me to start this party quest.");
+ cm.dispose();
+ } else {
+ var eli = em.getEligibleParty(cm.getParty());
+ if(eli.size() > 0) {
+ if(!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
+ cm.sendOk("Another party has already entered the #rParty Quest#k in this channel. Please try another channel, or wait for the current party to finish.");
+ }
+ }
+ else {
+ cm.sendOk("Either I cannot accept some members of your party inside the cave or you team is lacking. Solve this problem then talk to me!");
+ }
+
+ cm.dispose();
+ }
+ } else {
+ cm.sendOk("#e#b#k#n\r\nAs the gatekeeper of Horntail's lair, I will grant access #bjust to those worthy#k of his presence. Even for those people, the path inside is that of a maze, full of branches and trials. However, those #radept at fighting squad bosses#k have a better chance to stand to our leader, although those #rof our kind#k have a shabby chance as well.");
+ cm.dispose();
+ }
+ }
+ } else {
+ if(!cm.isEventLeader()) {
+ cm.sendOk("Only your event leader is allowed to interact with the Schedule.");
+ } else if(cm.getMapId() == 240050100) {
+ if(cm.haveItem(4001087) && cm.haveItem(4001088) && cm.haveItem(4001089) && cm.haveItem(4001090) && cm.haveItem(4001091)) {
+ cm.gainItem(4001087, -1);
+ cm.gainItem(4001088, -1);
+ cm.gainItem(4001089, -1);
+ cm.gainItem(4001090, -1);
+ cm.gainItem(4001091, -1);
+
+ cm.getEventInstance().warpEventTeam(240050200);
+ } else {
+ cm.sendOk("You don't have all the keys needed to proceed.");
+ }
+ } else if(cm.getMapId() == 240050300) {
+ if(cm.haveItem(4001092, 1) && cm.haveItem(4001093, 6)) {
+ cm.gainItem(4001092, -1);
+ cm.gainItem(4001093, -6);
+ cm.getEventInstance().clearPQ();
+ } else {
+ cm.sendOk("Check if you have got all 6 Red keys and 1 Blue key with you.");
+ }
+ } else if(cm.getMapId() == 240050310) {
+ if(cm.haveItem(4001092, 1) && cm.haveItem(4001093, 6)) {
+ cm.gainItem(4001092, -1);
+ cm.gainItem(4001093, -6);
+ cm.getEventInstance().clearPQ();
+ } else {
+ cm.sendOk("Check if you have got all 6 Red keys and 1 Blue key with you.");
+ }
+ }
+
+ cm.dispose();
+ }
+ }
}
\ No newline at end of file
diff --git a/scripts/npc/2083002.js b/scripts/npc/2083002.js
index 2f436df313..14328826c0 100644
--- a/scripts/npc/2083002.js
+++ b/scripts/npc/2083002.js
@@ -22,7 +22,7 @@
/**
*Crystal of Roots
- *@Author: Moogra
+ *@Author: Ronan
*@NPC: Crystal of Roots
*/
function start() {
@@ -33,11 +33,9 @@ function action(mode, type, selection) {
if (mode < 1)
cm.dispose();
else {
- cm.warp(240040700);
- if (cm.getPlayer().getMap().getCharacters().size() < 2){
- cm.getPlayer().getMap().killAllMonsters();
- cm.getPlayer().getMap().resetReactors();
- }
+ if(cm.getMapId() > 240050400) cm.warp(240050600);
+ else cm.warp(240040700);
+
cm.dispose();
}
}
\ No newline at end of file
diff --git a/scripts/npc/2083004.js b/scripts/npc/2083004.js
index d4043d726a..de3553b9c3 100644
--- a/scripts/npc/2083004.js
+++ b/scripts/npc/2083004.js
@@ -19,11 +19,9 @@
along with this program. If not, see .
*/
/*Mark of the Squad
- *@author Even
+ *
*@author SharpAceX (Alan)
- */
-/*TODO
- * ADD A CHECK TO SEE IF PLAYERS HAVE BADGE
+ *@author Ronan
*/
importPackage(Packages.server.expeditions);
importPackage(Packages.tools);
@@ -33,7 +31,10 @@ var status = 0;
var expedition;
var player;
var em;
-var horntail = MapleExpeditionType.HORNTAIL;
+var exped = MapleExpeditionType.HORNTAIL;
+var expedName = "Horntail";
+var expedBoss = "mighty Horntail";
+
var list = "What would you like to do?#b\r\n\r\n#L1#View current Expedition members#l\r\n#L2#Start the fight!#l\r\n#L3#Stop the expedition.#l";
function start() {
@@ -43,113 +44,134 @@ function start() {
function action(mode, type, selection) {
player = cm.getPlayer();
- expedition = cm.getExpedition(horntail);
+ expedition = cm.getExpedition(exped);
em = cm.getEventManager("HorntailFight");
- if (mode < 1) {
+ if (mode == -1) {
cm.dispose();
- return;
- }
- if (status == 0) {
- //cm.removeExpedition(expedition);
- if (player.getClient().getChannel() != 1) { //Only channel 1
- cm.sendOk("Sorry, Horntail may only be challenged on #bChannel 1#k.");
- cm.dispose();
- } else if (player.getLevel() < horntail.getMinLevel() && player.getLevel() > horntail.getMaxLevel()) { //Don't fit requirement
- cm.sendOk("You do not meet the criteria to take on Horntail!");
- cm.dispose();
- } else if (expedition == null) { //Start an expedition
- cm.sendSimple("Would you like to assemble a team to take on the mighty #rHorntail#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
- status = 1;
- } else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
- cm.sendSimple(list);
- status = 2;
- } else if (expedition.isRegistering()) { //If the expedition is registering
- if (expedition.contains(player)) { //If you're in it but it hasn't started, be patient
- cm.sendOk("You have already registered for the expedition. Please wait for " + expedition.getLeader().getName() + " to begin the expedition.");
- cm.dispose();
- } else { //If you aren't in it, you're going to get added
- cm.sendOk(expedition.addMember(cm.getPlayer()));
- cm.dispose();
- }
- } else if (expedition.isInProgress()) { //Only if the expedition is in progress
- if (expedition.contains(player)) { //If you're registered, warp you in
- em.getInstance("HorntailFight_" + player.getClient().getChannel()).registerPlayer(player);
- cm.dispose();
- } else { //If you're not in by now, tough luck
- cm.sendOk("Another expedition has taken the initiative to fight Horntail, lets pray for those brave souls.");
- cm.dispose();
- }
- }
- } else if (status == 1) {
- if (selection == 1) {
- cm.createExpedition(horntail);
- cm.sendOk("The #rHorntail Expedition#k has been created.\r\n\r\nTalk to me again to view the current team, or start the fight!");
- cm.dispose();
- return;
- } else if (selection == 2) {
- cm.sendOk("Sure, not everyone's up to challenging the might of Horntail.");
+ } else {
+ if (mode == 0) {
cm.dispose();
return;
}
- } else if (status == 2) {
- if (selection == 1) {
- if (expedition == null) {
- cm.sendOk("The expedition could not be loaded.");
+
+ if (status == 0) {
+ if (player.getLevel() < exped.getMinLevel() && player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement
+ cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
+ cm.dispose();
+ } else if (expedition == null) { //Start an expedition
+ cm.sendSimple("#e#b\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to take on #r" + expedBoss + "#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
+ status = 1;
+ } else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
+ cm.sendSimple(list);
+ status = 2;
+ } else if (expedition.isRegistering()) { //If the expedition is registering
+ if (expedition.contains(player)) { //If you're in it but it hasn't started, be patient
+ cm.sendOk("You have already registered for the expedition. Please wait for #r" + expedition.getLeader().getName() + "#k to begin the expedition.");
+ cm.dispose();
+ } else { //If you aren't in it, you're going to get added
+ cm.sendOk(expedition.addMember(cm.getPlayer()));
+ cm.dispose();
+ }
+ } else if (expedition.isInProgress()) { //Only if the expedition is in progress
+ if (expedition.contains(player)) { //If you're registered, warp you in
+ var eim = em.getInstance(expedName + player.getClient().getChannel());
+ if(eim.getIntProperty("canJoin") == 1) {
+ eim.registerPlayer(player);
+ } else {
+ cm.sendOk("Your expedition already started the battle against " + expedBoss + ". Lets pray for those brave souls.");
+ }
+
+ cm.dispose();
+ } else { //If you're not in by now, tough luck
+ cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
+ cm.dispose();
+ }
+ }
+ } else if (status == 1) {
+ if (selection == 1) {
+ expedition = cm.getExpedition(exped);
+ if(expedition != null) {
+ cm.sendOk("Someone already taken the initiative to be the leader of the expedition. Try joining them!");
+ cm.dispose();
+ return;
+ }
+
+ cm.createExpedition(exped);
+ cm.sendOk("The #r" + expedBoss + " Expedition#k has been created.\r\n\r\nTalk to me again to view the current team, or start the fight!");
+ cm.dispose();
+ return;
+ } else if (selection == 2) {
+ cm.sendOk("Sure, not everyone's up to challenging " + expedBoss + ".");
cm.dispose();
return;
}
- var size = expedition.getMembers().size();
- if (size == 1) {
- cm.sendOk("You are the only member of the expedition.");
+ } else if (status == 2) {
+ if (selection == 1) {
+ if (expedition == null) {
+ cm.sendOk("The expedition could not be loaded.");
+ cm.dispose();
+ return;
+ }
+ var size = expedition.getMembers().size();
+ if (size == 1) {
+ cm.sendOk("You are the only member of the expedition.");
+ cm.dispose();
+ return;
+ }
+ var text = "The following members make up your expedition (Click on them to expel them):\r\n";
+ text += "\r\n\t\t1." + expedition.getLeader().getName();
+ for (var i = 1; i < size; i++) {
+ text += "\r\n#b#L" + (i + 1) + "#" + (i + 1) + ". " + expedition.getMembers().get(i).getName() + "#l\n";
+ }
+ cm.sendSimple(text);
+ status = 6;
+ } else if (selection == 2) {
+ //var min = exped.getMinSize();
+ var min = 1;
+ var size = expedition.getMembers().size();
+ if (size < min) {
+ cm.sendOk("You need at least " + min + " players registered in your expedition.");
+ cm.dispose();
+ return;
+ }
+
+ cm.sendOk("Good luck! All of Leafre is counting on you.");
+ status = 4;
+ } else if (selection == 3) {
+ player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
+ cm.endExpedition(expedition);
+ cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
cm.dispose();
return;
}
- var text = "The following members make up your expedition (Click on them to expel them):\r\n";
- text += "\r\n\t\t1." + expedition.getLeader().getName();
- for (var i = 1; i < size; i++) {
- text += "\r\n#b#L" + (i + 1) + "#" + (i + 1) + ". " + expedition.getMembers().get(i).getName() + "#l\n";
+ } else if (status == 4) {
+ if (em == null) {
+ cm.sendOk("The event could not be initialized, please report this on the forum.");
+ cm.dispose();
+ return;
}
- cm.sendSimple(text);
- status = 6;
- } else if (selection == 2) {
- cm.sendOk("The expedition will begin and you will be escorted to the #bCave of Trial I#k.");
- status = 4;
- } else if (selection == 3) {
- cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
- player.getMap().broadcastMessage(MaplePacketCreator.removeClock());
- player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
- cm.endExpedition(expedition);
- cm.dispose();
- return;
- }
- } else if (status == 4) {
- var min = 1; //horntail.getMinSize();
- var size = expedition.getMembers().size();
- if (size < min) {
- cm.sendOk("You need at least " + min + " players registered in your expedition.");
+
+ em.setProperty("leader", player.getName());
+ em.setProperty("channel", player.getClient().getChannel());
+ if(!em.startInstance(expedition)) {
+ cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
+ cm.dispose();
+ return;
+ }
+
cm.dispose();
return;
- }
- if (em == null) {
- cm.sendOk("The event could not be found, please report this on the forum.");
- cm.dispose();
- return;
- }
- cm.sendOk("Good luck! All of Leafre is counting on you.");
- em.setProperty("channel", player.getClient().getChannel());
- em.startInstance(expedition);
- cm.dispose();
- return;
- } else if (status == 6) {
- if (selection > 0) {
- var banned = expedition.getMembers().get(selection);
- expedition.ban(banned);
- cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
- cm.dispose();
- } else {
- cm.sendSimple(list);
- status = 2;
+ } else if (status == 6) {
+ if (selection > 0) {
+ var banned = expedition.getMembers().get(selection - 1);
+ expedition.ban(banned);
+ cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
+ cm.dispose();
+ } else {
+ cm.sendSimple(list);
+ status = 2;
+ }
}
}
}
\ No newline at end of file
diff --git a/scripts/npc/2090004.js b/scripts/npc/2090004.js
index 3836f4e4a4..8aaad68df3 100644
--- a/scripts/npc/2090004.js
+++ b/scripts/npc/2090004.js
@@ -1,4 +1,5 @@
-/* Author: aaroncsn(MapleSea Like), Ronan Lana
+/* @author aaroncsn(MapleSea Like)
+ * @author Ronan
NPC Name: Mr. Do
Map(s): Mu Lung: Mu Lung(2500000000)
Description: Potion Creator
diff --git a/scripts/npc/2101013.js b/scripts/npc/2101013.js
index 9d88b2e76f..c36d9483b4 100644
--- a/scripts/npc/2101013.js
+++ b/scripts/npc/2101013.js
@@ -24,9 +24,9 @@ function action(mode, type, selection) {
else
status--;
if(status == 0){
- cm.sendAcceptDecline("I don't know how you found out about this, but you came to the right place! For those that wandered around Nihal Desert and are getting homesick, I am offering a flight straight to Victorial Island, non-stop! Don't worry about the flying ship--it's only fallen once or twice! Don't you feel claustrophobic being in a long flight on that small ship? What do you think? Are you willing to take the offer on this direct flight?");
+ cm.sendNext("I don't know how you found out about this, but you came to the right place! For those that wandered around Nihal Desert and are getting homesick, I am offering a flight straight to Victorial Island, non-stop! Don't worry about the flying ship--it's only fallen once or twice! Don't you feel claustrophobic being in a long flight on that small ship?");
} else if(status == 1){
- cm.sendAcceptDecline("Please remember two things. One, this line is actually for overseas shipping, so #rI cannot gurantee exactly which town you'll land#k. Two, since I am putting you in this special flight, it'll be a bit expensive. The service charge is #e#b10,000 mesos#n#k. There's a flight thats about to take off. Are you interested?");
+ cm.sendAcceptDecline("Please remember two things. One, this line is actually for overseas shipping, so #rI cannot gurantee exactly which town you'll land#k. Two, since I am putting you in this special flight, it'll be a bit expensive. The service charge is #e#b10,000 mesos#n#k. There's a flight thats about to take off. Are you interested in this direct flight?");
} else if(status == 2){
cm.sendNext("Okay, ready to takeoff~");
} else if(status == 3){
diff --git a/scripts/npc/9000017.js b/scripts/npc/9000017.js
index 1b92265645..f9ee0e2205 100644
--- a/scripts/npc/9000017.js
+++ b/scripts/npc/9000017.js
@@ -2,7 +2,7 @@
Refining NPC:
* Chaos scroll SYNTHETIZER (rofl)
*
- * By RonanLana
+ * @author RonanLana
*/
var status = 0;
diff --git a/scripts/npc/9000036.js b/scripts/npc/9000036.js
index d560bbd6f7..87cf7cc846 100644
--- a/scripts/npc/9000036.js
+++ b/scripts/npc/9000036.js
@@ -25,7 +25,7 @@
Refining NPC:
* Accessories refiner
*
- * By Ronan Lana
+ * @author Ronan Lana
*/
var status = -1;
diff --git a/scripts/npc/9000041.js b/scripts/npc/9000041.js
index 1089e9c2d7..aeb00fea05 100644
--- a/scripts/npc/9000041.js
+++ b/scripts/npc/9000041.js
@@ -23,7 +23,7 @@
Victoria Road : Henesys
NPC Bazaar:
- * By Ronan Lana
+ * @author Ronan Lana
*/
var options = ["EQUIP","USE","SET-UP","ETC"];
diff --git a/scripts/npc/9040003.js b/scripts/npc/9040003.js
index 55f2822ecb..1153623729 100644
--- a/scripts/npc/9040003.js
+++ b/scripts/npc/9040003.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/*
- * @Author TheRamon, Ronan
+ * @Author TheRamon
+ * @Author Ronan
*
* Sharen III's Soul, Sharenian: Sharen III's Grave (990000700)
*
diff --git a/scripts/npc/9040006.js b/scripts/npc/9040006.js
index d45433c04e..5d18e68346 100644
--- a/scripts/npc/9040006.js
+++ b/scripts/npc/9040006.js
@@ -1,4 +1,5 @@
-/* @Author Lerk, Ronan
+/* @Author Lerk
+ * @Author Ronan
*
* Guardian Statue - Sharenian: Fountain of the Wiseman (990000500)
*
diff --git a/scripts/npc/9103000.js b/scripts/npc/9103000.js
index dde1a4e58f..8ad59a2ea8 100644
--- a/scripts/npc/9103000.js
+++ b/scripts/npc/9103000.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/*
-* Author : Raz, Ronan
+* Author : Raz
+* Author : Ronan
*
* NPC = 9103000 - Pierre
* Map = Ludibrium - Ludibrium Maze 16
diff --git a/scripts/npc/9103001.js b/scripts/npc/9103001.js
index 27891371f3..70ae2af23c 100644
--- a/scripts/npc/9103001.js
+++ b/scripts/npc/9103001.js
@@ -20,7 +20,8 @@
along with this program. If not, see .
*/
/*
-* Author : Raz, Ronan
+* Author : Raz
+* Author : Ronan
*
* NPC = 9103001 - Rolly
* Map = Ludibrium -
diff --git a/scripts/npc/9201113.js b/scripts/npc/9201113.js
index e85cf4189d..408331b17d 100644
--- a/scripts/npc/9201113.js
+++ b/scripts/npc/9201113.js
@@ -20,7 +20,8 @@
*/
/*Jack
*
- *@author SharpAceX (Alan), Ronan
+ *@author SharpAceX (Alan)
+ *@author Ronan
*/
importPackage(Packages.server.expeditions);
importPackage(Packages.tools);
diff --git a/scripts/npc/9270047.js b/scripts/npc/9270047.js
index 55f5c99d78..be8fec82bd 100644
--- a/scripts/npc/9270047.js
+++ b/scripts/npc/9270047.js
@@ -20,7 +20,8 @@
*/
/*Aldol
*
- *@author SharpAceX (Alan), Ronan
+ *@author SharpAceX (Alan)
+ *@author Ronan
*/
importPackage(Packages.server.expeditions);
importPackage(Packages.tools);
@@ -31,6 +32,7 @@ var expedition;
var player;
var em;
var exped = MapleExpeditionType.SCARGA;
+var expedName = "Scarga";
var expedBoss = "Scarlion and Targa";
var expedMap = "Spooky World";
var expedItem = 4032246;
@@ -60,7 +62,7 @@ function action(mode, type, selection) {
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
cm.dispose();
} else if (expedition == null) { //Start an expedition
- cm.sendSimple("#e#b\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to take on #r" + expedBoss + "#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
+ cm.sendSimple("#e#b\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to take on #r" + expedBoss + "#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
status = 1;
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
cm.sendSimple(list);
@@ -75,7 +77,7 @@ function action(mode, type, selection) {
}
} else if (expedition.isInProgress()) { //Only if the expedition is in progress
if (expedition.contains(player)) { //If you're registered, warp you in
- var eim = em.getInstance("Scarga" + player.getClient().getChannel());
+ var eim = em.getInstance(expedName + player.getClient().getChannel());
if(eim.getIntProperty("canJoin") == 1) {
eim.registerPlayer(player);
} else {
diff --git a/scripts/portal/ariant_queens.js b/scripts/portal/ariant_queens.js
new file mode 100644
index 0000000000..fa4f07c190
--- /dev/null
+++ b/scripts/portal/ariant_queens.js
@@ -0,0 +1,3 @@
+//some quest where you must use hidden portals
+function enter(pi) {
+}
\ No newline at end of file
diff --git a/scripts/portal/captinsg00.js b/scripts/portal/captinsg00.js
index afd398df00..670d8e0363 100644
--- a/scripts/portal/captinsg00.js
+++ b/scripts/portal/captinsg00.js
@@ -1,4 +1,4 @@
-/* By RonanLana */
+/* @author RonanLana */
function enter(pi) {
if (!pi.haveItem(4000381)) {
diff --git a/scripts/portal/enterWitch.js b/scripts/portal/enterWitch.js
new file mode 100644
index 0000000000..5c04dd9dd4
--- /dev/null
+++ b/scripts/portal/enterWitch.js
@@ -0,0 +1,15 @@
+function enter(pi) {
+ if (pi.getQuestStatus(20407) == 2) {
+ pi.warp(924010200,0);
+ return true;
+ } else if (pi.getQuestStatus(20406) == 2) {
+ pi.warp(924010100,0);
+ return true;
+ } else if (pi.getQuestStatus(20404) == 2) {
+ pi.warp(924010000,0);
+ return true;
+ } else {
+ pi.playerMessage(5, "I shouldn't go here.. it's creepy!");
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/scripts/portal/guildwaitingenter.js b/scripts/portal/guildwaitingenter.js
index 634af77734..7e262a9201 100644
--- a/scripts/portal/guildwaitingenter.js
+++ b/scripts/portal/guildwaitingenter.js
@@ -19,7 +19,8 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
-/* @Author Lerk, Ronan
+/* @Author Lerk
+ * @Author Ronan
*
* Guild Quest Waiting Room - Entry Portal (map 990000000)
*/
diff --git a/scripts/portal/hontale_BR.js b/scripts/portal/hontale_BR.js
index eb2eaaf2f8..cb979f40d0 100644
--- a/scripts/portal/hontale_BR.js
+++ b/scripts/portal/hontale_BR.js
@@ -21,39 +21,21 @@
*/
function enter(pi) {
if (pi.getPlayer().getMapId() == 240060000) {
- var nextMap = 240060100;
- var eim = pi.getPlayer().getEventInstance()
- var target = eim.getMapInstance(nextMap);
- var targetPortal = target.getPortal("sp");
- // only let people through if the eim is ready
- var avail = eim.getProperty("head1");
- if (avail != "yes") {
- // do nothing; send message to player
- pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
- return false;
- }else {
- pi.getPlayer().changeMap(target, targetPortal);
- if (eim.getProperty("head2spawned") != "yes") {
- eim.setProperty("head2spawned", "yes");
- eim.schedule("headTwo", 5000);
- }
- return true;
- }
+ if(pi.getEventInstance().getIntProperty("defeatedHead") >= 1) {
+ pi.warp(240060100, 0);
+ return true;
+ } else {
+ pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
+ return false;
+ }
} else if (pi.getPlayer().getMapId() == 240060100) {
- var nextMap = 240060200;
- var eim = pi.getPlayer().getEventInstance()
- var target = eim.getMapInstance(nextMap);
- var targetPortal = target.getPortal("sp");
- // only let people through if the eim is ready
- var avail = eim.getProperty("head2");
- if (avail != "yes") {
- // do nothing; send message to player
- pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
- return false;
- }else {
- pi.getPlayer().changeMap(target, targetPortal);
- return true;
- }
+ if(pi.getEventInstance().getIntProperty("defeatedHead") >= 2) {
+ pi.warp(240060200, 0);
+ return true;
+ } else {
+ pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
+ return false;
+ }
}
- return true;
+ return false;
}
\ No newline at end of file
diff --git a/scripts/portal/hontale_Bopen.js b/scripts/portal/hontale_Bopen.js
index a465517ac2..0048dd7a66 100644
--- a/scripts/portal/hontale_Bopen.js
+++ b/scripts/portal/hontale_Bopen.js
@@ -29,10 +29,10 @@ function enter(pi) {
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("sp");
// only let people through if the eim is ready
- var avail = eim.getProperty("2stageclear");
+ var avail = eim.getProperty("1stageclear");
if (avail == null) {
// do nothing; send message to player
- pi.getPlayer().dropMessage(6, "This door is closed.");
+ pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
return false;
}else {
pi.getPlayer().changeMap(target, targetPortal);
@@ -45,10 +45,10 @@ function enter(pi) {
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("sp");
// only let people through if the eim is ready
- var avail = eim.getProperty("3stageclear");
+ var avail = eim.getProperty("2stageclear");
if (avail == null) {
// do nothing; send message to player
- pi.getPlayer().dropMessage(6, "This door is closed.");
+ pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
return false;
}else {
pi.getPlayer().changeMap(target, targetPortal);
@@ -61,10 +61,10 @@ function enter(pi) {
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("sp");
// only let people through if the eim is ready
- var avail = eim.getProperty("4stageclear");
+ var avail = eim.getProperty("3stageclear");
if (avail == null) {
// do nothing; send message to player
- pi.getPlayer().dropMessage(6, "This door is closed.");
+ pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
return false;
}else {
pi.getPlayer().changeMap(target, targetPortal);
@@ -77,10 +77,10 @@ function enter(pi) {
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("sp");
// only let people through if the eim is ready
- var avail = eim.getProperty("5stageclear");
+ var avail = eim.getProperty("4stageclear");
if (avail == null) {
// do nothing; send message to player
- pi.getPlayer().dropMessage(6, "This door is closed.");
+ pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
return false;
}else {
pi.getPlayer().changeMap(target, targetPortal);
@@ -88,14 +88,26 @@ function enter(pi) {
}
}
else if (pi.getPlayer().getMapId() == 240050105) {
- if (pi.haveItem(4001091, 6) && pi.isLeader()) {
- pi.gainItem(4001091, -6);
- pi.getPlayer().dropMessage(6, "The six keys break the seal for a flash...");
- pi.warp(240050100, "st00");
+ var nextMap = 240050100;
+ var eim = pi.getPlayer().getEventInstance()
+ var target = eim.getMapInstance(nextMap);
+ var targetPortal = target.getPortal("st00");
+
+ var avail = eim.getProperty("5stageclear");
+ if (avail == null) {
+ if (pi.haveItem(4001092) && pi.isEventLeader()) {
+ pi.getEventInstance().showClearEffect();
+ pi.getPlayer().dropMessage(6, "The leader's key break the seal for a flash...");
+ pi.getPlayer().changeMap(target, targetPortal);
+ eim.setIntProperty("5stageclear", 1);
+ return true;
+ } else {
+ pi.getPlayer().dropMessage(6, "Horntail\'s Seal is blocking this door. Only the leader with the key can lift this seal.");
+ return false;
+ }
+ }else {
+ pi.getPlayer().changeMap(target, targetPortal);
return true;
- } else {
- pi.getPlayer().dropMessage(6, "Horntail\'s Seal is blocking this door.");
- return false;
}
}
return true;
diff --git a/scripts/portal/hontale_BtoB1.js b/scripts/portal/hontale_BtoB1.js
index d318c86bb6..2d60047ef6 100644
--- a/scripts/portal/hontale_BtoB1.js
+++ b/scripts/portal/hontale_BtoB1.js
@@ -24,20 +24,15 @@
*/
function enter(pi) {
- var nextMap = 240050101;
- var eim = pi.getPlayer().getEventInstance()
- var target = eim.getMapInstance(nextMap);
- var targetPortal = target.getPortal("sp");
- // only let people through if the eim is ready
- var avail = eim.getProperty("1stageclear");
- if (!pi.haveItem(4001092, 1)) {
- // do nothing; send message to player
- pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
+ if (pi.getMap().countPlayers() == 1) {
+ pi.getPlayer().dropMessage(6, "As the last player on this map, you are compelled to wait for the incoming keys.");
return false;
}else {
- pi.gainItem(4001092, -1);
- pi.getPlayer().dropMessage(6, "The key disentegrates as Horntail\'s Seal is broken for a flash...");
- pi.getPlayer().changeMap(target, targetPortal);
+ if(pi.haveItem(4001087)) {
+ pi.getPlayer().dropMessage(6, "You cannot pass to the next map holding the 1st Crystal Key in your inventory.");
+ return false;
+ }
+ pi.warp(240050101);
return true;
}
}
\ No newline at end of file
diff --git a/scripts/portal/hontale_C.js b/scripts/portal/hontale_C.js
index 9595ec0df7..e0fa7ee5f3 100644
--- a/scripts/portal/hontale_C.js
+++ b/scripts/portal/hontale_C.js
@@ -23,31 +23,23 @@
**hontale_c.js
@author Jvlaple
+@author Ronan
*/
function enter(pi) {
-
- if (pi.isLeader() == true) {
+ if (pi.isEventLeader() == true) {
var eim = pi.getPlayer().getEventInstance();
- var party = eim.getPlayers();
var target;
- var theWay = eim.getProperty("theWay");
- var target;
- if (theWay != null) {
- if (theWay = "light") {
- target = eim.getMapInstance(240050300); //light
- } else {
- target = eim.getMapInstance(240050310); //dark
- }
+ var theWay = pi.getMap().getReactorByName("light").getState();
+ if (theWay == 1) {
+ target = 240050300; //light
+ } else if(theWay == 3) {
+ target = 240050310; //dark
} else {
pi.playerMessage(5, "Hit the Lightbulb to determine your fate!");
return false;
}
- var targetPortal = target.getPortal("sp");
- //Warp the full party into the map...
- var partyy = pi.getPlayer().getEventInstance().getPlayers();
- for (var i = 0; i < partyy.size(); i++) {
- party.get(i).changeMap(target, targetPortal);
- }
+
+ eim.warpEventTeam(target);
return true;
} else {
pi.playerMessage(6, "You are not the party leader. Only the party leader may proceed through this portal.");
diff --git a/scripts/portal/hontale_out1.js b/scripts/portal/hontale_out1.js
index 749360cede..eca6d11c30 100644
--- a/scripts/portal/hontale_out1.js
+++ b/scripts/portal/hontale_out1.js
@@ -20,6 +20,6 @@
along with this program. If not, see .
*/
function enter(pi) {
- pi.warp(240060000, "st00");
+ pi.warp(240050400, "sp");
return true;
}
\ No newline at end of file
diff --git a/scripts/portal/nets_in.js b/scripts/portal/nets_in.js
new file mode 100644
index 0000000000..0461160468
--- /dev/null
+++ b/scripts/portal/nets_in.js
@@ -0,0 +1,5 @@
+function enter(pi) {
+ pi.saveLocation("MIRROR");
+ pi.warp(926010000, 0);
+ return true;
+}
\ No newline at end of file
diff --git a/scripts/reactor/2401000.js b/scripts/reactor/2401000.js
index ef5f9e266c..7711a75c8a 100644
--- a/scripts/reactor/2401000.js
+++ b/scripts/reactor/2401000.js
@@ -19,14 +19,17 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
-/* @Author Aexr
+/* @Author Aexr, Ronan
* 2401000.js: Horntail's Cave - Summons Horntail.
*/
function act() {
rm.changeMusic("Bgm14/HonTale");
if (rm.getReactor().getMap().getMonsterById(8810026) == null) {
- rm.spawnMonster(8810026,71,260);
+ rm.getReactor().getMap().spawnHorntailOnGroundBelow(new java.awt.Point(71,260));
+
+ var eim = rm.getEventInstance();
+ eim.restartEventTimer(60 * 60000);
}
rm.mapMessage(6, "From the depths of his cave, here comes Horntail!");
}
\ No newline at end of file
diff --git a/scripts/reactor/2402006.js b/scripts/reactor/2402006.js
new file mode 100644
index 0000000000..b45773bd82
--- /dev/null
+++ b/scripts/reactor/2402006.js
@@ -0,0 +1,30 @@
+/*
+ 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 .
+*/
+
+/* @Author Ronan
+ *
+ * HTPQ Box
+*/
+
+function act(){
+ rm.dropItems();
+}
\ No newline at end of file
diff --git a/scripts/reactor/2406000.js b/scripts/reactor/2406000.js
new file mode 100644
index 0000000000..b2827ae5e6
--- /dev/null
+++ b/scripts/reactor/2406000.js
@@ -0,0 +1,23 @@
+/*
+Dragon nest
+*/
+
+function sendToHeaven() {
+ rm.destroyNpc(2081008);
+ rm.mapMessage(6, "In a flicker of light, Nine Spirit's Little Dragon returns to the place it belongs, high above the skies.");
+ rm.getReactor().getMap().resetReactors();
+}
+
+function touch() {
+ if(rm.haveItem(4001094) && rm.getReactor().getState() == 0) {
+ rm.hitReactor();
+ rm.gainItem(4001094, -1);
+ }
+}
+
+function untouch() {}
+
+function act() {
+ rm.spawnNpc(2081008);
+ rm.schedule("sendToHeaven", 12 * 1000);
+}
\ No newline at end of file
diff --git a/scripts/reactor/2408002.js b/scripts/reactor/2408002.js
index d66a504b75..3b55b5d787 100644
--- a/scripts/reactor/2408002.js
+++ b/scripts/reactor/2408002.js
@@ -25,34 +25,36 @@
*@author Jvlaple
*/
+importPackage(Packages.client.inventory);
+
function act() {
var eim = rm.getPlayer().getEventInstance();
- var party = rm.getPlayer().getEventInstance().getPlayers();
var womanfred = eim.getMapFactory().getMap(240050100);
var vvpMap = rm.getPlayer().getMapId();
var vvpKey;
- var vvpOrig = 4001087;
+ var vvpOrig = 4001088;
var vvpStage = -1;
- rm.mapMessage(6, "The key is teleported somewhere...");
+ eim.showClearEffect(false, vvpMap);
+ rm.mapMessage(6, "The key has been teleported somewhere...");
switch (vvpMap) {
case 240050101 : {
vvpKey = vvpOrig;
- vvpStage = 2;
+ vvpStage = 1;
break;
}
case 240050102 : {
vvpKey = vvpOrig + 1;
- vvpStage = 3;
+ vvpStage = 2;
break;
}
case 240050103 : {
vvpKey = vvpOrig + 2;
- vvpStage = 4;
+ vvpStage = 3;
break;
}
case 240050104 : {
vvpKey = vvpOrig + 3;
- vvpStage = 5;
+ vvpStage = 4;
break;
}
default : {
@@ -60,11 +62,14 @@ function act() {
break;
}
}
- var tehWomanfred = new client.Item(vvpKey, 0, 1);
+
+ eim.setIntProperty(vvpStage + "stageclear", 1);
+
+ var tehWomanfred = new Item(vvpKey, 0, 1);
var theWomanfred = womanfred.getReactorByName("keyDrop1");
var dropper = eim.getPlayers().get(0);
womanfred.spawnItemDrop(theWomanfred, dropper, tehWomanfred, theWomanfred.getPosition(), true, true);
- womanfred.dropMessage(5, "A bright flash of light, then a key suddenly appears somewhere in the map.");
+ eim.getMapInstance(240050100).dropMessage(6, "A bright flash of light, then a key suddenly appears somewhere in the map.");
}
\ No newline at end of file
diff --git a/scripts/reactor/2408004.js b/scripts/reactor/2408004.js
new file mode 100644
index 0000000000..b0dd87c0fc
--- /dev/null
+++ b/scripts/reactor/2408004.js
@@ -0,0 +1,3 @@
+function act() {
+ rm.spawnNpc(2081008);
+}
\ No newline at end of file
diff --git a/scripts/reactor/9208007.js b/scripts/reactor/9208007.js
index f4196455c2..26a3faf8d8 100644
--- a/scripts/reactor/9208007.js
+++ b/scripts/reactor/9208007.js
@@ -22,7 +22,8 @@
/*
Stage 2: Spear destinations - Guild Quest
-@Author Lerk, Ronan
+@Author Lerk
+@Author Ronan
*/
function act() {
diff --git a/sql/db_drops.sql b/sql/db_drops.sql
index 86c21bd006..f71568d294 100644
--- a/sql/db_drops.sql
+++ b/sql/db_drops.sql
@@ -19132,7 +19132,29 @@
(9420544, 1003023, 1, 1, 0, 50000),
(9420544, 1003024, 1, 1, 0, 50000),
(9420549, 1003025, 1, 1, 0, 50000),
-(9420549, 1003026, 1, 1, 0, 50000);
+(9420549, 1003026, 1, 1, 0, 50000),
+(9300066, 4001087, 1, 1, 0, 999999),
+(9300067, 4001088, 1, 1, 0, 999999),
+(9300069, 4001089, 1, 1, 0, 999999),
+(9300071, 4001090, 1, 1, 0, 999999),
+(9300073, 4001091, 1, 1, 0, 999999),
+(9300075, 4001092, 1, 1, 0, 999999),
+(9300077, 4001093, 1, 1, 0, 999999),
+(9300065, 4001080, 1, 1, 7302, 40000),
+(9300065, 4001081, 1, 1, 7302, 40000),
+(9300068, 4001081, 1, 1, 7302, 40000),
+(9300068, 4001082, 1, 1, 7302, 40000),
+(9300070, 4001080, 1, 1, 7302, 40000),
+(9300070, 4001082, 1, 1, 7302, 40000),
+(9300072, 4001080, 1, 1, 7302, 40000),
+(9300072, 4001081, 1, 1, 7302, 40000),
+(9300074, 4001081, 1, 1, 7302, 40000),
+(9300074, 4001082, 1, 1, 7302, 40000),
+(9300076, 4001080, 1, 1, 7302, 40000),
+(9300076, 4001082, 1, 1, 7302, 40000),
+(9300078, 4001080, 1, 1, 7302, 40000),
+(9300078, 4001081, 1, 1, 7302, 40000),
+(9300078, 4001082, 1, 1, 7302, 40000);
# (dropperid, itemid, minqty, maxqty, questid, chance)
@@ -19440,7 +19462,8 @@
(2001012, 4001045, 1, -1),
(2001013, 4001045, 1, -1),
(2001014, 4001045, 1, -1),
- (2001015, 4001045, 1, -1);
+ (2001015, 4001045, 1, -1),
+ (2402006, 4001093, 1, -1);
# updates info for all cards on monster book
DROP TABLE `monstercarddata`;
diff --git a/src/client/command/Commands.java b/src/client/command/Commands.java
index 2b84627e97..a4af539440 100644
--- a/src/client/command/Commands.java
+++ b/src/client/command/Commands.java
@@ -837,18 +837,11 @@ public class Commands {
player.setMp(player.getMaxMp());
player.updateSingleStat(MapleStat.MP, player.getMaxMp());
} else if (sub[0].equals("buffmap")) {
- for (MapleCharacter chr : player.getMap().getCharacters()){
- //GM Skills : Haste(Super) - Holy Symbol - Bless - Hyper Body - Echo of Hero
- SkillFactory.getSkill(9101001).getEffect(SkillFactory.getSkill(9101001).getMaxLevel()).applyTo(chr);
- SkillFactory.getSkill(9101002).getEffect(SkillFactory.getSkill(9101002).getMaxLevel()).applyTo(chr);
- SkillFactory.getSkill(9101003).getEffect(SkillFactory.getSkill(9101003).getMaxLevel()).applyTo(chr);
- SkillFactory.getSkill(9101008).getEffect(SkillFactory.getSkill(9101008).getMaxLevel()).applyTo(chr);
- SkillFactory.getSkill(1005).getEffect(SkillFactory.getSkill(1005).getMaxLevel()).applyTo(chr);
- chr.setHp(chr.getMaxHp());
- chr.updateSingleStat(MapleStat.HP, chr.getMaxHp());
- chr.setMp(chr.getMaxMp());
- chr.updateSingleStat(MapleStat.MP, chr.getMaxMp());
- }
+ SkillFactory.getSkill(9101001).getEffect(SkillFactory.getSkill(9101001).getMaxLevel()).applyTo(player, true);
+ SkillFactory.getSkill(9101002).getEffect(SkillFactory.getSkill(9101002).getMaxLevel()).applyTo(player, true);
+ SkillFactory.getSkill(9101003).getEffect(SkillFactory.getSkill(9101003).getMaxLevel()).applyTo(player, true);
+ SkillFactory.getSkill(9101008).getEffect(SkillFactory.getSkill(9101008).getMaxLevel()).applyTo(player, true);
+ SkillFactory.getSkill(1005).getEffect(SkillFactory.getSkill(1005).getMaxLevel()).applyTo(player, true);
} else if (sub[0].equals("buff")) {
if (sub.length < 2){
player.yellowMessage("Syntax: !buff ");
@@ -905,7 +898,6 @@ public class Commands {
eu.setHp(incval);
eu.setMp(incval);
eu.setSpeed(incval);
- eu.setHands(incval);
eu.setWatk(incval);
eu.setDex(incval);
eu.setInt(incval);
diff --git a/src/client/inventory/Equip.java b/src/client/inventory/Equip.java
index fdefc5f195..e3e01426a8 100644
--- a/src/client/inventory/Equip.java
+++ b/src/client/inventory/Equip.java
@@ -376,63 +376,79 @@ public class Equip extends Item {
boolean gotVicious = false, gotSlot = false;
String lvupStr = "'" + MapleItemInformationProvider.getInstance().getName(this.getItemId()) + "' is now level " + itemLevel + "! ";
+
+ Integer statUp, maxStat = ServerConstants.MAX_EQUIPMNT_STAT;
for (Pair stat : stats) {
switch (stat.getLeft()) {
case incDEX:
- dex += stat.getRight();
- lvupStr += "+" + stat.getRight() + "DEX ";
+ statUp = Math.min(stat.getRight(), maxStat - dex);
+ dex += statUp;
+ lvupStr += "+" + statUp + "DEX ";
break;
case incSTR:
- str += stat.getRight();
- lvupStr += "+" + stat.getRight() + "STR ";
+ statUp = Math.min(stat.getRight(), maxStat - str);
+ str += statUp;
+ lvupStr += "+" + statUp + "STR ";
break;
case incINT:
- _int += stat.getRight();
- lvupStr += "+" + stat.getRight() + "INT ";
+ statUp = Math.min(stat.getRight(), maxStat - _int);
+ _int += statUp;
+ lvupStr += "+" + statUp + "INT ";
break;
case incLUK:
- luk += stat.getRight();
- lvupStr += "+" + stat.getRight() + "LUK ";
+ statUp = Math.min(stat.getRight(), maxStat - luk);
+ luk += statUp;
+ lvupStr += "+" + statUp + "LUK ";
break;
case incMHP:
- hp += stat.getRight();
- lvupStr += "+" + stat.getRight() + "HP ";
+ statUp = Math.min(stat.getRight(), maxStat - hp);
+ hp += statUp;
+ lvupStr += "+" + statUp + "HP ";
break;
case incMMP:
- mp += stat.getRight();
- lvupStr += "+" + stat.getRight() + "MP ";
+ statUp = Math.min(stat.getRight(), maxStat - mp);
+ mp += statUp;
+ lvupStr += "+" + statUp + "MP ";
break;
case incPAD:
- watk += stat.getRight();
- lvupStr += "+" + stat.getRight() + "WATK ";
+ statUp = Math.min(stat.getRight(), maxStat - watk);
+ watk += statUp;
+ lvupStr += "+" + statUp + "WATK ";
break;
case incMAD:
- matk += stat.getRight();
- lvupStr += "+" + stat.getRight() + "MATK ";
+ statUp = Math.min(stat.getRight(), maxStat - matk);
+ matk += statUp;
+ lvupStr += "+" + statUp + "MATK ";
break;
case incPDD:
- wdef += stat.getRight();
- lvupStr += "+" + stat.getRight() + "WDEF ";
+ statUp = Math.min(stat.getRight(), maxStat - wdef);
+ wdef += statUp;
+ lvupStr += "+" + statUp + "WDEF ";
break;
case incMDD:
- mdef += stat.getRight();
- lvupStr += "+" + stat.getRight() + "MDEF ";
+ statUp = Math.min(stat.getRight(), maxStat - mdef);
+ mdef += statUp;
+ lvupStr += "+" + statUp + "MDEF ";
break;
case incEVA:
- avoid += stat.getRight();
- lvupStr += "+" + stat.getRight() + "AVOID ";
+ statUp = Math.min(stat.getRight(), maxStat - avoid);
+ avoid += statUp;
+ lvupStr += "+" + statUp + "AVOID ";
break;
case incACC:
- acc += stat.getRight();
- lvupStr += "+" + stat.getRight() + "ACC ";
+ statUp = Math.min(stat.getRight(), maxStat - acc);
+ acc += statUp;
+ lvupStr += "+" + statUp + "ACC ";
break;
case incSpeed:
- speed += stat.getRight();
- lvupStr += "+" + stat.getRight() + "SPEED ";
+ statUp = Math.min(stat.getRight(), maxStat - speed);
+ speed += statUp;
+ lvupStr += "+" + statUp + "SPEED ";
break;
case incJump:
- jump += stat.getRight();
- lvupStr += "+" + stat.getRight() + "JUMP ";
+ statUp = Math.min(stat.getRight(), maxStat - jump);
+ jump += statUp;
+ lvupStr += "+" + statUp + "JUMP ";
break;
case incVicious:
diff --git a/src/constants/ServerConstants.java b/src/constants/ServerConstants.java
index 226d0b1e73..640f289127 100644
--- a/src/constants/ServerConstants.java
+++ b/src/constants/ServerConstants.java
@@ -70,6 +70,7 @@ public class ServerConstants {
public static final boolean USE_EQUIPMNT_LVLUP_SLOTS = true;//Equips can upgrade slots at level up.
public static final boolean USE_EQUIPMNT_LVLUP_POWER = true;//Enable more powerful stats upgrades at equip level up.
public static final int MAX_EQUIPMNT_LVLUP_STAT_GAIN = 10000; //Max stat upgrade an equipment can have on a levelup.
+ public static final int MAX_EQUIPMNT_STAT = 32767; //Max stat on an equipment by leveling up.
public static final int USE_EQUIPMNT_LVLUP = 7; //All equips lvlup at max level of N, set 1 to disable.
public static final int FAME_GAIN_BY_QUEST = 4; //Fame gain each N quest completes, set 0 to disable.
public static final int SCROLL_CHANCE_RATE = 10; //Number of tries for success on a scroll, set 0 for default.
diff --git a/src/net/server/channel/handlers/ChangeMapHandler.java b/src/net/server/channel/handlers/ChangeMapHandler.java
index e3923ef816..d58a74c710 100644
--- a/src/net/server/channel/handlers/ChangeMapHandler.java
+++ b/src/net/server/channel/handlers/ChangeMapHandler.java
@@ -90,43 +90,46 @@ public final class ChangeMapHandler extends AbstractMaplePacketHandler {
chr.setHp(50);
chr.changeMap(to, to.getRandomPlayerSpawnpoint());
}
- } else if (targetid != -1 && chr.isGM()) {
- MapleMap to = chr.getWarpMap(targetid);
- chr.changeMap(to, to.getPortal(0));
- } else if (targetid != -1 && !chr.isGM()) {//Thanks celino for saving me some time (:
- final int divi = chr.getMapId() / 100;
- boolean warp = false;
- if (divi == 0) {
- if (targetid == 10000) {
- warp = true;
- }
- } else if (divi == 20100) {
- if (targetid == 104000000) {
- c.announce(MaplePacketCreator.lockUI(false));
- c.announce(MaplePacketCreator.disableUI(false));
- warp = true;
- }
- } else if (divi == 9130401) { // Only allow warp if player is already in Intro map, or else = hack
- if (targetid == 130000000 || targetid / 100 == 9130401) { // Cygnus introduction
- warp = true;
- }
- } else if (divi == 9140900) { // Aran Introduction
- if (targetid == 914090011 || targetid == 914090012 || targetid == 914090013 || targetid == 140090000) {
- warp = true;
- }
- } else if (divi / 10 == 1020) { // Adventurer movie clip Intro
- if (targetid == 1020000) {
- warp = true;
- }
- } else if(divi / 10 >= 980040 && divi / 10 <= 980045) {
- if(targetid == 980040000) {
- warp = true;
- }
- }
- if (warp) {
- final MapleMap to = chr.getWarpMap(targetid);
- chr.changeMap(to, to.getPortal(0));
- }
+ } else if (targetid != -1) {
+ if(chr.isGM()) {
+ MapleMap to = chr.getWarpMap(targetid);
+ chr.changeMap(to, to.getPortal(0));
+ }
+ else {
+ final int divi = chr.getMapId() / 100;
+ boolean warp = false;
+ if (divi == 0) {
+ if (targetid == 10000) {
+ warp = true;
+ }
+ } else if (divi == 20100) {
+ if (targetid == 104000000) {
+ c.announce(MaplePacketCreator.lockUI(false));
+ c.announce(MaplePacketCreator.disableUI(false));
+ warp = true;
+ }
+ } else if (divi == 9130401) { // Only allow warp if player is already in Intro map, or else = hack
+ if (targetid == 130000000 || targetid / 100 == 9130401) { // Cygnus introduction
+ warp = true;
+ }
+ } else if (divi == 9140900) { // Aran Introduction
+ if (targetid == 914090011 || targetid == 914090012 || targetid == 914090013 || targetid == 140090000) {
+ warp = true;
+ }
+ } else if (divi / 10 == 1020) { // Adventurer movie clip Intro
+ if (targetid == 1020000) {
+ warp = true;
+ }
+ } else if(divi / 10 >= 980040 && divi / 10 <= 980045) {
+ if(targetid == 980040000) {
+ warp = true;
+ }
+ }
+ if (warp) {
+ final MapleMap to = chr.getWarpMap(targetid);
+ chr.changeMap(to, to.getPortal(0));
+ }
+ }
}
if (portal != null && !portal.getPortalStatus()) {
c.announce(MaplePacketCreator.blockedMessage(1));
diff --git a/src/net/server/channel/handlers/DoorHandler.java b/src/net/server/channel/handlers/DoorHandler.java
index 7de6e0cae1..7f6e3c81ce 100644
--- a/src/net/server/channel/handlers/DoorHandler.java
+++ b/src/net/server/channel/handlers/DoorHandler.java
@@ -29,7 +29,8 @@ import tools.data.input.SeekableLittleEndianAccessor;
/**
*
- * @author Matze, Ronan
+ * @author Matze
+ * @author Ronan
*/
public final class DoorHandler extends AbstractMaplePacketHandler {
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
diff --git a/src/net/server/channel/handlers/ItemIdSortHandler.java b/src/net/server/channel/handlers/ItemIdSortHandler.java
index 9a367916f3..b495ad5167 100644
--- a/src/net/server/channel/handlers/ItemIdSortHandler.java
+++ b/src/net/server/channel/handlers/ItemIdSortHandler.java
@@ -40,11 +40,10 @@ import server.MapleItemInformationProvider;
/**
*
* @author BubblesDev
+ * @author Ronan
*/
class PairedQuicksort {
- /* by RonanLana */
-
private int i = 0;
private int j = 0;
private final ArrayList intersect;
diff --git a/src/net/server/channel/handlers/ItemPickupHandler.java b/src/net/server/channel/handlers/ItemPickupHandler.java
index 7e58a5bcbd..92f33f18d5 100644
--- a/src/net/server/channel/handlers/ItemPickupHandler.java
+++ b/src/net/server/channel/handlers/ItemPickupHandler.java
@@ -29,7 +29,8 @@ import client.MapleClient;
/**
*
- * @author Matze, Ronan
+ * @author Matze
+ * @author Ronan
*/
public final class ItemPickupHandler extends AbstractMaplePacketHandler {
diff --git a/src/net/server/channel/handlers/PetLootHandler.java b/src/net/server/channel/handlers/PetLootHandler.java
index 38a7d2a448..40a4697404 100644
--- a/src/net/server/channel/handlers/PetLootHandler.java
+++ b/src/net/server/channel/handlers/PetLootHandler.java
@@ -31,7 +31,8 @@ import tools.data.input.SeekableLittleEndianAccessor;
import constants.ServerConstants;
/**
- * @author TheRamon, Ronan
+ * @author TheRamon
+ * @author Ronan
*/
public final class PetLootHandler extends AbstractMaplePacketHandler {
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
diff --git a/src/net/server/guild/MapleAlliance.java b/src/net/server/guild/MapleAlliance.java
index 2c5df5c9d3..0128d25c29 100644
--- a/src/net/server/guild/MapleAlliance.java
+++ b/src/net/server/guild/MapleAlliance.java
@@ -37,7 +37,8 @@ import tools.MaplePacketCreator;
/**
*
- * @author XoticStory, Ronan.
+ * @author XoticStory
+ * @author Ronan
*/
public class MapleAlliance {
final private List guilds = new LinkedList<>();
diff --git a/src/scripting/AbstractPlayerInteraction.java b/src/scripting/AbstractPlayerInteraction.java
index f86479138c..da5ba87270 100644
--- a/src/scripting/AbstractPlayerInteraction.java
+++ b/src/scripting/AbstractPlayerInteraction.java
@@ -748,13 +748,13 @@ public class AbstractPlayerInteraction {
map.broadcastMessage(MaplePacketCreator.spawnNPC(npc));
}
}
-
+
public void spawnMonster(int id, int x, int y) {
MapleMonster monster = MapleLifeFactory.getMonster(id);
monster.setPosition(new Point(x, y));
getPlayer().getMap().spawnMonster(monster);
}
-
+
public MapleMonster getMonsterLifeFactory(int mid) {
return MapleLifeFactory.getMonster(mid);
}
diff --git a/src/scripting/event/EventInstanceManager.java b/src/scripting/event/EventInstanceManager.java
index 918f136215..c629f994e1 100644
--- a/src/scripting/event/EventInstanceManager.java
+++ b/src/scripting/event/EventInstanceManager.java
@@ -68,7 +68,8 @@ import tools.MaplePacketCreator;
/**
*
- * @author Matze, Ronan
+ * @author Matze
+ * @author Ronan
*/
public class EventInstanceManager {
private Map chars = new HashMap<>();
@@ -415,11 +416,13 @@ public class EventInstanceManager {
}
public void changedLeader(MapleCharacter ldr) {
- try {
+ try {
em.getIv().invokeFunction("changedLeader", this, ldr);
} catch (ScriptException | NoSuchMethodException ex) {
ex.printStackTrace();
}
+
+ leaderId = ldr.getId();
}
public void monsterKilled(MapleMonster mob) {
@@ -1002,6 +1005,10 @@ public class EventInstanceManager {
showClearEffect(hasGate, getLeader().getMapId());
}
+ public final void showClearEffect(int mapId) {
+ showClearEffect(false, mapId);
+ }
+
public final void showClearEffect(boolean hasGate, int mapId) {
showClearEffect(hasGate, mapId, "gate", 2);
}
diff --git a/src/scripting/reactor/ReactorActionManager.java b/src/scripting/reactor/ReactorActionManager.java
index 3e17b54adb..1a9fd257c7 100644
--- a/src/scripting/reactor/ReactorActionManager.java
+++ b/src/scripting/reactor/ReactorActionManager.java
@@ -45,7 +45,8 @@ import server.maps.MapleReactor;
import server.maps.ReactorDropEntry;
/**
- * @author Lerk, Ronan
+ * @author Lerk
+ * @author Ronan
*/
public class ReactorActionManager extends AbstractPlayerInteraction {
private MapleReactor reactor;
@@ -59,6 +60,14 @@ public class ReactorActionManager extends AbstractPlayerInteraction {
this.iv = iv;
}
+ public void hitReactor() {
+ reactor.hitReactor(client);
+ }
+
+ public void destroyNpc(int npcId) {
+ reactor.getMap().destroyNPC(npcId);
+ }
+
public void dropItems() {
dropItems(false, 0, 0, 0, 0);
}
diff --git a/src/server/MapleStatEffect.java b/src/server/MapleStatEffect.java
index ff2ee71593..7dd399f6fd 100644
--- a/src/server/MapleStatEffect.java
+++ b/src/server/MapleStatEffect.java
@@ -699,14 +699,19 @@ public class MapleStatEffect {
}
public boolean applyTo(MapleCharacter chr) {
- return applyTo(chr, chr, true, null);
+ return applyTo(chr, chr, true, null, false);
+ }
+
+ public boolean applyTo(MapleCharacter chr, boolean useMaxRange) {
+ return applyTo(chr, chr, true, null, useMaxRange);
}
public boolean applyTo(MapleCharacter chr, Point pos) {
- return applyTo(chr, chr, true, pos);
+ return applyTo(chr, chr, true, pos, false);
}
- private boolean applyTo(MapleCharacter applyfrom, MapleCharacter applyto, boolean primary, Point pos) {
+ // primary: the player caster of the buff
+ private boolean applyTo(MapleCharacter applyfrom, MapleCharacter applyto, boolean primary, Point pos, boolean useMaxRange) {
if (skill && (sourceid == GM.HIDE || sourceid == SuperGM.HIDE)) {
applyto.toggleHide(false);
return true;
@@ -724,11 +729,14 @@ public class MapleStatEffect {
}
}
List> hpmpupdate = new ArrayList<>(2);
- if (!primary && isResurrection()) {
- hpchange = applyto.getMaxHp();
- applyto.setStance(0);
- applyto.getMap().broadcastMessage(applyto, MaplePacketCreator.removePlayerFromMap(applyto.getId()), false);
- applyto.getMap().broadcastMessage(applyto, MaplePacketCreator.spawnPlayerMapobject(applyto), false);
+ if (!primary) {
+ if(isResurrection()) {
+ hpchange = applyto.getMaxHp();
+ applyto.setStance(0);
+
+ applyto.getMap().broadcastMessage(applyto, MaplePacketCreator.removePlayerFromMap(applyto.getId()), false);
+ applyto.getMap().broadcastMessage(applyto, MaplePacketCreator.spawnPlayerMapobject(applyto), false);
+ }
}
if (isDispel() && makeChanceResult()) {
applyto.dispelDebuffs();
@@ -818,7 +826,7 @@ public class MapleStatEffect {
}
if (primary && (overTime || isHeal())) {
- applyBuff(applyfrom);
+ applyBuff(applyfrom, useMaxRange);
}
if (primary && isMonsterBuff()) {
@@ -872,13 +880,17 @@ public class MapleStatEffect {
applyfrom.getMap().spawnMist(mist, getDuration(), mist.isPoisonMist(), false, mist.isRecoveryMist());
} else if(isTimeLeap()) {
applyto.removeAllCooldownsExcept(Buccaneer.TIME_LEAP, true);
+ } else if(isHyperBody() && !primary) {
+ applyto.getMap().broadcastMessage(applyto, MaplePacketCreator.removePlayerFromMap(applyto.getId()), false);
+ applyto.getMap().broadcastMessage(applyto, MaplePacketCreator.spawnPlayerMapobject(applyto), false);
}
+
return true;
}
- private void applyBuff(MapleCharacter applyfrom) {
+ private void applyBuff(MapleCharacter applyfrom, boolean useMaxRange) {
if (isPartyBuff() && (applyfrom.getParty() != null || isGmBuff())) {
- Rectangle bounds = calculateBoundingBox(applyfrom.getPosition(), applyfrom.isFacingLeft());
+ Rectangle bounds = (!useMaxRange) ? calculateBoundingBox(applyfrom.getPosition(), applyfrom.isFacingLeft()) : new Rectangle(Integer.MIN_VALUE / 2, Integer.MIN_VALUE / 2, Integer.MAX_VALUE, Integer.MAX_VALUE);
List affecteds = applyfrom.getMap().getMapObjectsInRect(bounds, Arrays.asList(MapleMapObjectType.PLAYER));
List affectedp = new ArrayList<>(affecteds.size());
for (MapleMapObject affectedmo : affecteds) {
@@ -890,7 +902,7 @@ public class MapleStatEffect {
}
}
for (MapleCharacter affected : affectedp) {
- applyTo(applyfrom, affected, false, null);
+ applyTo(applyfrom, affected, false, null, useMaxRange);
affected.getClient().announce(MaplePacketCreator.showOwnBuffEffect(sourceid, 2));
affected.getMap().broadcastMessage(affected, MaplePacketCreator.showBuffeffect(affected.getId(), sourceid, 2), false);
}
@@ -1379,6 +1391,10 @@ public class MapleStatEffect {
private boolean isCygnusFA() {
return skill && (sourceid == DawnWarrior.FINAL_ATTACK || sourceid == WindArcher.FINAL_ATTACK);
}
+
+ private boolean isHyperBody() {
+ return skill && (sourceid == Spearman.HYPER_BODY || sourceid == GM.HYPER_BODY || sourceid == SuperGM.HYPER_BODY);
+ }
private boolean isComboReset() {
return sourceid == Aran.COMBO_BARRIER || sourceid == Aran.COMBO_DRAIN;
diff --git a/src/server/MapleTrade.java b/src/server/MapleTrade.java
index a346af8fed..0768c5a942 100644
--- a/src/server/MapleTrade.java
+++ b/src/server/MapleTrade.java
@@ -38,7 +38,8 @@ import constants.ServerConstants;
/**
*
- * @author Matze, Ronan (concurrency safety)
+ * @author Matze
+ * @author Ronan (concurrency safety)
*/
public class MapleTrade {
private MapleTrade partner = null;
diff --git a/src/server/life/MapleNPC.java b/src/server/life/MapleNPC.java
index da7f2ed03d..7ddffac09c 100644
--- a/src/server/life/MapleNPC.java
+++ b/src/server/life/MapleNPC.java
@@ -54,6 +54,7 @@ public class MapleNPC extends AbstractLoadedMapleLife {
@Override
public void sendDestroyData(MapleClient client) {
+ client.announce(MaplePacketCreator.removeNPCController(getObjectId()));
client.announce(MaplePacketCreator.removeNPC(getObjectId()));
}
diff --git a/src/server/maps/MapleDoor.java b/src/server/maps/MapleDoor.java
index 3ebd0c9e1e..09672b6a49 100644
--- a/src/server/maps/MapleDoor.java
+++ b/src/server/maps/MapleDoor.java
@@ -30,7 +30,8 @@ import client.MapleCharacter;
/**
*
- * @author Matze, Ronan
+ * @author Matze
+ * @author Ronan
*/
public class MapleDoor {
private int ownerId;
diff --git a/src/server/maps/MapleMap.java b/src/server/maps/MapleMap.java
index 610cdcd69a..576424570d 100644
--- a/src/server/maps/MapleMap.java
+++ b/src/server/maps/MapleMap.java
@@ -722,6 +722,14 @@ public class MapleMap {
}
return mobs;
}
+
+ public void broadcastHorntailVictory() {
+ for (Channel cserv : Server.getInstance().getWorld(world).getChannels()) {
+ for (MapleCharacter player : cserv.getPlayerStorage().getAllCharacters()) {
+ player.dropMessage("To the crew that have finally conquered Horned Tail after numerous attempts, I salute thee! You are the true heroes of Leafre!!");
+ }
+ }
+ }
public void killMonster(final MapleMonster monster, final MapleCharacter chr, final boolean withDrops) {
killMonster(monster, chr, withDrops, 1);
@@ -760,13 +768,7 @@ public class MapleMap {
}
}
}
- if (monster.getId() == 8810018 && chr.getMapId() == 240060200) {
- for (Channel cserv : Server.getInstance().getWorld(world).getChannels()) {
- for (MapleCharacter player : cserv.getPlayerStorage().getAllCharacters()) {
- player.dropMessage("To the crew that have finally conquered Horned Tail after numerous attempts, I salute thee! You are the true heroes of Leafre!!");
- }
- }
- }
+
spawnedMonstersOnMap.decrementAndGet();
monster.setHp(0);
//if (monster.getStats().selfDestruction() == null) {//FUU BOMBS D:
@@ -1084,6 +1086,24 @@ public class MapleMap {
}
return false;
}
+
+ public void destroyNPC(int npcid) {
+ List npcs = getMapObjectsInRange(new Point(0, 0), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.NPC));
+
+ objectWLock.lock();
+ try {
+ for (MapleMapObject obj : npcs) {
+ if (((MapleNPC) obj).getId() == npcid) {
+ broadcastMessage(MaplePacketCreator.removeNPCController(obj.getObjectId()));
+ broadcastMessage(MaplePacketCreator.removeNPC(obj.getObjectId()));
+
+ this.mapobjects.remove(Integer.valueOf(obj.getObjectId()));
+ }
+ }
+ } finally {
+ objectWLock.unlock();
+ }
+ }
public MapleMapObject getMapObject(int oid) {
objectRLock.lock();
@@ -1905,8 +1925,12 @@ public class MapleMap {
}
}
+ public void dropMessage(int type, String message) {
+ broadcastStringMessage(type, message);
+ }
+
public void broadcastStringMessage(int type, String message) {
- broadcastMessage(MaplePacketCreator.serverNotice(type, message));
+ broadcastMessage(MaplePacketCreator.serverNotice(type, message));
}
public void broadcastMessage(final byte[] packet) {
@@ -2888,7 +2912,7 @@ public class MapleMap {
objectRLock.unlock();
}
}
-
+
public void setMobInterval(short interval) {
this.mobInterval = interval;
}
diff --git a/src/server/quest/actions/ItemAction.java b/src/server/quest/actions/ItemAction.java
index 61fe2c5ad2..c5b517484c 100644
--- a/src/server/quest/actions/ItemAction.java
+++ b/src/server/quest/actions/ItemAction.java
@@ -42,7 +42,8 @@ import tools.Randomizer;
/**
*
- * @author Tyler (Twdtwd), Ronan
+ * @author Tyler (Twdtwd)
+ * @author Ronan
*/
public class ItemAction extends MapleQuestAction {
List items = new ArrayList<>();
diff --git a/src/tools/MaplePacketCreator.java b/src/tools/MaplePacketCreator.java
index 8d8abe96a4..3f8e2b88ea 100644
--- a/src/tools/MaplePacketCreator.java
+++ b/src/tools/MaplePacketCreator.java
@@ -949,7 +949,7 @@ public class MaplePacketCreator {
/**
* Gets an empty stat update.
*
- * @return The empy stat update packet.
+ * @return The empty stat update packet.
*/
public static byte[] enableActions() {
return updatePlayerStats(EMPTY_STATUPDATE, true, null);
@@ -1325,7 +1325,7 @@ public class MaplePacketCreator {
mplew.writeBool(MiniMap);
return mplew.getPacket();
}
-
+
/**
* Gets a spawn monster packet.
*
@@ -2076,7 +2076,7 @@ public class MaplePacketCreator {
List onedList = damage.get(oned);
if (onedList != null) {
lew.writeInt(oned.intValue());
- lew.write(0xFF);
+ lew.write(0x0);
if (skill == 4211006) {
lew.write(onedList.size());
}
@@ -5676,11 +5676,21 @@ public class MaplePacketCreator {
return mplew.getPacket();
}
- public static byte[] removeNPC(int oid) { //Make npc's invisible
+ public static byte[] removeNPC(int oid) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
+ mplew.writeShort(SendOpcode.REMOVE_NPC.getValue());
+ mplew.writeInt(oid);
+
+ return mplew.getPacket();
+ }
+
+ public static byte[] removeNPCController(int objectid) {
+ MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
+
mplew.writeShort(SendOpcode.SPAWN_NPC_REQUEST_CONTROLLER.getValue());
mplew.write(0);
- mplew.writeInt(oid);
+ mplew.writeInt(objectid);
+
return mplew.getPacket();
}
diff --git a/wz/Item.wz/Etc/0400.img.xml b/wz/Item.wz/Etc/0400.img.xml
index bf66ffdc68..6718c2dda1 100644
--- a/wz/Item.wz/Etc/0400.img.xml
+++ b/wz/Item.wz/Etc/0400.img.xml
@@ -7126,8 +7126,7 @@
-
-
+
diff --git a/wz/Reactor.wz/2406000.img.xml b/wz/Reactor.wz/2406000.img.xml
index 8a5d3b7279..9d7cd4f4b8 100644
--- a/wz/Reactor.wz/2406000.img.xml
+++ b/wz/Reactor.wz/2406000.img.xml
@@ -2,6 +2,7 @@
+
+
+
+
+
+
+
-
+
@@ -6565,9 +6565,9 @@
-
-
-
+
+
+