Everything posted by lare96
-
Post a good song
- Exporting script with dependencies?
??? Can anyone help with this?- Exporting script with dependencies?
- Exporting script with dependencies?
For some reason whenever I try and export my script with my osbot-helper dependency (contains event state hierarchy and some utilities to avoid copying and pasting the same classes from script to script) I encounter a weird issue. When the bot first starts up (Failed to load local script : <class>): [INFO][04/25 01:29:32 PM]: Welcome to OSBot 2.3.64! [INFO][04/25 01:29:33 PM]: Loaded 2 RS accounts! [DEBUG][04/25 01:29:33 PM]: You last logged in as : Lare96 [ERROR][04/25 01:29:34 PM]: Failed to load local script : org/cs/event/AntiBanEvent.class [ERROR][04/25 01:29:34 PM]: Failed to load local script : org/cs/event/impl/AttackEnemyEvent.class [ERROR][04/25 01:29:34 PM]: Failed to load local script : org/cs/event/impl/NavigateTabsEvent.class [ERROR][04/25 01:29:34 PM]: Failed to load local script : org/cs/event/impl/LootItemEvent.class [ERROR][04/25 01:29:34 PM]: Failed to load local script : org/cs/event/impl/MouseMovementEvent.class [ERROR][04/25 01:29:34 PM]: Failed to load local script : org/cs/event/impl/EatFoodEvent.class [ERROR][04/25 01:29:34 PM]: Failed to load local script : org/cs/event/impl/CameraRotationEvent.class [ERROR][04/25 01:29:34 PM]: Failed to load local script : org/cs/task/PlayerRunTask.class [ERROR][04/25 01:29:34 PM]: Failed to load local script : org/cs/task/AutoRetaliateTask.class [ERROR][04/25 01:29:34 PM]: Failed to load local script : org/cs/task/TargetMonitorTask.class [INFO][04/25 01:29:34 PM]: Loaded 1 local scripts and 0 custom random solvers! [INFO][04/25 01:29:35 PM]: You have 0 SDN scripts loaded. [INFO][04/25 01:29:35 PM]: Updated injection hooks for client revision : 77! [INFO][04/25 01:29:35 PM]: There are 138 scripts on the SDN. [DEBUG][04/25 01:29:35 PM]: OSBot is now ready! Then when I try and run the script: ERROR][04/25 01:31:12 PM]: Uncaught exception! java.lang.NoClassDefFoundError: org/helper/event/Event at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.getConstructor(Unknown Source) at org.osbot.cOM1.run(im:387) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.helper.event.Event at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 8 more It's almost like the dependency isn't being bundled in with the JAR file I export my script in (I have it set up to include all dependencies). Anyone else have this problem, or know a solution?- OSBot Helper - Making script development easier
The Event class implements Comparable so it's the natural ordering and I used Collections#reverseOrder so events with a higher priority come first. Also I know right now it's just an event-state system but I plan on adding more to it as I write more scripts- OSBot Helper - Making script development easier
Don't know if this is in the right section, but it's related to script development. If you don't want to read all of my blabbering, you can find the code here (criticism/feedback appriciated, sorry for the lack of code, im working on it still): https://github.com/lare96/osbot-helper Introduction While writing scripts and attempting to reteach myself everything I noticed that I had been rewriting the same code and using the same utilities throughout virtually every project. This was apparent most specifically with the event state system, that I was copying and pasting from script to script. So I thought I'd write an open source API consisting of all of these things I was using in all of my scripts anyway, to save time. Why this is useful Not going to go too too deep into details, if you're really interested just click the link to the repository at the top of the thread and check it out Has support for event state "priorities", more important event states can be validated and executed before less important ones. Has support for randomized sleeping times, that can be between customized intervals of your choice. Has "fallback" event support (an event that is executed when no other event can be validated), and you can set the fallback event to the event of your choice. Support for attaching an Object to an EventManager (such as your script instance), that can then be therefore accessed through your event states (through the "context" parameter). Well designed and very easy to use, especially for AIO scripts (fletching; for example, you can have several different event manager instances for each fletching activity) Support for "event loop" types: static (maximum one event executed per cycle, the highest priority event which is valid is executed) and dynamic (all events which are valid are executed regardless). And lots of other cool features even unrelated to the event system. There's a few utility classes worth looking at too. Usage An example of how the EventManager is utilized... @ScriptManifest(name = "ScriptExample", author = "lare96", version = 1.0, info = "Script example.", logo = "") public final class ScriptExample extends Script { private final EventManager manager = new EventManager(); @Override public void onStart() { ... manager.submit(new EatFoodEvent(EventPriority.HIGH)); manager.submit(new CombatEvent()); manager.submit(new MoveCameraEvent(EventPriority.LOW)); manager.submit(new LootEvent()); manager.setAttachment(this); } @Override public int onLoop() { ... return manager.executeHook(); } @Override public void onPaint(Graphics2D g) { ... g.drawString("Time Running: " + manager.getTimeRunning(), 7, 265); ... } } An example of how to create an event state... // Lets say in theory this event state logs our player out if their health is below a certain amount. public final class LogoutEvent extends Event { public LogoutEvent() { // This is a very important event, so we'd give it max priority. super(EventPriority.HIGH); } @Override public boolean validate(EventManager context) { ScriptExample s = (ScriptExample) context.getAttachment(); // Check if the player's health is below 10 here... ... return ...; } @Override public void execute(EventManager context) { ScriptExample s = (ScriptExample) context.getAttachment(); // And if the player's health is, log us out. ... } } Download Haven't bothered to export this as JAR file yet, because it's not completed. I'm going to keep developing this as I get more familiar with scripting and add on to it with more features. Once again, you can find the source code here: https://github.com/lare96/osbot-helper Any and all criticism is appreciated, be harsh!!!- OSBot BETA 2.1.1 - Proxy Support, CPU Enhancements, and More!
.. its ... its beautiful i wanna try this out so bad but I'm banned- Has your gf ever puked on your dick while giving you head?
dude that's gross, you need to pick em better lol- Camera rotation operations blocking forever?
turned out to be the client I was using, thanks for the advice pain. feel free to lock/move this or whatever.- Post your IRL pictures
am i the only black dude on this website- Camera rotation operations blocking forever?
EDIT: I did a bit of searching around and apparently there was a bug with the camera rotations in versions prior to 1.8.3, I'm using 1.8.1 which might explain the issue I'm having. I'm going to update to version 1.8.3 and test out the script again. I'll update the topic with the results. For the antiban portion of my script I'm trying to get it to move the camera randomly. I've accomplished this by using the rotateCameraPitch(int degrees) and the rotateCameraAngle(int degrees) methods. This works sometimes, but other times I encounter a problem where the script will literally just block (stop, pause, etc.) forever when its supposed to rotate the camera! I thought it might've been the values I was entering into the methods so I tried changing the random intervals with no luck. Anyone have similar problems? Any possible fixes for this? The code I'm using to rotate the camera: script.myPlayer().getClient().rotateCameraPitch(MethodProvider.random(30, 50)); and script.myPlayer().getClient().rotateCameraToAngle(MethodProvider.random(50, 200));- Am I likely to get banned botting on my main?
just bot smart and you'll be fine- hey yall
- Post your IRL pictures
I will post a selfie in my new black flag shirt later 8)- Scripter Ranks
I'm new here and I find all of the ranks a bit confusing, there's like three different types of scripter ranks that all seem to be closely related so I support this I guess- warning for drill demon random
I'm 99.9% sure jagex monitor bottling communities so they'll always be one step ahead of us- Theory about bans [READ]
the trick to not getting banned is to monitor your bot... don't do stupid shit like leave it on all night. Bot while doing homework or something and for gods sake talk every once and awhile to not make yourself look so bait it's so easy to tell that bots are bots because a lot of people feel the need to bot for a crazy amount of time like 20 hours... then you complain that you got caught? just take it easy- Anyone here into shoes/kicks?
waaaaaaaaaaat? prods are cheap in europe? they're more expensive than janoskis here in canada- My first script [Fishing]
thanks! about a week on and off, testing it took awhile. im used to runescape private servers where you can easily simulate things to test your work but with scripting I had to wait for certain things to happen in order to test them- Which CPU i need for 60 bots?
why would you ever need to run 60 bots...?- Anyone here into shoes/kicks?
i like skate shoes http://wallpaper.ouinfo.com/uploads/other/Nike-Stefan-Janoski-Black-White.jpeg- Fat
- What would you do if your child was Gay
lol this is a reaaaaaaally ignorant question what would you do if your child was straight?- My first script [Fishing]
There's only like one free fishing script in the SDN, and honestly it sucks... so I made my own fishing script. Here are some of my proggies, the bot was set to "break" every 1-2 hours at 25-45 minute intervals. It's not ready for release yet but it should be by this weekend This is my first script so any constructive criticism is appreciated (from what you can see at least). The script will literally run well for ages, if you look at one of the proggy pictures it ran good by itself for 8 hours, although I stopped it shortly after to do a quest Features Will evade whirlpools Will look for your equipment after a fish spits them out Interactive GUI Support for powerfishing Support for banking Anti-ban mechanisms Lots more I probably missed Progress Snapshots- Blocking events
sorry but while looking through the API I actually found exactly what I was referring to in this topic, if anyone wants to know what I was talking about: http://osbot.org/api/org/osbot/script/rs2/utility/ConditionalSleep.html - Exporting script with dependencies?