MoopleDEV V83 need few commands

Results 1 to 12 of 12
  1. #1
    Apprentice Ben Azran is offline
    MemberRank
    Jul 2012 Join Date
    7Posts

    MoopleDEV V83 need few commands

    Whoa, I have searched everywhere and I can't seem to find the following commands:
    !mute
    !mutemap
    !killmap
    !seducemap
    !pos (hides your appearence in mini map)

    can someone help?


  2. #2
    unknowndog NmZero is offline
    MemberRank
    Jul 2012 Join Date
    unknowndogLocation
    202Posts

    Re: MoopleDEV V83 need few commands

    i guess you can code a little.

    mute and mutemap:

    add to maplecharacter.java:
    Code:
    public boolean canTalk = true;
    Code:
    public boolean canTalk() {
            return canTalk;
        }
        
        public boolean canTalk(boolean yn) {
            return canTalk = yn;
        }
        
        public boolean getCanTalk() {
            return canTalk;
        }
    commands.java:
    Code:
    case"unmute":
            case"mute": {
                MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(sub[1]);
                if (victim != null) {
                    if (sub[0].equals("mute")) {
                        victim.canTalk(false);
                    } else {
                        victim.canTalk(true);
                    }
                    victim.dropMessage(5, "Your chatting ability is now " + (victim.getCanTalk() ? "on" : "off"));
                    player.dropMessage(6, "Player's chatting ability is now set to " + victim.getCanTalk());
                } else {
                    player.dropMessage("Player not found");
                }
            break; }
            
            case"unmutemap":
            case"mutemap":
                for (MapleCharacter chr : player.getMap().getCharacters()) {
                    if (chr.gmLevel() == 0) {
                        if (sub[0].equals("mutemap")) {
                            chr.canTalk(false);
                        } else {
                            chr.canTalk(true);
                        }
                    }
                    chr.dropMessage("This map's chatting ability has been changed, please listen as a GM gives instructions");
                }
                player.dropMessage(6, "Done");
                break;
    generalchathandler.java change:
    Code:
    } else {
                if (!chr.isHidden()) {
                        chr.getMap().broadcastMessage(MaplePacketCreator.getChatText(chr.getId(), s, slea.readByte()));
    to:
    Code:
    } else {
                if (!chr.isHidden()) {
                    if (chr.canTalk()) {
                        chr.getMap().broadcastMessage(MaplePacketCreator.getChatText(chr.getId(), s, slea.readByte()));
    and dont forget to add another }

    -----------------------------------
    killmap:

    commands.java:
    Code:
    case"killmap":
                for (MapleCharacter mch : c.getPlayer().getMap().getCharacters()) {
                if (mch != null && !mch.is1()) {
                    player.setHpMp(0);
                    }
                }
            break;
    ----------------------------------------
    seducemap:

    commands.java:
    Code:
    case"diseasemap":
                for (MapleCharacter victim16 : player.getMap().getCharacters()) {
                int type = 0;
                if (sub[1].equalsIgnoreCase("SEAL")) {
                    type = 120;
                } else if (sub[1].equalsIgnoreCase("DARKNESS")) {
                    type = 121;
                } else if (sub[1].equalsIgnoreCase("WEAKEN")) {
                    type = 122;
                } else if (sub[1].equalsIgnoreCase("STUN")) {
                    type = 123;
                } else if (sub[1].equalsIgnoreCase("CURSE")) {
                    type = 124;
                } else if (sub[1].equalsIgnoreCase("POISON")) {
                    type = 125;
                } else if (sub[1].equalsIgnoreCase("SEDUCE")) {
                    type = 128;
                } else if (sub[1].equalsIgnoreCase("CONFUSE")) {
                    type = 132;
                } else {
                    player.dropMessage("ERROR.");
                }
                victim16.giveDebuff(MapleDisease.getType(type), MobSkillFactory.getMobSkill(type, 1));
                }
                break;
    use like !diseasemap seduce

    also add to mapledisease.java:
    Code:
    public static MapleDisease getType(int skill) {
            switch (skill) {
                case 120:
                    return MapleDisease.SEAL;
                case 121:
                    return MapleDisease.DARKNESS;
                case 122:
                    return MapleDisease.WEAKEN;
                case 123:
                    return MapleDisease.STUN;
                case 124:
                    return MapleDisease.CURSE;
                case 125:
                    return MapleDisease.POISON;
                case 128:
                    return MapleDisease.SEDUCE;
                case 132:
                    return MapleDisease.CONFUSE;
                default:
                    return null;
            }
        }
    i THINK thats all for diseasemap.. tell me if its not working

    ----------------------------------
    no idea about !pos
    if you want to hide yourself as a gm (also disappear from minimap) just re-activate sgm hide skill
    !job 910
    second tab, activate hide

    ~NmZero

    little bonus commands.java:
    Code:
    case"seduce":
                MapleCharacter victim13 = cserv.getPlayerStorage().getCharacterByName(sub[1]);
                int level = Integer.parseInt(sub[2]);
                if (victim13 != null) {
                    victim13.setChair(0);
                    victim13.getClient().getSession().write(MaplePacketCreator.cancelChair(-1));
                    victim13.getMap().broadcastMessage(victim13, MaplePacketCreator.showChair(victim13.getId(), 0), false);
                    victim13.giveDebuff(MapleDisease.SEDUCE, MobSkillFactory.getMobSkill(128, level));
                } else {
                    player.dropMessage("Player is not on.");
                }
                break;
                
                case"confuse":
                MapleCharacter victim15 = cserv.getPlayerStorage().getCharacterByName(sub[1]);
                int level2 = Integer.parseInt(sub[2]);
                if (victim15 != null) {
                    victim15.setChair(0);
                    victim15.getClient().getSession().write(MaplePacketCreator.cancelChair(-1));
                    victim15.getMap().broadcastMessage(victim15, MaplePacketCreator.showChair(victim15.getId(), 0), false);
                    victim15.giveDebuff(MapleDisease.CONFUSE, MobSkillFactory.getMobSkill(132, level2));
                } else {
                    player.dropMessage("Player is not on.");
                }
                break;
    !seduce/confuse player level
    level is the actually only really required for seduce as you can make people bow down or move the other way.
    these 2 commands dont work without a second sub, so be sure to add a number after the player name
    example:
    !seduce NmZero 13
    (13 makes me walk to the right for a super long time >.>)

  3. #3
    Wut. QuietCrystal is offline
    MemberRank
    Aug 2010 Join Date
    SingaporeLocation
    346Posts

    Re: MoopleDEV V83 need few commands

    As far as I know, you can't hide your position from the minimap, unless you hide your character entirely using !hide.

  4. #4
    unknowndog NmZero is offline
    MemberRank
    Jul 2012 Join Date
    unknowndogLocation
    202Posts

    Re: MoopleDEV V83 need few commands

    there is no !hide command in moopledev and that command is completly useless

  5. #5
    Wut. QuietCrystal is offline
    MemberRank
    Aug 2010 Join Date
    SingaporeLocation
    346Posts

    Re: MoopleDEV V83 need few commands

    Quote Originally Posted by NmZero View Post
    there is no !hide command in moopledev and that command is completly useless
    !hide on other servers is the same as using the GM hide skill anyway. And !unhide removes it.

  6. #6
    unknowndog NmZero is offline
    MemberRank
    Jul 2012 Join Date
    unknowndogLocation
    202Posts

    Re: MoopleDEV V83 need few commands

    so its useless, as on those servers the skill should work too
    typing !hide and !unhide is harder then pressing a button

  7. #7
    Wut. QuietCrystal is offline
    MemberRank
    Aug 2010 Join Date
    SingaporeLocation
    346Posts

    Re: MoopleDEV V83 need few commands

    Quote Originally Posted by NmZero View Post
    so its useless, as on those servers the skill should work too
    typing !hide and !unhide is harder then pressing a button
    On some servers you can't right click the skill icon to remove it.

    And on high-rate private servers where the keyboard is full of skills, !hide is better than opening the skill window and double clicking it XD

  8. #8
    unknowndog NmZero is offline
    MemberRank
    Jul 2012 Join Date
    unknowndogLocation
    202Posts

    Re: MoopleDEV V83 need few commands

    since we are talking about moopledev:
    1. most moopledev servers are low rate based
    2. as only gms have hide, they dont have their keyboard full of skills. also this doesnt matter if its high or low rate based as gms can take all jobs and skills.
    3. moopledev doesnt even make a skill with hide, you have to reactivate hide to unhide

    !hide and !unhide may be a good thing on other sources, but for moopledev its completly useless in my opinion

  9. #9
    Account Upgraded | Title Enabled! Syre is offline
    MemberRank
    Jan 2013 Join Date
    700Posts

    Re: MoopleDEV V83 need few commands

    Quote Originally Posted by QuietCrystal View Post
    !hide on other servers is the same as using the GM hide skill anyway. And !unhide removes it.
    Why have !hide and !unhide..? Check if hidden, then unhide, else hide...
    o_O

  10. #10
    Apprentice Ben Azran is offline
    MemberRank
    Jul 2012 Join Date
    7Posts

    Re: MoopleDEV V83 need few commands

    case"unmute":
    case"mute": {
    MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(sub[1]);
    if (victim != null) {
    if (sub[0].equals("mute")) {
    victim.canTalk(false);
    } else {
    victim.canTalk(true);
    }
    victim.dropMessage(5, "Your chatting ability is now " + (victim.getCanTalk() ? "on" : "off"));
    player.dropMessage(6, "Player's chatting ability is now set to " + victim.getCanTalk());
    } else {
    player.dropMessage("Player not found");
    }
    break; }

    case"unmutemap":
    case"mutemap":
    for (MapleCharacter chr : player.getMap().getCharacters()) {
    if (chr.gmLevel() == 0) {
    if (sub[0].equals("mutemap")) {
    chr.canTalk(false);
    } else {
    chr.canTalk(true);
    }
    }
    chr.dropMessage("This map's chatting ability has been changed, please listen as a GM gives instructions");
    }
    player.dropMessage(6, "Done");
    break;

    when i try to add this, I'm getting an error.

  11. #11
    Wut. QuietCrystal is offline
    MemberRank
    Aug 2010 Join Date
    SingaporeLocation
    346Posts

    Re: MoopleDEV V83 need few commands

    Quote Originally Posted by Ben Azran View Post
    case"unmute":
    case"mute": {
    MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(sub[1]);
    if (victim != null) {
    if (sub[0].equals("mute")) {
    victim.canTalk(false);
    } else {
    victim.canTalk(true);
    }
    victim.dropMessage(5, "Your chatting ability is now " + (victim.getCanTalk() ? "on" : "off"));
    player.dropMessage(6, "Player's chatting ability is now set to " + victim.getCanTalk());
    } else {
    player.dropMessage("Player not found");
    }
    break; }

    case"unmutemap":
    case"mutemap":
    for (MapleCharacter chr : player.getMap().getCharacters()) {
    if (chr.gmLevel() == 0) {
    if (sub[0].equals("mutemap")) {
    chr.canTalk(false);
    } else {
    chr.canTalk(true);
    }
    }
    chr.dropMessage("This map's chatting ability has been changed, please listen as a GM gives instructions");
    }
    player.dropMessage(6, "Done");
    break;

    when i try to add this, I'm getting an error.
    What's the error message?

  12. #12
    unknowndog NmZero is offline
    MemberRank
    Jul 2012 Join Date
    unknowndogLocation
    202Posts

    Re: MoopleDEV V83 need few commands

    my lucky guess(es):
    1. you dont have "cserv" variable at the top of you command class
    2. you didnt add the commands to "executeAdminCommand" class, that is the class with case/break, "executeGMCommand" uses if/else

    to fix 1:
    add
    Code:
    Channel cserv = c.getChannelServer();
    under
    Code:
    public static boolean executeAdminCommand(MapleClient c, String[] sub, char heading) throws SQLException {
    and/or
    Code:
    public static boolean executeGMCommand(MapleClient c, String[] sub, char heading) {
    to fix 2 (2 methods):

    -method 1
    if the command is in the class "executeGMCommand" you have to change the command switch/break to else/if (can can also change the whole class to switch/break, but i wont be doing that).
    here is the command with else/if:
    Code:
    } else if (sub[0].equals("unmute") || sub[0].equals("mute")) {
    	MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(sub[1]);
    	if (victim != null) {
    		if (sub[0].equals("mute")) {
    			victim.canTalk(false);
    		} else {
    			victim.canTalk(true);
    		}
    		victim.dropMessage(5, "Your chatting ability is now " + (victim.getCanTalk() ? "on" : "off"));
    		player.dropMessage(6, "Player's chatting ability is now set to " + victim.getCanTalk());
    	} else {
    		player.dropMessage("Player not found");
    	}
    }
    
    } else if (sub[0].equals("unmutemap") || sub[0].equals("mutemap")) {
    	for (MapleCharacter chr : player.getMap().getCharacters()) {
    		if (chr.gmLevel() == 0) {
    			if (sub[0].equals("mutemap")) {
    				chr.canTalk(false);
    			} else {
    				chr.canTalk(true);
    			}
    		}
    		chr.dropMessage("This map's chatting ability has been changed, please listen as a GM gives instructions");
    	}
    	player.dropMessage(6, "Done");
    }
    -method 2 (easier)
    move your commands
    Code:
    case"unmute":
    case"mute": {
    MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(sub[1]);
    if (victim != null) {
    if (sub[0].equals("mute")) {
    victim.canTalk(false);
    } else {
    victim.canTalk(true);
    }
    victim.dropMessage(5, "Your chatting ability is now " + (victim.getCanTalk() ? "on" : "off"));
    player.dropMessage(6, "Player's chatting ability is now set to " + victim.getCanTalk());
    } else {
    player.dropMessage("Player not found");
    }
    break; }
    
    case"unmutemap":
    case"mutemap":
    for (MapleCharacter chr : player.getMap().getCharacters()) {
    if (chr.gmLevel() == 0) {
    if (sub[0].equals("mutemap")) {
    chr.canTalk(false);
    } else {
    chr.canTalk(true);
    }
    }
    chr.dropMessage("This map's chatting ability has been changed, please listen as a GM gives instructions");
    }
    player.dropMessage(6, "Done");
    break;
    to "executeAdminCommand" class

    ~NmZero



Advertisement