Question Skulled Player OSRS

Discussion in 'Developer Support' started by Shumbo, Nov 21, 2015.

  1. Does the API have a command to detect nearby skulled players?
     
  2. You can detect overhead visuals so I assume you can detect skulls too.
     
  3. 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 (Text):
    1.  
    2. public class Fish extends Task {
    3.  
    4.  
    5.  
    6.     @Override
    7.     public boolean validate() {
    8.         return Players.getLocal().getAnimationId() == -1 && !Inventory.isFull() && !Npcs.getLoaded("Fishing spot").isEmpty() && Health.getCurrentPercent() > 98 ;
    9.     }
    10.  
    11.     @Override
    12.     public void execute() {
    13.  
    14.  
    15.         Npc Fspot = Npcs.getLoaded("Fishing spot").nearest();
    16.         if (Fspot != null) {
    17.             if (!Fspot.isVisible()){
    18.                 Camera.turnTo(Fspot);
    19.                 if(!Fspot.isVisible()){
    20.                     Path p = BresenhamPath.buildTo(Fspot);
    21.                     if(p != null)
    22.                         p.step();
    23.                 }
    24.             } else if(Fspot.interact("Cage")){
    25.                 Execution.delayUntil(()->Players.getLocal().getAnimationId() != -1, 10000);
    26.             }
    27.  
    28.         }
    29.     }
    30. }
     
  4. Possibly. Try Actor.getOverheadIcons()
    I'd check it myself but I'm still having trouble properly setting up runemate atm.
     
  5. Still seem to be stuck. At

    Code (Text):
    1.         LocatableEntityQueryResults<Player> OtherPlayers =Players.getLoaded();
    2.         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.
     
  6. 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
     
  7. Thanks Aidden,

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

Share This Page

Loading...