Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[RELEASE] !leeton/!leetoff (Fun Command)

Status
Not open for further replies.
Junior Spellweaver
Joined
Feb 23, 2008
Messages
111
Reaction score
1
This is pretty simple. This is just a status that GM's turn on and off with the !leeton and !leetoff commands and what it does it makes the person speak in leetspeak. Here's a picture to describe:


Sathon - [RELEASE] !leeton/!leetoff (Fun Command) - RaGEZONE Forums






CommandProcessor.java
Code:
else if (splitted[0].equals("!leeton"))
            {
                MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                victim.setLeetness(true);
                mc.dropMessage("You have given " + victim.getName() + " the gift of 1337ness.");
                
                ServernoticeMapleClientMessageCallback cm = new ServernoticeMapleClientMessageCallback(victim.getClient());
        
                if(!(c.getPlayer().getName().equals(victim.getName())))
                {
                    cm.dropMessage("You have been given the gift of 1337ness by a GM.");
                }
                
            }
            
            else if (splitted[0].equals("!leetoff"))
            {
                MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                victim.setLeetness(false);
                mc.dropMessage("You have taken away " + victim.getName() + "'s 1337ness.");
                
                ServernoticeMapleClientMessageCallback cm = new ServernoticeMapleClientMessageCallback(victim.getClient());
        
                if(!(c.getPlayer().getName().equals(victim.getName())))
                {
                    cm.dropMessage("Your 1337ness has been taken away by a GM.");
                }
            }
MapleCharacter.java, after this line:
Code:
private boolean gm;
add this line:
Code:
private boolean leetness;


MapleCharacter.java, after this line:
Code:
setPosition(new Point(0, 0));
add this line:
Code:
leetness = false;



MapleCharacter.java, after this code:
Code:
public void setLevel(int level) {
            this.level = level-1;
    }
add this code:
Code:
public boolean getLeetness()
    {
        return leetness;
    }
    
    public void setLeetness(boolean setTo)
    {
        leetness = setTo;
    }



GeneralChatHandler.java, after this code:
Code:
if (StringUtil.countCharacters(text, '@') > 4 || StringUtil.countCharacters(text, '%') > 4 ||
                StringUtil.countCharacters(text, '+') > 6 || StringUtil.countCharacters(text, '$') > 6 ||
                StringUtil.countCharacters(text, '&') > 6 || StringUtil.countCharacters(text, '~') > 6 ||
                StringUtil.countCharacters(text, 'W') > 6) {
                text = "DISREGARD THAT I SUCK penis";
            }
add this code:
Code:
if(c.getPlayer().getLeetness())
            {
                String normal = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
                String leet = "48(d3f9h1jk1mn0PQR57uvwxyz@6cD3F9hiJk|Mn0pqr$+uvWXy2";
                for(int i = 0; i < 52; i++)
                {
                    text = text.replace(normal.charAt(i), leet.charAt(i));
                }
                text = text.replaceAll("y0u", "j00");
            }
And that should do it. Enjoy.
 
Junior Spellweaver
Joined
Jul 28, 2008
Messages
154
Reaction score
1
LOL NICE ONE.
I love this other than the smega/!sex command.
 
Newbie Spellweaver
Joined
Aug 1, 2008
Messages
66
Reaction score
0
Nice i might use
NEW FORUM style suckss
 
Newbie Spellweaver
Joined
Apr 11, 2008
Messages
99
Reaction score
0
You have given Sathon the gift of 1337ness LMAO! this is so cool haha :p imma use it i think.
 
Skilled Illusionist
Joined
Apr 17, 2008
Messages
316
Reaction score
1
Im adding this for sure :D And yea I like the old style more
 
Junior Spellweaver
Joined
Jul 19, 2008
Messages
151
Reaction score
0
LOL! That has got to be the funnest command evar!
 
Junior Spellweaver
Joined
May 26, 2008
Messages
195
Reaction score
0
Sathon you made my day man :p
Been crappy all morning and this just made me lol.
Thanks.
 
Master Summoner
Loyal Member
Joined
Jul 22, 2008
Messages
573
Reaction score
0
nice but hmm.. i keep getting errors in commandprocessor there.
is there any special line to add in?

edit : error slove :D
 
Master Summoner
Loyal Member
Joined
Jul 22, 2008
Messages
573
Reaction score
0
about this..
Code:
else if (splitted[0].equals("!leeton"))
            {
                MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                victim.setLeetness(true);
                mc.dropMessage("You have given " + victim.getName() + " the gift of 1337ness.");
                
                ServernoticeMapleClientMessageCallback cm = new ServernoticeMapleClientMessageCallback(victim.getClient());
        
                if(!(c.getPlayer().getName().equals(victim.getName())))
                {
                    cm.dropMessage("You have been given the gift of 1337ness by a GM.");
                }
                
            }
            
            else if (splitted[0].equals("!leetoff"))
            {
                MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                victim.setLeetness(false);
                mc.dropMessage("You have taken away " + victim.getName() + "'s 1337ness.");
                
                ServernoticeMapleClientMessageCallback cm = new ServernoticeMapleClientMessageCallback(victim.getClient());
        
                if(!(c.getPlayer().getName().equals(victim.getName())))
                {
                    cm.dropMessage("Your 1337ness has been taken away by a GM.");
                }
            }

do i have to add
Code:
{
in front of
Code:
else if
?

it didn't work when i didn't add { but successfully compiled.
but it gets error once i add in {
 
Status
Not open for further replies.
Back
Top