Jump to content
Parabot - Bot for Ikov, DreamScape, SoulPlay, RuneWild, and more
Xunn

xRunecrafter [PKHonor]

Recommended Posts

xRunecrafter,

Crafting all Runes at amazing speed!

Feel free to suggest Changes or help me improve my code.

 

xRunecrafter

GitHub

How to Use:

- Start at the Altar of choice

- Have Pure or Rune Essence in your first bankslot

 

To Do:

 

- Fix resource Counter

Change Log

 

 Change Log
[21-3-2016] Added Teletab support
[15-3-2016] Updated GUI with player and altar names
[13-3-2016] First Release

FAQ

1. Why do I have weird names in my friendlist?

 

Spoiler
On 12-3-2015 at 9:18 PM, matt123337 said:

package isn't the word you're looking for, it's packet.

I was making diagrams and shit to explain this, but I never finished, so here's something else instead

K so, the 317 client uses some basic encryption to prevent people from injecting packets (Like how AutoRune worked ages ago). This encryption does this:

1. Generates 4 random ints when you login to the server (Here in the 317 client)

2. These random numbers get sent to the server (so they can decrypt stuff later)

3. These random numbers are used to seed a random number generator [From here on it shall be referred to as RNG1] (Here in the 317 client)

4. The client then adds a value (50 in the client I am showing as an example)to each of these ints, and then uses these new ints to seed another random number generator [From here on this shall be refereed to as RNG2](Here in the 317 client)

 

RNG1 is used to encrypt sent packets. Back when the 317 was the actual runescape out, PCs were far less powerful and encryption took much longer then it would now, so they couldn't encrypt the entierty of the packets, so instead the would just encrypt the first byte (the packet ID) (Here in the 317 client). Without knowing what the seed values are, you can't actually tell what packet is being sent, how long they are, etc.

 

RNG2 is used to decrypt received packets from the server, like above encrypting whole packets were too costly, so just the id was decrypted (Here in the 317 Client). This doesn't effect Parabot at all, as we don't actually mess with inbound info, only outbound.

 

But how does RNG1 involve Parabot, and why is it causing issues? Well when you write a packet, it generates a "random" byte, and encrypts the packet id with it (as stated above) and then send the packet. Parabot essentially calls the function that is used to "create" and queue packets called doAction(int id). Now this is fine and dandy, just one major flaw. Parabot runs in a separate Thread then the game client does (separate Threads = code running at same time) so every time parabot calls the doAction(int) method, their is also the chance that the client is already running it. So the client could be writing a packet, and in the middle of that we start to write a packet (also calling the encryption in the process). This forces the client to de-sync (the encryption is no longer generating the same random number as the server), so it gets the packet id wrong.

 

The server then tries to handle whatever packet it thinks it's receiving instead of what we actually sent. It just so happens that we tend to send a bunch of these at once, so eventually the server decrypts the packet id as the "addFriend" packet, and attempts to read the username from the client (also garbage data, thus why the names appear to be random letters/numbers, or "Invalid Name"). This is also why the game client sometimes seems to "freeze" and you can't logout/do anything other then change inventory tabs/move camera.

 

Now how do we fix it? We somehow need to get the client to sync with Parabot, usually by hijacking a method in the client. We could hijack the doAction() method, but we'd only be able to actually send out our actions when the game client itself tries to send them, so that wouldn't work. We could also hijack the client's main loop, but that's another hook that we'd need to find on every server and we'd have to write up some form of queue to send actions, and then we'd have to wait for actions to be sent.

 

RE the deleting: If the server was written properly, you'd be able to delete them rather easily (just like you would a normal friend), but clearly they haven't designed it for that.

 

TLDR:It's not the script adding the friends, it's the client. It's also a pain in the ass to fix, and none of our devs have time to do it.

TLDR; Parabot and the servers run in different threads, this might lead to wrong packet ID's which the (RSPS)client might handle as an AddFriend packet.

 

Edited by Xunn

Share this post


Link to post
Share on other sites

Approved!

Congrats on release

5 minutes ago, Xunn said:

Hi all,

I present to you my first PKHonor script,

This script, in theory, should craft all kinds of runes.

Feel free to suggest Changes or help me improve my code.

 

xRunecrafter

GitHub

How to Use:

- Start at the Altar of choice

- Have Pure or Rune Essence in your first bankslot

 

 

To Do:

 

 -Player.getName()

Change Log

 

 Change Log

 

Share this post


Link to post
Share on other sites

Just a future tip for everyone. 

Get an onyx ring, enchant it. 

You'll then have a ring of stone.

The ring morphs you into a rock and you cannot move, so once you run the bot the process 

will speed up almost 3X's as faster because it won't be walking back and forth! 

(I haven't tried this on all alters so depending on the distance, it should work.)

Thanks for the release OP!

Share this post


Link to post
Share on other sites
6 hours ago, crow78 said:

Great bot and thx for pure ess support everything seemed to be fine when i ran it 

Good :)

4 hours ago, plasts said:

Just a future tip for everyone. 

Get an onyx ring, enchant it. 

You'll then have a ring of stone.

The ring morphs you into a rock and you cannot move, so once you run the bot the process 

will speed up almost 3X's as faster because it won't be walking back and forth! 

(I haven't tried this on all alters so depending on the distance, it should work.)

Thanks for the release OP!

Nice find!

EDIT: does not seem to work at the nature altar, so it is highly unlikely that it works somewhere else.

Edited by Xunn

Share this post


Link to post
Share on other sites

/tmp/jc_10433/xRunecrafter.java:37: error: package org.rev317.min does not exist
import org.rev317.min.Loader;
                     ^
/tmp/jc_10433/xRunecrafter.java:38: error: package org.rev317.min.api.events does not exist
import org.rev317.min.api.events.MessageEvent;
                                ^
/tmp/jc_10433/xRunecrafter.java:39: error: package org.rev317.min.api.events.listeners does not exist
import org.rev317.min.api.events.listeners.MessageListener;
                                          ^
/tmp/jc_10433/xRunecrafter.java:40: error: package org.rev317.min.api.methods does not exist
import org.rev317.min.api.methods.Bank;
                                 ^
/tmp/jc_10433/xRunecrafter.java:41: error: package org.rev317.min.api.methods does not exist
import org.rev317.min.api.methods.Inventory;
                                 ^
/tmp/jc_10433/xRunecrafter.java:42: error: package org.rev317.min.api.methods does not exist
import org.rev317.min.api.methods.Menu;
                                 ^
/tmp/jc_10433/xRunecrafter.java:43: error: package org.rev317.min.api.methods does not exist
import org.rev317.min.api.methods.Players;
                                 ^
/tmp/jc_10433/xRunecrafter.java:44: error: package org.rev317.min.api.methods does not exist
import org.rev317.min.api.methods.SceneObjects;
                                 ^
/tmp/jc_10433/xRunecrafter.java:45: error: package org.rev317.min.api.methods does not exist
import org.rev317.min.api.methods.Skill;
                                 ^
/tmp/jc_10433/xRunecrafter.java:46: error: package org.rev317.min.api.wrappers does not exist
import org.rev317.min.api.wrappers.SceneObject;
                                  ^
/tmp/jc_10433/xRunecrafter.java:49: error: cannot find symbol
public class xRunecrafter extends Script implements Paintable, MessageListener {
                                                               ^
  symbol: class MessageListener
/tmp/jc_10433/xRunecrafter.java:443: error: cannot find symbol
    public void messageReceived(final MessageEvent arg0) {
                                      ^
  symbol:   class MessageEvent
  location: class xRunecrafter
/tmp/jc_10433/xRunecrafter.java:78: error: package Skill does not exist
	startExperience = Skill.RUNECRAFTING.getExperience();
	                       ^
/tmp/jc_10433/xRunecrafter.java:114: error: cannot find symbol
            Field field = Loader.getClient().getClass().getDeclaredField("hR");
                          ^
  symbol:   variable Loader
  location: class xRunecrafter
/tmp/jc_10433/xRunecrafter.java:118: error: cannot find symbol
		    value = field.get(Loader.getClient());
		                      ^
  symbol:   variable Loader
  location: class xRunecrafter
/tmp/jc_10433/xRunecrafter.java:283: error: cannot find symbol
		    lblPlayersArounddata.setText("" + (Players.getNearest().length - 1));
		                                       ^
  symbol: variable Players
/tmp/jc_10433/xRunecrafter.java:287: error: package Skill does not exist
		    lblExperiencedata.setText(format(timer.getPerHour(Skill.RUNECRAFTING.getExperience()
		                                                           ^
/tmp/jc_10433/xRunecrafter.java:320: error: cannot find symbol
	    SceneObject[] i = null;
	    ^
  symbol:   class SceneObject
  location: class xRunecrafter.Crafting
/tmp/jc_10433/xRunecrafter.java:322: error: cannot find symbol
		i = SceneObjects.getNearest(altarIDs);
		    ^
  symbol:   variable SceneObjects
  location: class xRunecrafter.Crafting
/tmp/jc_10433/xRunecrafter.java:325: error: cannot find symbol
	    return i != null && i.length > 0 && Inventory.containts(essence);
	                                        ^
  symbol:   variable Inventory
  location: class xRunecrafter.Crafting
/tmp/jc_10433/xRunecrafter.java:331: error: cannot find symbol
	    SceneObject[] i = null;
	    ^
  symbol:   class SceneObject
  location: class xRunecrafter.Crafting
/tmp/jc_10433/xRunecrafter.java:333: error: cannot find symbol
		i = SceneObjects.getNearest(altarIDs);
		    ^
  symbol:   variable SceneObjects
  location: class xRunecrafter.Crafting
/tmp/jc_10433/xRunecrafter.java:342: error: cannot find symbol
		    return !Inventory.containts(essence);
		            ^
  symbol: variable Inventory
/tmp/jc_10433/xRunecrafter.java:354: error: cannot find symbol
	    final int[] bankIds = Loader.getClient().getInterfaceCache()[5382].getItems();
	                          ^
  symbol:   variable Loader
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:364: error: cannot find symbol
	    final int[] bankIds = Loader.getClient().getInterfaceCache()[5382].getItems();
	                          ^
  symbol:   variable Loader
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:376: error: cannot find symbol
	    SceneObject[] i = null;
	    ^
  symbol:   class SceneObject
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:378: error: cannot find symbol
		i = SceneObjects.getNearest(bankObject);
		    ^
  symbol:   variable SceneObjects
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:381: error: cannot find symbol
	    return !Inventory.containts(essence) && i != null && i.length > 0;
	            ^
  symbol:   variable Inventory
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:387: error: cannot find symbol
	    if (!Bank.isOpen() && !Inventory.containts(essence)) {
	         ^
  symbol:   variable Bank
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:387: error: cannot find symbol
	    if (!Bank.isOpen() && !Inventory.containts(essence)) {
	                           ^
  symbol:   variable Inventory
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:390: error: cannot find symbol
		SceneObject[] i = null;
		^
  symbol:   class SceneObject
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:392: error: cannot find symbol
		    i = SceneObjects.getNearest(bankObject);
		        ^
  symbol:   variable SceneObjects
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:400: error: cannot find symbol
			return Bank.isOpen();
			       ^
  symbol: variable Bank
/tmp/jc_10433/xRunecrafter.java:405: error: cannot find symbol
	    } else if (Bank.isOpen() && !Inventory.containts(essence)) {
	               ^
  symbol:   variable Bank
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:405: error: cannot find symbol
	    } else if (Bank.isOpen() && !Inventory.containts(essence)) {
	                                 ^
  symbol:   variable Inventory
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:408: error: cannot find symbol
		    Menu.sendAction(53, essence[0] - 1, getBankSlot(essence[0]), 5382, 3);
		    ^
  symbol:   variable Menu
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:412: error: cannot find symbol
			    return Inventory.containts(essence);
			           ^
  symbol: variable Inventory
/tmp/jc_10433/xRunecrafter.java:417: error: cannot find symbol
		    Menu.sendAction(53, essence[1] - 1, getBankSlot(essence[1]), 5382, 3);
		    ^
  symbol:   variable Menu
  location: class xRunecrafter.Banking
/tmp/jc_10433/xRunecrafter.java:421: error: cannot find symbol
			    return Inventory.containts(essence);
			           ^
  symbol: variable Inventory
/tmp/jc_10433/xRunecrafter.java:432: error: cannot find symbol
	if (Inventory.getItems(x) != null) {
	    ^
  symbol:   variable Inventory
  location: class xRunecrafter
/tmp/jc_10433/xRunecrafter.java:434: error: cannot find symbol
	    final int l = Inventory.getItems(x).length;
	                  ^
  symbol:   variable Inventory
  location: class xRunecrafter
/tmp/jc_10433/xRunecrafter.java:436: error: cannot find symbol
		t += Inventory.getItems(x).getStackSize();
		     ^
  symbol:   variable Inventory
  location: class xRunecrafter
/tmp/jc_10433/xRunecrafter.java:442: error: method does not override or implement a method from a supertype
    @Override
    ^
43 errors

 

Not sure what I am doing wrong.

Share this post


Link to post
Share on other sites
22 hours ago, TerminatoR7 said:

 

 

 

Not sure what I am doing wrong.

Did you include the minifed API and the normal .jar file in your buildpath?

Share this post


Link to post
Share on other sites

Having an issue when I try to compile it. I put all the .Java files in and compile it, and put the .Class filed in the compiled scripts folder and the script opens, and gui pops up but nothing happens.

Anyone else experience this?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...