[Release/Guide] Better !Jail - !Unjail commands
[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.
PHP Code:
} 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 Code:
} 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!");
}
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.
PHP Code:
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 Code:
} 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());
To add more buffs use this line and place it under the one above.
PHP Code:
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 :D
Re: [Quick Release] Better !Jail - !Unjail commands
Re: [Quick Release] Better !Jail - !Unjail commands
It's pretty basic. Just another add-on to simple commands.
Re: [Quick Release] Better !Jail - !Unjail commands
Re: [Quick Release] Better !Jail - !Unjail commands
Yes thanks, what could we have done without this!?
Re: [Quick Release] Better !Jail - !Unjail commands
Quote:
Originally Posted by
xblackcat
Yes thanks, what could we have done without this!?
You do not know how glad I am that there isnt any flaming so far! And no that isnt sarcasm I really mean it!
Old ragezone : Flamers
New ragezone: Helpers ;D
Re: [Quick Release] Better !Jail - !Unjail commands
Quote:
Originally Posted by
BloodAngel13
You do not know how glad I am that there isnt any flaming so far! And no that isnt sarcasm I really mean it!
Old ragezone : <3
New ragezone: Leechers and faggot who take credit for things, and flamers.
Fix'd
Re: [Quick Release/Guide] Better !Jail - !Unjail commands
xD Yeah well I dont know how Ragezone was like 2 months ago because I wasnt here.
Past ragezone: <3
Present ragzone: leechers, faggots, flamers
Future ragezone: <3 x2
Re: [Quick Release] Better !Jail - !Unjail commands
Quote:
Originally Posted by
BloodAngel13
You do not know how glad I am that there isnt any flaming so far! And no that isnt sarcasm I really mean it!
Old ragezone : People who can actually code
New ragezone: Leechers/Leakers
Fixed it for you.
On topic: Eh, I'm having trouble finding a good jail map =/
Re: [Quick Release/Guide] Better !Jail - !Unjail commands
Re: [Quick Release/Guide] Better !Jail - !Unjail commands
Re: [Quick Release/Guide] Better !Jail - !Unjail commands
Added 2 more guides, so I guess this should be considered a guide and not a release. Oh well. Enjoy :D
Re: [Quick Release] Better !Jail - !Unjail commands
Quote:
Originally Posted by
miniaxel
fix'd
<33
Re: [Quick Release/Guide] Better !Jail - !Unjail commands
[sarcasm] wowwwwww so advancedddddddddd [/sarcasm]
Re: [Quick Release/Guide] Better !Jail - !Unjail commands
Umm... Thanks... I told you its basic just to help out those who didnt know how to do it before.