Jump to content

bfir3

Members
  • Posts

    148
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by bfir3

  1. 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?
  2. 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?
  3. 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?
  4. I meant that it will try to solve the Mysterious box even with an interface open.
  5. 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.
  6. 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.
  7. 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?
  8. 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.
  9. 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?
  10. 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 }
  11. Nice, I like the GUI panel! I'm still reluctant to use paints. They are more resource intensive and I feel like depending on the situation, if users are running multiple instances of the script on the same machine, this can really bog things down. I might be picky, I'm not sure, what do you guys think?
  12. bfir3

    QSlayer Progress

    You should release now and gather feedback on non-path walking issues. This way you can tighten up other parts of the script while you wait for the web walking.
  13. Simply because I do not reply to the thread within minutes does not mean anything disturbing. I hope that most of your concerns were answered with the previous reply. As for web-walking, we've dumped data from about 1.3K map regions in RuneScape which is about 90% of the world map. We will be using this data with a combination of efficient algorithms to make web-walking fully automated and dynamic. It has not been fully planned however our development team has discussed the various options and we believe the right one will be written for OSBot 2. More info on web walking will be released as more development arises. Also, for those concerned that OSBot will support RS3. RS3 support will not be released right away. OSBot 2 will be designed in a way that an RS3 bot could be integrated. This does not mean that we are not focusing on 07. 07scape will come first. RS3 support will be a special update scheduled for OSBot 2. You're right, I was being very impatient and I apologize for that. Very interesting information though, I'm looking forward to seeing how things shape up with the new project.
  14. Still waiting for Laz or Maxi to comment on the concerns posted about in here.
  15. The lack of response to any meaningful post in here is quite disturbing. Users have expressed their skepticism and concerns and they go unnoticed. I am new to the community, but there seems to be a disconnect between the people responsible for updating OSBot and the people who are creating the scripts for the users. I hope some of the concerns will be addressed soon enough. I am particularly interested in the new web-walking. How is this being implemented? Also, if you guys are looking for help to develop this, I would be very interested in the opportunity. Let me know.
  16. bfir3

    Get Time

    Or this call: this.toTimeString(System.currentTimeMillis()); private String toTimeString(long time) { return String.format("%02d:%02d:%02d", TimeUnit.MILLISECONDS.toHours(time), TimeUnit.MILLISECONDS.toMinutes(time) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(time)), TimeUnit.MILLISECONDS.toSeconds(time) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(time))); }
  17. Updated Tutorial Island to v0.30 and posted linked the thread here. Tutorial Island will now create a random character and logout when in Lumbridge.
  18. Updated OP with direct download links for currently available projects. These download links won't be as up to date as the SVN repo. Also released the Tutorial Island script.
  19. I just pushed my Tutorial Island script to the repo for anyone to download. It's a fairly early release, but should be stable enough. If you try it please let me know. I will update OP with info soon.
  20. Fir3's Flawless Full Recovery Scripts Simple setup, easy updating Free of hassle, free of maintenance and free of charge I started writing scripts for OSBot about a month ago, and recently released my first script in the Local Scripts section here. I'm hosting all of my projects on Google Code SVN. As of right now, I only have the jar files online, but I will be adding a new repository that includes all of the source code for other developers to work with. I understand that a .jar files aren't intended for use with a versioning system, but the intention here is to simplify updating for users. You will have to delete the current .jar files before updating each time (not much hassle compared to finding a new download link and updating the script in your scripts folder). One time setup, and update instructions are included at the bottom of the post. My main goal is to provide highly stable, simple setup, low maintenance, feature rich scripts to the community for free, and to hopefully contribute to the growth of other scripts through collaborative thinking and source sharing. This thread will be used as a hub for suggestions of improvements that would affect all scripts like anti-ban features, recovery features, or any other suggestions people have in general. You can also post other ideas you are interested in seeing implemented and if they interest me I will add them to my to-do list. I will be maintaining a list of my in-development scripts, and those currently available on SVN. All of my scripts will feature up to date anti-ban, path recovery, death walks and I will address problems as quickly as I can in all cases. The upcoming scripts in the list below are almost ready to be released, and anything in development is either in too early of development stages to be released, or is in need of further testing to ensure functionality and stability. Here you can find a easy start download for those without TortoiseSVN: http://www.mediafire.com/folder/d4lw1691l7zwz/Public Currently Available Scripts: Fir3 Guild Fisher (direct download v1.10) Path Recorder (direct download v1.03) Tutorial Island (direct download v0.30) Upcoming Scripts: Log Burner In Development Scripts: Guild Fisher -> Full AIO Fisher Set-up: Download and install TortoiseSVN - http://tortoisesvn.net/downloads.html Right-click your OSBot scripts folder (or any other local folder) and click "SVN Checkout" Enter https://fir3-scripts.googlecode.com/svn/trunk as the URL of the repository and press OK to download files Updating: Delete all scripts (including those in base folder) in the fir3-scripts folder except for the .svn folder Right-click inside the folder or on it and click SVN Update If there are any errors in the SVN Update window, try deleting the scripts and updating again
  21. Not bad, but there's still a few issues here. It might be useful for the method to return a boolean so that the caller can know if the path is complete or not. Also, if the path isn't reversed it will never walk to the first position in the path because of the for loop condition (i > 0) should be (i >= 0). I'm pretty sure the native osbot walking method supports simple paths like this anyway, but it might be problematic. I'm not sure. Good work either way.
  22. This looks like it's coming along nicely. Also looking really slick. Keep up the good work.
  23. In my experience, getting the amount from the ShopItem and keeping the item up to date can be a bit tricky depending on connection quality and other performance factors. I personally use the slotId to get the amount of items in the slot using this method: public int getAmountForSlot(int slotId) throws InterruptedException { return this.scr.client.getInterface(this.parentID).getChild(this.childID).getInvStackSizes()[slotId]; } This will return the correct data even when shop.isOpen() returns false. I was running into a lot of problems when refreshing ShopItems and they would become null due to what I could only conclude was networking issues. This took care of it nicely. And with this you could also do something like this: public int getAmountForItemId(int itemId) throws InterruptedException { ShopItem shopItem = this.getShopItemByID(itemId); if (shopItem == null) return -1; return this.getAmountForSlot(shopItem.slotID); } And actually, because the getShopItemByName and getShopItemByID use the getAllShopItems() which seemed to be somewhat sluggish, I wrote a getShopItemByItemId() method: public ShopItem getShopItemByItemId(int itemId) { if (this.isOpen()) { Item[] items = this.scr.client.getInterface(this.parentID).getItems(this.childID); for (int slotId = 0; slotId < items.length; slotId++) { if (items[slotId].getId() == itemId) { ShopItem shopItem = new ShopItem(this.scr, slotId); shopItem.name = items[slotId].getName(); shopItem.id = items[slotId].getId(); shopItem.amount = items[slotId].getAmount(); return shopItem; } } } return null; }
  24. I would personally use something more like this: public boolean withdraw(int itemId, int quantity) throws InterruptedException { if (!getBank().isOpen()) return false; int slotId = getBank().getSlotForId(itemId); // getSlotForId returns -1 if the item is unavailable if (slotId == -1) return false; if (!getBank().isSlotVisible(slotId)) getBank().scrollToSlot(slotId); return getBank().withdrawX(itemId, quantity); }
×
×
  • Create New...