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?
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?
i guess you can code a little.
mute and mutemap:
add to maplecharacter.java:
Code:public boolean canTalk = true;commands.java:Code:public boolean canTalk() { return canTalk; } public boolean canTalk(boolean yn) { return canTalk = yn; } public boolean getCanTalk() { return canTalk; }
generalchathandler.java change: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:Code:} else { if (!chr.isHidden()) { chr.getMap().broadcastMessage(MaplePacketCreator.getChatText(chr.getId(), s, slea.readByte()));
and dont forget to add another }Code:} else { if (!chr.isHidden()) { if (chr.canTalk()) { chr.getMap().broadcastMessage(MaplePacketCreator.getChatText(chr.getId(), s, slea.readByte()));
-----------------------------------
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:
use like !diseasemap seduceCode: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;
also add to mapledisease.java:
i THINK thats all for diseasemap.. tell me if its not workingCode: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; } }
----------------------------------
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:
!seduce/confuse player levelCode: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;
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 >.>)
As far as I know, you can't hide your position from the minimap, unless you hide your character entirely using !hide.
there is no !hide command in moopledev and that command is completly useless
so its useless, as on those servers the skill should work too
typing !hide and !unhide is harder then pressing a button
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
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.
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
underCode:Channel cserv = c.getChannelServer();
and/orCode:public static boolean executeAdminCommand(MapleClient c, String[] sub, char heading) throws SQLException {
to fix 2 (2 methods):Code:public static boolean executeGMCommand(MapleClient c, String[] sub, char heading) {
-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:
-method 2 (easier)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"); }
move your commands
to "executeAdminCommand" classCode: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;
~NmZero