I'm using MapleBlade and this is my SGM command. All commands working fine for me with this. Also the !seducemap im using is by askhugo. He has it so that you do it as !seducemap 1 to go left. !seducemap 2 to go right and !seducemap 3 to jump. Credits to Askhugo for the seducemap that im using.
PHP Code:
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
package client.command;
import client.MapleCharacter;
import client.MapleClient;
import client.MapleJob;
import client.MapleStat;
import net.channel.ChannelServer;
import server.life.MapleLifeFactory;
import tools.MaplePacketCreator;
import server.life.MapleMonster;
import tools.StringUtil;
import server.maps.MapleMapObject;
import server.maps.MapleMapObjectType;
import server.maps.MapleMap;
import java.util.List;
import java.util.Arrays;
class SGMCommand {
static boolean execute(MapleClient c, String[] splitted, char heading) {
MapleCharacter player = c.getPlayer();
ChannelServer cserv = c.getChannelServer();
if (splitted[0].equals("setrebirths")) {
int rebirths = 0;
try {
rebirths = Integer.parseInt(splitted[2]);
} catch (NumberFormatException asd) {
}
MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
if (victim != null) {
victim.setReborns(rebirths);
} else {
player.dropMessage("Player was not found");
}
} else if (splitted[0].equalsIgnoreCase("permban")) {
String name = splitted[1];
String reason = StringUtil.joinStringFrom(splitted, 2);
MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(name);
if (victim != null) {
if (!victim.isGM()) {
victim.ban(reason, true);
player.dropMessage("Character permanently banned. !");
} else {
player.dropMessage("You can't ban a GM. Sorry");
}
} else {
if (MapleCharacter.ban(name, reason, false)) {
player.dropMessage("Permanently banned sucessfully");
} else {
player.dropMessage("Error while banning.");
}
} } else if (splitted[0].equals("killnear")) {
MapleMap map = player.getMap();
List<MapleMapObject> players = map.getMapObjectsInRange(player.getPosition(), (double) 50000, Arrays.asList(MapleMapObjectType.PLAYER));
for (MapleMapObject closeplayers : players) {
MapleCharacter playernear = (MapleCharacter) closeplayers;
if (playernear.isAlive());
{
if (!playernear.isGM()) {
playernear.setHp(0);
playernear.updateSingleStat(MapleStat.HP, 0);
playernear.dropMessage(5, "Tagged");
}
}
}
} else if (splitted[0].equals("killn")) {
MapleMap map = player.getMap();
List<MapleMapObject> players = map.getMapObjectsInRange(player.getPosition(), (double) 50000, Arrays.asList(MapleMapObjectType.PLAYER));
for (MapleMapObject closeplayers : players) {
MapleCharacter playernear = (MapleCharacter) closeplayers;
if (playernear.isAlive()); {
if (!playernear.isGM()) {
playernear.setHp(0);
playernear.updateSingleStat(MapleStat.HP, 0);
playernear.dropMessage(5, "You were too close to a GM.");
}
}
}
} else if (splitted[0].equalsIgnoreCase("zakum")) {
for (int m = 8800003; m <= 8800010; m++) {
player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(m), player.getPosition());
}
player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(8800000), player.getPosition());
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "The almighty Zakum has awakened!"));
} else if (splitted[0].equalsIgnoreCase("horntail")) {
MapleMonster ht = MapleLifeFactory.getMonster(8810026);
player.getMap().spawnMonsterOnGroudBelow(ht, player.getPosition());
player.getMap().killMonster(ht, player, false);
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "As the cave shakes and rattles, here comes Horntail."));
} else if (splitted[0].equals("jobperson")) {
cserv.getPlayerStorage().getCharacterByName(splitted[1]).changeJob(MapleJob.getById(Integer.parseInt(splitted[2])));
} else if (splitted[0].equals("levelperson")) {
MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
victim.setLevel(Integer.parseInt(splitted[2]));
victim.gainExp(-victim.getExp(), false, false);
victim.updateSingleStat(MapleStat.LEVEL, victim.getLevel());
} else if (splitted[0].equals("setrebirths")) {
int rebirths = 0;
try {
rebirths = Integer.parseInt(splitted[2]);
} catch (NumberFormatException asd) {
}
MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
if (victim != null) {
victim.setReborns(rebirths);
} else {
player.dropMessage("Player was not found");
}
} else if (splitted[0].equalsIgnoreCase("horntail")) {
for (int i = 8810002; i < 8810010; i++) {
player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(i), player.getPosition());
}
} else {
return false;
}
return true;
}
static String joinStringFrom(String arr[], int start) {
StringBuilder builder = new StringBuilder();
for (int i = start; i < arr.length; i++) {
builder.append(arr[i]);
if (i != arr.length - 1) {
builder.append(" ");
}
}
return builder.toString();
}
public static int getOptionalIntArg(String splitted[], int position, int def) {
if (splitted.length > position) {
try {
return Integer.parseInt(splitted[position]);
} catch (NumberFormatException nfe) {
return def;
}
}
return def;
}
private static int getNoticeType(String typestring) {
if (typestring.equals("n")) {
return 0;
} else if (typestring.equals("p")) {
return 1;
} else if (typestring.equals("l")) {
return 2;
} else if (typestring.equals("nv")) {
return 5;
} else if (typestring.equals("v")) {
return 5;
} else if (typestring.equals("b")) {
return 6;
}
return -1;
}
}