By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now!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);
}
}
}
}
Possibly. Try Actor.getOverheadIcons()Does the API have a command to detect nearby skulled players?
LocatableEntityQueryResults<Player> OtherPlayers =Players.getLoaded();
if (OtherPlayers.furthest().getOverheadIcons())
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 iconStill 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.
We use essential cookies to make this site work, and optional cookies to enhance your experience.