Everything posted by Adept
-
Muling snippet?
What I'm looking for is the bit where a message is sent to the mule (via sockets?) signalling it to log in. As you rightly pointed out yourself, the rest is fairly easy to make using the API.
-
Muling snippet?
I've searched the forums but couldn't find a muling snippet. Does anyone have a working muling script they are willing to share? Edit: What I'm really looking for is a snippet to send a message to the mule (via sockets?) signalling it to log in. The rest I can code with ease myself. Thanks for your help though.
-
Can't login into the client.
- Max number of clients for free users
According to the thread linked below, free users are allowed a maximum of two clients. However, I am prompted to buy VIP when running the second client. How many clients are free users allowed?- Hopping worlds
I'd recommend using the bottom one. I edited the code so that all you have to do is add world to the "worlds" array. Copy the code again from the original reply and try again.- Hopping worlds
So far I've haven't experienced any issues with the hopper. Are you sure you're making use of the correct methods? Also, consider using a switch instead of multiple if statements. You should use something of this sort: int hopTo = -1; int rand = random(1,10); switch (rand) { case 1: hopTo = 1; break; case 2: hopTo = 8; break; //add remaining cases } if (hopTo != -1 && hopTo != getWorlds().getCurrentWorld){ getWorlds().hop(hopTo); } Here's an even better solution with an array instead of a switch int hopTo = -1; int[] worlds = {1,8,16}; //add your worlds here int rand = random(0, worlds.length - 1); //arrays start from index 0 hopTo = worlds[rand]; if (hopTo != -1 && hopTo != getWorlds().getCurrentWorld){ getWorlds().hop(hopTo); }- GE Data (get price etc. by item name) no external libraries required
What a silly goose I am. I was passing the ID's of the noted version. RSbuddy needs the IDs of the unnoted version. One can avoid using the other class you provided by simply finding the unnoted ID's using the getUnnotedID() method. Thanks for your help- GE Data (get price etc. by item name) no external libraries required
I'm making use of the ExchangeItem.java class multiple times throughout my code. On some occasions, fetching the price works and other times all price checks simply return 0. Here's an example of price checks which return 0: Item[] inventoryItems = getInventory().getItems(); int j; for(j = 0; j < inventoryItems.length; j++){ Item currentItem = inventoryItems[j]; if (currentItem != null) { log("currentItem: " + currentItem.toString()); int jId = currentItem.getId(); String jName = currentItem.getName(); ExchangeItem jItem = new ExchangeItem(jName, jId); int jPrice = jItem.getPrice(); log("Price: " + jPrice); //returns 0 } } Log example: [INFO][Bot #1][02/22 12:54:38 AM]: currentItem: Item id: 995, Name: Coins, Amount: 8000 [INFO][Bot #1][02/22 12:54:38 AM]: Price: 0 [INFO][Bot #1][02/22 12:54:38 AM]: currentItem: Item id: 12288, Name: Mithril platebody (t), Amount: 1 [INFO][Bot #1][02/22 12:54:38 AM]: Price: 0 [INFO][Bot #1][02/22 12:54:38 AM]: currentItem: Item id: 1051, Name: Santa hat, Amount: 17 [INFO][Bot #1][02/22 12:54:39 AM]: Price: 0 [INFO][Bot #1][02/22 12:54:39 AM]: currentItem: Item id: 6740, Name: Dragon axe, Amount: 11 [INFO][Bot #1][02/22 12:54:39 AM]: Price: 0 Why is this happening?- A Simple Login Handler
How can I check/listen for login failure i.e. incorrect login details, account invalid, account logged, etc.?- Reading text file to List
Worked like a charm! Thanks a lot!- Reading text file to List
I am attempting to read a text file to a List using the following code: List<String> accList = new ArrayList<String>(); try { accList = Files.readAllLines(Paths.get("file.txt"), StandardCharsets.UTF_8); } catch (IOException e) { e.printStackTrace(); } but I'm getting the following error: Blocked permission: ("java.io.FilePermission" "file.txt" "read") Any help is appreciated.- How to determine if an item is a "Members object"
Woah! That's one informative and detailed post! Very well-explained. Thanks a lot!- How to determine if an item is a "Members object"
Consider a tab of 10 items. I withdraw the 6th item of the tab, leaving me with the first five items, an empty slot and the remaining 4 items. when I then attempt to get the tabSlot for the 8th item like so getTabSlot(8thItemiId), the method creates the itemsInTab array with the remaining 9 items, hence int i returned is 7 when it should be 8 due to the empty slot left over from the item withdrawn still occupying one tab slot.- How to determine if an item is a "Members object"
Thank you very much. Currently trying to solve another issue. After withdrawing one item, the getTabSlot method breaks since getting the items in the tab does not take into consideration the empty slot left by the item withdrawn.- How to determine if an item is a "Members object"
Yep, I checked. EDIT: I found the issue! It's due to the comparison used in the getTabSlot method. Comparing the item objects does not return true (similarly to Strings I assume). Comparing item IDs is the way to go. if(itemsInTab[i].getId() == item.getId()) {- How to determine if an item is a "Members object"
I keep getting this error when I include the code you provided: [ERROR][Bot #1][02/17 04:51:44 PM]: Error in script executor! java.lang.IllegalStateException: Bank tab count calculation failed! at org.osbot.rs07.api.Bank.getItemCountForTab(tf:48) at org.osbot.rs07.api.Bank.getItemsInTab(tf:12) at MassAccountCleaner.getTabSlot(MassAccountCleaner.java:270) at MassAccountCleaner.onLoop(MassAccountCleaner.java:210) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(wh:281) at java.lang.Thread.run(Unknown Source) P.S. I changed the for loop statement in the getTabForItem method to the following: for(int tab = 0; tab < getBank().getTabsAvailable(); tab++) {- How to determine if an item is a "Members object"
You call seeking a better, more efficient solution being "lazy"? If you check previous replies you'll find the answer to your question and that another user has already provided a working method which does not require managing a list. Nonetheless, I appreciate your will to help and your attempt at being humorous. Keepo- How to determine if an item is a "Members object"
But that would require me updating the list every time new content/items are released. Not very keen on that tbh.- How to determine if an item is a "Members object"
Thanks a lot for the code. Why does the API always require the tabSlot and the absoluteSlot. Wouldn't the absoluteSlot only be sufficient to locate the item? Might be a sily question, but why does the API itself not provide a method to find the tabSlot?- How to determine if an item is a "Members object"
Withdrawing all items from the bank and selling them to GE. Don't want to withdraw "Members object". Using it to clean worker accounts. Edit: Prior to hovering the item, I will need to make sure it's visible by scrolling to it. I'm looking at the Bank API but can't understand the difference between a slot, a tabSlot and an absoluteSlot. Could someone clarify, please?- How to determine if an item is a "Members object"
Not sure why it's throwing a NullPointer Exception. But it looks like the solution I was hoping for. Thank you! Edit: I'm retarded. Was using getInventory() instead of getBank() I'm tremendously grateful, Explv!- How to determine if an item is a "Members object"
I tried making use of ItemDefinition but couldn't figure out a way. Maybe I'm missing something. The API though! That's more like it! Thank you!- How to determine if an item is a "Members object"
I quote myself: In your opinion, does the string "Dragon dagger" contain "Members object"?- How to determine if an item is a "Members object"
Not relevant. Kindly revisit the question. I want to check if the item in a particular slot is a "Members object".- How to determine if an item is a "Members object"
I have no clue how to use that and Google isn't helping much. Could you kindly provide some context or provide a clearer example? - Max number of clients for free users