Jump to content

What scripts does osbot need ?


Recommended Posts

Posted

If I bothered to learn npc filtering for npcs that aren't in combat, I'd start on a free AIO GWD doge.png

 

hint hint @@Token

 

 

Here is one, I hope it helps and sorry for my last post!

public void Available() {

		List<NPC> npc = npcs.getAll();
	
		for (NPC n : npc) {
			if (!n.isUnderAttack() && n.getHealthPercent() > 0) {
			npc.add(n);
			log(n.getName());
				
			}
		}

	}
Posted
List<NPC> noobs = npcs.getAll().stream().filter(n -> !n.isUnderAttack()).collect(Collectors.toList());

this is why i'm going to have your kids

 

 

Here is one, I hope it helps and sorry for my last post!

public void Available() {

		List<NPC> npc = npcs.getAll();
	
		for (NPC n : npc) {
			if (!n.isUnderAttack() && n.getHealthPercent() > 0) {
			npc.add(n);
			log(n.getName());
				
			}
		}

	}

thx for the help, fam

gonna go with token's method tho cause we're having babies soon

  • Like 1
Posted (edited)

this is why i'm going to have your kids

 

thx for the help, fam

gonna go with token's method tho cause we're having babies soon

 

@

As you like, Here is an improvement,

List<NPC> npc = npcs.getAll();
	
		for (NPC n : npc) {
			if (!n.isUnderAttack() && n.getHealthPercent() > 0) {
			npc.add(n);
			for (NPC e : npc) {
				e.interact("Action");
					
				}
			}
		}

	}
Edited by Mr Pro Pop

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...