Coma

The RSBot Cookbook: Clay Softener

Recommended Posts

Coma   

I needed soft clay, nobody had a clay softener, so I made this.

Covers basic interactions/movements/widget handling.

 

https://gist.github.com/Strikegently/dcbe589e74951c2a11ff

Share this post


Link to post


Smokey_   

The SDN compiles on Java 6, so no.

 

Why is that? Wouldn't it be better to use a more version of java? I like the changes they've made to the api since I was away

Edited by TehWarPath

Share this post


Link to post
Minho   

Why is that? Wouldn't it be better to use a more version of java? I like the changes they've made to the api since I was away


Mac comes standard with Java 6, so that's why.

Share this post


Link to post
ctx.objects.select(15).id(FOUNTAIN).select(new Filter<GameObject>()

line 72, could you explain what the first select does and what the second select does?

Please take the parameter in consideration, too, when explaining.

Edited by Flamezors

Share this post


Link to post

 

I got that bookmarked already ;)

I know that select() populates the query with loaded entities and that you can filter it with additional calls like id(ID_OF_THING), but I do not really understand what the "15" does in te first select() and what the second select() does.

Does the second select() take the query which has all the objects with the fountain ID and then filters it further based on if the objects in the query are GameObjects? What could happen if that second select() did not take place?

Share this post


Link to post
Coma   

I got that bookmarked already ;)

I know that select() populates the query with loaded entities and that you can filter it with additional calls like id(ID_OF_THING), but I do not really understand what the "15" does in te first select() and what the second select() does.

Does the second select() take the query which has all the objects with the fountain ID and then filters it further based on if the objects in the query are GameObjects? What could happen if that second select() did not take place?

select() = reset the query, and populate it with the loaded entities

select(int radius) = #1, but only for entities within the specified radius (saves processing time)

Share this post


Link to post

select() = reset the query, and populate it with the loaded entities

select(int radius) = #1, but only for entities within the specified radius (saves processing time)

Ah, so there are multiple select() methods but with different arguments. Thanks for explaining that, I'll check the docs now.

Share this post


Link to post
Robert G   

You can replace this:

                if (ctx.players.local().animation() != -1) {
                    last = System.currentTimeMillis();
                }

                //checks if last clay softened was less than 3 seconds ago (prevents spam clicking)
                if (System.currentTimeMillis() - last < 3000) {
                    break;
                }

with

                if (ctx.varpbits.varpbit(1175) > 0) {
		    break;
		}

Not sure if the setting is still 1175, so you might want to check that it's still right.

Share this post


Link to post
Chris   

hmmmm...after the update this script seems to just open up bank then opens up the preset menu and get hang thr pls fix it thank you excited.png

have you got the preset set up?

Share this post


Link to post
Chris   

I'm getting the same problem. What's the preset supposed to look like?

an inventory of clay

Share this post


Link to post
laolin7   

have you got the preset set up?

yes i did its a full inventory of clays. the finding water source and using clay with water is working perfectly but once all clay turns to soft clays it will jus open up the bank and the presets menu and hang there. any ideas wad i am doing wrong?

Share this post


Link to post
Chris   

yes i did its a full inventory of clays. the finding water source and using clay with water is working perfectly but once all clay turns to soft clays it will jus open up the bank and the presets menu and hang there. any ideas wad i am doing wrong?

if the preset menu opens it means the preset hasn't been set up

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now