[Release/Guide] Better !Jail - !Unjail commands

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.

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!");
				}
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:
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());
To add more buffs use this line and place it under the one above.
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 :D
 
Re: [Quick Release] Better !Jail - !Unjail commands

Yes thanks, what could we have done without this!?
 
Re: [Quick Release] Better !Jail - !Unjail commands

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] Better !Jail - !Unjail commands

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

[sarcasm] wowwwwww so advancedddddddddd [/sarcasm]
 
Last edited:
Re: [Quick Release/Guide] Better !Jail - !Unjail commands

LOLS dude you've seriously gotta stop using getMap() if you want to broadcast it to the whole server.
Oh man, you're so pro at this shit. Your scripts are so advanced. /sarcasm
 
Re: [Quick Release/Guide] Better !Jail - !Unjail 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.

No. They are dfferent message types
Code:
     0: [Notice] font
     1: Popup
     2: Light blue background and lolwhut
     4: Scrolling message at top
     5: Pink Text
     6: Lightblue Text
 
Back