Jump to content

inlustra

Members
  • Posts

    14
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by inlustra

  1. Makes sense, the only issue I can see is that you need a single try catch to decorate (A main one) or you need the foresight to include this decorator in the offending method! Ah, the struggles of programming
  2. Nice little class, have you ever actually dealt with a weird system that could only be fixed by something like this?
  3. Hi , About time I posted an introduction! The name is Tom, 22 and I'm currently the lead software developer of a small company in London (Full-stack; AngularJS, Java back-end, Android and iOS). I was the creator of one of the first Minecraft Mod Managers (TFCMM), and I'm just getting back into scripting after a hiatus of around... 5 - 6 years? I wrote a Nature Runner using the fairy rings back when I was 14, which is actually how I started programming. My brother asked me to look into creating a few scripts for him, and one thing led to another, here I am! It's probably worth mentioning that I don't actually play Runescape anymore, just before the Wilderness was opened up for trading again, Jagex banned my main account - So I completely stopped. With that in mind, I'm not really looking to create mundane scripts as I really enjoy creating the frameworks behind the system. I'll be using this opportunity to teach myself some AI basics and have been looking at Bayesian probability models to try to map the way the user moves the mouse with a goal in mind (Like a learning phase). I'll be perfectly honest, I have no idea how this is going to work, but I enjoy the challenge! As a side note, I came up with another idea last night, we should create a visual programming experience for creating scripts! For those of you that know of scratch (https://scratch.mit.edu/projects/editor/) I think this could be a great way to create scripts... I'll be releasing a library soon of all of the snippets and tidbits that I've acquired over the past week in a Gradle project that should kickstart the development of scripts (I know there are those out there, but I wanted one for myself, that I can place on github!). Still learning the API, which can be frustrating at times, so I might often ask stupid questions - apologies. Thanks guys, Looking forward to being part of the community!
  4. Ah ok! Thanks, that actually enables console output. Now, the second issue - I still can't add my own arguments to the OSBot client! :'(
  5. Whaaaaaat...? Brand new, just downloaded: U:\Downloads>java -jar "OSBot 2.4.43.jar" U:\Downloads> <----- this happens just after I click login. (The original process is stopped.)
  6. I'm confused, did you guys read the question? :P or am I genuinely stupid, because at the moment, the process still gets spawned... Thanks, seems stupid, makes it impossible to attach JRebel to my classes :'(
  7. Can it be done? Running the downloadable jar with java -jar OSBot 2.4.43.jar Causes the jar to spawn a separate process. How can I run the actual client? Thanks.
  8. Thanks, Best explanation so far, but it actually confirms my suspicions that the mouse handling of the bot was written somewhat poorly where they've decided to implement a custom interface rather than use default Java. Again, by forcing the use of blockInput(Point point) (infact, I'd be totally fine with a method `blockInput(MouseEvent event)`), I don't have access to any of the InputEvent parameters from my inner-components, which means I'll need to create some kind of wrapper! *sigh* Do the devs accept any developer git-branching? Thanks again.
  9. Honestly, Bootstrap is the easiest of Frameworks to grasp but - it's getting old now, I know some people won't agree with me on that one. Depending on your backwards compatibility, seriously look something like Material Design Lite that uses a flex layout. Avoid jQuery if you can, it's useless nowadays and it'll do you much better to learn raw Javascript, especially with the advent of ES6 Honestly, if you want to learn javascript, learn AngularJS, it's tough to start with but it's amazing when you get the hang of it!
  10. No, this is the thing, I want to block user input depending on where they click (Did they click in my rectangle?) My component system wraps the MouseEvent using a custom class that modifies the x and y relative to the component: if (this.mousePressed(new LightMouseEvent(e, this))) e.consume(); Which ultimately doesn't matter because e.consume() wasn't implemented :P I thought maybe someone knew if there is a specific implementation I can hook into using one of the many addMouseListener functions out there, such as getBot().getWrappedCanvas()! There's definitely a Frame with the same implementation. What's the difference!
  11. Thanks for your input, but that's not really my question. I understand how to use the MouseListener interface, my question is about the logic behind blocking and input from the user. Currently, you can override BotMouseListener and return false on the blockInput(Point) method in order to stop a users input from reaching the canvas. Not only must this require extra logic behind the scenes (instanceof BotMouseListener?) but the MouseListeners also take no notice of the isConsumed() method in the MouseEvent classes. Either I'm missing something or the devs have implemented it differently. For example: @Override public void mouseClicked(MouseEvent e) { e.consume(); //This does nothing! :'( log.trace("Consumed click event."); } @Override public boolean blockInput(Point point) { return true; //This does! But I don't have access to the MouseEvent! :'( } The MouseEvent is still fired on the Frame/WrappedCanvas
  12. Hi guys, Pretty simple: I'm making a component system using the g2d (Have made). I have to ask, what's with the BotMouseListener, how does it work? (Docs are empty) where does it interact? and how does it differ from the regular MouseEvents and Listeners. My issue is with the blockInput(Point) method, why? Why not just use the regular Java consume()/isConsumed()? The blockInput(Point) method does not allow components to differentiate the click by any other method (Such as modifiers) Why not just use consume? Thanks, Tom
  13. Thanks, just getting into RS Script development myself and this kind of API specificity would have probably taken a couple of minutes to find. You could improve your code! No need to declare the flag variable. private boolean healthAbovePercent(double p) { double dynamicLvl = getSkills().getDynamic(Skill.HITPOINTS); double staticLvl = getSkills().getStatic(Skill.HITPOINTS); return dynamicLvl >= staticLvl * p; } Why not take it one step further? private boolean healthAbovePercent(double p) { return skillAbovePercent(Skill.Hitpoints); } private boolean skillAbovePercent(Skill skill, double p) { double dynamicLvl = getSkills().getDynamic(skill); double staticLvl = getSkills().getStatic(skill); return dynamicLvl >= staticLvl * p; }
×
×
  • Create New...