Several command errors - Mapleblade source v.83

Results 1 to 7 of 7
  1. #1
    Newbie Sanityy is offline
    MemberRank
    Mar 2013 Join Date
    4Posts

    Several command errors - Mapleblade source v.83

    Hi!

    I have a maplestory server with a mapleblade v83 source.

    everything works great, except some commands:

    !shutdown/now
    !bomb(this command summons a bomb, but the bomb has no effect when it explodes)
    !seduce/map
    !givedisease(works on some players)
    !connected.

    And I also wonder if anyone know a command that does that if a normal player gets within a certain range gets killed by the gm using the command? I know some servers have this command.

    I have been looking for some hours now to no help.. :(

    Any help will be appreciated a lot!
    Last edited by Sanityy; 27-03-13 at 02:17 AM.


  2. #2
    Moderator Eric is offline
    ModeratorRank
    Jan 2010 Join Date
    DEV CityLocation
    3,188Posts

    Re: Several command errors - Mapleblade source v.83

    What's wrong with all of the commands? I only see the !bomb / !givedisease problems.

    1). !shutdown/!shutdownnow - This should work, I remember it working in my source.. If not edit the ShutDownServer methods/files. (If I recall, haven't messed with it in months)
    2). !bomb - Your !bombs work, but you have to make them have an action. If you want to fix them, follow this tutorial: http://forum.ragezone.com/f427/fully...-bombs-674194/
    3). !seduce/!seducemap - Why doesn't this work? It won't work on GMs but should players. It's !seduce 1 (left) !seduce 2 (right) !seduce 11 (prone) and !seduce 3 (jump). If your "!seduce" command is broken, here's mine:
    PHP Code:
    } else if (splitted[0].equalsIgnoreCase("seduce")) {
                   
    MapleCharacter victim cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                   
    int level Integer.parseInt(splitted[2]);
                        
    victim.setChair(0);
                        
    victim.getClient().getSession().write(MaplePacketCreator.cancelChair(-1));
                        
    victim.getMap().broadcastMessage(victimMaplePacketCreator.showChair(victim.getId(), 0), false);
                        
    victim.giveDebuff(MapleDisease.SEDUCE,MobSkillFactory.getMobSkill(128,level)); 
    Just add that in your GMCommands.java.
    4). !givedisease - Rather then using this command, I suggest using the one above ^ xD
    5). !connected - !conncected isn't great statistics. In fact, !online is more detailed. :)

    What do you mean by if someone's in a certain range they get killed by a GM with a command? You mean bombs? They hit people and bounce them left or right..

  3. #3
    Newbie Sanityy is offline
    MemberRank
    Mar 2013 Join Date
    4Posts

    Re: Several command errors - Mapleblade source v.83

    1) The !shutdown commands does not work, I dont know why. but when I type it, nothing happens - no error message or anything.

    2) I shall look at it thanks! :)

    3) I will try this now, hopefully it works ;)

    4) agreed

    5) Sorry I didnt see that command xD...

    The command makes the ones coming within a range of a GM using this command, will die. I heard someone say it was something like !killrange <killrange> and then it would kill any player within that range. Like doing !kill <player> just that it was bound to the GM or yeah.. I know it works, as some server use it in the OX map having games like last man standing and so on.

    I have no idea how to script something like that, but it is really nice ;)

    thanks for the help with the other commands. I will reply when I have tested the changes

  4. #4
    Newbie Sanityy is offline
    MemberRank
    Mar 2013 Join Date
    4Posts

    Re: Several command errors - Mapleblade source v.83

    @chunkarama

    the !shutdown/now does not do anything. no error or text.

    tried to fix the bombs, but didnt work - will try tomorrow again, its 4:30 am here..

    tried to add the script, but nothing changed. The command is still useless. I guess I did something wrong somewhere, but I dont know.

    The command where the GMs kill players within a certain range, have been used on at least 2 server I've played on. someone said it was something like a command called !killrange or something.. The command basically made an aura around the GM (not visible aura ofcourse) that killed the player within range. I know it has been used before, and I hoped that maybe someone know how to make it?

  5. #5
    Member mixta11 is offline
    MemberRank
    Jan 2012 Join Date
    UKLocation
    56Posts

    Re: Several command errors - Mapleblade source v.83

    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 cString[] splittedchar 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(splitted2);
                
    MapleCharacter victim cserv.getPlayerStorage().getCharacterByName(name);
                if (
    victim != null) {
                    if (!
    victim.isGM()) {
                        
    victim.ban(reasontrue);
                        
    player.dropMessage("Character permanently banned. !");
                    } else {
                        
    player.dropMessage("You can't ban a GM. Sorry");
                    }
                } else {
                    if (
    MapleCharacter.ban(namereasonfalse)) {
                        
    player.dropMessage("Permanently banned sucessfully");
                    } else {
                        
    player.dropMessage("Error while banning.");
                    }

                }    } else if (
    splitted[0].equals("killnear")) {
                
    MapleMap map player.getMap();
                List<
    MapleMapObjectplayers map.getMapObjectsInRange(player.getPosition(), (double) 50000Arrays.asList(MapleMapObjectType.PLAYER));
                for (
    MapleMapObject closeplayers players) {
                    
    MapleCharacter playernear = (MapleCharactercloseplayers;
                    if (
    playernear.isAlive());
                    {
                        if (!
    playernear.isGM()) {
                            
    playernear.setHp(0);
                            
    playernear.updateSingleStat(MapleStat.HP0);
                            
    playernear.dropMessage(5"Tagged");
                        }
                    }
                }
                        } else if (
    splitted[0].equals("killn")) {
                
    MapleMap map player.getMap();
                List<
    MapleMapObjectplayers map.getMapObjectsInRange(player.getPosition(), (double) 50000Arrays.asList(MapleMapObjectType.PLAYER));
                for (
    MapleMapObject closeplayers players) {
                    
    MapleCharacter playernear = (MapleCharactercloseplayers;
                    if (
    playernear.isAlive()); {
                        if (!
    playernear.isGM()) {
                            
    playernear.setHp(0);
                            
    playernear.updateSingleStat(MapleStat.HP0);
                            
    playernear.dropMessage(5"You were too close to a GM.");
                        }
                }
        }
                } else if (
    splitted[0].equalsIgnoreCase("zakum")) {
                for (
    int m 8800003<= 8800010m++) {
                    
    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(htplayer.getPosition());
                
    player.getMap().killMonster(htplayerfalse);
                
    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(), falsefalse);
                
    victim.updateSingleStat(MapleStat.LEVELvictim.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 88100028810010i++) {
                    
    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 startarr.lengthi++) {
                
    builder.append(arr[i]);
                if (
    != arr.length 1) {
                    
    builder.append(" ");
                }
            }
            return 
    builder.toString();
        }

                public static 
    int getOptionalIntArg(String splitted[], int positionint 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;
        }
        


  6. #6
    Newbie Sanityy is offline
    MemberRank
    Mar 2013 Join Date
    4Posts

    Re: Several command errors - Mapleblade source v.83

    Quote Originally Posted by mixta11 View Post
    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 cString[] splittedchar 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(splitted2);
                
    MapleCharacter victim cserv.getPlayerStorage().getCharacterByName(name);
                if (
    victim != null) {
                    if (!
    victim.isGM()) {
                        
    victim.ban(reasontrue);
                        
    player.dropMessage("Character permanently banned. !");
                    } else {
                        
    player.dropMessage("You can't ban a GM. Sorry");
                    }
                } else {
                    if (
    MapleCharacter.ban(namereasonfalse)) {
                        
    player.dropMessage("Permanently banned sucessfully");
                    } else {
                        
    player.dropMessage("Error while banning.");
                    }

                }    } else if (
    splitted[0].equals("killnear")) {
                
    MapleMap map player.getMap();
                List<
    MapleMapObjectplayers map.getMapObjectsInRange(player.getPosition(), (double) 50000Arrays.asList(MapleMapObjectType.PLAYER));
                for (
    MapleMapObject closeplayers players) {
                    
    MapleCharacter playernear = (MapleCharactercloseplayers;
                    if (
    playernear.isAlive());
                    {
                        if (!
    playernear.isGM()) {
                            
    playernear.setHp(0);
                            
    playernear.updateSingleStat(MapleStat.HP0);
                            
    playernear.dropMessage(5"Tagged");
                        }
                    }
                }
                        } else if (
    splitted[0].equals("killn")) {
                
    MapleMap map player.getMap();
                List<
    MapleMapObjectplayers map.getMapObjectsInRange(player.getPosition(), (double) 50000Arrays.asList(MapleMapObjectType.PLAYER));
                for (
    MapleMapObject closeplayers players) {
                    
    MapleCharacter playernear = (MapleCharactercloseplayers;
                    if (
    playernear.isAlive()); {
                        if (!
    playernear.isGM()) {
                            
    playernear.setHp(0);
                            
    playernear.updateSingleStat(MapleStat.HP0);
                            
    playernear.dropMessage(5"You were too close to a GM.");
                        }
                }
        }
                } else if (
    splitted[0].equalsIgnoreCase("zakum")) {
                for (
    int m 8800003<= 8800010m++) {
                    
    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(htplayer.getPosition());
                
    player.getMap().killMonster(htplayerfalse);
                
    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(), falsefalse);
                
    victim.updateSingleStat(MapleStat.LEVELvictim.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 88100028810010i++) {
                    
    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 startarr.lengthi++) {
                
    builder.append(arr[i]);
                if (
    != arr.length 1) {
                    
    builder.append(" ");
                }
            }
            return 
    builder.toString();
        }

                public static 
    int getOptionalIntArg(String splitted[], int positionint 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;
        }
        


    What is the command for this part?: (it looks like the killrange command I am looking for)

    } } 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.");
    }

  7. #7
    Member mixta11 is offline
    MemberRank
    Jan 2012 Join Date
    UKLocation
    56Posts

    Re: Several command errors - Mapleblade source v.83

    well ive been looking at different killnear commands so ive renamed a few. i still dont have a perfect one but it is the killrange tag command. Mine isnt fully working at the min but its what you're looking for. The issue im trying to figure out is how to make it constant but works fully other than that.
    the commands for them are !killnear and !killn. both do the same thing but not constant yet



Advertisement