Chris

[Video Tutorial] Introduction To RSBot Scripting (IDE set-up & your first combat script) ~ Video 1

Recommended Posts

Chris   
1 hour ago, killamods said:

 

Is their a specific output folder needed? I set it to my created  rsbot project folder, and I now receive an error. I have posted the full log output of the error below.

 

"C:\Program Files (x86)\Java\jre1.8.0_191\bin\java.exe" -Djava.search.path=C:\Users\Unique Consoles\Desktop\RSBot\src\scripts\DirtyMining\ -Dsun.java2d.nodraw=true -Dcom.jagex.config=http://www.runescape.com/l=en/jav_config.ws -Xmx512m -Xss2m -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC "-javaagent:C:\Users\Unique Consoles\Desktop\RSBot\RSBot-7084.jar" -Dfile.encoding=windows-1252 -jar "C:\Users\Unique Consoles\AppData\Roaming\RSBot\jagexappletviewer.jar" runescape

Error: Could not find or load main class Consoles\Desktop\RSBot\src\scripts\DirtyMining\

Process finished with exit code 1

 

**UPDATE**

 

I got powerbot to load, and got it past the error, but my scripts still do not show up when I go to load them from the script menu.

please follow the video

 

"-javaagent:C:\Users\Unique Consoles\Desktop\RSBot\RSBot-7084.jar"

would be

-javaagent:"C:\Users\Unique Consoles\Desktop\RSBot\RSBot-7084.jar"

 

 

this

-Djava.search.path=C:\Users\Unique Consoles\Desktop\RSBot\src\scripts\DirtyMining\

would be

-Djava.search.path="C:\Users\Unique Consoles\Desktop\RSBot\src\scripts\DirtyMining\"

 

 

but that's 100% wrong, nothing in the tutorial suggests this path.

Share this post


Link to post


Thend   

I have 2 problems. Problem 1: Why when i put an if statement if(!fire.inViewport){ Cut logs } if(fire.inViewport){ Cook} it still cuts logs after i make a fire.

Problem 2: When i press the food on fire to cook, how to click Cook all on the bottom? ctx.players.local().interact("Cook");?

 

 

Share this post


Link to post
Chris   
13 minutes ago, Thend said:

I have 2 problems. Problem 1: Why when i put an if statement if(!fire.inViewport){ Cut logs } if(fire.inViewport){ Cook} it still cuts logs after i make a fire.

Problem 2: When i press the food on fire to cook, how to click Cook all on the bottom? ctx.players.local().interact("Cook");?

 

 

1. logic error

2. widgets

Share this post


Link to post
Thend   
1 minute ago, Chris said:

1. logic error

2. widgets

Can you make a guide on widgets or send me somewhere so i can learn more about widgets i tried the docs but did not understand at all.

2 minutes ago, Chris said:

1. logic error

2. widgets

How can i find widget id for Cook?

Share this post


Link to post
Chris   
Just now, Thend said:

Can you make a guide on widgets or send me somewhere so i can learn more about widgets i tried the docs but did not understand at all.

Click 'View->Widgets' and you should understand what they are, find the widget you want in there and then use it by

ctx.widgets.widget(100).component(2) (or similar).

Share this post


Link to post
Thend   
8 minutes ago, Chris said:

Click 'View->Widgets' and you should understand what they are, find the widget you want in there and then use it by

ctx.widgets.widget(100).component(2) (or similar).

How can i find Cook in widget? I searched for Cook all i got was Cooks assistant.

I tried updating still did not find Cook. 😕 Only You successfully cooked fish and all that other stuff. But no Cook.

Share this post


Link to post

I get the following compile error:

"Error:(55, 94) java: <anonymous scripts.GoblinKiller$1> is not abstract and does not override abstract method test(org.powerbot.script.rt4.Npc) in java.util.function.Predicate"

 

It's a reference to this line of code:

"

final Npc goblinToAttack = ctx.npcs.select().id(GOBLIN_IDS).select(new Filter<Npc>() { 


What could be wrong?

Share this post


Link to post
iDzn   
2 minutes ago, Rsbothelper said:

I get the following compile error:

"Error:(55, 94) java: <anonymous scripts.GoblinKiller$1> is not abstract and does not override abstract method test(org.powerbot.script.rt4.Npc) in java.util.function.Predicate"

 

It's a reference to this line of code:

"


final Npc goblinToAttack = ctx.npcs.select().id(GOBLIN_IDS).select(new Filter<Npc>() { 


What could be wrong?

idk if it'll solve your problem but you need to poll the results with .poll() and also need to close your second select ).

Share this post


Link to post
Thend   
On 11/28/2018 at 10:39 PM, Rsbothelper said:

I get the following compile error:

"Error:(55, 94) java: <anonymous scripts.GoblinKiller$1> is not abstract and does not override abstract method test(org.powerbot.script.rt4.Npc) in java.util.function.Predicate"

 

It's a reference to this line of code:

"


final Npc goblinToAttack = ctx.npcs.select().id(GOBLIN_IDS).select(new Filter<Npc>() { 


What could be wrong?

You need to change project language level from 6 to 8. File -> Project structure -> Project.

Share this post


Link to post
Chris   
3 hours ago, lolbus2 said:

hi sir, is it ok if u upload the complete globin killer code u did in the video?

I dont have this code any more

Share this post


Link to post
1 hour ago, Chris said:

 

Hi Chris,

 

Thanks for that. I am having problems running the client tho. It opens alright, but as soon as I enter the world it crashes with this error:

 

Error: client.init:1222 sun.reflect.NativeMethodAccessorImpl.invoke0 sun.reflect.NativeMethodAccessorImpl.invoke sun.reflect.DelegatingMethodAccessorImpl.invoke java.lang.reflect.Method.invoke Rs2Applet.a:24 Rs2Applet.init:485 app.appletviewer.a jagexappletviewer.main:78 | java.lang.RuntimeException | 

Any idea what that might be?

Share this post


Link to post
Chris   
5 hours ago, Goofyfellow said:

I cant find the RSBot-7042.jar file that you have at 1:28

Any suggestions on where i can find and download it?

use the latest one

Share this post


Link to post
Chris   
5 hours ago, Goofyfellow said:

The latest JDK?

Edit: Never mind I found it. Thank you!

latest rsbot from the homepage powerbot.org

Share this post


Link to post

Hey, Just followed the video and everything seems to be working alright, but when I rightclick the folder to compile it doesnt give me that option, instead it says "Build" or "Rebuild", clicking build (which I assume would compile it) creates a file in the \out\ folder but the script does not show up locally in RSBot once the client loads. Is there something I missed?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...