Giter VIP home page Giter VIP logo

p3achb0t's Introduction

P3achB0t

Educational attempt to create a Oldschool Runescape client

This project is to learn:

  1. More about how the Oldschool runescape client operates
  2. Learning about reflection
  3. Learn more about injection
  4. Runtime analysis of values to identify fields/classes
  5. Learn control flow analysis to trim unused fields and classes when deobfuscating the code

Discord

If you would like to join the community or have questions feel free to join this discord

https://discord.gg/kcepXFP

Requirements

Make sure you have Java 11. Its recommended to use the 32-bit to reduce the ram usage. https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot#x32_win

How to setup & build the project

Its recommended that you use InteliJ IDEA for the development environment. Currently, we are using Java 11

Importing Steps

  1. Clone the repo from the commandline, GitHub desktop GUI or even within InteliJ
  2. Open up the newly cloned repo in InteliJ
  3. Reimport the maven project by pressing this button in the Maven panel on the right hand side

Note If you get stuck, and the maven project doesnt import correctly, right click the pom.xml and press import as maven project

At this point you should have all the external Libraries loaded in the project panel

Building & running from Maven

  1. Back over to the Maven panel you need to run the compile Lifecycle. You should get [INFO] BUILD SUCCESS
  2. Then run the exec:exec plugin to launch the application

Building & running using native Kotlin template using InteliJ(recommended)

  1. Go to com.p3achb0t.Main or src/com/p3achb0t/main.kt
  2. Click on the green play button. This should compile and launch the app as well.

Script loading

Currently the scripts live in the follow location: src/com/p3achb0t/scripts The TutorialIsland.kt script should have an extensive working version on a script. As long as you set up the Manifest the scripts should automatically be loaded

Fast Debugging

If you use the Kotlin template building method you can recompile files and "Hot swap" the class files while the client is working. All you need to do is be sure you are in debug mode and you can do that by pressing the Bug button as long as you have the correct build configurations selected

Within the file if you are editing it you can right click and select "Compile and reload file"

OR

On the Project View on the left hand side you can right click a file and select "Compile

Caveat - Depending on what you change within the file or files its possible you cant just recompile. For example, if you change a class signature or add a new class then you need to do a recompile and relaunch.

Known issues

When starting the client from a fresh folder we have to download a 2nd copy of the cache into the .cache folder. This is to help to get varbit info and item names. The Cache reader fails in the original cache. That being said you probably will need to wait a few min before that loads. Its recommended that you just close the client after about 3-5min and restart.

p3achb0t's People

Contributors

acorbin3 avatar awesomeuploads avatar dependabot[bot] avatar loehde avatar mustache-inc avatar zaksmithcomputing avatar zulfor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

p3achb0t's Issues

Create a robust login handler

We have a hacked up version of a login handler that does a poor job.
It should be able to do the following

  • Verify username is correct
  • Set user name
  • Set password
  • Pretty the red button after login
  • Log out
  • Break handler. Run time allowed +/- min. Break time +/- min

Additional features:

  • Check for if an account was banned. If so stop logging in. report ban
  • Add a way to only run during a specific time period. Like 2AM - 7PM or something like that

Use convention of a logger

From a timing perspective using print can be challenging when going back to look at logs. Consider updating to have a simple logger that provides a time stamp. The VarBit explore has an example.

Paint debug

Its similar to #2 but some extra stuff

  • Make sure debug works with zoom
  • Display objects such as doors and trees
  • Display object models
  • Display ground items names
  • Display ground items model
  • Display inventory items
  • Create some kind of framework to allow @draw or @pain in any class

Ram usage

Investigate on if there is any excessive ram usage and any leaks

Low CPU mode

Look into having the ability to turn off NPC, Player, and GameObject rendering

Update readme

Update readme with set up instructions, how to use with intellij and how to create a simple script

Correctly fix the z and y for the camera

Internally we have switched z and y and have injected that into the client. This was affecting the models at some point in time but it was obvious that it was swapped due to the model utilities that paint as seen here: https://puu.sh/F9OcT/f3b16dcb6b.png

TODO here:

  1. revert back the injection
  2. fix the models use the correct calculations with y and z

Updater

Right now we are currently using Dreambot's hooks. This issue will be used to convert over to custom updater.
Classes and members below that need to be converted

  • Client.varps
  • @VarpBit identified as: ia
  • VarpBit.index ia e 30212683
  • VarpBit.leastSig ia p -1456133489
  • VarpBit.mostSig ia k 1287867035

Debug testing

  • switch between all tabs
  • all items from inventory the ground
  • pick up items from the floor
  • bank items and remove items
  • swap equipment

Projectile getY

Projectile.getY is off and doesnt seem to be by a static amount

Tutorial Island

Simple script to do tutorial island

  • Pick name
  • Select outfit
  • Talk to Gielinor Guide
  • Go to fishing spot
  • Talk to Survival Expert
  • Chop tree down
  • Light fire
  • Do the fishing
  • Cook shrimp, if there is no fire go chop more wood to create a fire. Ensure you cook at least one. might need to catch more shrimp
  • Walk to baker
  • Make bread
  • Learn about the music & Emotes & running
  • Go to quest guide and do that convo
  • Go down to dungen
  • Mine rocks
  • Make bars
  • make dagger
  • Talk to combat instructor
  • Equip weapon
  • Go into rat pen and kill rat
  • Kill rat using range
  • go back upstairs and go to the bank
  • Go to poll booth
  • Talk to financial advisor
  • Leave to talk to priest
  • Learn about prayer
  • Learn about friends list and ignore list
  • Go to wizard
  • Do the wind strike on chicken
  • Talk back to wizard and exit

Model debug

  • Get orientation working
  • Get hull convex which is the box around the object
  • highlight the box where the model is

Interactions

A list of things to interact with. (Its possible they should be broken up into other issues)

  • Actor(NPC,Player)
  • Ground Items
  • Inventory
  • Armor
  • Spells
  • Banking
  • Basic prayer
  • Dialog
  • Walking
  • Interacting walking with minimap

Part of this is camera interactions

  • Swing camera to object
  • Set correct pitch(up/down) to object

Mouse Hopping

Switching over to mouse hopping because handling moving objects is a pain right now

doAction overrides

I'm currently looking into Overriding doAction parameters when they are invoked.

https://i.imgur.com/wNbVoPH.png - methods which are invoked when calling doAction

The idea would be to use a boolean injected into these methods in which is by default off so when using the mouse in game legitimately it does not interfere with gameplay. If the boolean is switched on (by a method we create e.g named overridedoAction) then the parameters will be set by the function within that method and the doaction would be called from the click with altered params and then the boolean switched off again.

Add projectiles

Look in to adding projectiles the api. I have made a start

Inventory issues

Seems to be an issue detecting the slot at which an item is in the inventory also the inventory paint is not displaying not sure if the issue is correlated or not. Bank paint not displaying. Also having issues with ground items again. It seems like these issues could all be linked

Tile#/Object#.canReach

Implement a feature that can compute if a local character can reach the specific tile or object. The use case would be getting a tile or object and checking to see if there are any barriers between.

Sources to look at:
https://github.com/RuneStar/client/blob/f80b524282f3407fdb9c389ded837aaf06707313/game-api/src/main/java/org/runestar/client/game/api/live/LineOfSight.kt

https://github.com/RuneStar/client/blob/f80b524282f3407fdb9c389ded837aaf06707313/game-api/src/main/java/org/runestar/client/game/api/live/Movement.kt

Test ANTIBAN

  1. Opening a official Client from different Folders then you would be able to open as many Clients as you want :=)

  2. Have Low CPU MODE

  3. Fix the Ram Usage Going up by a Little

About the Official Client is to test if Clients matter or not

doAction implementation

research into implementing doAction for instant interactions with objects and also then looking into spoofing mouse data for those interactions

GUI rehall

  • Add menu options
  • Add debug in menu
  • Block user input toggle

Webwalking

Make a global webwalking using xtea keys to get information and computing a path.

  • cache loading
  • collision map generation
  • layer stitching, and doors
  • special obstacles, tp, agility, etc.
  • webwalking-script

General cleanup

  • clean up main file
  • strip out reflection or move it to another branch

Migrate from wrapper classes to Mixins

I found out that RuneLite uses their own Mixins framework but it was based off of this minecraft lib which injected functions, methods, fields, etc into the client: https://github.com/SpongePowered/Mixin

Currently I dont have time to research into this so I am just creating wrapper functions to create an API for scripting. What I would like to do is migrate to Mixins so that we dont need a wrappers around the interfaces. Here is an old source to use: https://github.com/reb1995/Runelite-with-DEOB

Get proxy working

Set up a way to use a proxy.
Maybe consider using commandline arguments to pass in the proxy

focus listeners

remove focus listeners with injection so that client is always 'focused'

Canvas Paint goes black

Sometimes when a script is running and the client moves from 1 screen to another the paint goes black. It appears the client is still running but you just cant see anything.

Dismiss random events

Some times there will be a random event such as a troll or genie, need to figure out how to dismiss them.

Create loading screen

When you first run the jar it takes a while before the client pops up. Need to have some kind of loading screen to let users know what's going on

Widget explorer children

Currently the widget explorer has the children all in text, the idea would be to all them in the tree node system so it's easier to view individual ones

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.