LearningToBot

Turning off Random Event Handling

Recommended Posts

If I wanted to turn off Random Event handling all together where in my script would I put it?

 

package osrs;

import org.powerbot.script.rt4.ClientAccessor;
import org.powerbot.script.rt4.ClientContext;

public abstract class Task extends ClientAccessor {
    public Task(ClientContext ctx) {
        super(ctx);
    }

    public abstract boolean activate();
    public abstract void execute();

    public static int checkPlayerOrSkillCounter = 0;
    public static int moveCameraCounter = 0;
    ctx.properties.setProperty("randomevents.disable", "true");
}

I'm getting the error, cannot resolve symbol setProperty.

Okay I'm an idiot I needed to put it into the class that extends PollingScript.

 

Edited by LearningToBot

Share this post


Link to post


On 4/4/2019 at 6:40 PM, LearningToBot said:

 

 

Okay I'm an idiot I needed to put it into the class that extends PollingScript.

 

No you don't, you just didn't have it in a function. Anywhere that has access to your ctx can interact with it.

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...