Everything posted by d0zza
-
Starting the script with a "start" button
You can have global variables in a script
-
Starting the script with a "start" button
Yes but scripting for osbot does have global variables.
-
Starting the script with a "start" button
I never said it should be static?
-
Starting the script with a "start" button
Have a global boolean called started that you set to be true inside the action-listener body. Then have an if (started) check in your onLoop.
-
[Experienced] [Reliable] [Affordable] d0zza's Private Script Shop | Fast | CLI Support | Mule Support | Dozens of custom scripts made
Bump
-
How do I set up breaks?
Did you have a script running?
-
Move away from other player
Instead of calculating the distance like that what you can do is if (myPosition().equals(player.getPosition()) And the reason why you're not moving is because your walking event is trying to walk to the player itself. WalkingEvent event = new WalkingEvent(player).setMinDistanceThreshold(3); should be WalkingEvent event = new WalkingEvent(the position you want to walk to);
-
agility or mining
If I were you I'd go for something with a higher xp/hr like cooking or fm to minimise botting time
-
[Experienced] [Reliable] [Affordable] d0zza's Private Script Shop | Fast | CLI Support | Mule Support | Dozens of custom scripts made
Bump
-
How to properly trade with players?
For accounts with spaces in their names you'll need to replace the space character with another character, see the second post in this thread
-
How to properly trade with players?
He's doing the same thing, just not storing the player he wants to interact with. Perform the null check anyway because I'm 99.9% sure that's the issue. If it still happens let me know.
-
How to properly trade with players?
Are you checking if the player is not null?
-
Cast spell (or preform any action) mid walking event
A WalkingEvent is continuously running while it's being executed, no other code in your script will be running while it's active. So in this case when you want to cast a spell you need to use setBreakCondition in the WalkingEvent API.
-
[Experienced] [Reliable] [Affordable] d0zza's Private Script Shop | Fast | CLI Support | Mule Support | Dozens of custom scripts made
Bump
-
How would i go about grabbing the value of items in my inventory?
The hashmap is not useless to you, you're just not using it properly. Please read up on the basics of Java and OO before trying to script.
-
How would i go about grabbing the value of items in my inventory?
Right now your key in the for loop when doing hash.get(i) is an Item, you need to use the item's name.
-
Define itemID to a number
Like I said in the other topic you made, use a HashMap, you can use a HashMap for item IDs too.
-
How would i go about grabbing the value of items in my inventory?
https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html A HashMap will allow you to link an item or String (item name) to a particular integer (item value).
-
Walking to Specific Position in POH
Why doesn't a WalkingEvent work? Oh if it's because of doors then maybe using build mode will work?
-
How would i go about grabbing the value of items in my inventory?
If you already have the value of all of the items and you've stored them somewhere, all you need to do is loop through each item in your inventory and add up each value. for (Item i : getInventory().getItems()) { totalValue += valueOfItem(i); }
-
Please tell me why I am bad at java.
Then answer your own questions genius.
-
Please tell me why I am bad at java.
You're arguing with a dev... If he tells you something isn't right in your code and you don't listen no one can help you.
-
Dispute against speechless
@Speechless asked for a private script, I quoted 90m for it, he said he only had 50m at the time and would pay me the rest by the 6th, he traded me 50m and once complete and tested I sent over the script, he hasn't replied to me since. https://i.imgur.com/N0vetYf.png https://i.imgur.com/j5Cn8jg.png https://i.imgur.com/EkpNhnR.png https://i.imgur.com/aKtfq4q.png
-
0.53 [☆1000 Feedback☆] [LIFETIME SPONSOR]?️EATING COMPETITORS[BULK]
Sold some mills
-
dSmither
Unfortunately I have no control over that speed as all interactions are handled by the OSBot API.