• Log in or sign up for an account here: https://www.sythe.org/login

Need help with fixing my script!

dark spaj

Forum Addict
Joined
Nov 16, 2008
Sythe Gold
0
Messages
342
Location
Finland
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:

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!!
 
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 boolean onStart(String[] args) {  
		return true;	
	 }


	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(Willows); 
					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); 
	 }
	 
}
 
^^ignore that post above^^

Ok ive edited this thread to fit the new edit of the thread...this script is pretty much rivgens script but edited slightly so ignore that post above plz that isnt the best script as it didnt do it well so plz IGNORE IT!!!! rivgen did do a good job..dont deny it but just that isnt an update of teh current !!!!

so could someone still fix plz =)
 
Member of the Month Winner
Sythe's 10th Anniversary
I said its in the first ever post in this fucin thread man!
Calm down or you sir will be infracted.

There is no script - it uses RSbot libraries, but that is actually a legitimate Java PROGRAM source file, nowhere near a script.

Now enough spam or I will indeed lock this.
 
Member of the Month Winner
Sythe's 10th Anniversary
i dont see any imports...
facepalm.png


I really think I should quote you here:

Are you blind or something or are you trying to get post count?

its in teh first post stoopid ?

DUUHHH!

I said its in the first ever post in this fucin thread man!

Code:
import com.speljohan.rsbot.script.*;
import com.speljohan.rsbot.script.wrappers.*;
 
Runescape Gamblingrunescape gambling
Back
Top