Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/18/14 in all areas

  1. its that did you just fucking give me, your king, an order pouf! such a murderous and wonderful stare, anyone here watch hunter x hunter?
    2 points
  2. Looks good, but you could convert that to an enum.
    2 points
  3. For kids who don't have a job a nice $5 a week can be a new video game, etc. I make a decent $500 a week, and you might say this is a waste of my time. But I spend probably 30 minutes a week and I get $5 to spend on things from my car, or phone. It's really nice to see that that money isn't coming out of my paycheck, if I spent $5 a week for a year, I'd spend close to $250.
    2 points
  4. Definitely this, and also make sure to transfer over 1k Monkfish at a time perhaps whilst fishing.
    2 points
  5. @RoomScape, our newest (and oldest) retard
    2 points
  6. Using Multiple Classes Complete Guide! Tutorial Written By: @NotoriousPP Introduction: It has been brought to my attention that some script writers do not know how to use multiple class files inside of their project, and in this tutorial I will try to cover everything I can, to help you have a better understanding how this is done correctly. I will be working on an example project for this tutorial, just follow along using your own project, doesn’t matter which type of project, as long as you understand what’s going on. This project will be modeled in a State based framework, as I see this most often used throughout the forum. Another question you may have, why should you use multiple classes, what are the benefits, is there an upside? Speaking from an Organizational aspect, yes! Splitting up classes makes it easier for the writer and to whoever is working on the script, instead of having to search through a wall of text; you can simply find the class in your Project Folder. Things you’ll need: A Computer or Laptop. A IDE (For this tutorial I will be using Itellij) Latest Version of OSBot. A Brain (Might help) Getting your project setup: Create new project, and add OSBot as a library. Your project should now look something like this: Create packages inside of your src folder, this well help better organize your script! After doing this it should look similar to this: The Real Work Begins (Kinda): So now that we have packages in our src, we need to fill them up! So first lets create a Script class inside of our Core package. (Notice the Class name “ExampleScript”, this is following correct Conventions. An incorrect way of naming classes would be “examplescript”, “exampleScript”, “EXAMPLE_SCRIPT”, etc. If you would like to learn more about Conventions, you can go here: Code Conventions for the Java Programming Language) Alright so now we have a basic Skeleton setup, though it does nothing just yet. Well, lets change that! Since for this tutorial we are writing a State based script, first we need to create State Objects! To do this we need to create an Enum, which basically is “a special data type that enables for a variable to be a set of predefined constants.” (docs.oracle.com). I personally like to have a package that stores all my data needed for a script, so I’m going to create a new package “data”. After we have created the package, create a new Enum inside of the “data” package. (If you don’t know how to create an Enum right away, just create a new class file for right now, and I’ll show you what to do next!) (If you were one of the people who did not know how to create an Enum, simply create a new Class, and then replace “class” with “enum”, and your set!) For this Enum were are only really using the name, and not storing any real data here, so all we need to do is add the different States we want in our script! For this example, I will be using Attack, Eat, Loot, Drop, and Bank. REMEMBER! To follow correct Conventions we are going to name the states using all CAPITAL letters. Optional: Adding a toString() method can be used to make your “state” or “status” more presentable, and not YELLING AT YOU when displaying. The method essentially grabs whatever “state” being used, and modifies it to your liking. In the example below, it creates a final String “s”, then replaces all underscores (Not used in example) with a space; the next like I return the String “s”, though I grab the first Char of the string and add it to a substring for the rest of the string and add a toLowercase(), making ATTACK, to Attack. This is especially helpful when using States as a status; this method can be applied to all types of Enums! (Cool trick if you’re a Windows Intellij user! You can type all your states without having to type with caps lock, or holding shift; just type your states, select them, and press “ctrl + shift + u”, and it will capitalize all selected, or turn it to lowercase if already capital) So we have our States, now what do I do? Well we need to get a getState() method ready our Script class. If you don’t already know, this is the method we use to determine which action or “state” should be executed. Then in the onLoop we have a Switch statement that determines which action should be executed. So what do we do now? The some people here make the mistake of continuing using this class for their tasks, actions, and data; just everything really. This is exactly what this tutorials main focus is on; how we can use multiple classes to help organize our project. You Script class should now look something similar to this. So now we get to create our first separate class! You may ask, well how will I be able to use myPlayer(), client.getInventory(), if I’m not inside of the Script class. Well one word really “Constructors”. We are going to need to create a constructor that takes a Script variable which we can use throughout the script, in this case “sI” (Swizzbeat are you happy now? I didn’t use sA this time ) which refers to Script Instance; but first we need to create a new class inside of our “tasks” package (folder), and in the example I will be creating an Attack() class. In this class we create a public Constructor that accepts a Script variables “sI” as discussed before! So now you should have a class that looks like this. Well you’re almost done implementing your first separate class (If this is your first time that is)! In the Attack() class we can now use “sI” for all of the calls we need, so instead of typing myPlayer() like in the Script class, it would be sI.myPlayer() in your extended class. So for example you can do something along the line of this: (Please don’t use this snippit below for real, it’s just a funny example, I don’t want a PM saying this didn’t work…) Alright so I got a separate class, but how the hell do I use this shit? You might be asking. Well in your Script class, since you extended Script, by using “this” is other words a Script variable, so that’s what we will be using to call our class! So in the onLoop, we can now add the new separated class, simply by adding “new Attack(this);”. Yup it was that easy! So it should look similar to what I have below. Just import the class (Most IDEs do it automatically), and call the class using “new Class(this)”: Well if you don’t understand how this all works by now, read through it once more, it will make sense eventually! To add more classes to our project, just use the same logic we used in creating our Attack() class(Or hell you can just copy/paste, and edit a little). The other packages in our “src”, can be used for numerous of different classes, just it’s up to you to fill them, just use them to keep organized! Conculsion: Well if you followed along, and got it working correctly! Congratulations! Separating classes help you so much down the road when working with large project, teammates, and or co-workers! No one wants to read a wall of text, it’s much easier to navigate through folders and get the file you need (Like how an office files paper work, Duh…). I really hope you guys all enjoy reading this, and it helps a few people out with their scripts! If you have any suggestions, and or comments, please leave them below, and I’m more than gladly answer them! Also let me know about any errors that you find! I'm not a expert, just trying to help! Sources used: http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html http://docs.oracle.com/javase/tutorial/java/javaOO/constructors.html http://www.oracle.com/technetwork/java/codeconv-138413.html
    1 point
  7. So I've decided to get all the work I have posted and put it in here with a date so people can see how I have improved. I'm probs missing stuff but yolo. 4/9/2014 24/8/2014 23/8/2014 17/8/2014 invested in a drawing tablet wooo 9/8/2014 3/8/2014 2/8/2014 20/7/2014 4/7/2014 7/7/2014 (The text was done by ) 3/7/2014 Old Stuff
    1 point
  8. Post your favorite one of your own. Tycoon Not Coy. and let see what unfolds
    1 point
  9. Hello dear botters and script developers. In order to ensure that OSBot 2 will be flawless upon release, the development team has decided to delay the official launch of OSBot 2 by 4 days. It's not a big delay, but we (both script writers and developers) intend to use those extra days to do some extra testing. Just to clarify what will happen once the transition is made: 1) The OSBot 1 client will not become obsolete immediately. It will be kept up to date for a period of time, and you will still be able to use your OSBot 1 scripts on that client. 2) For those of you who have a one time payment script for OSBot 1: If the scripter who made your original script ports it to OSBot 2, you will be given 1 month of trial access. 3) The SDN page for OSBot 1 scripts will be moved to the following page: http://osbot.org/mvc/sdn1/scripts Note: ALL OSBot 1 SCRIPTS WILL BE REMOVED WHEN OSBOT 1 IS NO LONGER SUPPORTED. 4) Any renewals for OSBot 1 scripts have been terminated. 5) All scripts for OSBot 2 will be monthly scripts. This means there will no longer be any one time "lifetime" scripts. 6) Once OSBot 2 officially launches, all scripts will be free for the first week. This is to allow public testing of the client and the scripts. 6) Don't kill the messenger (me)
    1 point
  10. 1 point
  11. Omg killua would look awesome, ill probs make something to do with him on the weekend
    1 point
  12. ^^^ pls make my fav char
    1 point
  13. are you fucking kidding me.... -.- why the hell would you choose rs3 over os
    1 point
  14. beautiful, aren't they?
    1 point
  15. Here you go... http://lmgtfy.com/?q=free+icons
    1 point
  16. Yea 12-13 years of school and Im finally graduating high-school. I live in london and after Year 11 you finish school and go on to college or sixth form if you want to. So yea Im free now :P Finished all my exams and shit. So yea Im really happy to reach this stage in my life.
    1 point
  17. Congratulations! Highschool is just the easy part though, prepare yourself for bigger missions.
    1 point
  18. Congratulations! Shoutout to my class of 2014
    1 point
  19. Congratz bro. party hard.
    1 point
  20. Congratulations! Although I would not say you are free because you graduated. You will only get more responsibilities as life goes on. :P
    1 point
  21. 6) Once OSBot 2 officially launches, all scripts will be free for the first week. This is to allow public testing of the client and the scripts. Aww yeah
    1 point
  22. Could depend on hours botted, location, flagged IP/not, flagged account. I wouldn't bot on it using OSBot 1, wait till the release of OSBot 2 and you will have a far less chance of getting banned.
    1 point
  23. I've first read it "Botting orgies!" ... was like wtf, how would that work?
    1 point
  24. 1 point
  25. i use to use wbot to bot on private servers lmao, funny as fuck how they was the first bot to be up when oldschool came out.
    1 point
  26. Lol, you have weird family. My dad asks me if I need a hand.
    1 point
  27. Just confirm for me after you're done.
    1 point
  28. Interesting idea, I will definitely try this out once I research it a little more. OT: Am I the only one seeing this -
    1 point
  29. Problem is it takes like a month to get the 500 reward points lmao
    1 point
  30. Beating le wild meat is normal, and a normal topic to talk about with your friends... If they dont feel comfortable they're either gay or not really your friends lol
    1 point
  31. Going best case scenario isn't what should be done. Just do 1 account running shrooms for 5 hours a day = 6 dollars and run like 3 times in 30 days and you make your money back x2 - 2 bonds, so you still profit in 3 proggies 1% chance of ban botting 6 hours 3 times a month. Yet you still are acting as you aren't making money. One time scripts make the market crash faster, and everything. You paying a small fee is worth it in the long run. More scripter updates and dedication to fixing it because if they don't people won't renew.
    1 point
  32. You are not alone brother.
    1 point
×
×
  • Create New...