Several PQ platform patches + Quest complete count + Fast meso drop
Implemented CPQ challenges using the matching system. Fixed LanguageConstants statically acting for all players. Fixed OPQ's <On the Way Up> stage sometimes leading players to unexpected platforms. Fixed EllinPQ fountain not giving Altaire Fragment to players. Fixed "Lab - Unit" stage on RnJPQ, now using correlated sequences between the units. Fixed Fredrick handing out negative values of mesos to players. Improved "goto" command info. Implemented quest complete count. Fixed mobs still being "controlled" by players even though it's already dead. Concurrently protected adding items into inventory. Concurrently protected EXP gain through Writs of Solomon. Adjusted smoothly respawn rate of mobs in map (solo players in a map now experiences 75% of mobs spawned). Fixed mesos not being able to drop so frequently (prior 200ms threshold between drops). Tweaked matchchecking so that match checking doesn't outright dispose matching members on dismissal (match still sticks to the player until they answer or timeout). Fixed a dupe case within storage's item store. Added any-NPC scriptable to the source.
This commit is contained in:
@@ -204,6 +204,8 @@ public class CommandsExecutor {
|
||||
addCommand("enableauth", EnableAuthCommand.class);
|
||||
addCommand("toggleexp", ToggleExpCommand.class);
|
||||
addCommand("mylawn", MapOwnerClaimCommand.class);
|
||||
addCommand("bosshp", BossHpCommand.class);
|
||||
addCommand("mobhp", MobHpCommand.class);
|
||||
|
||||
commandsNameDesc.add(levelCommandsCursor);
|
||||
}
|
||||
@@ -212,8 +214,6 @@ public class CommandsExecutor {
|
||||
private void registerLv1Commands() {
|
||||
levelCommandsCursor = new Pair<>((List<String>) new ArrayList<String>(), (List<String>) new ArrayList<String>());
|
||||
|
||||
addCommand("bosshp", 1, BossHpCommand.class);
|
||||
addCommand("mobhp", 1, MobHpCommand.class);
|
||||
addCommand("whatdropsfrom", 1, WhatDropsFromCommand.class);
|
||||
addCommand("whodrops", 1, WhoDropsCommand.class);
|
||||
addCommand("buffme", 1, BuffMeCommand.class);
|
||||
@@ -291,7 +291,6 @@ public class CommandsExecutor {
|
||||
addCommand("givevp", 3, GiveVpCommand.class);
|
||||
addCommand("givems", 3, GiveMesosCommand.class);
|
||||
addCommand("giverp", 3, GiveRpCommand.class);
|
||||
addCommand("id", 3, IdCommand.class);
|
||||
addCommand("expeds", 3, ExpedsCommand.class);
|
||||
addCommand("kill", 3, KillCommand.class);
|
||||
addCommand("seed", 3, SeedCommand.class);
|
||||
@@ -307,7 +306,6 @@ public class CommandsExecutor {
|
||||
addCommand("startmapevent", 3, StartMapEventCommand.class);
|
||||
addCommand("stopmapevent", 3, StopMapEventCommand.class);
|
||||
addCommand("online2", 3, OnlineTwoCommand.class);
|
||||
addCommand("warpsnowball", 3, WarpSnowBallCommand.class);
|
||||
addCommand("ban", 3, BanCommand.class);
|
||||
addCommand("unban", 3, UnBanCommand.class);
|
||||
addCommand("healmap", 3, HealMapCommand.class);
|
||||
@@ -339,6 +337,7 @@ public class CommandsExecutor {
|
||||
addCommand("exprate", 4, ExpRateCommand.class);
|
||||
addCommand("mesorate", 4, MesoRateCommand.class);
|
||||
addCommand("droprate", 4, DropRateCommand.class);
|
||||
addCommand("bossdroprate", 4, BossDropRateCommand.class);
|
||||
addCommand("questrate", 4, QuestRateCommand.class);
|
||||
addCommand("travelrate", 4, TravelRateCommand.class);
|
||||
addCommand("fishrate", 4, FishingRateCommand.class);
|
||||
|
||||
@@ -27,23 +27,64 @@ import client.MapleCharacter;
|
||||
import client.command.Command;
|
||||
import client.MapleClient;
|
||||
import constants.GameConstants;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import net.server.Server;
|
||||
import server.MaplePortal;
|
||||
import server.maps.FieldLimit;
|
||||
import server.maps.MapleMap;
|
||||
import server.maps.MapleMapFactory;
|
||||
import server.maps.MapleMiniDungeonInfo;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class GotoCommand extends Command {
|
||||
|
||||
{
|
||||
setDescription("");
|
||||
|
||||
MapleMapFactory mapFactory = Server.getInstance().getWorlds().get(0).getChannels().get(0).getMapFactory();
|
||||
|
||||
List<Entry<String, Integer>> towns = new ArrayList<>(GameConstants.GOTO_TOWNS.entrySet());
|
||||
sortGotoEntries(towns);
|
||||
for (Map.Entry<String, Integer> e : towns) {
|
||||
GOTO_TOWNS_INFO += ("'" + e.getKey() + "' - #b" + (mapFactory.getMap(e.getValue()).getMapName()) + "#k\r\n");
|
||||
}
|
||||
|
||||
List<Entry<String, Integer>> areas = new ArrayList<>(GameConstants.GOTO_AREAS.entrySet());
|
||||
sortGotoEntries(areas);
|
||||
for (Map.Entry<String, Integer> e : areas) {
|
||||
GOTO_AREAS_INFO += ("'" + e.getKey() + "' - #b" + (mapFactory.getMap(e.getValue()).getMapName()) + "#k\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
public static String GOTO_TOWNS_INFO = "";
|
||||
public static String GOTO_AREAS_INFO = "";
|
||||
|
||||
private static void sortGotoEntries(List<Entry<String, Integer>> listEntries) {
|
||||
Collections.sort(listEntries, new Comparator<Entry<String, Integer>>() {
|
||||
@Override
|
||||
public int compare(Entry<String, Integer> e1, Entry<String, Integer> e2)
|
||||
{
|
||||
return e1.getValue().compareTo(e2.getValue());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
if (params.length < 1){
|
||||
player.yellowMessage("Syntax: @goto <map name>");
|
||||
String sendStr = "Syntax: #b@goto <map name>#k. Available areas:\r\n\r\n#rTowns:#k\r\n" + GOTO_TOWNS_INFO;
|
||||
if (player.isGM()) {
|
||||
sendStr += ("\r\n#rAreas:#k\r\n" + GOTO_AREAS_INFO);
|
||||
}
|
||||
|
||||
player.getAbstractPlayerInteraction().npcTalk(9000020, sendStr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -74,7 +115,13 @@ public class GotoCommand extends Command {
|
||||
player.saveLocationOnWarp();
|
||||
player.changeMap(target, targetPortal);
|
||||
} else {
|
||||
player.dropMessage(5, "Area '" + params[0] + "' is not registered.");
|
||||
// detailed info on goto available areas suggested thanks to Vcoc
|
||||
String sendStr = "Area '#r" + params[0] + "#k' is not available. Available areas:\r\n\r\n#rTowns:#k" + GOTO_TOWNS_INFO;
|
||||
if (player.isGM()) {
|
||||
sendStr += ("\r\n#rAreas:#k\r\n" + GOTO_AREAS_INFO);
|
||||
}
|
||||
|
||||
player.getAbstractPlayerInteraction().npcTalk(9000020, sendStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class WhatDropsFromCommand extends Command {
|
||||
if (name == null || name.equals("null") || drop.chance == 0){
|
||||
continue;
|
||||
}
|
||||
float chance = 1000000 / drop.chance / (!MapleMonsterInformationProvider.getInstance().isBoss(mobId) ? player.getDropRate() : player.getBossDropRate());
|
||||
float chance = Math.max(1000000 / drop.chance / (!MapleMonsterInformationProvider.getInstance().isBoss(mobId) ? player.getDropRate() : player.getBossDropRate()), 1);
|
||||
output += "- " + name + " (1/" + (int) chance + ")\r\n";
|
||||
} catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
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.gm3;
|
||||
|
||||
import client.command.Command;
|
||||
import client.MapleClient;
|
||||
import client.MapleCharacter;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
|
||||
public class IdCommand extends Command {
|
||||
{
|
||||
setDescription("");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !id <id>");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
try (BufferedReader dis = new BufferedReader(new InputStreamReader(new URL("http://www.mapletip.com/search_java.php?search_value=" + params[0] + "&check=true").openConnection().getInputStream()))) {
|
||||
String s;
|
||||
while ((s = dis.readLine()) != null) {
|
||||
player.dropMessage(s);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server, commands OdinMS-based
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@@ -17,19 +17,18 @@
|
||||
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.gm3;
|
||||
package client.command.commands.gm4;
|
||||
|
||||
import client.command.Command;
|
||||
import client.MapleClient;
|
||||
import client.MapleCharacter;
|
||||
import tools.MaplePacketCreator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class WarpSnowBallCommand extends Command {
|
||||
/**
|
||||
*
|
||||
* @author Ronan
|
||||
*/
|
||||
public class BossDropRateCommand extends Command {
|
||||
{
|
||||
setDescription("");
|
||||
}
|
||||
@@ -37,10 +36,13 @@ public class WarpSnowBallCommand extends Command {
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
List<MapleCharacter> chars = player.getMap().getAllPlayers();
|
||||
for (MapleCharacter chr : chars) {
|
||||
chr.saveLocationOnWarp();
|
||||
chr.changeMap(109060000, chr.getTeam());
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !bossdroprate <newrate>");
|
||||
return;
|
||||
}
|
||||
|
||||
int bossdroprate = Math.max(Integer.parseInt(params[0]), 1);
|
||||
c.getWorldServer().setBossDropRate(bossdroprate);
|
||||
c.getWorldServer().broadcastPacket(MaplePacketCreator.serverNotice(6, "[Rate] Boss Drop Rate has been changed to " + bossdroprate + "x."));
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,5 @@ public class MesoRateCommand extends Command {
|
||||
int mesorate = Math.max(Integer.parseInt(params[0]), 1);
|
||||
c.getWorldServer().setMesoRate(mesorate);
|
||||
c.getWorldServer().broadcastPacket(MaplePacketCreator.serverNotice(6, "[Rate] Meso Rate has been changed to " + mesorate + "x."));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user