PlayerNPC patch + Wedding ring effects + Bypassable PIN/PIC + SP cap

Fixed an issue with delayed item pickups.
Fixed ClearSlot command not removing rechargeables from inventory.
Fixed Resurrection and Hyper Body animation effect not working for other players.
Implemented bypassable PIN/PIC, applied on accounts after a successful authentication, remaining active while activity is detected for that account.
Fixed anti-multiclient system not properly registering players logged in via all-chars-view.
Fixed cases where players still could gain EXP from much higher-leveled mobs if they were on an event instance.
Optimized scroll result method performance.
Added a server flag for SP cap limit on the player's current job (missing amount are reobtained after changing jobs).
PlayerNPCs now have overridable scripts.
Fixed some mapobject issues with PlayerNPCs, potencially leading to disappearing from maps in certain circumstances.
Fixed SpawnAllPnpcs command not properly spawning all PlayersNPCs.
Added extra info on Abdula, now stating whether a book can be obtained from questline or not.
Fixed marriage ring effects.
Fixed some cases where marriage rings were being able to be sent out from the character owner.
Fixed Duey allowing send untradeable items.
New tool: MapleWorldmapChecker. It reads Map.wz XMLs, fetching mapids not properly referenced on the worldmap nodes.
This commit is contained in:
ronancpl
2018-10-25 07:09:35 -03:00
parent 17d3ffe1c3
commit 8f8cd815aa
87 changed files with 2040 additions and 271 deletions

View File

@@ -180,6 +180,7 @@ public class CommandsExecutor {
addCommand("dex", StatDexCommand.class);
addCommand("int", StatIntCommand.class);
addCommand("luk", StatLukCommand.class);
addCommand("enableauth", EnableAuthCommand.class);
commandsNameDesc.add(levelCommandsCursor);
}

View File

@@ -28,6 +28,10 @@ import client.command.Command;
import client.processor.BuybackProcessor;
public class BuyBackCommand extends Command {
{
setDescription("");
}
@Override
public void execute(MapleClient c, String[] params) {
if (params.length < 1) {

View File

@@ -0,0 +1,45 @@
/*
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 <http://www.gnu.org/licenses/>.
*/
/*
@Author: Arthur L - Refactored command content into modules
*/
package client.command.commands.gm0;
import client.command.Command;
import client.MapleClient;
import net.server.coordinator.MapleLoginBypassCoordinator;
public class EnableAuthCommand extends Command {
{
setDescription("");
}
@Override
public void execute(MapleClient c, String[] params) {
if (c.tryacquireClient()) {
try {
MapleLoginBypassCoordinator.getInstance().unregisterLoginBypassEntry(c.getNibbleHWID(), c.getAccID());
} finally {
c.releaseClient();
}
}
}
}

View File

@@ -49,31 +49,31 @@ public class ClearSlotCommand extends Command {
Item tempItem = c.getPlayer().getInventory(MapleInventoryType.EQUIP).getItem((byte) i);
if (tempItem == null)
continue;
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.EQUIP, (byte) i, tempItem.getQuantity(), false, true);
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.EQUIP, (byte) i, tempItem.getQuantity(), false, false);
}
for (int i = 0; i < 101; i++) {
Item tempItem = c.getPlayer().getInventory(MapleInventoryType.USE).getItem((byte) i);
if (tempItem == null)
continue;
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.USE, (byte) i, tempItem.getQuantity(), false, true);
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.USE, (byte) i, tempItem.getQuantity(), false, false);
}
for (int i = 0; i < 101; i++) {
Item tempItem = c.getPlayer().getInventory(MapleInventoryType.ETC).getItem((byte) i);
if (tempItem == null)
continue;
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.ETC, (byte) i, tempItem.getQuantity(), false, true);
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.ETC, (byte) i, tempItem.getQuantity(), false, false);
}
for (int i = 0; i < 101; i++) {
Item tempItem = c.getPlayer().getInventory(MapleInventoryType.SETUP).getItem((byte) i);
if (tempItem == null)
continue;
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.SETUP, (byte) i, tempItem.getQuantity(), false, true);
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.SETUP, (byte) i, tempItem.getQuantity(), false, false);
}
for (int i = 0; i < 101; i++) {
Item tempItem = c.getPlayer().getInventory(MapleInventoryType.CASH).getItem((byte) i);
if (tempItem == null)
continue;
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.CASH, (byte) i, tempItem.getQuantity(), false, true);
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.CASH, (byte) i, tempItem.getQuantity(), false, false);
}
player.yellowMessage("All Slots Cleared.");
break;
@@ -82,7 +82,7 @@ public class ClearSlotCommand extends Command {
Item tempItem = c.getPlayer().getInventory(MapleInventoryType.EQUIP).getItem((byte) i);
if (tempItem == null)
continue;
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.EQUIP, (byte) i, tempItem.getQuantity(), false, true);
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.EQUIP, (byte) i, tempItem.getQuantity(), false, false);
}
player.yellowMessage("Equipment Slot Cleared.");
break;
@@ -91,7 +91,7 @@ public class ClearSlotCommand extends Command {
Item tempItem = c.getPlayer().getInventory(MapleInventoryType.USE).getItem((byte) i);
if (tempItem == null)
continue;
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.USE, (byte) i, tempItem.getQuantity(), false, true);
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.USE, (byte) i, tempItem.getQuantity(), false, false);
}
player.yellowMessage("Use Slot Cleared.");
break;
@@ -100,7 +100,7 @@ public class ClearSlotCommand extends Command {
Item tempItem = c.getPlayer().getInventory(MapleInventoryType.SETUP).getItem((byte) i);
if (tempItem == null)
continue;
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.SETUP, (byte) i, tempItem.getQuantity(), false, true);
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.SETUP, (byte) i, tempItem.getQuantity(), false, false);
}
player.yellowMessage("Set-Up Slot Cleared.");
break;
@@ -109,7 +109,7 @@ public class ClearSlotCommand extends Command {
Item tempItem = c.getPlayer().getInventory(MapleInventoryType.ETC).getItem((byte) i);
if (tempItem == null)
continue;
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.ETC, (byte) i, tempItem.getQuantity(), false, true);
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.ETC, (byte) i, tempItem.getQuantity(), false, false);
}
player.yellowMessage("ETC Slot Cleared.");
break;
@@ -118,7 +118,7 @@ public class ClearSlotCommand extends Command {
Item tempItem = c.getPlayer().getInventory(MapleInventoryType.CASH).getItem((byte) i);
if (tempItem == null)
continue;
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.CASH, (byte) i, tempItem.getQuantity(), false, true);
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.CASH, (byte) i, tempItem.getQuantity(), false, false);
}
player.yellowMessage("Cash Slot Cleared.");
break;

View File

@@ -56,5 +56,6 @@ public class MaxSkillCommand extends Command {
player.changeSkillLevel(skill, (byte) -1, -1, -1);
}
player.yellowMessage("Skills maxed out.");
}
}

View File

@@ -31,10 +31,12 @@ import provider.MapleDataProvider;
import provider.MapleDataProviderFactory;
import provider.MapleDataTool;
import server.MapleItemInformationProvider;
import server.quest.MapleQuest;
import tools.MaplePacketCreator;
import tools.Pair;
import java.io.File;
import java.util.List;
public class SearchCommand extends Command {
private static MapleData npcStringData;
@@ -65,7 +67,7 @@ public class SearchCommand extends Command {
long start = System.currentTimeMillis();//for the lulz
MapleData data = null;
if (!params[0].equalsIgnoreCase("ITEM")) {
boolean mapSearch = false;
int searchType = 0;
if (params[0].equalsIgnoreCase("NPC")) {
data = npcStringData;
@@ -75,21 +77,24 @@ public class SearchCommand extends Command {
data = skillStringData;
} else if (params[0].equalsIgnoreCase("MAP")) {
data = mapStringData;
mapSearch = true;
searchType = 1;
} else if (params[0].equalsIgnoreCase("QUEST")) {
data = mapStringData;
searchType = 2;
} else {
sb.append("#bInvalid search.\r\nSyntax: '!search [type] [name]', where [type] is MAP, NPC, ITEM, MOB, or SKILL.");
sb.append("#bInvalid search.\r\nSyntax: '!search [type] [name]', where [type] is MAP, QUEST, NPC, ITEM, MOB, or SKILL.");
}
if (data != null) {
String name;
if (!mapSearch) {
if (searchType == 0) {
for (MapleData searchData : data.getChildren()) {
name = MapleDataTool.getString(searchData.getChildByPath("name"), "NO-NAME");
if (name.toLowerCase().contains(search.toLowerCase())) {
sb.append("#b").append(Integer.parseInt(searchData.getName())).append("#k - #r").append(name).append("\r\n");
}
}
} else {
} else if (searchType == 1) {
String mapName, streetName;
for (MapleData searchDataDir : data.getChildren()) {
@@ -102,6 +107,16 @@ public class SearchCommand extends Command {
}
}
}
} else {
for (MapleQuest mq : MapleQuest.getMatchedQuests(search)) {
sb.append("#b").append(mq.getId()).append("#k - #r");
String parentName = mq.getParentName();
if (!parentName.isEmpty()) {
sb.append(parentName).append(" - ");
}
sb.append(mq.getName()).append("\r\n");
}
}
}
} else {

View File

@@ -28,7 +28,9 @@ import client.MapleClient;
import client.MapleCharacter;
import server.life.MapleMonster;
import server.life.MapleNPC;
import server.life.MaplePlayerNPC;
import server.maps.MapleMapObject;
import java.util.HashSet;
public class WhereaMiCommand extends Command {
{
@@ -38,23 +40,54 @@ public class WhereaMiCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
HashSet<MapleCharacter> chars = new HashSet<>();
HashSet<MapleNPC> npcs = new HashSet<>();
HashSet<MaplePlayerNPC> playernpcs = new HashSet<>();
HashSet<MapleMonster> mobs = new HashSet<>();
for (MapleMapObject mmo : player.getMap().getMapObjects()) {
if (mmo instanceof MapleNPC) {
MapleNPC npc = (MapleNPC) mmo;
npcs.add(npc);
} else if (mmo instanceof MapleCharacter) {
MapleCharacter mc = (MapleCharacter) mmo;
chars.add(mc);
} else if (mmo instanceof MapleMonster) {
MapleMonster mob = (MapleMonster) mmo;
if (mob.isAlive()) {
mobs.add(mob);
}
} else if (mmo instanceof MaplePlayerNPC) {
MaplePlayerNPC npc = (MaplePlayerNPC) mmo;
playernpcs.add(npc);
}
}
player.yellowMessage("Map ID: " + player.getMap().getId());
player.yellowMessage("Players on this map:");
for (MapleMapObject mmo : player.getMap().getPlayers()) {
MapleCharacter chr = (MapleCharacter) mmo;
for (MapleCharacter chr : chars) {
player.dropMessage(5, ">> " + chr.getName() + " - " + chr.getId() + " - Oid: " + chr.getObjectId());
}
player.yellowMessage("NPCs on this map:");
for (MapleMapObject npcs : player.getMap().getMapObjects()) {
if (npcs instanceof MapleNPC) {
MapleNPC npc = (MapleNPC) npcs;
if (!playernpcs.isEmpty()) {
player.yellowMessage("PlayerNPCs on this map:");
for (MaplePlayerNPC pnpc : playernpcs) {
player.dropMessage(5, ">> " + pnpc.getName() + " - Scriptid: " + pnpc.getScriptId() + " - Oid: " + pnpc.getObjectId());
}
}
if (!npcs.isEmpty()) {
player.yellowMessage("NPCs on this map:");
for (MapleNPC npc : npcs) {
player.dropMessage(5, ">> " + npc.getName() + " - " + npc.getId() + " - Oid: " + npc.getObjectId());
}
}
player.yellowMessage("Monsters on this map:");
for (MapleMapObject mobs : player.getMap().getMapObjects()) {
if (mobs instanceof MapleMonster) {
MapleMonster mob = (MapleMonster) mobs;
if (!mobs.isEmpty()) {
player.yellowMessage("Monsters on this map:");
for (MapleMonster mob : mobs) {
if (mob.isAlive()) {
player.dropMessage(5, ">> " + mob.getName() + " - " + mob.getId() + " - Oid: " + mob.getObjectId());
}

View File

@@ -25,7 +25,6 @@ package client.command.commands.gm6;
import client.command.Command;
import client.MapleClient;
import client.MapleCharacter;
import server.life.MaplePlayerNPC;
public class EraseAllPNpcsCommand extends Command {
@@ -35,7 +34,6 @@ public class EraseAllPNpcsCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
//MapleCharacter player = c.getPlayer();
MaplePlayerNPC.removeAllPlayerNPC();
}
}