- Joined
- Oct 25, 2008
- Messages
- 1,371
- Reaction score
- 599
[Updated!] - Added 2 guides at the bottom.
Better !Jail - !Unjail commands
Before you post I must say this, all I did was add a message to tell the world that this was person was jailed/unjailed, very minor changes. This will help those who dont know how to add a message to commands. This will make everyone aware that GMs actually do catch bad people and embrassed the victim at the same time. Edit the !jail command and put your jail map id instead.
Quick guide - How to add messages to commands:
Use this line. Try and put it where it will not interfere with the command's code. Make sure to put text in " " and things that arent text dont need " ". Also dont forget a + to connect the two. The 6 is to the entire world and a 0 is to a map. That's all I know for now.
Another Quick guide - How to add buffing commands:
Use this format as your base. Put in the command names, buff id and the skill level.
To add more buffs use this line and place it under the one above.
Credits to
Moogra because I used the !unjail command from his repack and for his !buffme command.
Sean because I used the !jail command from his repack.
Me for releasing and doing VERY minor changes.
Enjoy
Better !Jail - !Unjail commands
Before you post I must say this, all I did was add a message to tell the world that this was person was jailed/unjailed, very minor changes. This will help those who dont know how to add a message to commands. This will make everyone aware that GMs actually do catch bad people and embrassed the victim at the same time. Edit the !jail command and put your jail map id instead.
PHP:
} else if (splitted[0].equals("!unjail")) {
MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
int mapid = 100000000; //Henesys
if (splitted.length > 2 && splitted[1].equals("2")) {
mapid = 211000000;
victim = cserv.getPlayerStorage().getCharacterByName(splitted[2]);
}
if (victim != null) {
MapleMap target = cserv.getMapFactory().getMap(mapid);
MaplePortal targetPortal = target.getPortal(0);
victim.changeMap(target, targetPortal);
c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, victim.getName() + " was un-jailed. We have our eyes on you so you better be good!"));
} else {
mc.dropMessage(splitted[1] + " not found!");
}
PHP:
} else if (splitted[0].equals("!jail")) {
MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
int mapid = 980000404; //<--- Put your Jail map id
if (splitted.length > 2 && splitted[1].equals("2")) {
mapid = 200090300;
victim = cserv.getPlayerStorage().getCharacterByName(splitted[2]);
}
if (victim != null) {
MapleMap target = cserv.getMapFactory().getMap(mapid);
MaplePortal targetPortal = target.getPortal(0);
victim.changeMap(target, targetPortal);
c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, victim.getName() + " was jailed, what a noob!"));
mc.dropMessage(victim.getName() + " was owned.");
} else {
mc.dropMessage(splitted[1] + " not found!");
}
Use this line. Try and put it where it will not interfere with the command's code. Make sure to put text in " " and things that arent text dont need " ". Also dont forget a + to connect the two. The 6 is to the entire world and a 0 is to a map. That's all I know for now.
PHP:
c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "Place message here!"));
Another Quick guide - How to add buffing commands:
Use this format as your base. Put in the command names, buff id and the skill level.
PHP:
} else if (splitted[0].equals("!COMMANDNAME")) {
SkillFactory.getSkill(BUFFID).getEffect(SKILLLEVEL).applyTo(player);
player.setHp(player.getMaxHp());
player.updateSingleStat(MapleStat.HP, player.getMaxHp());
player.setMp(player.getMaxMp());
player.updateSingleStat(MapleStat.MP, player.getMaxMp());
PHP:
SkillFactory.getSkill(BUFFID).getEffect(SKILLLEVEL).applyTo(player);
Credits to
Moogra because I used the !unjail command from his repack and for his !buffme command.
Sean because I used the !jail command from his repack.
Me for releasing and doing VERY minor changes.
Enjoy
