-
Script hangs on Inventory interaction when in trade
I may take this approach eventually, but I think my problem is actually related to using an interact action that doesn't exist. I noticed that this error seemed to be occurring when the client would incorrectly report that the player is in a trade (using this.getTrade().isCurrentlyTrading()) and my script would call interact on the desired inventory item with action "Offer-X" when the action does not exist. Instead of failing to interact and continuing as normal, it looks like the interaction method gets completely stuck when the action doesn't exist and locks up further script execution. Does this sound accurate? If so, it may be a change required in the API?
-
Script hangs on Inventory interaction when in trade
To follow up, the issue occurred again today and I checked the log when the mouse was hovering over the inventory item but not interacting with it. Neither of the traces were shown in the log. When I paused the script, the traces both appears shortly after: [INFO][Bot #1][08/09 08:06:30 PM]: Unable to interact with Offer-X [INFO][Bot #1][08/09 08:06:30 PM]: Waiting after interaction to offer amount [INFO][Bot #1][08/09 08:06:30 PM]: Script Fir3 RuneCrafter v1.00 has paused! [INFO][Bot #1][08/09 08:06:30 PM]: Script Fir3 RuneCrafter v1.00 has resumed! And then shortly after I saw again: [WARN][Bot #1][08/09 08:06:34 PM]: Event executor is taking too long to suspend; terminating now... [WARN][Bot #1][08/09 08:06:46 PM]: Event executor is taking too long to suspend; terminating now... [ERROR][Bot #1][08/09 08:06:46 PM]: Caught thread death in EventExecutor When I hit play after pausing the script, it continues fine but usually tries to interact with the inventory item over and over again really quickly (after it was stuck not interacting for a while). Any ideas guys?
-
Trading player fails when other players are on tile
I noticed that if I try to interact with a player (say to "Trade with"), the interaction will usually work fine. But if there is another player, or multiple other players on the same tile as the player I am trying to trade, nothing will happen. The interact method doesn't even move the mouse to hover the player, let alone right-click and select the action. Any ideas?
-
Random Events that Require Dropping don't close open Interfaces
I meant that it will try to solve the Mysterious box even with an interface open.
-
Script hangs on Inventory interaction when in trade
Yeah, I'm not gonna use a while loop like that. Not a good idea. I added additional tracing to my code to hopefully get some more answers. It looks like the interaction fails, but that execution does not continue to the following instruction. if (!this.getInventory().interact(slotId, "Offer-x")) { this.log("Unable to interact with Inventory item"); } script.log("Continuing after Inventory interaction attempt"); The next time the issue comes up I will check my log to see what appears.
-
Random Events that Require Dropping don't close open Interfaces
It will also do this for opening a Mysterious Box.
-
Random Events that Require Dropping don't close open Interfaces
Another issue I've noticed. Often the client will solve a random event, and then it will attempt to drop the item (a gem, the security book, etc.). Problem is, if the user has an interface open (Skills, Trade, etc.) the client will get stuck trying to drop the item and never be able to recover. This should be fixed.
-
Unregistering a Random Solver (RunAwayFromCombat)
I don't need to provide additional functionality, I just want to disable it. Surely the "unregisterHook" method which takes a RandomEvent argument is intended for this?
-
Unregistering a Random Solver (RunAwayFromCombat)
Hey all, I have another issue lately. I can't seem to successfully unregister to RunAwayFromCombat hook. Here is a piece of code I have with traces for now: this.getBot().getRandomExecutor().unregisterHook(RandomEvent.RUN_AWAY_FROM_COMBAT); if (this.getBot().getRandomExecutor().hasHook(RandomEvent.RUN_AWAY_FROM_COMBAT)) { log("RunAwayFromCombat random handler has hook"); } else { log("RunAwayFromCombat random handler does not have hook"); } this.getBot().getRandomExecutor().registerRandoms(); if (this.getBot().getRandomExecutor().hasHook(RandomEvent.RUN_AWAY_FROM_COMBAT)) { log("RunAwayFromCombat random handler has hook"); } else { log("RunAwayFromCombat random handler does not have hook"); } That is in my onStart() method. And I see that the "RunAwayFromCombat random handler does not have hook" twice in the log when starting -- indicating that it would not run, I imagine. Yet, when I am attacked by a swarm or other I still get the random RunAwayFromCombat overlay and OSBot handles it normally. Any ideas? EDIT: Pretty sure I tried this without calling this.getBot().getRandomExecutor().registerRandoms() after unregistering the hook and it still didn't work.
-
Script hangs on Inventory interaction when in trade
I'm having an issue right now, where occasionally when attempting to interact with an Inventory item (to offer), the script will hang. The mouse will move to the inventory item, but it will not right click to interact with it. Usually just pausing and unpausing the script will solve it, and these messages will appear in the log (only after cycling the pause): [WARN][Bot #1][08/08 03:51:53 AM]: Event executor is taking too long to suspend; terminating now... [ERROR][Bot #1][08/08 03:51:53 AM]: Caught thread death in EventExecutor Any ideas?
-
Woke up in lumby bank with nothing
There should be no issues with my scripts as long as you download them from the Google Code repository. Claims that any of my scripts are malicious are 100% false.
-
Picking up items?
Sounds like you might have single click enabled in RS settings tab. If not, I don't know why that would happen.
-
[FREE] Fir3 PlankAny - AIO Plank Maker (Full path recovery, death walk, etc.)
Just to keep you guys in the loop, I have looked into this problem and resolved it. I have a major FireBot update pending that can only be pushed once FishAny is updated to use my new architecture. Needless to say, it will be easier for me to wait until I am done with the FireBot update to push the update for PlankAny. I will be out tonight, so there is only a chance I will get it done tonight. Otherwise you can expect it tomorrow. Sorry for the delay.
-
[FREE] Fir3 PlankAny - AIO Plank Maker (Full path recovery, death walk, etc.)
Known issue now. You can refer to the posts above. I will be updating it tonight or tomorrow at the latest with a fix for this. Sorry for the inconvenience.
-
Polygon Area (not finished yet!)
This is very useful, great work! I think you could probably simplify it a bit, and remove some of the dependencies like this: import java.awt.Polygon; import org.osbot.script.rs2.map.Position; import org.osbot.script.rs2.model.Entity; public class PolygonArea { Polygon polygon; PolygonArea(Position... positions) { polygon = new Polygon(); addPositions(positions); } public boolean containsEntity(Entity e) { return polygon.contains(e.getX(), e.getY()); } public void addPositions(Position... positions) { for (Position pos : positions) { polygon.addPoint(pos.getX(), pos.getY()); } } } How to use PolygonArea polygonArea = new PolygonArea(positionsArray); Check for entities in the area with this (NPC, Player, GroundItems, etc): if (polygonArea.containsEntity(entity)) { //do method }