[Tut]How to change the way you add commands

Newbie Spellweaver
Joined
Sep 28, 2008
Messages
11
Reaction score
0
Difficulty: 2/10
Knowlage: Basic cut and paste
Leeched: No

First of all find out where your commands are stored normaly search for:
Code:
public void customCommand(String command)

Just bellow 'command.trim();' add:
Code:
command.doCommand(command);

Now create a new java file in notepad and add the code:
Code:
public class command
{
	public command()
	{
		//Cannot be declared
	}
	public static void doCommands(String cmd)
	{
		if (cmd != null || cmd != "")
		{
			//How to add comands...
			/*if (cmd == "commandname")
			 * {
			 *  Actions go here!
			 * }*/


		} //Checks to see if the value is nothing or empty if it is. Ignore
		return;
	}
}

It also contains an example on how to add commands to the file.
Compile and run and it should work. Try and add and example that if you typed 'change' it would open up character creation. Hint:
showInterface(3559); //Open up character creation!

If you cant do it. Check out the example.txt!

Another great tutoriaol by deathtime38!
 

Attachments

Back