-
Posts
240 -
Joined
-
Last visited
-
Feedback
100%
Everything posted by BravoTaco
-
Elemental Binder [Open Source Runecrafter]
BravoTaco replied to BravoTaco's topic in Resource Crafting
Oh I think I uploaded the wrong .jar .jar link- 48 replies
-
- open source
- runecrafting
-
(and 1 more)
Tagged with:
-
Elemental Binder [Open Source Runecrafter]
BravoTaco replied to BravoTaco's topic in Resource Crafting
This is interesting. Are you opening separate clients for each bot? Or clicking the Add bot button to add new bots? Also if its walking back to get essences than somehow its not detecting the essences in the inventory. In the method that retrieves essences the first line is this: if (script.getInventory().contains("Pure essence") || script.getInventory().contains("Rune essence")) return; So if essences are detected than it will exit that method. The only way it could be executing is that the bot can't detect any items in the inventory. When, in this scenario, it completes it's walk back to the bank does it break? Ill add a log statement to log all the items in the inventory before it walks to get essences so you can tell me if it is able to detect any items. .jar Edit: I was able to run 2 mules until I ran out of essences each account had roughly 600 each.- 48 replies
-
- open source
- runecrafting
-
(and 1 more)
Tagged with:
-
Elemental Binder [Open Source Runecrafter]
BravoTaco replied to BravoTaco's topic in Resource Crafting
I had a logic error when calculating the local path to see if its usable. I believe that was what was causing it to get stuck. I added a check before initiating the walking event to the bank to get essences, hopefully that fixes it. .jar- 48 replies
-
- 1
-
-
- open source
- runecrafting
-
(and 1 more)
Tagged with:
-
Elemental Binder [Open Source Runecrafter]
BravoTaco replied to BravoTaco's topic in Resource Crafting
For some reason when grabbing player names if they have a space in it, it will sometimes count the space as a non-breaking space which will return code 160 while the normal space code is 32. I had to create a method that used a string regex to remove all white space, non breaking and regular. Than compared those names. Method here: public static boolean stringMatchesWithRemovedWhiteSpace(String string1, String string2) { if (string1.length() != string2.length()) return false; string1 = string1.replaceAll("\\p{Z}", ""); string2 = string2.replaceAll("\\p{Z}", ""); return string1.equalsIgnoreCase(string2); } I will look into the area problems and the banking problem. Essences traded not resetting will be fixed in the next update.- 48 replies
-
- open source
- runecrafting
-
(and 1 more)
Tagged with:
-
How exactly does ConditionalSleep/Sleep and onLoop work together?
BravoTaco replied to ultraswagger's topic in Scripting Help
Hmmm interesting is this directly in the onLoop() or are you calling it from somewhere? Also I noticed that if the inventory is completely empty than inventory.onlyContains() method will return true. Try this: new ConditionalSleep(Integer.MAX_VALUE) { @Override public boolean condition() throws InterruptedException { return !getInventory().isEmpty() && getInventory().onlyContains("Something"); } }.sleep(); -
Elemental Binder [Open Source Runecrafter]
BravoTaco replied to BravoTaco's topic in Resource Crafting
Because of the way the old load system worked I had to restrict the area in which the Crafter would detect the mule. Because of partial name matches if another random player is nearby than it would think that is a mule and would trade it. But I have finished the new GUI for now and with it added the new Save/Load system. I think if you manually select the X in the bank and the amount is set to what it needs it will left click it instead of right clicking? I can't remember though. Using OSBot's API method to withdraw from the bank ATM. If it doesn't do it let me know and I'll implement it. I will change the UI Text 'Runes made' to 'Essence's traded' for mules in the next update. Edit: Added the UI text. Fixed a bug with not detecting the runecrafter. .jar link- 48 replies
-
- 1
-
-
- open source
- runecrafting
-
(and 1 more)
Tagged with:
-
Elemental Binder [Open Source Runecrafter]
BravoTaco replied to BravoTaco's topic in Resource Crafting
Np. Currently working on the new GUI with the new Save/Load functionality.- 48 replies
-
- 1
-
-
- open source
- runecrafting
-
(and 1 more)
Tagged with:
-
Elemental Binder [Open Source Runecrafter]
BravoTaco replied to BravoTaco's topic in Resource Crafting
Changed the walking conditions and the walking method. Also changed the trading to Trade-all. I was originally using a Trade-x amount while detecting how many free slots were in the other players inventory. I think it might have been messing up on that calculation. With this latest patch I ran it until Mirror mode crashed on me, which was for about an hour and half. It never got stuck. So hopefully its good now... I am probably going to re-write the saving and loading functionality. If so I will make it so it changes all the settings to their set state. .jar link- 48 replies
-
- open source
- runecrafting
-
(and 1 more)
Tagged with:
-
Elemental Binder [Open Source Runecrafter]
BravoTaco replied to BravoTaco's topic in Resource Crafting
Might be fixed? I couldn't reproduce the result so I refactored some things, and added some more checks. .jar link- 48 replies
-
- open source
- runecrafting
-
(and 1 more)
Tagged with:
-
Elemental Binder [Open Source Runecrafter]
BravoTaco replied to BravoTaco's topic in Resource Crafting
Ill look into this when i get home.- 48 replies
-
- 1
-
-
- open source
- runecrafting
-
(and 1 more)
Tagged with:
-
Elemental Binder [Open Source Runecrafter]
BravoTaco replied to BravoTaco's topic in Resource Crafting
Yeah I think that's how it works for all of the altars. Don't remember why I decided to do it that way though.- 48 replies
-
- open source
- runecrafting
-
(and 1 more)
Tagged with:
-
Only thing I noticed is that you use 'this' keyword when its not needed. Usually 'this' is used within methods that have parameter names that are the same as declared variable names in the class. Example: public class Float3 { private float x, y, z; public Float3(float x, float y, float z) { this.x = x; this.y = y; this.z = z; } public float getX() { return x; } public float getY() { return y; } public float getZ() { return z; } public Float3 add(Float3 other) { x += other.x; y += other.y; z += other.z; return this; } public Float3 addNumberEqually(float numberToEquallyAdd) { Float3 temp = new Float3(numberToEquallyAdd, numberToEquallyAdd, numberToEquallyAdd); //this.add(temp); 'this' is not needed here. add(temp); return this; } }
-
How is your artifacts tab set up? The .class file is the wrong thing to be placing into the Scripts folder. You need to build out a .jar and have that in their. Example of the artifacts tab:
-
Elemental Binder [Open Source Runecrafter]
BravoTaco replied to BravoTaco's topic in Resource Crafting
Surprised this still works. Haven't updated it since September. When you don't have the required level it will print it out in the logger. But I added a quick message box to also display this. I changed the sleep time for interacting with the portal should make leaving faster. .jar link: jar file- 48 replies
-
- open source
- runecrafting
-
(and 1 more)
Tagged with:
-
Tasks Timer overriding another classes timer
BravoTaco replied to Tylerart's topic in Scripting Help
Oooh you are talking about it not getting called within the main thread until the pause is over. This is just a logic thing though? The sync call is made to block the current thread it is running on. In knowing that you would just have to structure your code for it. -
Tasks Timer overriding another classes timer
BravoTaco replied to Tylerart's topic in Scripting Help
This is true but if you run the async event first it can execute while the sync one is executing. Just depends on the order of which you are calling your tasks. -
Tasks Timer overriding another classes timer
BravoTaco replied to Tylerart's topic in Scripting Help
I believe what is happening is the Task is an Async operation causing the task to run, but not freezing the rest of the code execution. I created a CustomEvent class that can be set as an Async operation or kept as a Sync one. Example: -
Thanks dude. Yeah, the only reason I was doing this was to apply for S3, as you have to contribute something unique before applying. Work got in the way though and I had to put off development. Np
-
Link To The GitHub Link To The .Jar File I was working on a visual scripting script a while back, kinda forgot about it, and I see that @ProjectPact has made something similar. So I'm going to release this as open source as I probably wont be working on it any longer, as Pact's script has way more functionality and options than this has. I was thinking about finishing it, but looking back at the code base I realized that things could have been done a lot cleaner, and more efficient. If I were to ever go back to this I would much rather just re-write the thing than try to refactor everything. Some information about the script: Script works as normal scripts do, add the .jar file to the scripts folder than run it. You will than get the GUI to create/load scripts. Save/Load Functionality using Serialization Can edit the script while it is running (Might run into some bugs with this). Shows which node is currently being executed. Has more information about the GUI and different actions you can do in the top right corner of the GUI. Types Of Support: Player Inventory Interaction Sleeps Walking Widgets Logger Banking Pictures:
-
Forgot about that. You can make the bounding box smaller after retrieving it to give a tighter area to click within. Would reduce the amount of differing positions when moving to the point but if the offset is small enough it should be ok.
-
If you just need the position of whatever you are trying to click, and the object implements Entity, you can retrieve the bounding box of said object. Than use your mouse movement logic to move within the bounding box, than interact with it.
-
HELP! How to make script LOGOUT for specific time interval
BravoTaco replied to m4tis's topic in Scripting Help
Why not use the built-in break manager? Gujarat is correct. If you just want it to break for a certain amount of time I would create a synchronous event and call that when you want to break. -
I believe both would require roughly the same amount since I think they would both have to loop through all the active widgets to retrieve the correct one. Also once you have searched once for the widget you can than reuse that variable instead of searching for the widget again. That way you will only have to run that code once.
-
The easiest way around the "failed to create advertisement" is to just spam open a bunch of clients the first tike you are opening them. Than just close the ones you dont need. You could also make a .bat file to open them all.
-
There are different types of variables. Main ones in java I think are class variables, local variables, and instance variables. Local variables - These are created inside of a method and are destroyed once the method that contains it has been exited. Instance variables - These are declared outside of any method and will hold the value assigned unto it until the program has finished executing or until you assign a different value to it. Methods inside of the class can reference this variable and other classes can as well, as long as, the variable is set to public or you have Getters and Setters. Class variables - These are very similar to Instance variables, except they are declared static. Having this type of variable means that there will only ever be one version of it. And to access this variable you have to call the class name than the variable or a method that returns the variable. Code Example: public class Driver { private static String string = "Example String"; // This is an example of a Class variable. private int amountOfCoins; // This is an example of a Instance variable, Not setting a value will set it to its default which is 0. public static void main(String... args) { // In order to access the amountOfCoins I will have to create a new object from the class that contains it. Driver driver = new Driver(); // Creating of the class and setting it to a local variable. // To modify or retrieve the value of amountOfCoins in a different class I would have to use Getters and Setters since it is declared private, // but since I am trying to use it in the same class I can access it directly regardless if it is public or not. // To access the variable I will first call the local variable that I created than call the amountOfCoins variable. System.out.println(driver.amountOfCoins); // To change the amountOfCoins variables I do the same thing except set it equal to a different value or do some math with it. driver.amountOfCoins = 1_000; // Setting the amount of coins to equal 1000. System.out.println(driver.amountOfCoins); driver.amountOfCoins += 1_231; // Adding 1231 to the amountOfCoins. System.out.println(driver.amountOfCoins); // To access the Class variable you would have to call the class directly followed by the Getter or the Setter method if you are using it outside the class. // Since I am in the same class, I can just call it. System.out.println(string); string = "New String"; // Setting the string to equal "New String" System.out.println(string); } }