diff --git a/.gitignore b/.gitignore
index 2105e475e1..32140893ac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,6 +27,10 @@
/tools/MapleCashDropFetcher/dist/
/tools/MapleCashDropFetcher/nbproject/
+/tools/MapleCashVegaChecker/build/
+/tools/MapleCashVegaChecker/dist/
+/tools/MapleCashVegaChecker/nbproject/
+
/tools/MapleCodeCouponGenerator/build/
/tools/MapleCodeCouponGenerator/dist/
/tools/MapleCodeCouponGenerator/nbproject/
diff --git a/README.md b/README.md
index df258ac230..33a2d0e088 100644
--- a/README.md
+++ b/README.md
@@ -23,13 +23,15 @@ Java7 SDK: https://www.oracle.com/technetwork/java/javase/downloads/java-archive
**Important note about localhosts**: these executables are red-flagged by antivirus tools as __potentially malicious softwares__, this happens due to the reverse engineering methods that were applied onto these software artifacts. Those depicted here have been put to use for years already and posed no harm so far, so they are soundly assumed to be safe.
- Latest localhost: https://hostr.co/m2bVtnizCtmD
+ Latest localhost: https://hostr.co/tsYsQzzV6xT0
The following list, in bottom-up chronological order, holds information regarding all changes that were applied from the starting localhost used in this development. Some lines have a link attached, that will lead you to a snapshot of the localhost at that version of the artifact. Naturally, later versions holds all previous changes along with the proposed changes.
**Change log:**
- * Removed block on applying attack-based strengthening gems on non-weapon equipments.
+ * Fixed some 'rn' problems with quest icons & removed "tab" from party leader changed message.
+
+ * Removed block on applying attack-based strengthening gems on non-weapon equipments. https://hostr.co/m2bVtnizCtmD
* Set a higher cap for SPEED.
@@ -84,6 +86,7 @@ It's never enough to tell this, thanks to everyone that have been contributing s
Our Discord channel is still available on: https://discord.gg/Q7wKxHX
+
### Donation
If you REALLY liked what you have seen on the project, please feel free to donate a little something as a helping hand for my contributions towards Maple development. Also remember to **support Nexon**!
diff --git a/docs/issues.txt b/docs/issues.txt
index bea3d980b2..657eadb8e2 100644
--- a/docs/issues.txt
+++ b/docs/issues.txt
@@ -16,6 +16,7 @@ Known issues:
- Some monster status such as freeze and weapon/magic reflect doesn't behave properly in certain scenarios. Freeze seems to not work on mobs with low OID or are starters from server boot time.
- On low-end connections, things such as command summoning a player that is currently logging in (already visible to other players) may cause the player to freeze, consequently freezing the account as well since the server-side disconnection doesn't happen.
- Reportedly, there are cases where mob positions fail to sync between player's client-view.
+- Visual equip EXP watch value will present stuttering for early levels requirement (EXP needed less than 100), and requirement at level 200 will not progress at all due to the level cap in client.
---------------------------
---------------------------
@@ -24,7 +25,6 @@ Missing features list:
- Some pirate skills doesn't work for 3rd parties.
- Cache frequently used SQL data.
- Pet commands are not being propagated to 3rd parties, and the commandResponse packet function seems somewhat wonky.
-- Pet speed.
---------------------------
diff --git a/docs/mychanges_ptbr.txt b/docs/mychanges_ptbr.txt
index 25788d0a90..9f5614badc 100644
--- a/docs/mychanges_ptbr.txt
+++ b/docs/mychanges_ptbr.txt
@@ -1619,4 +1619,45 @@ Adicionado checagem em quantidade de itens nas lojas e mercantes de jogadores, a
Corrigido um exploit com mercantes, envolvendo chamada à DB antes de retirar item (que está sendo inserido na loja) do inventário do jogador.
30 Janeiro 2019,
-Corrigido chamadas irregulares a "qm/cm" em scripts.
\ No newline at end of file
+Corrigido chamadas irregulares a "qm/cm" em scripts.
+
+31 Janeiro 2019,
+Com a ajuda de Irenex, adicionado referência a pet flags no criador de pacotes.
+Adicionado funcionalidade de quest que permite pets a andarem na velocidade do jogador.
+Corrigido quest repetível de Dragon Stone não apropriadamente recompensando o item ao jogador.
+Corrigido método de checagem de slots em MapleCharacter, agora utilizando o método padrão implementado especificamente para checagem de slots.
+
+01 Fevereiro 2019,
+Corrigido vulnerabilidade na ação de jogadores ao retornar para a cidade após reviver. Servidor poderia receber packet de dano e processá-lo legitimamente com o HP atualizado do jogador antes de enviá-lo de volta para cidade.
+
+04 - 05 Fevereiro 2019,
+Corrigido NPCs de portão em Mushking Empire permitindo jogadores acesso a área de bosses sem requisitos mínimos.
+Incrementado diálogos de permissão para realizar expedições contra Zakum.
+Modificado gerenciador de item scripts, agora referenciando conversação de NPCs (como previsto pelo WZ).
+Implementado limitação de mob summons, como previsto no WZ.
+Revisado fechamento de sessões no código-fonte não utilizando o coordenador de sessões para isto.
+Revisado sistema de login, agora automaticamente desconectando contas retidas no jogo quando DB determina que uma conta está disponível para login.
+Revisado Teleport Rocks, agora devidamente checando se é possível chegar ao mapa alvo (ou se há bloqueio de uso do item para esse mapa), além de certas checagens contra exploits com esse item.
+Corrigido agendamento de removeAfter de mobs atuando quando o mesmo já foi liberado.
+
+07 - 08 Fevereiro 2019,
+Corrigido ocorrências de NPE ao tentar registrar-se em instância de evento, quando existe uma outra instância que leva o mesmo nome em andamento.
+Tentativa de correção em todos os scripts de eventos, após ter atualizado o sistema de eventos para não mais ficar gerando instâncias livremente (agora, todas as instâncias orientadas-a-solo têm limite de acesso simultâneo entre jogadores).
+Corrigido lojas de jogadores e mercantes não aceitando itens em certos casos onde já se foi usado Scissors of Karma.
+Revisado novamente diversos scripts de evento, atentando às chamadas de função "setup" das mesmas.
+
+09 Fevereiro 2019,
+Tentativa de correção em sessões com exceptionCaught, já que aparentemente a sessão nem sempre é fechada pelo MINA automaticamente.
+Corrigido lista de guilds em alliances não sendo atualizado corretamente ao criar-se uma nova alliance. Era possível ver guilds de alianças passadas antes de ocorrer alguma atualização de packet em jogo que resolva isso.
+Implementado comando "toggleexp", que permite jogadores a escolher ganhar nível ou não se os mesmos não estivem em instância de evento.
+Nova ferramenta: MapleCashVegaChecker. Ferramenta busca por itens que supostamente deveriam permitir uso do Vega Scroll (segundo descrição) porém não o permitem.
+Revisado nomes de skill e mastery books, que mantinham números no nome da skill (agora padronizado com os outros livros).
+
+10 Fevereiro 2019,
+Editado requerimentos de level de medalhas level 200 para 180, assim evitando o problema onde nível das medalhas não apareçe na visão do cliente devido ao level cap.
+Corrigido puppets não tomando prioridade na nova mecânica de aggro.
+Incrementado mensagem custom de venda de produtos pelo mercante.
+
+13 - 14 Fevereiro 2019,
+Corrigido limites na função isWeapon, que não contabilizaria certos itens corretamente.
+Resolvido comportamento de puppets usando o novo sistema de aggro.
\ No newline at end of file
diff --git a/handbook/Equip/Cape.txt b/handbook/Equip/Cape.txt
index 113117ce61..ae3945d6d9 100644
--- a/handbook/Equip/Cape.txt
+++ b/handbook/Equip/Cape.txt
@@ -82,7 +82,7 @@
1102080 - Ragged Blue Cape - (no description)
1102081 - Ragged Yellow Cape - (no description)
1102082 - Ragged Black Cape - (no description)
-1102083 - Ragged Red Cape - (no description)
+1102083 - Ragged Green Cape - (no description)
1102084 - Pink Gaia Cape - (no description)
1102085 - Yellow Gaia Cape - (no description)
1102086 - Purple Gaia Cape - (no description)
diff --git a/handbook/Use.txt b/handbook/Use.txt
index 0a2f651a57..137f8b3141 100644
--- a/handbook/Use.txt
+++ b/handbook/Use.txt
@@ -376,15 +376,15 @@
2030004 - Return Scroll to Henesys - Returns you to Henesys.
2030005 - Return Scroll to Kerning City - Returns you to the dark Kerning City.
2030006 - Return Scroll to Sleepywood - Returns you to Sleepywood, a quiet and dark forest-town.
-2030007 - Return Scroll for Dead Mine - Returns you to the dead mine at the higher ground of El Nath.nCan only be used in Orbis and El Nath.
+2030007 - Return Scroll to Dead Mine - Returns you to the dead mine at the higher ground of El Nath.nCan only be used in Orbis and El Nath.
2030008 - Coffee Milk - Returns you to the nearest town.
2030009 - Strawberry Milk - Returns you to Mushroom Shrine.
2030010 - Fruit Milk - Returns you to Showa Town.
2030011 - Command Center Warp Capsule - A warp capsule that allows the owner of the capsule to warp to the Command Center of Omega Sector.
2030012 - Ludibrium Warp Capsule - A warp capsule that returns you to Ludibrium.
2030016 - Phyllia's Warp Powder - Warp powder made by fairy Phyllia. Teleports you to Magatia when used inside the Nihal desert region.
-2030019 - Nautilus Return Scroll - This scroll enables you to return to the Pirate village, Nautilus. This is a one use item and will disappear after use.
-2030020 - Return to New Leaf City Scroll - Use this scroll to venture back to New Leaf City whenever you want!
+2030019 - Return Scroll to Nautilus - This scroll enables you to return to the Pirate village, Nautilus. This is a one use item and will disappear after use.
+2030020 - Return Scroll to New Leaf City - Use this scroll to venture back to New Leaf City whenever you want!
2030100 - Return Scroll - Banished Area - Returns you to the map where you were last banished. Requires immediate use and have changed neither maps nor channels.
2031000 - Masked Man's Invitation - An invitation from the Masked Man to the Halloween Party at the Haunted Mansion. Double-click to move straight to the mansion.
2031001 - Studio Invitation - An invitation to the studio for the event "For Guild Only".
@@ -1182,7 +1182,7 @@
2280001 - Black Cloud Machine - A mechanical device that produces black clouds. Enables the character to acquire the Smokescreen skill using the clouds.
2280002 - Firm Hand - A stimulant packaged inside a bottle that resembles a clenched fist. Drinking the stimulant will allow the character to acquire The Will of a Warrior.
2280003 - [Skill Book] Maple Warrior - You can learn #cMaple Warrior# with this book.rnJob : All 4th jobsrnCondition : #cMaple Warrior# not acquired.
-2280004 - [Skill Book] Infinity - You can learn #Infinity# with this book.rnJob : 4th Advancement MagicianrnCondition : #cInfinity# not acquired
+2280004 - [Skill Book] Infinity - You can learn #cInfinity# with this book.rnJob : 4th Advancement MagicianrnCondition : #cInfinity# not acquired
2280005 - [Skill Book] Dragon's Breath - You can learn #cDragon's Breath# with this book.wnJob : 4th Advancement BowmanrnCondition : #cDragon's Breath# not acquired
2280006 - [Skill Book] Taunt - You can learn #cTaunt# with this book.rnJob : 4th Advancement ThiefrnCondition : #cTaunt# not acquired
2280007 - [Skill Book] Advanced Combo Attack - You can learn #cAdvanced Combo Attack# with this book.rnClass : HerornCondition : #cAdvanced Combo# not acquired
@@ -1191,6 +1191,13 @@
2280010 - [Skill Book] Triple Throw - You can learn #cTriple Throw# with this book.rnClass : Night LordrnCondition : #cTriple Throw# not acquired
2280011 - Ancient Ice Powder - This is a pack full of ancient ice powder. If you eat this, you will feel chilled and can learn Ice Demon.
2280012 - [Skill Book] Rush - You can learn #cRush# with this book.rnJob : 4th Advancement WarriorrnCondition : #cRush# not acquired
+2280013 - [Skill Book] Final Blow - Skill Book from which you can learn about the #cFinal Blow# skill.\nJob: 4th Lv Aran\nCondition: #cFinal Blow# not available
+2280014 - [Skill Book] High Defense - Skill Book from which you can learn about the #cHigh Defense# skill.\nJob: 4th Lv Aran\nCondition: #cHigh Defense# not available
+2280015 - [Skill Book] Combo Tempest - Skill Book from which you can learn about the #cCombo Tempest# skill.\nJob: 4th Lv Aran\nCondition: #cCombo Tempest# not available
+2280017 - [Skill Book] Pig's Weakness - Skill Book from which you can learn about the #cPig's Weakness# skill.\nCondition: #cPig's Weakness# not available
+2280016 - [Skill Book] Combo Barrier - Skill Book from which you can learn about the #cCombo Barrier# skill.\nJob: 4th Lv Aran\nCondition: #cCombo Barrier# not available
+2280018 - [Skill Book] Stump's Weakness - Skill Book from which you can learn about the #cStump's Weakness# skill.\nCondition: #cStump's Weakness# not available
+2280019 - [Skill Book] Slime's Weakness - Skill Book from which you can learn about the #cSlime's Weakness# skill.\nCondition: #cSlime's Weakness# not available
2290000 - [Mastery Book] Monster Magnet - This increases master level of the #cMonster Magnet# skill up to 20 with 70% chance of success.rnJob : 4th Advancement WarriorrnCondition : Skill level above 5
2290001 - [Mastery Book] Monster Magnet - This increases master level of the #cMonster Magnet# skill up to 30 with 50% chance of success. rnJob : 4th Advancement WarriorrnCondition : Skill Level above 15
2290002 - [Mastery Book] Achilles - This increases the master level of #cAchilles# up to 20 with 70% of chance.rnJob : 4th Advancement WarriorrnCondition : Skill level above 5
@@ -1287,7 +1294,7 @@
2290093 - [Mastery Book] Assassinate - This increases the master level of #cAssassinate# up to 30 with 50% of chance.rnClass : ShadowerrnCondition : Skill level above 15
2290094 - [Mastery Book] Smokescreen - This increases the master level of #cSmokescreen# up to 20 with 70% of chance.rnClass : ShadowerrnCondition : Skill level above 5
2290095 - [Mastery Book] Smokescreen - This increases the master level of #cSmokescreen# up to 30 with 50% of chance.rnClass : ShadowerrnCondition : Skill level above 15
-2290096 - [Mastery Book] Maple Warrior 20 - This increases the master level of #cMaple Warrior# up to 20 with 70% of chance.rnJob : All 4th Advancement JobsrnCondition : Skill level above 5
+2290096 - [Mastery Book] Maple Warrior - This increases the master level of #cMaple Warrior# up to 20 with 70% of chance.rnJob : All 4th Advancement JobsrnCondition : Skill level above 5
2290097 - [Mastery Book] Dragon Strike - With a 70% success rate, it raises the Master Level of #cDragon Strike# to 20.nJob : BuccaneernRequirement : At least Level 5 in this skill
2290098 - [Mastery Book] Dragon Strike - With a 50% success rate, it raises the Master Level of #cDragon Strike# to 30.nJob : BuccaneernRequirement : At least Level 15 in this skill
2290099 - [Mastery Book] Energy Orb - With a 70% success rate, it raises the Master Level of #cEnergy Orb# to 20.nJob : BuccaneernRequirement : At least Level 5 in this skill
@@ -1316,7 +1323,21 @@
2290122 - [Mastery Book] Battleship Torpedo - With a 50% success rate, it raises the Master Level of #cBattleship Torpedo# to 30.nJob : CorsairnRequirement : At least Level 15 in this skill
2290123 - [Mastery Book] Hypnotize - With a 70% success rate, it raises the Master Level of #cHypnotize# to 20.nJob : CorsairnRequirement : At least Level 5 in this skill
2290124 - [Mastery Book] Bullseye - With a 70% success rate, it raises the Master Level of #cBullseye# to 20.nJob : CorsairnRequirement : At least Level 5 in this skill
-2290125 - [Mastery Book] Maple Warrior 30 - This increases the master level of #cMaple Warrior# up to 30 with 50% of chance.rnJob : All 4th Advancement JobsrnCondition : Skill level above 15
+2290125 - [Mastery Book] Maple Warrior - This increases the master level of #cMaple Warrior# up to 30 with 50% of chance.rnJob : All 4th Advancement JobsrnCondition : Skill level above 15
+2290126 - [Mastery Book] Overswing - With a 70% success rate, raises the Mastery Level of #cOverswing# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
+2290127 - [Mastery Book] Overswing - With a 50% success rate, raises the Mastery Level of #cOverswing# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
+2290128 - [Mastery Book] High Mastery - With a 70% success rate, raises the Mastery Level of #cHigh Mastery# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
+2290129 - [Mastery Book] High Mastery - With a 50% success rate, raises the Mastery Level of #cHigh Mastery# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
+2290130 - [Mastery Book] Freeze Standing - With a 70% success rate, raises the Mastery Level of #cFreeze Standing# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
+2290131 - [Mastery Book] Freeze Standing - With a 50% success rate, raises the Mastery Level of #cFreeze Standing# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
+2290132 - [Mastery Book] Final Blow - With a 70% success rate, raises the Mastery Level of #cFinal Blow# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
+2290133 - [Mastery Book] Final Blow - With a 50% success rate, raises the Mastery Level of #cFinal Blow# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
+2290134 - [Mastery Book] High Defense - With a 70% success rate, raises the Mastery Level of #cHigh Defense# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
+2290135 - [Mastery Book] High Defense - With a 50% success rate, raises the Mastery Level of #cHigh Defense# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
+2290136 - [Mastery Book] Combo Tempest - With a 70% success rate, raises the Mastery Level of #cCombo Tempest# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
+2290137 - [Mastery Book] Combo Tempest - With a 50% success rate, raises the Mastery Level of #cCombo Tempest# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
+2290138 - [Mastery Book] Combo Barrier - With a 70% success rate, raises the Mastery Level of #cCombo Barrier# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
+2290139 - [Mastery Book] Combo Barrier - With a 50% success rate, raises the Mastery Level of #cCombo Barrier# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
2310000 - The Owl of Minerva - #cThe Owl of Minerva#, which represents wisdom, can be used to search for items sold at the Free Market. #cDisappears right after showing the results of the item search#.
2320000 - Teleport Rock - Remembers 5 maps of your choice. This rock will enable you to #cteleport to the map you remembered#. It can even allow you to #cmove to the map where a certain character is#, provided that the person is in the same channel at the same world.
2330000 - Bullet - A bullet made out of steel. A set contains numerous bullets and once they are used up, they'll need to be recharged.\nAttack + 10
@@ -2162,27 +2183,6 @@
2109008 - Bubbling Summoning Bag - For use in the restricted bonus map area of the subway station.
2109009 - Jr. Yeti Pharaoh Summoning Bag - Summons Jr. Yeti Pharaoh for the bonus stage of Nett's Pyramid (Easy, Normal, Hard)
2109010 - Jr. Yeti Pharaoh Summoning Bag - Summons Jr. Yeti Pharaoh for the bonus stage of Nett's Pyramid (Hell Mode)
-2280013 - [Skill Book] Final Blow - Skill Book from which you can learn about the #cFinal Blow# skill.\nJob: 4th Lv Aran\nCondition: #cFinal Blow# not available
-2280014 - [Skill Book] High Defense - Skill Book from which you can learn about the #cHigh Defense# skill.\nJob: 4th Lv Aran\nCondition: #cHigh Defense# not available
-2280015 - [Skill Book] Combo Tempest - Skill Book from which you can learn about the #cCombo Tempest# skill.\nJob: 4th Lv Aran\nCondition: #cCombo Tempest# not available
-2280017 - [Skill Book] Pig's Weakness - Skill Book from which you can learn about the #cPig's Weakness# skill.\nCondition: #cPig's Weakness# not available
-2280016 - [Skill Book] Combo Barrier - Skill Book from which you can learn about the #cCombo Barrier# skill.\nJob: 4th Lv Aran\nCondition: #cCombo Barrier# not available
-2280018 - [Skill Book] Stump's Weakness - Skill Book from which you can learn about the #cStump's Weakness# skill.\nCondition: #cStump's Weakness# not available
-2280019 - [Skill Book] Slime's Weakness - Skill Book from which you can learn about the #cSlime's Weakness# skill.\nCondition: #cSlime's Weakness# not available
-2290126 - [Mastery Book] Overswing 20 - With a 70% success rate, raises the Mastery Level of #cOverswing# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
-2290127 - [Mastery Book] Overswing 30 - With a 50% success rate, raises the Mastery Level of #cOverswing# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
-2290128 - [Mastery Book] High Mastery 20 - With a 70% success rate, raises the Mastery Level of #cHigh Mastery# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
-2290129 - [Mastery Book]High Mastery 30 - With a 50% success rate, raises the Mastery Level of #cHigh Mastery# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
-2290130 - [Mastery Book] Freeze Standing 20 - With a 70% success rate, raises the Mastery Level of #cFreeze Standing# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
-2290131 - [Mastery Book] Freeze Standing 30 - With a 50% success rate, raises the Mastery Level of #cFreeze Standing# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
-2290132 - [Mastery Book] Final Blow 20 - With a 70% success rate, raises the Mastery Level of #cFinal Blow# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
-2290133 - [Mastery Book] Final Blow 30 - With a 50% success rate, raises the Mastery Level of #cFinal Blow# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
-2290134 - [Mastery Book] High Defense 20 - With a 70% success rate, raises the Mastery Level of #cHigh Defense# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
-2290135 - [Mastery Book] High Defense 30 - With a 50% success rate, raises the Mastery Level of #cHigh Defense# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
-2290136 - [Mastery Book] Combo Tempest 20 - With a 70% success rate, raises the Mastery Level of #cCombo Tempest# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
-2290137 - [Mastery Book] Combo Tempest 30 - With a 50% success rate, raises the Mastery Level of #cCombo Tempest# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
-2290138 - [Mastery Book] Combo Barrier 20 - With a 70% success rate, raises the Mastery Level of #cCombo Barrier# to 20.\nJob: Aran\nCondition: Min Skill Lv. 5
-2290139 - [Mastery Book] Combo Barrier 30 - With a 50% success rate, raises the Mastery Level of #cCombo Barrier# to 30.\nJob: Aran\nCondition: Min Skill Lv. 15
2380014 - Dejected Green Mushroom Card - A card featuring the Dejected Green Mushroom.
2380015 - Muru Card - A card featuring Muru.
2380016 - Murupa Card - A card featuring Murupa.
@@ -2209,7 +2209,7 @@
2430016 - Crystal Chest - A chest full of items that's sure to excite anyone who sees it. Open it by August 31st, 2009, or it'll disappear.
2450000 - Hunter's Luck - For 30 minutes, doubles your EXP from hunting.
2040758 - Scroll for Shoes for ATT - Improves attack on shoes.\nSuccess rate: 100%. Weapon Attack +1
-2040759 - Scroll for Shoes for ATT - Improves attack on gloves.\nSuccess rate: 60%. Weapon Attack +2. The success rate of this scroll can be enhanced by Vega's Spell.
+2040759 - Scroll for Shoes for ATT - Improves attack on shoes.\nSuccess rate: 60%. Weapon Attack +2. The success rate of this scroll can be enhanced by Vega's Spell.
2040760 - Scroll for Shoes for ATT - Improves attack on shoes.\nSuccess rate: 10%, Weapon Attack +3. The success rate of this scroll can be enhanced by Vega's Spell.
2044815 - Scroll for Knuckler for Attack 100% - Improves attack on Knucklers.\nSuccess rate: 100%. Weapon Attack +2, STR +1
2044817 - Scroll for Knuckler for Attack 50% - Improves attack on Knucklers.\nSuccess rate: 50%. Weapon Attack +5, STR +3, DEX +1
diff --git a/scripts/event/3rdJob_bowman.js b/scripts/event/3rdJob_bowman.js
index e622903724..447ae673d7 100644
--- a/scripts/event/3rdJob_bowman.js
+++ b/scripts/event/3rdJob_bowman.js
@@ -41,6 +41,14 @@ function init() {
em.setProperty("noEntry","false");
}
+function setup(level, lobbyid) {
+ var eim = em.newInstance("3rdJob_bowman_" + lobbyid);
+ eim.setProperty("level", level);
+ eim.setProperty("boss", "0");
+
+ return eim;
+}
+
function playerEntry(eim, player) {
eim.getInstanceMap(maxMapId).resetPQ(1);
@@ -97,8 +105,6 @@ function dispose() {}
// ---------- FILLER FUNCTIONS ----------
-function setup(eim, leaderid) {}
-
function disbandParty(eim, player) {}
function afterSetup(eim) {}
diff --git a/scripts/event/3rdJob_magician.js b/scripts/event/3rdJob_magician.js
index 563efe6de9..aa244b5114 100644
--- a/scripts/event/3rdJob_magician.js
+++ b/scripts/event/3rdJob_magician.js
@@ -41,6 +41,14 @@ function init() {
em.setProperty("noEntry","false");
}
+function setup(level, lobbyid) {
+ var eim = em.newInstance("3rdJob_magician_" + lobbyid);
+ eim.setProperty("level", level);
+ eim.setProperty("boss", "0");
+
+ return eim;
+}
+
function playerEntry(eim, player) {
eim.getInstanceMap(maxMapId).resetPQ(1);
@@ -97,8 +105,6 @@ function dispose() {}
// ---------- FILLER FUNCTIONS ----------
-function setup(eim, leaderid) {}
-
function disbandParty(eim, player) {}
function afterSetup(eim) {}
diff --git a/scripts/event/3rdJob_mount.js b/scripts/event/3rdJob_mount.js
index 1b100dd27b..b3f4bc0f7a 100644
--- a/scripts/event/3rdJob_mount.js
+++ b/scripts/event/3rdJob_mount.js
@@ -43,15 +43,38 @@ function init() {
em.setProperty("noEntry","false");
}
+function checkHogHealth(eim) {
+ var watchHog = eim.getInstanceMap(923010000).getMonsterById(9300102);
+ if (watchHog != null) {
+ var hp = watchHog.getHp();
+ var oldHp = eim.getIntProperty("whog_hp");
+
+ if (oldHp - hp > 1000) { // or 800, if using mobHP / eventTime
+ eim.dropMessage(6, "Please protect the pig from the aliens!"); // thanks Vcoc
+ }
+ eim.setIntProperty("whog_hp", hp);
+ }
+}
+
function respawnStages(eim) {
var i;
for (i = 0; i < eventMaps.length; i++) {
eim.getInstanceMap(eventMaps[i]).instanceMapRespawn();
}
-
+ checkHogHealth(eim);
+
eim.schedule("respawnStages", 10 * 1000);
}
+function setup(level, lobbyid) {
+ var eim = em.newInstance("3rdJob_mount_" + lobbyid);
+ eim.setProperty("level", level);
+ eim.setProperty("boss", "0");
+ eim.setProperty("whog_hp", "0");
+
+ return eim;
+}
+
function playerEntry(eim, player) {
var mapObj = eim.getInstanceMap(entryMap);
@@ -127,8 +150,6 @@ function dispose() {}
// ---------- FILLER FUNCTIONS ----------
-function setup(eim, leaderid) {}
-
function disbandParty(eim, player) {}
function afterSetup(eim) {}
diff --git a/scripts/event/3rdJob_pirate.js b/scripts/event/3rdJob_pirate.js
index fb7ba2be9e..ef18f1dc31 100644
--- a/scripts/event/3rdJob_pirate.js
+++ b/scripts/event/3rdJob_pirate.js
@@ -51,6 +51,14 @@ function playerEntry(eim, player) {
eim.startEventTimer(eventTime * 60000);
}
+function setup(level, lobbyid) {
+ var eim = em.newInstance("3rdJob_pirate_" + lobbyid);
+ eim.setProperty("level", level);
+ eim.setProperty("boss", "0");
+
+ return eim;
+}
+
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
@@ -97,8 +105,6 @@ function dispose() {}
// ---------- FILLER FUNCTIONS ----------
-function setup(eim, leaderid) {}
-
function disbandParty(eim, player) {}
function afterSetup(eim) {}
diff --git a/scripts/event/3rdJob_thief.js b/scripts/event/3rdJob_thief.js
index 6160f3c221..285c4d0484 100644
--- a/scripts/event/3rdJob_thief.js
+++ b/scripts/event/3rdJob_thief.js
@@ -41,6 +41,14 @@ function init() {
em.setProperty("noEntry","false");
}
+function setup(level, lobbyid) {
+ var eim = em.newInstance("3rdJob_thief_" + lobbyid);
+ eim.setProperty("level", level);
+ eim.setProperty("boss", "0");
+
+ return eim;
+}
+
function playerEntry(eim, player) {
eim.getInstanceMap(maxMapId).resetPQ(1);
@@ -97,8 +105,6 @@ function dispose() {}
// ---------- FILLER FUNCTIONS ----------
-function setup(eim, leaderid) {}
-
function disbandParty(eim, player) {}
function afterSetup(eim) {}
diff --git a/scripts/event/3rdJob_warrior.js b/scripts/event/3rdJob_warrior.js
index af119f877b..f3b7f0bf97 100644
--- a/scripts/event/3rdJob_warrior.js
+++ b/scripts/event/3rdJob_warrior.js
@@ -41,6 +41,14 @@ function init() {
em.setProperty("noEntry","false");
}
+function setup(level, lobbyid) {
+ var eim = em.newInstance("3rdJob_warrior_" + lobbyid);
+ eim.setProperty("level", level);
+ eim.setProperty("boss", "0");
+
+ return eim;
+}
+
function playerEntry(eim, player) {
eim.getInstanceMap(maxMapId).resetPQ(1);
@@ -97,8 +105,6 @@ function dispose() {}
// ---------- FILLER FUNCTIONS ----------
-function setup(eim, leaderid) {}
-
function disbandParty(eim, player) {}
function afterSetup(eim) {}
diff --git a/scripts/event/4jberserk.js b/scripts/event/4jberserk.js
index 9480843488..d3fd4fa747 100644
--- a/scripts/event/4jberserk.js
+++ b/scripts/event/4jberserk.js
@@ -20,27 +20,22 @@
along with this program. If not, see .
*/
var exitMap;
-var instanceId;
var minPlayers = 3;
-function init() {
- instanceId = 1;
-}
+function init() {}
function monsterValue(eim, mobId) {
return 1;
}
-function setup() {
+function setup(level, lobbyid) {
exitMap = em.getChannelServer().getMapFactory().getMap(105090800); //
- var instanceName = "4jberserk" + instanceId;
-
- var eim = em.newInstance(instanceName);
+
+ var eim = em.newInstance("4jberserk_" + lobbyid);
+ eim.setProperty("level", level);
var mf = eim.getMapFactory();
-
- instanceId++;
-
+
var map = mf.getMap(910500200);
map.addMapTimer(3*60);
em.schedule("timeOut", 20 * 60000);
diff --git a/scripts/event/4jrush.js b/scripts/event/4jrush.js
index e5b7179d91..a1258d0ec6 100644
--- a/scripts/event/4jrush.js
+++ b/scripts/event/4jrush.js
@@ -27,23 +27,21 @@
*/
var exitMap;
-var instanceId;
var minPlayers = 3;
-function init() {
- instanceId = 1;
-}
+function init() {}
function monsterValue(eim, mobId) {
return 1;
}
-function setup() {
+function setup(level, lobbyid) {
exitMap = em.getChannelServer().getMapFactory().getMap(105090700); //
- var instanceName = "4jrush" + instanceId;
- var eim = em.newInstance(instanceName);
+
+ var eim = em.newInstance("4jrush_" + lobbyid);
+ eim.setProperty("level", level);
+
var mf = eim.getMapFactory();
- instanceId++;
var map = mf.getMap(910500100);
map.addMapTimer(20*60);
em.schedule("timeOut", 20 * 60000);
diff --git a/scripts/event/Aran_2ndmount.js b/scripts/event/Aran_2ndmount.js
index 68f2e64c47..1be6114b18 100644
--- a/scripts/event/Aran_2ndmount.js
+++ b/scripts/event/Aran_2ndmount.js
@@ -41,6 +41,14 @@ function init() {
em.setProperty("noEntry","false");
}
+function setup(level, lobbyid) {
+ var eim = em.newInstance("Aran_2ndmount_" + lobbyid);
+ eim.setProperty("level", level);
+ eim.setProperty("boss", "0");
+
+ return eim;
+}
+
function respawnStages(eim) {}
function playerEntry(eim, player) {
@@ -114,8 +122,6 @@ function dispose() {}
// ---------- FILLER FUNCTIONS ----------
-function setup(eim, leaderid) {}
-
function disbandParty(eim, player) {}
function afterSetup(eim) {}
diff --git a/scripts/event/Aran_3rdmount.js b/scripts/event/Aran_3rdmount.js
index efc469e2fc..04e135d0b8 100644
--- a/scripts/event/Aran_3rdmount.js
+++ b/scripts/event/Aran_3rdmount.js
@@ -41,6 +41,14 @@ function init() {
em.setProperty("noEntry","false");
}
+function setup(level, lobbyid) {
+ var eim = em.newInstance("Aran_3rdmount_" + lobbyid);
+ eim.setProperty("level", level);
+ eim.setProperty("boss", "0");
+
+ return eim;
+}
+
function respawnStages(eim) {}
function playerEntry(eim, player) {
@@ -119,8 +127,6 @@ function dispose() {}
// ---------- FILLER FUNCTIONS ----------
-function setup(eim, leaderid) {}
-
function disbandParty(eim, player) {}
function afterSetup(eim) {}
diff --git a/scripts/event/BalrogQuest.js b/scripts/event/BalrogQuest.js
index 6ab3a6917f..fcef456bf4 100644
--- a/scripts/event/BalrogQuest.js
+++ b/scripts/event/BalrogQuest.js
@@ -41,6 +41,14 @@ function init() {
em.setProperty("noEntry","false");
}
+function setup(level, lobbyid) {
+ var eim = em.newInstance("BalrogQuest_" + lobbyid);
+ eim.setProperty("level", level);
+ eim.setProperty("boss", "0");
+
+ return eim;
+}
+
function respawnStages(eim) {}
function afterSetup(eim) {}
@@ -104,8 +112,6 @@ function dispose() {}
// ---------- FILLER FUNCTIONS ----------
-function setup(eim, leaderid) {}
-
function disbandParty(eim, player) {}
function changedLeader(eim, leader) {}
diff --git a/scripts/event/DollHouse.js b/scripts/event/DollHouse.js
index d784adc0b1..a01e6e072a 100644
--- a/scripts/event/DollHouse.js
+++ b/scripts/event/DollHouse.js
@@ -32,6 +32,14 @@ function init() {
em.setProperty("noEntry","false");
}
+function setup(level, lobbyid) {
+ var eim = em.newInstance("DollHouse_" + lobbyid);
+ eim.setProperty("level", level);
+ eim.setProperty("boss", "0");
+
+ return eim;
+}
+
function playerEntry(eim, player) {
eim.getInstanceMap(entryMap).shuffleReactors();
eim.setExclusiveItems([4031094]);
@@ -81,8 +89,6 @@ function dispose() {}
// ---------- FILLER FUNCTIONS ----------
-function setup(eim, leaderid) {}
-
function monsterValue(eim, mobid) {return 0;}
function disbandParty(eim, player) {}
diff --git a/scripts/event/Hak.js b/scripts/event/Hak.js
index a33ab7121e..24e33279d9 100644
--- a/scripts/event/Hak.js
+++ b/scripts/event/Hak.js
@@ -16,8 +16,8 @@ function init() {
rideTime = em.getTransportationTime(rideTime);
}
-function setup() {
- var eim = em.newInstance("Hak_" + + em.getProperty("player"));
+function setup(level, lobbyid) {
+ var eim = em.newInstance("Hak_" + lobbyid);
return eim;
}
diff --git a/scripts/event/KerningTrain.js b/scripts/event/KerningTrain.js
index 6a30f37b5f..516af052c5 100644
--- a/scripts/event/KerningTrain.js
+++ b/scripts/event/KerningTrain.js
@@ -16,8 +16,8 @@ function init() {
rideTime = em.getTransportationTime(rideTime);
}
-function setup() {
- var eim = em.newInstance("KerningTrain_" + em.getProperty("player"));
+function setup(level, lobbyid) {
+ var eim = em.newInstance("KerningTrain_" + lobbyid);
return eim;
}
diff --git a/scripts/event/RockSpirit.js b/scripts/event/RockSpirit.js
index 6ab69099ed..fe043ad251 100644
--- a/scripts/event/RockSpirit.js
+++ b/scripts/event/RockSpirit.js
@@ -34,8 +34,11 @@ function init() {
otherMap = em.getChannelServer().getMapFactory().getMap(103040420);
}
-function setup() {
- var eim = em.newInstance("RockSpirit_" + em.getProperty("player"));
+function setup(level, lobbyid) {
+ var eim = em.newInstance("RockSpirit_" + lobbyid);
+ eim.setProperty("level", level);
+ eim.setProperty("boss", "0");
+
respawn(eim);
eim.startEventTimer(timer);
return eim;
diff --git a/scripts/event/RockSpiritVIP.js b/scripts/event/RockSpiritVIP.js
index 2a2983211f..4de76839c1 100644
--- a/scripts/event/RockSpiritVIP.js
+++ b/scripts/event/RockSpiritVIP.js
@@ -34,8 +34,11 @@ function init() {
otherMap = em.getChannelServer().getMapFactory().getMap(103040450);
}
-function setup() {
- var eim = em.newInstance("RockSpiritVIP_" + em.getProperty("player"));
+function setup(level, lobbyid) {
+ var eim = em.newInstance("RockSpiritVIP_" + lobbyid);
+ eim.setProperty("level", level);
+ eim.setProperty("boss", "0");
+
respawn(eim);
eim.startEventTimer(timer);
return eim;
diff --git a/scripts/event/s4aWorld.js b/scripts/event/s4aWorld.js
index ea5039fca9..24867aaa3b 100644
--- a/scripts/event/s4aWorld.js
+++ b/scripts/event/s4aWorld.js
@@ -33,8 +33,9 @@ function getEligibleParty(party) { //selects, from the given party, the tea
return eligible;
}
-function setup() {
- var eim = em.newInstance("s4aWorld");
+function setup(level, lobbyid) {
+ var eim = em.newInstance("s4aWorld_" + lobbyid);
+ eim.setProperty("level", level);
eim.getInstanceMap(910500000).resetPQ(1);
respawnStages(eim);
diff --git a/scripts/map/onUserEnter/200090000.js b/scripts/map/onUserEnter/200090000.js
index 4d6b0e02b4..0a346311d3 100644
--- a/scripts/map/onUserEnter/200090000.js
+++ b/scripts/map/onUserEnter/200090000.js
@@ -3,12 +3,12 @@ importPackage(Packages.tools);
var mapId = 200090000;
-function start(pi) {
- var map = pi.getClient().getChannelServer().getMapFactory().getMap(mapId);
+function start(ms) {
+ var map = ms.getClient().getChannelServer().getMapFactory().getMap(mapId);
if(map.getDocked()) {
- pi.getClient().announce(MaplePacketCreator.musicChange("Bgm04/ArabPirate"));
- pi.getClient().announce(MaplePacketCreator.crogBoatPacket(true));
+ ms.getClient().announce(MaplePacketCreator.musicChange("Bgm04/ArabPirate"));
+ ms.getClient().announce(MaplePacketCreator.crogBoatPacket(true));
}
return(true);
diff --git a/scripts/map/onUserEnter/200090010.js b/scripts/map/onUserEnter/200090010.js
index 49ebeffc72..bf114d894f 100644
--- a/scripts/map/onUserEnter/200090010.js
+++ b/scripts/map/onUserEnter/200090010.js
@@ -3,12 +3,12 @@ importPackage(Packages.tools);
var mapId = 200090010;
-function start(pi) {
- var map = pi.getClient().getChannelServer().getMapFactory().getMap(mapId);
+function start(ms) {
+ var map = ms.getClient().getChannelServer().getMapFactory().getMap(mapId);
if(map.getDocked()) {
- pi.getClient().announce(MaplePacketCreator.musicChange("Bgm04/ArabPirate"));
- pi.getClient().announce(MaplePacketCreator.crogBoatPacket(true));
+ ms.getClient().announce(MaplePacketCreator.musicChange("Bgm04/ArabPirate"));
+ ms.getClient().announce(MaplePacketCreator.crogBoatPacket(true));
}
return(true);
diff --git a/scripts/map/onUserEnter/922000000.js b/scripts/map/onUserEnter/922000000.js
index 8286c4f002..8ef2f3647e 100644
--- a/scripts/map/onUserEnter/922000000.js
+++ b/scripts/map/onUserEnter/922000000.js
@@ -1,5 +1,5 @@
-function start(pi) {
- var map = pi.getClient().getChannelServer().getMapFactory().getMap(922000000);
+function start(ms) {
+ var map = ms.getClient().getChannelServer().getMapFactory().getMap(922000000);
map.clearDrops();
map.resetReactors();
map.shuffleReactors();
diff --git a/scripts/npc/1052007.js b/scripts/npc/1052007.js
index ae31e7b5a8..8636978a81 100644
--- a/scripts/npc/1052007.js
+++ b/scripts/npc/1052007.js
@@ -25,10 +25,11 @@ function action(mode, type, selection) {
}
if (status == 1) {
if (selection == 0) {
- var train = cm.getEventManager("KerningTrain");
- train.newInstance("KerningTrain");
- train.setProperty("player", cm.getPlayer().getName());
- train.startInstance(cm.getPlayer());
+ var em = cm.getEventManager("KerningTrain");
+ if (!em.startInstance(cm.getPlayer())) {
+ cm.sendOk("The passenger wagon is already full. Try again a bit later.");
+ }
+
cm.dispose();
return;
} else if (selection == 1) {
diff --git a/scripts/npc/1052125.js b/scripts/npc/1052125.js
index 7c93ee15c5..05f5a8d634 100644
--- a/scripts/npc/1052125.js
+++ b/scripts/npc/1052125.js
@@ -47,10 +47,10 @@ function action(mode, type, selection) {
if (status == 0) {
if (selection == 0) {
if (cm.isQuestStarted(2286) || cm.isQuestStarted(2287) || cm.isQuestStarted(2288)) {
- var rock = cm.getEventManager("RockSpirit");
- rock.newInstance("RockSpirit");
- rock.setProperty("player", cm.getPlayer().getName());
- rock.startInstance(cm.getPlayer());
+ var em = cm.getEventManager("RockSpirit");
+ if (!em.startInstance(cm.getPlayer())) {
+ cm.sendOk("Uh... It looks like the rooms ahead are a bit crowded right now. Please wait around here for a bit, ok?");
+ }
cm.dispose();
return;
} else {
diff --git a/scripts/npc/1061009.js b/scripts/npc/1061009.js
index f74d609784..3062c8eb24 100644
--- a/scripts/npc/1061009.js
+++ b/scripts/npc/1061009.js
@@ -59,13 +59,12 @@ function start() {
if (em == null)
cm.sendOk("Sorry, but 3rd job advancement (" + js + ") is closed.");
else {
- if (em.getProperty("noEntry") == "false") {
- var eim = em.newInstance("3rdjob_" + js);
- eim.registerPlayer(cm.getPlayer());
- }
- else {
+ if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("Someone else is already challenging the clone. Please wait until the area is cleared.");
}
+
+ cm.dispose();
+ return;
}
}
diff --git a/scripts/npc/1061014.js b/scripts/npc/1061014.js
index b7c51c4891..ce3cd86ffa 100644
--- a/scripts/npc/1061014.js
+++ b/scripts/npc/1061014.js
@@ -174,7 +174,7 @@ function action(mode, type, selection) {
if (selection > 0) {
var banned = expedMembers.get(selection - 1);
expedition.ban(banned);
- cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
+ cm.sendOk("You have banned " + banned.getValue() + " from the expedition.");
cm.dispose();
} else {
cm.sendSimple(list);
diff --git a/scripts/npc/1300013.js b/scripts/npc/1300013.js
index 561fb5f6e6..ed62c35219 100644
--- a/scripts/npc/1300013.js
+++ b/scripts/npc/1300013.js
@@ -6,7 +6,7 @@
var status;
function start(){
- status = -1;
+ status = -1;
action(1, 0, 0);
}
@@ -26,6 +26,11 @@ function action(mode, type, selection){
if(cm.getMapId() == 106021402) {
+ if (!(cm.isQuestCompleted(2331))) {
+ cm.dispose();
+ return;
+ }
+
if(status == 0){
cm.sendSimple("#L0#Enter to fight #bKing Pepe#k and #bYeti Brothers#k.#l\r\n#L1#Enter to fight #bPrime Minister#k.#l");
}
@@ -48,6 +53,12 @@ function action(mode, type, selection){
}
}
} else {
+ var questProgress = cm.getQuestProgress(2330, 3300005) + cm.getQuestProgress(2330, 3300006) + cm.getQuestProgress(2330, 3300007); //3 Yetis
+ if (!(cm.isQuestStarted(2330) && questProgress < 3)) { // thanks Vcoc for finding an exploit with boss entry through NPC
+ cm.dispose();
+ return;
+ }
+
if(status == 0){
cm.sendSimple("#L1#Enter to fight #bKing Pepe#k and #bYeti Brothers#k.#l");
}
diff --git a/scripts/npc/2020008.js b/scripts/npc/2020008.js
index bfe4b52f82..ce8ab3516e 100644
--- a/scripts/npc/2020008.js
+++ b/scripts/npc/2020008.js
@@ -140,11 +140,11 @@ function action(mode, type, selection){
}
} else {
if (cm.getPlayer().getLevel() >= 50){
- cm.sendNext("Ok, go.");
+ cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else
- cm.sendNext("You're weak.");
+ cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose();
}
}
diff --git a/scripts/npc/2020009.js b/scripts/npc/2020009.js
index a44bdcf957..5e759803ef 100644
--- a/scripts/npc/2020009.js
+++ b/scripts/npc/2020009.js
@@ -112,11 +112,11 @@ function action(mode, type, selection){
}
} else {
if (cm.getPlayer().getLevel() >= 50){
- cm.sendNext("Ok, go.");
+ cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else
- cm.sendNext("You're weak.");
+ cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose();
}
}
diff --git a/scripts/npc/2020010.js b/scripts/npc/2020010.js
index 6c51b76405..b4de6203d5 100644
--- a/scripts/npc/2020010.js
+++ b/scripts/npc/2020010.js
@@ -113,11 +113,11 @@ function action(mode, type, selection){
}
} else {
if (cm.getPlayer().getLevel() >= 50){
- cm.sendNext("Ok, go.");
+ cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else
- cm.sendNext("You're weak.");
+ cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose();
}
}
diff --git a/scripts/npc/2020011.js b/scripts/npc/2020011.js
index 850b295c62..811ca153f2 100644
--- a/scripts/npc/2020011.js
+++ b/scripts/npc/2020011.js
@@ -112,11 +112,11 @@ function action(mode, type, selection){
}
} else {
if (cm.getPlayer().getLevel() >= 50){
- cm.sendNext("Ok, go.");
+ cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else
- cm.sendNext("You're weak.");
+ cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose();
}
}
diff --git a/scripts/npc/2020013.js b/scripts/npc/2020013.js
index 1521740211..f18199331d 100644
--- a/scripts/npc/2020013.js
+++ b/scripts/npc/2020013.js
@@ -111,11 +111,11 @@ function action(mode, type, selection){
}
} else {
if (cm.getPlayer().getLevel() >= 50){
- cm.sendNext("Ok, go.");
+ cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
}else
- cm.sendNext("You're weak.");
+ cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
cm.dispose();
}
}
diff --git a/scripts/npc/2030013.js b/scripts/npc/2030013.js
index ef61b1d339..15af48201b 100644
--- a/scripts/npc/2030013.js
+++ b/scripts/npc/2030013.js
@@ -176,7 +176,7 @@ function action(mode, type, selection) {
if (selection > 0) {
var banned = expedMembers.get(selection - 1);
expedition.ban(banned);
- cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
+ cm.sendOk("You have banned " + banned.getValue() + " from the expedition."); // getValue, thanks MedicOP for finding this issue
cm.dispose();
} else {
cm.sendSimple(list);
diff --git a/scripts/npc/2030013_old.js b/scripts/npc/2030013_old.js
index ae98e3e482..a7ea949fa0 100644
--- a/scripts/npc/2030013_old.js
+++ b/scripts/npc/2030013_old.js
@@ -78,13 +78,13 @@ function action(mode, type, selection) {
if (getEimForString(em,passwd) != null)
cm.sendOk("You may not use that password.");
else { // start Zakum Battle
- var eim = em.newInstance("Zakum" + passwd);
- if(!em.startInstance(eim,cm.getPlayer().getName())) {
- cm.sendOk("A party in your name is already registered in this instance.");
- cm.dispose();
- return;
+ //var em = cm.getEventManager("Zakum" + passwd);
+ if (!em.startInstance(cm.getPlayer())) {
+ cm.sendOk("A party is already registered in this instance.");
}
- eim.registerPlayer(cm.getPlayer());
+
+ cm.dispose();
+ return;
}
}
if (state == 1) { // Member
diff --git a/scripts/npc/2040002.js b/scripts/npc/2040002.js
index 12a025f5b0..4e81a20573 100644
--- a/scripts/npc/2040002.js
+++ b/scripts/npc/2040002.js
@@ -56,8 +56,11 @@ function action(mode, type, selection) {
if (status == 1)
cm.sendYesNo("Are you ready to enter the dollhouse map?");
else if (status == 2) {
- var eim = em.newInstance("DollHouse");
- eim.registerPlayer(cm.getPlayer());
+ var em = cm.getEventManager("DollHouse");
+ if (!em.startInstance(cm.getPlayer())) {
+ cm.sendOk("Hmm... The DollHouse is being challenged already, it seems. Try again later.");
+ }
+
cm.dispose();
}
}
diff --git a/scripts/npc/2060005.js b/scripts/npc/2060005.js
index 4ff99de789..d9a2009733 100644
--- a/scripts/npc/2060005.js
+++ b/scripts/npc/2060005.js
@@ -36,11 +36,7 @@ function start() {
if (em == null)
cm.sendOk("Sorry, but 3rd job advancement (mount) is closed.");
else {
- if (em.getProperty("noEntry") == "false") {
- var eim = em.newInstance("3rdjob_mount");
- eim.registerPlayer(cm.getPlayer());
- }
- else {
+ if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("There is currently someone in this map, come back later.");
}
}
diff --git a/scripts/npc/2083004.js b/scripts/npc/2083004.js
index 17520857e5..7960c49c4f 100644
--- a/scripts/npc/2083004.js
+++ b/scripts/npc/2083004.js
@@ -168,7 +168,7 @@ function action(mode, type, selection) {
if (selection > 0) {
var banned = expedMembers.get(selection - 1);
expedition.ban(banned);
- cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
+ cm.sendOk("You have banned " + banned.getValue() + " from the expedition.");
cm.dispose();
} else {
cm.sendSimple(list);
diff --git a/scripts/npc/2090005.js b/scripts/npc/2090005.js
index 1c698f0f75..be092366f1 100644
--- a/scripts/npc/2090005.js
+++ b/scripts/npc/2090005.js
@@ -85,10 +85,14 @@ function action(mode, type, selection) {
cm.warp(250000100, 0);
cm.dispose();
} else {
+ var em = cm.getEventManager("Hak");
+ if (!em.startInstance(cm.getPlayer())) {
+ cm.sendOk("Uh... We are currently taking requests from too many maplers right now... Please try again in a bit.");
+ cm.dispose();
+ return;
+ }
+
cm.gainMeso(-cost[slct]);
- hak.newInstance("Hak");
- hak.setProperty("player", cm.getPlayer().getName());
- hak.startInstance(cm.getPlayer());
cm.dispose();
}
}
diff --git a/scripts/npc/2141001.js b/scripts/npc/2141001.js
index 9772b05adc..e0336c9585 100644
--- a/scripts/npc/2141001.js
+++ b/scripts/npc/2141001.js
@@ -171,7 +171,7 @@ function action(mode, type, selection) {
if (selection > 0) {
var banned = expedMembers.get(selection - 1);
expedition.ban(banned);
- cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
+ cm.sendOk("You have banned " + banned.getValue() + " from the expedition.");
cm.dispose();
} else {
cm.sendSimple(list);
diff --git a/scripts/npc/9120201.js b/scripts/npc/9120201.js
index 4f3b233776..275acfa415 100644
--- a/scripts/npc/9120201.js
+++ b/scripts/npc/9120201.js
@@ -175,7 +175,7 @@ function action(mode, type, selection) {
if (selection > 0) {
var banned = expedMembers.get(selection - 1);
expedition.ban(banned);
- cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
+ cm.sendOk("You have banned " + banned.getValue() + " from the expedition.");
cm.dispose();
} else {
cm.sendSimple(list);
diff --git a/scripts/npc/9201113.js b/scripts/npc/9201113.js
index 4cd1baca90..4c9621d431 100644
--- a/scripts/npc/9201113.js
+++ b/scripts/npc/9201113.js
@@ -158,7 +158,7 @@ function action(mode, type, selection) {
if (selection > 0) {
var banned = expedMembers.get(selection - 1);
expedition.ban(banned);
- cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
+ cm.sendOk("You have banned " + banned.getValue() + " from the expedition.");
cm.dispose();
} else {
cm.sendSimple(list);
diff --git a/scripts/npc/9270047.js b/scripts/npc/9270047.js
index 4d7288d24e..6b3418ca4b 100644
--- a/scripts/npc/9270047.js
+++ b/scripts/npc/9270047.js
@@ -175,7 +175,7 @@ function action(mode, type, selection) {
if (selection > 0) {
var banned = expedMembers.get(selection - 1);
expedition.ban(banned);
- cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
+ cm.sendOk("You have banned " + banned.getValue() + " from the expedition.");
cm.dispose();
} else {
cm.sendSimple(list);
diff --git a/scripts/npc/9977777.js b/scripts/npc/9977777.js
index e3c07313a7..9591063262 100644
--- a/scripts/npc/9977777.js
+++ b/scripts/npc/9977777.js
@@ -48,6 +48,7 @@ function writeFeatureTab_PQs() {
addFeature("Mu Lung Dojo.");
addFeature("Capt. Latanica with party fighting the boss.");
addFeature("Filled up missing obligatory event script methods.");
+ addFeature("Secured uniquety of active lobby-name instances.");
}
function writeFeatureTab_Skills() {
@@ -126,7 +127,9 @@ function writeFeatureTab_MonstersMapsReactors() {
addFeature("Mobs now can drop more than one of the same equip.");
addFeature("Mobs only drop items collectable by the player/party.");
addFeature("Mobs shouldn't fall from foothold too often now.");
+ addFeature("Puppets holds targeted mobs nearby on new aggro feat.");
addFeature("Properly applying MP cost on non-skill mob moves.");
+ addFeature("Limited underling mob spawns.");
addFeature("Implemented mob banish by touch & skill move.");
addFeature("Redesigned HT mechanics: assemble & dmg taken.");
addFeature("Implemented Zombify disease status.");
@@ -253,10 +256,12 @@ function writeFeatureTab_Project() {
addFeature("Improved login phase, using cache over DB queries.");
addFeature("Protected many flaws with login management system.");
addFeature("Developed a robust anti-exploit login coordinator.");
+ addFeature("Revised uniqueness aspect of logged in accounts.");
addFeature("Usage of HikariCP to improve DB connection calls.");
addFeature("Usage of Java Threadpool to improve runnable calls.");
addFeature("Developed many survey tools for content profiling.");
addFeature("Removed dangling item name throughout game files.");
+ addFeature("Remodeled item scripts, properly using NPC dialogs.");
addFeature("ThreadTracker: runtime tool for deadlock detection.");
addFeature("Channel, World and Server-wide timer management.");
addFeature("Thoroughly reviewed encapsulation for player stats.");
diff --git a/scripts/portal/Depart_ToKerning.js b/scripts/portal/Depart_ToKerning.js
index fb775ffb92..213f7aa04f 100644
--- a/scripts/portal/Depart_ToKerning.js
+++ b/scripts/portal/Depart_ToKerning.js
@@ -1,8 +1,10 @@
function enter(pi) {
+ var em = pi.getEventManager("KerningTrain");
+ if (!em.startInstance(pi.getPlayer())) {
+ pi.message("The passenger wagon is already full. Try again a bit later.");
+ return false;
+ }
+
pi.playPortalSound();
- var train = pi.getEventManager("KerningTrain");
- train.newInstance("KerningTrain");
- train.setProperty("player", pi.getPlayer().getName());
- train.startInstance(pi.getPlayer());
return true;
}
\ No newline at end of file
diff --git a/scripts/portal/enterRider.js b/scripts/portal/enterRider.js
index 6d654efb73..225c2e42a2 100644
--- a/scripts/portal/enterRider.js
+++ b/scripts/portal/enterRider.js
@@ -6,14 +6,13 @@ function enter(pi) {
return false;
}
else {
- if (em.getProperty("noEntry") == "false") {
- var eim = em.newInstance("Aran_2ndmount");
- eim.registerPlayer(pi.getPlayer());
- return true;
- }
- else {
+ var em = pi.getEventManager("Aran_2ndmount");
+ if (!em.startInstance(pi.getPlayer())) {
pi.message("There is currently someone in this map, come back later.");
return false;
+ } else {
+ pi.playPortalSound();
+ return true;
}
}
} else {
diff --git a/scripts/portal/q2073.js b/scripts/portal/q2073.js
index 598147147f..e1af259317 100644
--- a/scripts/portal/q2073.js
+++ b/scripts/portal/q2073.js
@@ -28,6 +28,8 @@ function enter(pi) {
pi.playPortalSound();
pi.warp(900000000, 0);
return true;
- }
- return false;
+ } else {
+ pi.message("Private property. This place can only be entered when running an errand from Camila.");
+ return false;
+ }
}
\ No newline at end of file
diff --git a/scripts/portal/rankRoom.js b/scripts/portal/rankRoom.js
index 812d6ae5b8..c112ece152 100644
--- a/scripts/portal/rankRoom.js
+++ b/scripts/portal/rankRoom.js
@@ -20,6 +20,9 @@ function enter(pi) {
case 100000201:
pi.warp(100000204, 2); //or 100000205
break;
+ case 101000003: // portal warp fix thanks to Vcoc
+ pi.warp(101000004, 2); //or 101000005
+ break;
default:
pi.warp(pi.getMapId() + 1, 1); //or + 2
break;
diff --git a/scripts/quest/21401.js b/scripts/quest/21401.js
index f078a0915b..0e52708254 100644
--- a/scripts/quest/21401.js
+++ b/scripts/quest/21401.js
@@ -22,13 +22,13 @@ function start(mode, type, selection) {
} else if (status == 3) {
qm.sendAcceptDecline("Please, Aran. Please stop me from becoming enraged. Only you can control me. It's getting out of my hands now. Please do whatever it takes to #rstop me from going berserk#k!");
} else if (status == 4) {
- qm.startQuest();
-
- var mb = qm.getEventManager("MahaBattle");
- mb.newInstance("MahaBattle");
- mb.setProperty("player", qm.getPlayer().getName());
- mb.startInstance(qm.getPlayer());
-
+ var em = qm.getEventManager("MahaBattle");
+ if (!em.startInstance(qm.getPlayer())) {
+ qm.sendOk("There is currently someone in this map, come back later.");
+ } else {
+ qm.startQuest();
+ }
+
qm.dispose();
}
}
diff --git a/scripts/quest/21613.js b/scripts/quest/21613.js
index b0d80f11bb..cc99db89f4 100644
--- a/scripts/quest/21613.js
+++ b/scripts/quest/21613.js
@@ -48,17 +48,14 @@ function start(mode, type, selection) {
return;
}
else {
- if (em.getProperty("noEntry") == "false") {
- var eim = em.newInstance("Aran_3rdmount");
- eim.registerPlayer(qm.getPlayer());
-
- qm.forceStartQuest();
- qm.dispose();
- }
- else {
+ var em = qm.getEventManager("Aran_3rdmount");
+ if (!em.startInstance(qm.getPlayer())) {
qm.sendOk("There is currently someone in this map, come back later.");
- qm.dispose();
+ } else {
+ qm.forceStartQuest();
}
+
+ qm.dispose();
}
}
}
diff --git a/scripts/quest/2245.js b/scripts/quest/2245.js
index c14537e296..f5d503c153 100644
--- a/scripts/quest/2245.js
+++ b/scripts/quest/2245.js
@@ -42,17 +42,14 @@ function start(mode, type, selection) {
return;
}
- if (em.getProperty("noEntry") == "false") {
- var eim = em.newInstance("BalrogQuest");
- eim.registerPlayer(qm.getPlayer());
- eim.startEvent();
-
- qm.dispose();
- }
- else {
+ var em = qm.getEventManager("BalrogQuest");
+ if (!em.startInstance(qm.getPlayer())) {
qm.sendOk("There is currently someone in this map, come back later.");
- qm.dispose();
+ } else {
+ qm.forceStartQuest();
}
+
+ qm.dispose();
}
}
}
diff --git a/scripts/quest/2291.js b/scripts/quest/2291.js
index 48b8daa124..d9d6588f57 100644
--- a/scripts/quest/2291.js
+++ b/scripts/quest/2291.js
@@ -43,13 +43,14 @@ function end(mode, type, selection) {
qm.sendNext("You got the #b#i4032521##k with you, great. Let me show you the way.");
} else if (status == 1) {
+ var em = qm.getEventManager("RockSpiritVIP");
+ if (!em.startInstance(qm.getPlayer())) {
+ qm.sendOk("Uh... It looks like the rooms ahead are a bit crowded right now. Please wait around here for a bit, ok?");
+ qm.dispose();
+ return;
+ }
+
qm.gainItem(4032521, -10);
-
- var rock = qm.getEventManager("RockSpiritVIP");
- rock.newInstance("RockSpiritVIP");
- rock.setProperty("player", qm.getPlayer().getName());
- rock.startInstance(qm.getPlayer());
-
qm.forceCompleteQuest();
qm.dispose();
}
diff --git a/scripts/quest/3714.js b/scripts/quest/3714.js
index c724911816..7868cb80bc 100644
--- a/scripts/quest/3714.js
+++ b/scripts/quest/3714.js
@@ -41,9 +41,22 @@ function start(mode, type, selection) {
return;
}
- qm.sendNext("You have brought a #b#t4001094##k, thank you for the effort!");
+ if (qm.haveItem(2041200, 1)) {
+ qm.sendOk("(The #b#t2041200##k in my bag has grown brighter since reaching this place... Noticing again, the young dragon over there seems to be glaring bitterly towards it.)");
+ qm.dispose();
+ return;
+ }
+
+ qm.sendNext("You have brought a #b#t4001094##k, thank you for retrieving one more of my kin to the nest! Please have this...\r\n\r\n....... (bleuuhnuhgh) (blahrgngnhhng) ...\r\n\r\nehh, #b#t2041200##k as a token of my kin's gratitude. And do a favor for us, please, get that thing out of here...");
} else if (status == 1) {
+ if (!qm.canHold(2041200, 1)) {
+ qm.sendOk("Please make a room on your USE inventory to receive the reward.");
+ qm.dispose();
+ return;
+ }
+
qm.gainItem(4001094, -1);
+ qm.gainItem(2041200, 1); // quest not rewarding properly found thanks to MedicOP & Thora
qm.gainExp(42000);
qm.forceCompleteQuest();
diff --git a/sql/db_database.sql b/sql/db_database.sql
index aae28570c9..ca9b171565 100644
--- a/sql/db_database.sql
+++ b/sql/db_database.sql
@@ -16458,6 +16458,7 @@ CREATE TABLE IF NOT EXISTS `pets` (
`closeness` int(10) unsigned NOT NULL,
`fullness` int(10) unsigned NOT NULL,
`summoned` tinyint(1) NOT NULL DEFAULT '0',
+ `flag` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`petid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
diff --git a/src/client/MapleCharacter.java b/src/client/MapleCharacter.java
index 100c2eb355..7645da228c 100644
--- a/src/client/MapleCharacter.java
+++ b/src/client/MapleCharacter.java
@@ -66,6 +66,7 @@ import net.server.world.World;
import scripting.event.EventInstanceManager;
import server.CashShop;
import server.MapleItemInformationProvider;
+import server.MapleItemInformationProvider.ScriptedItem;
import server.MaplePortal;
import server.MapleShop;
import server.MapleStatEffect;
@@ -287,6 +288,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
private AutobanManager autoban;
private boolean isbanned = false;
private boolean blockCashShop = false;
+ private boolean allowExpGain = false;
private byte pendantExp = 0, lastmobcount = 0, doorSlot = -1;
private List trockmaps = new ArrayList<>();
private List viptrockmaps = new ArrayList<>();
@@ -649,6 +651,10 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
public void addSummon(int id, MapleSummon summon) {
summons.put(id, summon);
+
+ if (summon.isPuppet()) {
+ map.addPlayerPuppet(this);
+ }
}
public void addVisibleMapObject(MapleMapObject mo) {
@@ -805,6 +811,10 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
public void toggleBlockCashShop() {
blockCashShop = !blockCashShop;
}
+
+ public void toggleExpGain() {
+ allowExpGain = !allowExpGain;
+ }
public void setClient(MapleClient c) {
this.client = c;
@@ -1728,6 +1738,15 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
}
}
+ public Collection getControlledMonsters() {
+ cpnLock.lock();
+ try {
+ return new ArrayList<>(controlled);
+ } finally {
+ cpnLock.unlock();
+ }
+ }
+
public void releaseControlledMonsters() {
Collection controlledMonsters;
@@ -1799,7 +1818,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
mpcs = getPartyMembersOnSameMap();
}
- String itemScriptName = null;
+ ScriptedItem itemScript = null;
mapitem.lockItem();
try {
if (mapitem.isPickedUp()) {
@@ -1872,9 +1891,9 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
this.gainMeso(mapitem.getMeso(), true, true, false);
}
} else if (mItem.getItemId() / 10000 == 243) {
- MapleItemInformationProvider.scriptedItem info = ii.getScriptedItemInfo(mItem.getItemId());
- if (info.runOnPickup()) {
- itemScriptName = info.getScript();
+ ScriptedItem info = ii.getScriptedItemInfo(mItem.getItemId());
+ if (info != null && info.runOnPickup()) {
+ itemScript = info;
} else {
if (!MapleInventoryManipulator.addFromDrop(client, mItem, true)) {
client.announce(MaplePacketCreator.enableActions());
@@ -1908,11 +1927,9 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
mapitem.unlockItem();
}
- if (itemScriptName != null) {
+ if (itemScript != null) {
ItemScriptManager ism = ItemScriptManager.getInstance();
- if (ism.scriptExists(itemScriptName)) {
- ism.runItemScript(client, itemScriptName);
- }
+ ism.runItemScript(client, itemScript);
}
}
client.announce(MaplePacketCreator.enableActions());
@@ -1927,14 +1944,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
}
public boolean canHold(int itemid, int quantity) {
- int hold = getCleanItemQuantity(itemid, false);
-
- if(hold > 0) {
- if(hold + quantity <= ii.getSlotMax(client, itemid))
- return true;
- }
-
- return getInventory(ItemConstants.getInventoryType(itemid)).getNextFreeSlot() > -1;
+ return client.getAbstractPlayerInteraction().canHold(itemid, quantity);
}
public boolean isRidingBattleship() {
@@ -2907,7 +2917,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
private synchronized void gainExpInternal(long gain, int equip, int party, boolean show, boolean inChat, boolean white) { // need of method synchonization here detected thanks to MedicOP
long total = Math.max(gain, -exp.get());
- if (level < getMaxLevel()) {
+ if (level < getMaxLevel() && (allowExpGain || this.getEventInstance() != null)) {
long leftover = 0;
long nextExp = exp.get() + total;
@@ -3464,9 +3474,11 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
getMap().broadcastMessage(MaplePacketCreator.removeSummon(summon, true), summon.getPosition());
getMap().removeMapObject(summon);
removeVisibleMapObject(summon);
+
summons.remove(summonId);
-
- if (summon.getSkill() == DarkKnight.BEHOLDER) {
+ if (summon.isPuppet()) {
+ map.removePlayerPuppet(this);
+ } else if (summon.getSkill() == DarkKnight.BEHOLDER) {
if (beholderHealingSchedule != null) {
beholderHealingSchedule.cancel(false);
beholderHealingSchedule = null;
@@ -4602,19 +4614,19 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
}
public int getItemQuantity(int itemid, boolean checkEquipped) {
- int possesed = inventory[ItemConstants.getInventoryType(itemid).ordinal()].countById(itemid);
+ int count = inventory[ItemConstants.getInventoryType(itemid).ordinal()].countById(itemid);
if (checkEquipped) {
- possesed += inventory[MapleInventoryType.EQUIPPED.ordinal()].countById(itemid);
+ count += inventory[MapleInventoryType.EQUIPPED.ordinal()].countById(itemid);
}
- return possesed;
+ return count;
}
public int getCleanItemQuantity(int itemid, boolean checkEquipped) {
- int possesed = inventory[ItemConstants.getInventoryType(itemid).ordinal()].countNotOwnedById(itemid);
+ int count = inventory[ItemConstants.getInventoryType(itemid).ordinal()].countNotOwnedById(itemid);
if (checkEquipped) {
- possesed += inventory[MapleInventoryType.EQUIPPED.ordinal()].countNotOwnedById(itemid);
+ count += inventory[MapleInventoryType.EQUIPPED.ordinal()].countNotOwnedById(itemid);
}
- return possesed;
+ return count;
}
public MapleJob getJob() {
@@ -6600,13 +6612,9 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
rs = ps.executeQuery();
while (rs.next()) {
String name = rs.getString("name");
- if (rs.getString("name").equals("rescueGaga")) {
+ if (rs.getString("name").contentEquals("rescueGaga")) {
ret.events.put(name, new RescueGaga(rs.getInt("info")));
}
- //ret.events = new MapleEvents(new RescueGaga(rs.getInt("rescuegaga")), new ArtifactHunt(rs.getInt("artifacthunt")));
- }
- if (!ret.events.containsKey("rescueGaga")) {
- ret.events.put("rescueGaga", new RescueGaga(0));
}
rs.close();
ps.close();
@@ -6988,13 +6996,12 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
}
public void respawn(EventInstanceManager eim, int returnMap) {
- cancelAllBuffs(false);
-
- updateHp(50);
- setStance(0);
-
if (eim != null) eim.unregisterPlayer(this); // some event scripts uses this...
changeMap(returnMap);
+
+ cancelAllBuffs(false); // thanks Oblivium91 for finding out players still could revive in area and take damage before returning to town
+ updateHp(50);
+ setStance(0);
}
private void prepareDragonBlood(final MapleStatEffect bloodEffect) {
@@ -7514,6 +7521,8 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
this.getInventory(itEntry.getRight()).addItem(itEntry.getLeft());
}
+ this.events.put("rescueGaga", new RescueGaga(0));
+
Connection con = null;
PreparedStatement ps = null;
@@ -9733,7 +9742,6 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
events = null;
mpc = null;
mgc = null;
- events = null;
party = null;
family = null;
diff --git a/src/client/MapleClient.java b/src/client/MapleClient.java
index 4e5acbe135..9fdf031b53 100644
--- a/src/client/MapleClient.java
+++ b/src/client/MapleClient.java
@@ -517,11 +517,15 @@ public class MapleClient {
}
public int login(String login, String pwd, String nibbleHwid) {
- loginattempt++;
- if (loginattempt > 4) {
- MapleSessionCoordinator.getInstance().closeSession(session, false);
- }
int loginok = 5;
+
+ loginattempt++;
+ if (loginattempt > 4) {
+ loggedIn = false;
+ MapleSessionCoordinator.getInstance().closeSession(session, false);
+ return loginok;
+ }
+
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;
@@ -748,7 +752,12 @@ public class MapleClient {
return accId;
}
- public void updateLoginState(int newstate) {
+ public void updateLoginState(int newstate) {
+ // rules out possibility of multiple account entries
+ if (newstate == LOGIN_LOGGEDIN) {
+ MapleSessionCoordinator.getInstance().updateOnlineSession(this.getSession());
+ }
+
try {
Connection con = DatabaseConnection.getConnection();
try (PreparedStatement ps = con.prepareStatement("UPDATE accounts SET loggedin = ?, lastlogin = ? WHERE id = ?")) {
@@ -763,6 +772,7 @@ public class MapleClient {
} catch (SQLException e) {
e.printStackTrace();
}
+
if (newstate == LOGIN_NOTLOGGEDIN) {
loggedIn = false;
serverTransition = false;
@@ -797,9 +807,6 @@ public class MapleClient {
MapleSessionCoordinator.getInstance().closeSession(session, null);
updateLoginState(LOGIN_NOTLOGGEDIN);
}
- } else if (state == LOGIN_LOGGEDIN && player == null) {
- state = LOGIN_LOGGEDIN;
- updateLoginState(LOGIN_LOGGEDIN);
}
rs.close();
ps.close();
@@ -1006,8 +1013,7 @@ public class MapleClient {
Server.getInstance().unregisterLoginState(this);
- this.session.setAttribute(MapleClient.CLIENT_KEY, null);
- this.accountName = null;
+ this.accountName = null;
this.macs = null;
this.hwid = null;
this.birthday = null;
diff --git a/src/client/command/CommandsExecutor.java b/src/client/command/CommandsExecutor.java
index 4ae2f7dedf..966809824d 100644
--- a/src/client/command/CommandsExecutor.java
+++ b/src/client/command/CommandsExecutor.java
@@ -193,6 +193,7 @@ public class CommandsExecutor {
addCommand("int", StatIntCommand.class);
addCommand("luk", StatLukCommand.class);
addCommand("enableauth", EnableAuthCommand.class);
+ addCommand("toggleexp", ToggleExpCommand.class);
commandsNameDesc.add(levelCommandsCursor);
}
diff --git a/src/client/command/commands/gm0/ToggleExpCommand.java b/src/client/command/commands/gm0/ToggleExpCommand.java
new file mode 100644
index 0000000000..d7e6ab5e0f
--- /dev/null
+++ b/src/client/command/commands/gm0/ToggleExpCommand.java
@@ -0,0 +1,44 @@
+/*
+ This file is part of the HeavenMS MapleStory Server, commands OdinMS-based
+ Copyleft (L) 2016 - 2018 RonanLana
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation version 3 as published by
+ the Free Software Foundation. You may not use, modify or distribute
+ this program under any other version of the GNU Affero General Public
+ License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+/*
+ @Author: Ronan
+*/
+package client.command.commands.gm0;
+
+import client.command.Command;
+import client.MapleClient;
+
+public class ToggleExpCommand extends Command {
+ {
+ setDescription("");
+ }
+
+ @Override
+ public void execute(MapleClient c, String[] params) {
+ if (c.tryacquireClient()) {
+ try {
+ c.getPlayer().toggleExpGain(); // Vcoc's idea
+ } finally {
+ c.releaseClient();
+ }
+ }
+ }
+}
diff --git a/src/client/command/commands/gm1/GotoCommand.java b/src/client/command/commands/gm1/GotoCommand.java
index 3e1a816449..72445d122b 100644
--- a/src/client/command/commands/gm1/GotoCommand.java
+++ b/src/client/command/commands/gm1/GotoCommand.java
@@ -46,12 +46,19 @@ public class GotoCommand extends Command {
player.yellowMessage("Syntax: @goto