Jump to content

What scripts does osbot need ?


Mr Pro Pop

Recommended Posts

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());
				
			}
		}

	}
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

  • Recently Browsing   0 members

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