Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Skulled Player OSRS

12 year old normie
Joined
Jan 8, 2015
Messages
2,768
You can detect overhead visuals so I assume you can detect skulls too.
 
Joined
Oct 10, 2015
Messages
43
Alright thanks,

I am trying to ask RM to condition my bot that it should not fish if there are near by skulled players. Any help will be appreciated as I am still new to this.

Code:
public class Fish extends Task {



    @Override
    public boolean validate() {
        return Players.getLocal().getAnimationId() == -1 && !Inventory.isFull() && !Npcs.getLoaded("Fishing spot").isEmpty() && Health.getCurrentPercent() > 98 ;
    }

    @Override
    public void execute() {


        Npc Fspot = Npcs.getLoaded("Fishing spot").nearest();
        if (Fspot != null) {
            if (!Fspot.isVisible()){
                Camera.turnTo(Fspot);
                if(!Fspot.isVisible()){
                    Path p = BresenhamPath.buildTo(Fspot);
                    if(p != null)
                        p.step();
                }
            } else if(Fspot.interact("Cage")){
                Execution.delayUntil(()->Players.getLocal().getAnimationId() != -1, 10000);
            }

        }
    }
}
 
Joined
Oct 10, 2015
Messages
43
Still seem to be stuck. At

Code:
        LocatableEntityQueryResults<Player> OtherPlayers =Players.getLoaded();
        if  (OtherPlayers.furthest().getOverheadIcons())

Not sure what to do after this. I am assuming I am wanting to make sure no1 has an overhead icon.
 
Author of MaxiBots
Joined
Dec 3, 2013
Messages
7,032
Still seem to be stuck. At

Code:
        LocatableEntityQueryResults<Player> OtherPlayers =Players.getLoaded();
        if  (OtherPlayers.furthest().getOverheadIcons())

Not sure what to do after this. I am assuming I am wanting to make sure no1 has an overhead icon.
Loop over the icons and check for one with the id of the skull. To work out the skull one either go near someone with a skull or get a skull yourself and get the id of the icon
 
Joined
Oct 10, 2015
Messages
43
Thanks Aidden,

What command would I do to scan for that. If am using a Validate Task based bot
 
Top