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] Avatar Smega Command (Let's you make other people smega!)

Junior Spellweaver
Joined
Feb 23, 2008
Messages
111
Reaction score
1
Hey, this is a GM command that smega's a message using an avatar smega! What's more, you choose who says the smega! Any player on the server can say it as long as they are on the same channel as you.

The syntax is !sex [name] [type] [message]

For type, you put "diablo" "love" or "cloud."

You'll have to add this at the top of CommandProcessor.java:

Code:
import java.lang.String;

And here's the code for the command:

Code:
else if (splitted[0].equals("!sex"))
            {
                if (splitted.length == 1)
                {
                    mc.dropMessage("Usage: !amega [name] [type] [message], where [type] is love, cloud, or diablo.");
                }
                
                MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                
                String type = splitted[2];
                int channel = victim.getClient().getChannel();
                String text = StringUtil.joinStringFrom(splitted, 3);
                
                int itemID = 0;
                
                if(type.equals("love"))
                    itemID = 5390002;
                
                else if(type.equals("cloud"))
                    itemID = 5390001;
                
                else if(type.equals("diablo"))
                    itemID = 5390000;
                
                else
                {
                    mc.dropMessage("Invalid type (use love, cloud, or diablo)");
                    return true;
                }
                
                String[] lines = {"", "", "", ""};
                
                if(text.length() > 30)
                {
                    lines[0] = text.substring(0, 10);
                    lines[1] = text.substring(10, 20);
                    lines[2] = text.substring(20, 30);
                    lines[3] = text.substring(30);
                }
                
                else if(text.length() > 20)
                {
                    lines[0] = text.substring(0, 10);
                    lines[1] = text.substring(10, 20);
                    lines[2] = text.substring(20);
                }
                
                else if(text.length() > 10)
                {
                    lines[0] = text.substring(0, 10);
                    lines[1] = text.substring(10);
                }
                
                else if(text.length() <= 10)
                {
                    lines[0] = text;
                }
                
                LinkedList list = new LinkedList();
                list.add(lines[0]);
                list.add(lines[1]);
                list.add(lines[2]);
                list.add(lines[3]);
                
                try
                {
                    MaplePacket mp = MaplePacketCreator.getAvatarMega(victim, channel, itemID, list);
                    victim.getClient().getChannelServer().getWorldInterface().broadcastMessage(null, mp.getBytes());
                }
                catch(Exception e)
                {}
            }
 
Junior Spellweaver
Loyal Member
Joined
Apr 23, 2008
Messages
155
Reaction score
2
init:
deps-jar:
Compiling 1 source file to C:\Documents and Settings\Administrator\Desktop\Final2\build\classes
Note: C:\Documents and Settings\Administrator\Desktop\New Folder (18)\src\net\sf\odinms\client\messages\CommandProcessor.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
compile:
Building jar: C:\Documents and Settings\Administrator\Desktop\Final2\dist\JavaProject64.jar
jar:
BUILD SUCCESSFUL (total time: 2 seconds)
normal right?
 
Junior Spellweaver
Joined
Feb 23, 2008
Messages
111
Reaction score
1
That's probably just Netbeans being gay!
 
Newbie Spellweaver
Joined
Feb 6, 2008
Messages
14
Reaction score
0
I remember Sathon, he made the gm handbook for us back at odin..
 
Master Summoner
Loyal Member
Joined
Nov 30, 2007
Messages
511
Reaction score
0
That's a painfully hilarious command.
 
Newbie Spellweaver
Joined
Feb 15, 2008
Messages
96
Reaction score
0
hmmmmmm nice command name "!sex"

its a fun command to make ppl mad lol
 
Back?
Loyal Member
Joined
Apr 17, 2008
Messages
540
Reaction score
19
ty so much for your releases sathon your a PRo UBER PRO godly person
 
Junior Spellweaver
Loyal Member
Joined
Apr 23, 2008
Messages
155
Reaction score
2
hey sathon i know this is unrelated and all but pets are not coded correct? i do see see a Maplepet.java just wondering :S like if i can even make it so it appears in game im satisfied , and :S how do you enable pins? xDDDD thanks ^^
 
Junior Spellweaver
Joined
Feb 23, 2008
Messages
111
Reaction score
1
hey sathon i know this is unrelated and all but pets are not coded correct? i do see see a Maplepet.java just wondering :S like if i can even make it so it appears in game im satisfied , and :S how do you enable pins? xDDDD thanks ^^

Currently, there is no way for you to make pets work. I know some people have been capturing packets and writing code, but I don't believe they have released anything yet.
 
Elite Diviner
Joined
Jun 19, 2008
Messages
463
Reaction score
1
Could anyone put it in a txt file.. And upload it ?
 
Newbie Spellweaver
Joined
Jul 12, 2008
Messages
55
Reaction score
0
do u really nid to add this?
Code:
import java.lang.String;

i mean is't the java.lang package included automatically in all java file?
so wads the point of adding that in?
 
Skilled Illusionist
Joined
Apr 12, 2008
Messages
397
Reaction score
0
This would be funny when framing somebody that flirting with somebody.. Or afk....
 
Newbie Spellweaver
Joined
Apr 9, 2008
Messages
24
Reaction score
0
Doesn't work. :(

I put in CommandProcessor. Compiled, no errors. Then I build Main Project. Move the new .jar to my odinms dist folder. And started up server. It is always

"command !sex not found"

Any help?

Edit: I get errors now.
 
Back
Top