PDA

View Full Version : 562/659 RuneEscape Command Engine



Sonicforce41
July 30th, 2011, 00:41
Hey guys, This tutorial/snippet (What ever you want to call it) is for RuneEscape source released by Dragonkk (Alex).
He did it over teamviewer in my pc.

Do not flame that i did not get permission from him because
he was one who said to release it to public and if you want picture,
I sent him a pm about it.

Let's begin:

1.First create a class called Commands in game > player > content

2.Put this code in:

package com.rs.game.player.content;

import com.rs.game.WorldTile;
import com.rs.game.player.Player;

/*
* doesnt let it be extended
*/
public final class Commands {

/*
* all console commands only for admin, chat commands processed if they not processed by console
*/
/*
* returns if command was processed
*/
public static boolean processCommand(Player player, String command, boolean console, boolean clientCommand) {
if(command.length() == 0) //if they used ::(nothing) theres no command
return false;
String[] cmd = command.toLowerCase().split(" ");
if(player.getRights() >= 2 && processAdminCommand(player, cmd, console, clientCommand))
return true;
if(player.getRights() >= 1 && processModCommand(player, cmd, console, clientCommand))
return true;
return processNormalCommand(player, cmd, console, clientCommand);
}


/*
* extra parameters if you want to check them
*/
public static boolean processAdminCommand(Player player, String[] cmd, boolean console, boolean clientCommand) {
if(cmd[0].equals("dungtest")) {
player.getControlerManager().startControler("Dungeoneering", new WorldTile(4000, 4200, 0));
return true;
}
return false;
}

public static boolean processModCommand(Player player, String[] cmd, boolean console, boolean clientCommand) {
return false;
}
public static boolean processNormalCommand(Player player, String[] cmd, boolean console, boolean clientCommand) {
if(cmd[0].equals("test")) {
player.getPackets().sendGameMessage("works as it should.");
return true;
}
return false;
}


/*
* doesnt let it be instanced
*/
private Commands() {

}
}


3. Save and Exit

4. Make sure to import the Commands class

import com.rs.game.player.content.Commands;

5. Go into WorldPacketsDecover class and Replace your PUBLIC_CHAT_PACKET with this:

}else if(packetId == PUBLIC_CHAT_PACKET) {
if(!player.hasStarted() || player.hasFinished())
return;
int effects = stream.readShort();
String message = Huffman.readEncryptedMessage(76, stream);
if(message.startsWith("::"))
//if command exists and processed wont send message as public message
if(Commands.processCommand(player, message.replace("::", ""), false, false))
return;
player.setNextPublicChatMessage(new PublicChatMessage(message, effects));

6. After you did that, Find COMMANDS_PACKET and replace it with this:

} else if(packetId == COMMANDS_PACKET) {
if(!player.isRunning())
return;
boolean clientCommand = stream.readUnsignedByte() == 1;
String command = stream.readString();//.toLowerCase();
Commands.processCommand(player, command, true, clientCommand);

Credits:
100% Credit and Honor to Dragonkk

displee
July 30th, 2011, 01:55
Hey guys, This tutorial/snippet (What ever you want to call it) is for RuneEscape source released by Dragonkk (Alex).
He did it over teamviewer in my pc.

Do not flame that i did not get permission from him because
he was one who said to release it to public and if you want picture,
I sent him a pm about it.

I dont understand why dragonkk is asking people to release what he made.
PS: Most people will still stay on 657.
He is releasing to fast.

Sonicforce41
July 30th, 2011, 02:19
Um.. This was a request that i asked him to make for me and he asked me if i can release it for him. He was doing something else..

Ez savag3 ez
July 30th, 2011, 03:00
please people dont get that he is quitting rsps pretty soon. i would do the same also.

Sonicforce41
July 30th, 2011, 03:32
please people dont get that he is quitting rsps pretty soon. i would do the same also.

True.

@Displee
Yes it was a fast release but he just want everything to be perfect before he leaves ;)

xxkillaa125
July 30th, 2011, 03:48
How the fuck do u portforward on linkys router i reset mine and tryed all the default shit pm an help a brother out :)

hellman2741
July 30th, 2011, 04:04
Alex is quitting RSPS' in September...

xJames
July 30th, 2011, 04:14
Good job I guess.

austin cadle
July 30th, 2011, 04:28
Thanks for common sense? L?

Sonicforce41
July 30th, 2011, 14:14
How the fuck do u portforward on linkys router i reset mine and tryed all the default shit pm an help a brother out :)

Please post your help request in the help section.

Kill Joy
July 31st, 2011, 02:20
I can't find his source?

Nouish
July 31st, 2011, 02:24
I can't find his source?

It's on Roon-Serba.

Kill Joy
July 31st, 2011, 02:25
It's on Roon-Serba.

ah k. To Noob serba it is.

David
August 3rd, 2011, 21:29
Javadoc..?