Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

fixthissite

Trade With Caution
  • Joined

  • Last visited

Everything posted by fixthissite

  1. That doesn't enforce any compile-time safety, which is a pretty big factor in API design. Imagine if the entire JDK was built without compile-time saftey measures; the cognition required to write a program would be rediculous. It's best to inform the developer of a problem as soon as it happens (compile-time). If not possible, inform them at runtime (excpetions). Logical errors should be prevented at all costs, reducing the amount of "wtf moments" (not being able to easily explain the result of the code) and undocumented rules
  2. This was a design I use in cases where configuration should be set by the client (person using your code) for a framework. The idea is to allow the client to specify the configuration, but prevent the client from storing an instance of the Config so it can be modified later on; a truely immutable config. This is a design I came across myself through experimenting. It started by simply passing the client a Config object, which is used to specify type-safe configurations as well as guide the client by showing them their options (which properties should/can be set) through templates. This means when you put a period after config, it'll give you all the available methods you can choose from, leaving out any irrelevant methods. public final class Config { //details needed by the framework, but not by the client Config() { } //declare setters so the client can specify //declare getters so the framework can access } public abstract class Framework { public final void start() { //check if running Config config = new Config(); init(config); //use config } protected abstract void init(Config config); } public final class MyApp extends Framework { protected void init(Config config) { //set config through setter methods } } The idea was to hide the ability of creating a Config from the client. The framework would pass in the config, ensuring the client couldn't create "garbage" config objects. The problem with this is that MyApp can store the config object in a field, allowing the client to mutate it (change it's state) later. Our Config is not immutable, because we NEED to set the values in a place other than the constructor. We could implement validations in the config's setter methods, to ensure each field is only set once, but that would be quite a bit to manage. To fix this, I implemented a Builder for Config. The Builder pattern allows the developer to specify the properties of an object, then build it afterwards, allowing immutability after building. To do this, we pass the responsibility of creating the Config class to it's builder. The developer uses the builder to specify the properties (which are stored in the builder). Once you decide to build() the object, the Builder passes itself to the constructor of the object we want, initializing the fields with what we specified in the builder: public final class Config { //private final fields private Config(Builder builder) { //use builder to init final fields } public static final class Builder { //config properties; will be transfered to Config public Builder setProperty(...) { //assign to field return this; } public Config build() { return new Config(this); } } } Instead of passing a Config object to the client, we would pass a Config.Builder object. This will allow them to set the properties of the config, while ensuring the properties are immutable. There's a downside to this: Framework doesn't have any access to the config the client builds right now; it simply creates the builder and passes it to the client. We need to have the client return it: public abstract class Framework { public final void start() { Config.Builder builder = new Config.Builder(); init(builder); } protected abstract void init(Config.Builder builder); } public final class MyApp extends Framework { protected void init(Config.Builder builder) { return builder.setProperty(...).build(); } } The client can hold a reference to the Config, but is unable to mutate it. Although this works, we can see that the client doesn't have any reason to know about the Config. We can remove the client's ability to access the Config by removing their ability to build it, and forcing them to return the builder after they specified the properties (allowing the framework to build it). Simply protect the Builder#build method (as well as Builder's constructor; no reason the client should be able to instantiate it). The final API design looks like: public final class Config { private Config(Builder builder) { } public static final class Builder { Builder() { } Config build() { return new Config(this); } } } abstract class Framework { public final void start() { Config config = init(new Config.Builder()).build(); //use config } protected abstract Config.Builder init(Config.Builder builder); } public final class MyApp extends Framework { protected Config.Builder init(Config.Builder builder) { return builder.setProperty(...); } } I don't expect this to be used, seeing how a system like this is not needed in scripting. I just thought some programmers may be interested in such development processes. I also criticise this as being verbose, but it's a step up from "no design". Responsibilities, encapsulation and enforcing a "hard to misuse API". This also may seem like a complete overkill to those who don't care for strong design, so if you're a "if it works, good enough" kind of developer, this is obviously not a topic for you :P Feel free to leave feedback!
  3. I want detailed answers (multiple sentences). It'll help weight out any questions you choose not to answer. The more you can tell me, the better chance you have at getting the answer right.I've noticed that some questions can have very similar answers if not explained in detail. If you notice 2 answers seem too similar, dig deeper into it. I wouldn't put questions put that have the exact same answers
  4. Reminds me of South Park: Human Centipad ;) Just don't use his services
  5. I didn't say anything about "cheap", nor do I expect anyone to be able to answer ALL these questions. Please check out my other posts. I have explained this a few times already.If you want to take the quiz, please send me your answers in a private message. Although I encourage devs to research, I don't want devs getting all the info basically handed to them in a neatly formatted post :P Hope you understand, and I hope to see an attempt!
  6. These modifications are allowed, and I really hope they take place /:
  7. Don't worry, I'm aware. But Google is one hell of a tool. If they can look into it and explain it in their own words, there's hope. I do not discourage looking into the questions (I actually encourage it). This is not to see how much you know right now, rather than how eager you are to proceed.Feel free to give it a try! All answers are confidential, and you will be given the correct answers afterwards (for learning purposes). Although the amount of answers you get correct do impact my decision, it's due to the low amount of right answers reflecting your ability to gather data, which is definitely something I'm not fond of. If you can't look into the subjects, then you probably won't qualify. Believe it or not, I've actually received some excellent answers. Although some questions go unanswered, that's perfectly fine with me (as mentioned in the original post). I hope anyone who is interested in programming will give this a shot! That way, I can give correct answers in context to your other answers (or possible misunderstandings). I will be releasing the answers on Monday, but that will not compare to the 1 on 1 answers you could get by filling out the quiz in a private message!
  8. fixthissite replied to Matt's topic in Introductions
    Feel free to message me at any time to chat about programming I also have a few guides in the Programming Help > Tutorials section, so feel free to drop by there and criticize where possible! Welcome!
  9. I've never used IP, but I'm aware that such modifications are possible for other forum providers.Hopefully we'll get some kind of statement on this, cause the "homepage navigation not appearing on mobile" issue is extremely tedious /: (and I just noticed your message; replying now )
  10. When you write a message, it'll auto-save. This is only available in the full editor. I hardly use the full editor due to the fact that I can't see other messages while replying. When on my phone, it's hard avoiding all the ads and other clickable links/buttons while posing, so I tend to waste a lot of time writing messages. Please, add auto-save to the quick-reply editor. There's no reason to even use the full editor in my eyes, seeing how I can format my text just the same in the quick-reply editor. While using the generic Quote button, the blinking cursor will randomly get out of sync with my mouse clicks. To fix it, I gotta click on something else (so the text box loses focus), then click on it again. Tedious stuff. The navigation doesn't appear on your homepage while on mobile. To access the forums, I have to include /forum at the end of the url. Tedious stuff. Mobile doesn't have formatting tools (not even in the full editor). When I request for desktop site, it appears. This has been going on for a while now (ever since I joined the community), and it doesn't seem like anyone is pointing it out. I use my phone 90% of the time I'm accessing the internet. Please, make the site functional for mobile. I don't care about the viewport, as long as I don't have to jump through hoops to do some basic stuff. Chrome on Android may refresh a tab as well, depending on how long you've been away from it. My guides are sometimes long, and I write them in chunks (I'm a busy guy, gotta pace myself). When I go back and notice all my work is gone, I don't even bother re-writing it. All those guides down the drain Thanks for reading. I'm simply asking for fixes; for all I care, they could be cheap fixes. I just want to be able to use this site without worrying about leaving the page by clicking the wrong button, with all my work going to waste. By the time I'm finished writing a guide on my phone, I pop out the good ol S Pen, zoom in all the way and make sure i hold down the send button until a fragment pops up asking me "open in new tab?" confirming the link. I feel like a paranoid freak just trying to publish my stuff. As the scroll bar gets smaller (and my guides get longer), I start getting anxious, questioning "is it worth it? should i continue?" and "why do i keep putting myself through this". You know, questioning life and stuff... Auto-saving on quick reply and fixing the formatting system (and auto save system) for mobile would do wonders. I'm sure others use their phones as well!
  11. fixthissite replied to Apostle's topic in Introductions
    Hey, I'm Vince, a computer scientist in the making If you need any advice, feel as if you might be able to teach me a thing or two, or just want to chat about computers, feel free to message me! I'm still somewhat new when it comes to the botting scene, but I'm slowly getting the hang of it. If you have any botting questions, I'm probably not the best person to go to right now for that (as I still don't know ALL the details), but I could probably assist on anything else programming. So don't be shy Welcome!
  12. I don't get it. He's getting in trouble for being social? Is he posting spam or something? If not, I see nothing wrong. Make friends, socialize.. Especially since the chat box is not currently available, you would expect such behavior. People get bored and want to chat.
  13. What is the purpose of this question? Why do you want to know the things you can and can't do in a script? What are your plans? Would be easier to mentioned what you were planning on doing. That way, we wouldn't have to exhaust every stupid possibility (like no porn, no hacking, no killing the president, no hunting til hunting season...)
  14. It's actually one of the first subjects tackled in the AI wiki ;) You got the syntax correct And you're right, having a generic interact script would be extremely useful, although I'm not too fond of the lack of type safety with Strings. I would most likely make constants through enums. If you're interested, I'm actually looking for developers to partner up with me on some (potentially profitable) botting related projects. I have a quiz to test your Java skill (but from the looks of the replies, it seems to be more of an introduction to a lot of things :P), which I'm using to find developers to work with. I don't expect anyone to answer EVERY question, but I do hope they do a little research before answering, and to give an explanation in their own words rather than ripping off the internet. You can find the quiz here. If you're interested, please send me the answers in a private message I understand you have your own scripting thing going on, so I would totally understand if you don't want to. Although I'm not expecting you to drop what you're doing to work with me, as long as you can still put in what you would be credited (and paid, if its a profitable project) for.
  15. Same here (until I sold my account). Was a level 3 skiller with all 50+ skills, a few 90s, 79 slayer, finished lost city (zanaris peng ;)), about 5 tracks from air guitar, and not a single 99
  16. Feel free to research every question independently As long as you understand it, then you'll be good. I'm not looking for people who already know this stuff (although that would be nice, it would be rare on here), rather than people who are willing to learn and able to learn independently; I don't wanna be holding hands through-out projects if you catch my drift.As I've informed others, just give it your best. If you feel you aren't knowledable enough, I will tell you the answers after so you can look into it if you're interested. This could be a learning experience. All I'm looking for is people who know this stuff, whether it be they know it now or they know it after researching the questions in this post. It's easy to tell when someone is BSing once they get out on the field, so feel free to get as familiar as you want with these topics now, possibly fill out the questionaire tomorrow or the day after (or however long it takes you to familiarize yourself with a lot of this stuff; doesn't even gotta be all of it. Like I said, I don't mind teaching as long as it's not EVERYTHING) Could you please send this is a message so other's don't get an easy "quick fix" lesson? I guess it's not THAT big of a problem, since people can just google.. But i'd rather them have the experience of looking, possibly stumbling across something else that may spark their interest Also, I can easily reply, going over any answers you may have gotten wrong without switching back and fourth from messages to this thread
  17. fixthissite replied to Pecman's topic in Spam/Off Topic
    Don't think he has ever said "Forghetti". You mean "vomiting on his sweater already, mom's spaghetti"? Or am I missing a joke here
  18. Great! Don't let any of the questions discourage you; I'm not judgemental at all. I respect trying over not trying anyday (as long as no one gets hurt..). I'm actually hoping developers who don't understand these topics look into them. I never said you couldn't use google, as long as you actually understand it, explaining it in your own words. It's easy to tell when someone actually knows something, and when they only know of it, especially when they get out on the field ;)
  19. I understand a lot of these questions are pretty advanced. The advanced questions are there to hopefully spot out the more knowledgable developers in the community. I don't expect scripters to know EVERY answer. Even less than half would be acceptable. As long as you know SOME of the answers, I'm sure I'll be able to easily snswer the rest for you. This will help me get an idea of your view on programming. Even if you answer questions incorrect, your reasoning for your answer could still be impressive, thus showing me you have a good philosophical view on programming It's to partner up with me on future botting related projects. Whether or not you feel the quiz is worth partnering up with me is your belief. As for the projects I have planned, I'd prefer only to unveil them to developers who have a good programming mind-set; would rather not waste the time explaining things to someone who may not fully understand
  20. That is my plan Hopefully this could be a learning experience as well. Don't feel discouraged to take the quiz. Even if you can only answer 5, depending on the questions you answered and the answer given, you might still have a good philosophical view on programming, which is enough to get me WANTING to teach you this stuff. No one else will see your answers, and I will not mention anything of your skill to anyone else; completely confidental!
  21. I will no longer be accepting answers. Thanks for everyone who participated! I'm glad to hear a lot of people found it to be a fun learning experience I'm sorry for the delay on the answers. I have been quite busy the past few days, and I'm hoping time frees up in the future. The developers I have chosen will be taking some courses I have designed (and might release in some form..) to ensure they are ready for what's to come! Once again, thanks for the patience and participation. Great things are to come ____________________ Preface: So I'm finally getting into the botting/scripting scene. I have quite a bit planned, and it would take quite a while to push these projects out without some help. So I created a short quiz for anyone who may be interested in working with me on some projects. I don't expect all questions to be answered; this is more to get an idea of what you know. I don't mind teaching before bringing you on board, as long as you have a good view on programming already. You can take this quiz even if you aren't interested in working on botting related projects with me. Please send your answers to me in a private message, so others can't copy! A few of these questions may be googlable, so I expect an original answers in your own words. I've bee all up and down google, so don't try to be sneaky Positions are no longer available! Sorry! Quiz (with answers): 1. What's an efficient way to measure elapsed time in Java? Why? Anything independent of the system clock (such as System.nanoTime()) to prevent interferences while measuring time (manually changing the clock) 2. What's the difference between java.util.Timer and javax.swing.Timer? swing.Timer executes on the Event Dispatch Thread. util.Timer executes on a background thread 3. Why do we use synchronization in multithreaded applications? To ensure sequential memory ordering between a release and subsequent aquire of two locks, and to prevent thread interference 4. What is immutability? Give an original example of immutability The inability to modify the state of something. public final class ID { private final Picture picture; private final Date experation; public ID(Picture picture, Date experation) { } //no setters; prevent client from modifying //some immutable classes use setters like this: public ID changePicture(Picture picture) { return new ID(picture, experation); } } 5. Java divides memory into 3 main sections. What are these sections and what purposes do they serve? Thread Call Stacks - stores the frames of execution (in the form of methods) as well as local values. Heap - stores objects and their instance values. Metaspace - stores class data and static values 6. If you notice your application consuming a lot of memory due to short-lived object not being collected by the GC often, what do you do? Tune your heap. In this case, shrink your young generation (more specifically, edan space) 7. class Game implements KeyListener, MouseMotionListener { private Player player = new Player(); private Dragon enemy = new Dragon(); private boolean[] keys = new boolean[300]; private Point mouseLocation = new Point(0, 0); public void update() { if(keys[KeyEvent.VK_UP]) player.move(Direction.NORTH); // handle other input events } public void keyPressed(KeyEvent e) { keys[e.getKeyCode()] = true; } public void keyReleased(KeyEvent e) { keys[e.getKeyCode()] = true; } public void keyTyped(KeyEvent e) { } public void mouseMoved(MouseEvent e) { mouseLocation = e.getPoint(); } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } } This code violates every SOLID principle. List how it violates each principle, and what can be done to fix it. SRP - Has the responsibility of managing input, managing entities and managing game logic. Break down the responsibilities into their own objects (decomposition) OCP - Requires modification of the class to update/add behavior to things like game logic and handling input. Create an abstraction and allow the client to specify different "strategies" rather than hardcoding systems into the class LSP - Game is at risk of being extended upon, allowing the subclass to completely modify the behavior (by overriding critical methods like update, resulting in undesired results when we replace all instances of the base class Game with instances of it's subclasses). Either make the methods final, make the class final, or supply template methods that can't interfere with desired results if misused. ISP - Forced to declare (but doesn't depend on) keyTyped, mouseEntered, mouseExited. Use KeyAdapter and MouseAdapter DIP - The enemy is depending on a concrete type (Dragon) rather than an abstraction. Change the field type to something less concrete (Enemy) 8. What is the purpose of String interning, and when is it performed? To prevent creating multiple String objects that contain the same character values. It's performed when using String literals or when you invoke String#intern() 9. Are Strings read in from an input stream interned? No. They're transfered using bytes, then recreated into a String manually. 10. What's the difference between a blocking network server, a non blocking network server and an asynchronous network server? Blocking halts a thread (blocks the thread) attempting to perform network operations until the operation is complete. Will wait if nothing is available (which is why it's considered blocking). Non-blocking returns a null value if nothing is currently available, removing the need to block. Asynchronous dispatches network operations (which may block) to "worker" threads (reusable threads) 11. When should you manually invoke System.gc()? Never. It's a request which can be ignored, usually a sign of a "code smell" 12. List every form of object creation you know of. The standard "new keyword followed by constructor call" Reflection Deserialization Cloning 13. List some reasons why Singletons is now considered an anti-pattern. Introduces global state and widely overused in places stronger design (such as dependency injection and aspect orientation) should be applied. 14. How do you properly terminate a Thread? Let it "die gracefully". If it's continuous, create a (volatile) boolean which allows you to stop it from outside of the thread. If the thread is currently blocking, use interrupt(). 15. Why are wildcard imports frowned upon? The create ambiguity. import javax.swing.Timer; import java.util.Timer; class MyClass { Timer timer; //swing or util? } 16. volatile longs and double are "atomic". Why? On 32 bit machines (or 64bit with compressed oops enabled), longs and doubles are 64bits long, which cannot fit in a 32bit register. It's split in 2, so we need to create a "happens before" relationship betwee the 2 registers when accessing ghe value. 17. What is double checked locking and when should it be used? It's a form of synchronization that accounts for the possibility of 2 threads performing interleaved null-checks and variable assignments, accidentally generating a useless object (which gets dereferenced and replace with a new object immediately). It should be used for lazy initialization in multithreaded environments. The "initialization on demand" idiom is a lot cleaner and should be preferred. 18. What's the difference between a programmer, a developer and a computer scientist? Programmers understand the syntax of the language, such as specifications (conditionals, loops, objects) but do not fully understand the best use-cases for the specifications; they lack design skills. Developers understand how to create structured environments. They tend to use tools like UMLs and flow charts to help guide design. Computer scientists are the philosophers of the conputer world, setting the standards and conventions we use today. They are the innovators, which tries to improve things from how to manage things better at a transistor level, and how to manage things better at a source level (although the latter is rarer, they are the ones who brought us design patterns and philosophies like "Tell, don't ask!") 19. A programmer asks you "I need to get the location of the mouse without GUI. How do I do so?" What would you answer with? You would need to either access the mouse natively through JNI (or use a third party API like JNativeHook) or simply use MouseInfo.getPointerInfo().getLocation() 20. What is a cross-cutting concern? How should you handle them? An aspect of programming that applies to all other aspects, which results in coupling irrelevant things (such as Logging, which applies just about everywhere). You should handle them using aspect orientation; Java has frameworks like AspectJ which guides this task 21. What is delta timing? Measuring responsiveness while measuring elapsed time. Accounts for possible delays and spare time in the current frame, which affects the next to reduce latency 22. Lambdas were intended to replace anonymous classes when working with functional interfaces. Some say it's nothing more than syntactic sugar. Is that true? No. Lambdas use method handles under the hood, rather than declaring a new class and instantiating it. 23. What's the purpose of method references? To lower the verbosity of lambda expressions that perform 1 function call. 24. Primitive types are not allowed to be specified for generic type parameters. Some developers choose to use primitive wrapper types to get around this. What should you be aware of when using primitive wrapper types? Autoboxing and unboxing 25. List<String> list = new ArrayList<>(); list.add("hey"); for(String string : list) { list.remove(string); } The code above throws a ConcurrentModificationException. Why? What can you do to fix this? It's modifying the collection directly while it's being iterated over. To avoid this, use a non fail-fast iterator or modify the collection using the iterator (not directly) 26. It's possible for a ClassCastException to occur when initializing a variable with an object that derived from the same class: class MyType { } class OtherClass { public MyType get() { return new MyType(); } } MyType type = OtherClass.get(); //ClassCastException What could possibly cause this? MyType in class Main was loaded by a different classloader than MyType in OtherClass.get(). Types must be loaded by thensame classloader to be identical 27. What are compressed oops An optimization technique which involves shrinking the size of oops (ordinary object pointers) to 32bit for 64bit machines. Since Java 7, this is enabled by default. Once again, I do not expect you to answer them all. But the more you can answer the better. All profits made would be split equally based on your impact on the project, and will be fully credited for anything you do. Please do not post your answers here so people can't copy; send them to me in a message! Good luck!
  22. That's not correct; Windows 8.1 actually consumes LESS resources. You should try profiling it. Lower memory usage, better clock times which results in faster response times.Not downing your opinion that Windows 7 has a better UI; I share the same opinion, which is why I actually still use Windows 7
  23. There we go; an actual argument I gotta agree, I'm not a fan of the UX of windows 8, especially since I don't own a touch screen. But performance wise, 8.1 definitely takes the cake.Keep in mind, this is about windows 8.1, not the initial 8.0, and he is asking in terms of power, not UX. Windows 8.1 takes less power (allowing for longer battery life). On top of everything mentioned, account for factors like boot time and it's hard to believe Windows 7 could ever be considered the "more powerful system". I gotta agree with the fact that Windows 7 has a better user experience. If possible, look into linux. Although it lacks support for mainstream programs like Word and Photoshop, the stability is unmatchable. If you're looking towards performance, Linux is your answer. Windows actually tends to degrade with time, mostly due to your registry getting cluttered. Believe it or not many Windows users actually understand how to properly take care of their Windows systems, which leads to slower performance over time. From what I've seen and experienced, this is not a problem for Linux machines
  24. Could we at least get some reasons why you think Windows 8.1 sucks so much? From what I've researched, less memory usage, better mutlicore support... Haven't heard much bad about Windows 8.1 other than lack of support for legacy apps and games. Also, how could you give an opinion on Windows 10 if you haven't even used it yet? Why should people 'not hesitate to upgrade'?

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.