Everything posted by dreameo
-
Old SDN scripts
Yeah your gonna have to ask someone. I tried a couple of stuff, no luck.
-
Old SDN scripts
Get the ID of the script and then type in the following into your browser: 503 = ID of the script you want to remove https://osbot.org/mvc/sdn2/scripts/0?action=rmv&scriptID=503
-
Online Java Courses
Don't learn how to make a script. Learn java and then come write scripts. There are a million tutorials, any suitable. Find one that is best for you.
-
Checking if Xp has been gained In past (X) milliseconds
Hmm You might not want to block execution. You could create a global variable which keeps track of the current XP. Then you can make your check to see if your new XP is greater the the current. If it is, then just set your current XP to your new XP. Also: while(test() == true) // is equivalent to while(test())
-
My legit RS gameplay
Nice. Osrs is fun for me if you don't include all the manual work (quests, grinding, etc). Things like going into multi pvp with a group of friends always brings back some good memories.
-
Interacting with 2 of Same Item in Inv w/o Slots
You can use Pattern.quote to avoid having to worry about escape characters.
-
Osbot ignoring delays
Seems like your sleeps are being interrupted. Why, idk.
-
AIO FM - FM Anywhere
This is my mostly finished fm script. This is something you need to edit and compile yourself. If you can't do that, then this isn't for you. How it works: You can go to any location on the map and define that to be your area. An area gets defined from when you START the bot. So wherever you're standing, this is the beginning of your FM area. (Make sure that the area to your WEST is not cluttered) How large the area is, is defined by you. Check the Utils.java script. numberOfRows = how many rows consists of the area minAvailable = the minumum available slots to which a row should have in order for you to FM. So if a row had 25 free locations and your minAvailable was 20, then that row is one of the possible rows you can FM on and which the bot will use. maxRowLength = how far a row should extend. All the properties are in the Utils.java which you can play with and figure more out about the bot. I feel like it's easily modifiable so go at it. Ask away if you have any issues or questions. src.rar
-
GE Data
Seems like other snippets of getting item data didn't work so I just made one myself. Who knows how long this might last. If you're interested in storing values you wish to lookup instead of having to parse the json data stored, please implement it yourself (hashmap). I left it out on purpose. How it works: Usage: Code:
-
Script stacking somehow
I'm not sure if you have created threads but that's one way of the program 'carrying on' once you've stopped the bot. Don't think you can get much help without posting some source. In any case, I can only imagine the your source is a bit of a mess if you can't debug it yourself.
-
Dream GE Firemaker
details
-
PathWalk break
Code: So I just tried that and it seems to work fine. You just fill in whatever break condition you want. (You need to keep a temporary path so that as you traverse to each node, you delete it and then continue to next -> really depends on how you write your logic to START the walker)
-
PathWalk break
... -.- You can look at Chris's example or literally do what I said.. For each Position.. use the WalkingEvent until there are no more positions..
-
PathWalk break
You could try creating a path: ArrayList<Position> path and then use WalkingEvent to traverse to each point.
-
Dream GE Firemaker
Thanks
-
Dream GE Firemaker
haha banned from botting? no way
-
Open Source Oak woodcutter with semi-auto muling
Hi, I didn't fully look at your code but I see so many people doing this recently so I had to say something (bad open source code hurts the community because bad practices are being learned, not saying your code is bad or anything, just in general). 'This' keyword is used mainly for ambiguity. Example: public Class Test(){ private String name; public Test(String name){ this.name = name; } } People lately have been doing 'this.add()' where add() is a function that exists in the class that you're writing in. Don't do this.
-
Asking for help with my Farming Script
Just look in the API to see if message listener is available: https://imgur.com/a/Zzyv8rX
-
Opening all feather packs - Need help
Once you open a feather pack, yes the condition is no longer true that inventory is full, however you are still inside the code block. The code block will execute everything inside of it (that should be executed), it wont just exit because the condition changed. If you have it written so that it opens everything (example: iterate through all items and open), then you wouldn't be facing this problem.
-
Need help keeping bot in specified area
Here's how you go about doing it: If you're confused about how it looks, search up anonymous classes.
-
Need help keeping bot in specified area
yea, just use a filter when doing closest and return ground items pos is within x area
-
Question about InteractionEvent
I'm guessing each event was distinct? Event 1 - attempt: fail Event 2 - attempt: fail Event 3 - attempt: pass instead of Event 1 - attempt: fail Event 1 - attempt: fail Event 1 - attempt: pass Never tried interactevent befoh
-
My first script: Feedback wanted :)
There's a lot of things wrong lol but here's something I see a lot of people doing: interact method() // boolean New Conditional sleep... Your conditional sleep should only execute if the interact method is true. The way you have it written, the conditional sleep always runs regardless if the interact actually happened. It should always be like this: if (druid.interact("attack")){ insert conditiona sleep here... } It might be hard to get your head to wrap around it. You would think interacts should be a void right(void methods are usually actions and return nothing). Well if you interact, you want to know if it was successful. So that's why the action returns a boolean.
-
Why does my script attempt to attack a new npc
hmm.. I don't think the return condition is right, should be without the '!'. If you click eat, there's probably atleast 300 ms of no action which means your player isn't animating and it will immediately continue execution. If it loops fast enough in time (nothing else blocking execution) which it probably will, then it will double click or triple click until you do animate.
-
How to Multi-thread [Easy]
Here is how you can multi thread. Why would you want to? Sometimes you want to be doing x and y at the same time. In a single thread, you can only do one thing at a time. Note: There are different ways to multi thread and this isn't some kind of perfect way to do it. In this example there are two classes: Main Thread Demo thread (where we run our second thread) Demo Thread The most important thing for the demo thread is that you implement Runnable. The second most important thing is the boolean, 'run'. We need to tell the thread when to stop running because in this case, we are in a loop. Had there been no loop and we just began the thread, it would be like any other execution, it runs once and then ends. In that case, we wouldn't need to worry about storing a boolean. So here is the Demo Thread Example: edit: added volatile keyword to boolean - important! Main Thread We need to do one extra thing before we can start with our thread. Since I extended method provider, I need to exchange context (First line after the onStart method). Now the actual multithreading part you've been waiting for: haha, just create a new thread and run your instance of runnable . Yeah that's it.. Only thing we have to do is make sure we stop our new thread once we stop our script. If we don't, the additional thread we made will keep running even if we stop the bot. If you start and stop the bot several times, you'll have a number of threads (demo threads that we made) running. We created a flag that tells the thread when to 'stop' executing. In the onExit method, just use the stop method we build which sets the flag to false (stop running). Here's just a snippet of the output from the log: You don't have to multi thread and a lot of times, you can probably find solutions in a single thread instead of multi threading. Good luck