Hey this is just an edit so i can like save making a new thread about the same script...
These are the errors i get when i run the script...(these happen when rs is going to the 'click here to play screen")
[11:24:31][ Error Stream] java.lang.NullPointerException
[11:24:31][ Error Stream] at com.speljohan.rsbot.script.Methods.atObject(Methods.java:2018)
[11:24:31][ Error Stream] at DSedgewillows.loop(DSedgewillows.java:70)
[11:24:31][ Error Stream] at com.speljohan.rsbot.script.Script.run(Script.java:102)
[11:24:31][ Error Stream] at com.speljohan.rsbot.script.ScriptHandler$1.run(ScriptHandler.java:70)
[11:24:31][ Error Stream] at java.lang.Thread.run(Unknown Source)
dont know if it means any thing.
and also, atleast the script does something bu it still doesnt chop willows, it seems interested in items on the ground, it right clicks them then cancels...and sometimes it chops normal trees so i dont know whats wrong...
so heres the script:
If you can do this THANKS SO MUCH!!
These are the errors i get when i run the script...(these happen when rs is going to the 'click here to play screen")
[11:24:31][ Error Stream] java.lang.NullPointerException
[11:24:31][ Error Stream] at com.speljohan.rsbot.script.Methods.atObject(Methods.java:2018)
[11:24:31][ Error Stream] at DSedgewillows.loop(DSedgewillows.java:70)
[11:24:31][ Error Stream] at com.speljohan.rsbot.script.Script.run(Script.java:102)
[11:24:31][ Error Stream] at com.speljohan.rsbot.script.ScriptHandler$1.run(ScriptHandler.java:70)
[11:24:31][ Error Stream] at java.lang.Thread.run(Unknown Source)
dont know if it means any thing.
and also, atleast the script does something bu it still doesnt chop willows, it seems interested in items on the ground, it right clicks them then cancels...and sometimes it chops normal trees so i dont know whats wrong...
so heres the script:
Code:
import com.speljohan.rsbot.script.*;
import com.speljohan.rsbot.script.wrappers.*;
public class DSedgewillows extends Script{
public String getName() {
return "Dark Spaj's Edgeville Willows";
}
public double getVersion() {
return 0.1;
}
public String getAuthor() {
return "Dark Spaj";
}
public String getScriptCategory() {
return "Woodcutting";
}
public boolean onStart(String[] args) {
return true;
}
public String getScriptDescription() {
String html = "";
html += "<html>\n";
html += "<body>\n";
html += "<h2>" + getName() + " v" + getVersion() + "</h2><br>\n";
html += "Author: " + getAuthor() + "<br><br>\n";
html += "Setup: <br>";
html += "<li>Start in Edgeville bank.</li>";
html += "<li>Have an axe.</li>";
html += "</body>\n";
html += "</html>\n";
return html;
}
private int State = 0;
private int[] Trees = { 1308, 5551, 5552, 5553 };
private int[] Bankbooths = { 5912, 5913 };
private int Logs = 1519;
private int Runs = 0;
private int Willows;
private final RSTile[] treetobank = {
new RSTile(3115, 3498),
new RSTile(3106, 3496), new RSTile(3094, 3494)
};
private final RSTile[] banktotree = {
new RSTile(3094, 3494),
new RSTile(3106, 3496), new RSTile(3115, 3498)
};
public int loop() {
try{
switch (State) {
case 0:
if (getInventoryCount() == 28) {
State++;
} else {
RSObject Willow = findObject(Trees);
atObject(Willow, "Chop down");
}
return random(1000, 2000);
case 1:
if(getInventoryCount(Logs) == 0){
State++;
Runs++;
} else{
walkPathMM(randomizePath(treetobank, 2, 2), 20);
//treetobank.walkToEnd();
RSObject Bankbooth = findObject(Bankbooths);
atObject(Bankbooth, "Use-quickly");
atInventoryItem(Logs, "Deposit-All");
walkPathMM(randomizePath(banktotree, 2, 2), 20);
}
return random(1000, 2000);
case 2: //Runs output
System.out.println("Runs: " + Runs);
State = 0;
return random(1000, 2000);
}
} catch(Exception e){
e.printStackTrace();
}
return random(1000, 2000);
}
}
If you can do this THANKS SO MUCH!!




