Jump to content

Vilius

Scripter II
  • Posts

    1495
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Everything posted by Vilius

  1. You used the meme confession bear, which by what you wrote on the image is not a confession its more like "Socially Awesome Awkward" and at the top: "I was expecting a new moderator" at the bottom: "But it was the same old one" pls know your meme fam
  2. Wow, I find your topic very offensive with the f word in it that is targeted against us users. (wrong meme too)
  3. Well hasnt that "resizable mode solver" told you something? Its there for a reason so shit break
  4. I wont leak his methods, dont bother asking
  5. But why name an inanimate object?
  6. make a graphics var Graphics2D paint = (Graphics2D) g.create(); and do: paint.drawString(); etc. I think its because you are using an entity debugger which overrides your paint.
  7. You can make an area in lumby and walk from it to cammy with one line, the spacing between the areas can be as big as you want. It will even handle boats, obstacles for you.
  8. Vilius

    onPaint caveats

    wew, you are quick, guessing its the same in bed with a girl?
  9. Just make 2 areas where you want to walk Area area1 = new Area(x,y,x,y); Area area2 = new Area(x,y,x,y); And simply walk to any one of them by doing: getWalking().webWalk(area1); getWalking().webWalk(area2); by using the webwalker you dont need to have predefined paths, it makes a new path for itself to walk which is far better.
  10. Android developer at google, huh? pics or didnt happen when you go to work take a picture of you holding up your osbot username and I believe you
  11. Lmao, I saw singing bots too
  12. wooo Just bummed there is no
  13. Runescape updated, client hasn't, please calm your tits and wait till the developers update the client. And for god sakes don't come to the chatbox and ask "OMG HALP MY BOT NO WORK AFTER UPDATE, PLS FIX" You will just piss people off and noone will help you. -Much love, Vilius and the osbot community p.s really calm yo tits.
  14. I appreciate the constructive criticism my friend
  15. So, I have seen people struggle pausing their scripts while their gui is open. Sometimes they try using a boolean public void onStart(){ gui.initComponents() pause = true; } public int onLoop(){ if(pause == false){ //do stuff } } In theory it works, but its not really what you want to do, do you? You essentially want to halt the scripts thread from working until the gui is closed or the start button is pressed, because you only want it to start doing stuff only after the user has his settings done so this is where synchronization of objects comes into play. we just add this to your main class: public class Main extends Script{ Object lock = new Object(); public void onStart(){ GUI.initComponents(); synchronized(lock){ lock.wait(); } } public int onLoop(){ return 100; } } And it halts the thread. When a thread invokes a synchronized statement, it automatically acquires the intrinsic lock for that method's object and releases it when the method returns. Every object has an intrinsic lock associated with it. A thread that needs exclusive and consistent access to an object's fields has to acquire the object's intrinsic lock before accessing them, and then release the intrinsic lock when it's done with them. But now you are asking how is my gui functioning if my script is halted? Its because the gui will be handled on another thread which the synchronized statement doesn't affect. Alright, so we know we halted our script thread, now what? We need to start it again, so we know our gui is handled on another thread which is not affected by the synchronized statement, which in term would mean the thread is "free" to do anything with the object So we just do this on the button: JButton button = new JButton("Start"); frame.add(button); button.addActionListener{e ->{ synchronized(main.lock){ main.lock.notify(); } frame.setVisible(false); } as we notify the object, the object now releases its intrinsic lock and lets the script thread run as normal as before the lock. Hope you learned something. If I have made mistakes feel free to correct me
×
×
  • Create New...