Everything posted by Trees
-
Creating Events?
I want to make scripts that are more event based rather than loop/conditional sleep based. For example an event like OnInventoryFull or OnBankOpen. To do this, I need to create an event manager to subscribe and fire events, independent of the main script loop. I'm not very familiar with threading in java, and I'm just wondering what the appropriate way to do this is.
-
What is Auto Muling?
Basically you have code where all the bots join a clan chat and you provide them some command like "!trade" for example, and they all come to one location/world and trade all the resources/money they have made.
-
how would this be done [script]
Use the mouse listener to find out when the mouse is clicked. Then use the menu to verify it was an attack, then use mouse.getEntitiesOnCursor() to find the player and player name.
-
Objects on Ground?
The interact returns true. And I can right click using the mouse method, but if there are players standing there, the correct option moves further down and I don't really know how to check uptext, etc. to find the right thing to use it on.
-
Objects on Ground?
Script seems to have trouble interacting with objects on grounds (things like fire, altar, etc). Especially when moving or a player is on top of the object. There's no way to right click interact so does anyone have any suggestions?
-
Cost of Drawing / Reducing paint refresh rate
Yeah it would be better if there was an event for when the client paints, since onPaint is probably ran at the same frequency as onLoop.
-
APA Gilded Altar
Very nice script, but the logout thing still happens. Might be better for it to try to leave the house via house options when it can't find the portal.
-
Cost of Drawing / Reducing paint refresh rate
Just add a timer and find the average frequency of the paint and only paint every x time. In LoL, it's based on every time DX EndScene is called, which is effectively measured through FPS. So if your FPS is 300, there's no sense in drawing 300x a second when your monitor is only 60 Hz.
-
Team Cape's Agility
Started at lvl1 at Gnome Agility and it just sat there until I did the first obstacle, otherwise seems to be working fine!
-
Manually install Webwalking
I'm not sure this is webwalking, but I assume it is. Extract this in C:\Users\USERNAME\OSBot\Data\
-
Best way to implement deathwalking?
It works, or you can check if your player has the death animation (which might be different now because of the grim reaper)
-
Best way to implement deathwalking?
You can also check when hp == 0
-
Inventory Issue?
Not really a problem for it going slower. Thanks for showing me how to use Filters and getItemInSlot kappa. But shouldn't it be < 27
-
Inventory Issue?
Like I said I'm literally just iterating inventory.getItems and interacting with the item. And that built in method got me banned so I made my own.
-
Inventory Issue?
Not really sure why this is happening, but after interacting with an item in the inventory, it hovers over the item again or something like that? In this example it involves dropping, but even things like ID'ing herbs causes this to happen. Any ideas how to fix? I am just looping over inventory.getItems(), and it's only iterating once...
-
Closest with Pathfinding?
Yeah, but how does it work? Is it using A*? Because I imagine that the pathfinding is calculated client sided when you issue a movement order, which could potentially be done by hooking the callback and getting the path and then not sending it to the server.
-
My node class! everything looks clean but not start -_-
The player is null. return player != null && player.isInteracting(s.myPlayer()); For future reference try/catch usually helps a lot.
-
My node class! everything looks clean but not start -_-
No here: public void sleep(int min, int max) throws InterruptedException { sleep(MethodProvider.random(min, max), max); } There's also a problem with that switch statement because 4 and 5 (?, forget if random is inclusive or not) aren't handled.
-
My node class! everything looks clean but not start -_-
Not sure it's the issue, but in your Data class it seems like you have a recursive call to sleep, which would cause an infinite loop. Need to use the methodprovider sleep inside the sleep method.
-
My node class! everything looks clean but not start -_-
Override is needed because those methods are abstract methods in the Script class. The runnable scripts inherit Script class, without override when onStart/onLoop/etc. is called from the super class it is not able to be called in the inherited class because the abstract method wasn't overriden.
-
Closest with Pathfinding?
Hey all, objects.closest uses linear distance to calculate the closest object, is there a way to find the closest walkable object using pathfinding? (Ex. collisionable objects makes the distance by walking longer than linear distance) Couldn't find anything in the api.
-
getHitBarLoopCycle()
As compared to what? How do I get the in game time or whatever. I want to use it to determine time between attacks, so I should just record when it updates and take the difference?
-
getHitBarLoopCycle()
Anyone know how to read/use this? Values seem to keep increasing.
-
Finding the closest position in a list to my position
It's funny how it tries to mimic linq in .net but it still looks so gross.
-
WebWalkingEvent.SetBreakCondition?
Can I just use the evalute event as sort of an update event? To do stuff while walking and return false so it doesn't stop the webwalking?