Search the Community
Showing results for tags 'use'.
-
Been having some issues with one of my combat scripts, it died seemingly random. buy i finally managed to be at the PC when the script was messing up. What happened was that when the client tried shift dropping a vial, it instead normally clicked on it so basically it clicked "use" on it. and then went on to proceed with the script. it's just that it wont be able to interact with anything since all the interact options is now replaced with use vial > on. And for some reason the osbot wont notice this which results in the bot doing nothing since it cant use any interactions in either the game window or in the inventory. which means even though i have super strict priorities in the script to always eat and teleport away above anything else, it cant execute it cause it cant interact with anything cause the vial is highlighted for use and replace all the items other interactions. So i was thinking, I'll just add a check for it; if something is highlighted. but how do i do that? And also is this a osbot bug i should report, cause im 99% sure the logic in my script isn't causing this. I'm sure this isn't a big problem if your script involves walking around alot since it would simply normal click in the game window and the "use" would go away. but my script is in a super crowded area and walks between 2 tiles that has mobs on them which means it pretty much allways relies on right click>walk here which it cant do when the item is highlighted. to sum it shortly: highlighted(use) item is fucking my script.
-
When someone talks about task based script or enum based scripts there's always that other guy: Just use onloop bro! What does that mean though? Well first off you can think of it as normal scripting--it's not new! For an example take a look at this onloop() /** * Just use onLoop() bro * * @return the loop interval * @throws InterruptedException if something fucks up */ @Override public int onLoop() throws InterruptedException { if (!inventory.isFull() && cows.cowsNearby()) { status = "At work--picking up bones and hides..."; bone.pickupBones(); hide.collectHides(); hideCount = hide.getHideCount(); boneCount = bone.getBonerCount(); } else if (inventory.isFull()) { status = "Time to bank"; goToBank.walkToBank(); } else if (!cows.cowsNearby() && inventory.isEmpty()) { status = "Walking to cows for more loot"; cows.walkToCows(); } return random(200, 300); } It's small and concise. One could read it and understand what is going to be happening. Start from the top and work your way down: Inventory not full and cows nearby? Pickup some shit. Inventory full? Go bank Inventory not full and no cows nearby? FIND DEM COWS! It's easy to read, right? Just use onloop() bro Full project has been uploaded to this thread Bank.java CollectBoners.java CollectHide.java Main.java WalkToCows.java