Leaderboard
Popular Content
Showing content with the highest reputation on 03/16/14 in all areas
-
Post whatever you want Annouce Winner 17-03 nuuuubs I am Using www.random.org ( thanks to arctic<3 ) WINNER Post 24!! qw3 Please add my skype to claim your price, Next month there will be another Give aways Cheers,4 points
-
4 points
-
3 points
-
No longer works past what ever update introduced the memory loader. 1.8? Short and sweet. Look at the image in the link. Then see the virus scan/text below that link. Image: Just click me for the image Scan: VirusTotal Requirements: Gmail account .Net 4.5 Download: Click me! If you would like to try the program out, post on this thread. Any feedback is GREATLY appreciated because I like to know how it is going. These messages have problems sending to UK numbers. Some of you are better off just sending to a normal e-mail linked to the phone.2 points
-
He scammed pin back to september, and pretended that it never happend. Futhermore he reported me as a scammer on osbot and other sites.2 points
-
2 points
-
2 points
-
GG I got this. Why do I got this? Because today is my lucky day. I got OSD. I sold two vouchers. I sold the gp I made from the two vouchers. For me, sounds like a good fucking day.2 points
-
2 points
-
2 points
-
2 points
-
2 points
-
2 points
-
2 points
-
2 points
-
2 points
-
Nice tutorial, Enums were a bit tricky for me to grasp when I was learning a few years ago. I don't blame anyone, they are a bit confusing at first. You might want to explain why you would use Enums, for example the Skill Enum in the API, use that as an example.2 points
-
Divine's GUI Paint System What is this paint system, and how can it benefit me?: This is an open source class which you can implement into any script for extremely quick + clean paint. It is not paint, but can be used instead or along with paint. It is a seperate window which displays whatever information you wish to display!How easy is it?: Notice how few lines create and draw the entire window: Media: Does it consume a lot of memory?: Very low memory usage, much smaller than drawing paint on the client screen.Instructions for use: Add the new .java file into your project (GUIPaint.java). Code with few easy methods. Make sure to include the compiled .class inside the script jar, or along with the other script classes. Code Syntax: This code goes in onPaint(Graphics g) inside YOUR script. Always start with this line: GUIPaint.buildFrame("GUI WINDOW TITLE"); Then, you MUST define a category. When you want to set a new category, after the last cell in the previous category, use the same code again. GUIPaint.setCategory("Category Name"); Next, add as many cells as you wish! If you go too high, specify in GUIPaint.buildFrame(name, MAX_CELLS) to increase the maximum amount of cells. The default is 20. Also, addCell supports value types of String, doubles, booleans, longs, and integers. GUIPaint.addCell("NAME OF ITEM (WITHOUT COLON)", "VALUE"); Always End with RefreshPaint(): GUIPaint.RefreshPaint(); To have the Window CLOSE on script exit, add GUIHandler.CloseGUI() inside your onExit(): public void onExit() { GUIPaint.CloseGUI(); } A good example of a full implementation, displaying static text: public void onPaint(Graphics g) { GUIPaint.buildFrame("Clay Miner"); GUIPaint.setCategory("Time"); GUIPaint.addCell("Time Running", "00:00:00"); GUIPaint.setCategory("Clay"); GUIPaint.addCell("Clay", 0); GUIPaint.addCell("Clay / Hour", 0); GUIPaint.setCategory("Experience"); GUIPaint.addCell("Experience", 0); GUIPaint.addCell("Experience / Hour", 0); GUIPaint.RefreshPaint(); } public void onExit() { GUIPaint.CloseGUI(); } Download the GUIPaint class HERE: http://uppit.com/vrkhkxohfryb/GUIPaint.java1 point
-
Credits to @Divinity for letting me use his enum as an example Example: (I will be using this enum through out the whole tutorial, the variable will be shorten down to make space). public enum ThievingNPC { MAN("Man", 1), FARMER("Farmer", 10), FEMALE("HAM Female", 15), MALE("HAM Male", 20), HAM_GUARD("HAM Guard", 20), WARRIOR("Al-karid Warrior", 25), ROGUE("Rogue", 32), MASTER_FARMER("Master Farmer", 38), GUARD("Guard", 40), PALADIN("Paladin", 70), GNOME("Gnome", 75), HERO("Hero", 80), ELVE("Elve", 90); private String name; private int lvl; ThievingNPC(String name, int lvl){ this.name = name; this.lvl = lvl; } public String getName(){ return name; } public int getLevel(){ return lvl; } } What’s an Enum? An Enum is a data type, just like an interface and class. Enums and Classes consist of some similar characteristics, for example: constructor and some general methods. But the most unique things about Enums would be that they allow you to pre-define constants, which then allow you to access them at any time. What’s a Data Type? So a Data Types would be consider something like: Int, String, Boolean etc.. So what I’m trying to say, is that your allowed to create methods out of an Enum. You’re allowed to use them, like you would in an argument, constructor, and even a method. Example: public void something(Enum name) { } public EnumName somethingElse() { return enumVariable } Parts of an Enum: (in order) Example: //variables //private fields //Enum constructor //setters & getters methods //your own custom methods How to create an Enum: When you want to create an Enum, you will start off with a modifier (optional). Followed by the key word “enum”, then after follows the name of the Enum. Finally end it with brackets “{ }” Example: public enum ThievingNPC { } Enum Conventions: Naming the Enum: You must capitalize the first letter in every word (no spaces ). Example: //The only reason why my enum is called ThievingNPC, and npc is in all caps is because it is an acronym ThievingEnum YouGetItNow Naming Variables: You must capitalize all letters, and you must replace all spaces with underscores (“_”). Example: ROGUE MASTER_FARMER Adding in variable (use Conventions): This is where the fun begins. Now you are allow to add in as many variables as you want. Just know that after every variable you end it with a coma “,”. But at your last variable it must end in a semicolon “;”. Example: MAN(), HAM_GUARD(); More important info about variables: Once you create your variables, if you decide not to add any predefined constants (hence the infomation in between the parenthesis after the variable name), then you dont need to addin the parenthesis. The parenthesis are meant to help organize what information goes with which variable. Example: (this is part of my Magic Manager snippet) "If you dont understand then dont worry this isnt that important". public static enum Rune { STEAM, MIST, MUD, LAVA, SMOKE, DUST, EARTH, FIRE, WATER, AIR, ASTRAL, BLOOD, BODY, CHAOS, COSMIC, DEATH, LAW, MIND, NATURE, SOUL; @Override public String toString() { return super.name().toLowerCase() +" rune"; } } How to create Constructor: Optional adding a modifier. With Enum you’re not allowed to use the “public” keyword modifier. Since Enum variables are static. Use the Enum name followed by Arguments. Your constructor Argument must match the arguments within the variables. and end with brackets “{ }”. Example: MAN("Man", 1), FARMER("Farmer", 10); ThievingNPC(String name, int lvl) { } What to do within the Constructor: You must first create some private fields. Then make your Constructor argument equal those private fields. Example of the key word this: link Example: public enum ThievingNPC { MAN("Man", 1), FARMER("Farmer", 10); private String name; private int lvl; ThievingNPC(String name, int lvl){ this.name = name; this.lvl = lvl; } } Creating Methods: Since your fields are private you need some sort of way to be able to access the values. So this is where you would create your getter methods. Also any other custom method you would need. Example: public enum ThievingNPC{ MAN("Man", 1), FARMER("Farmer", 10); private String name; private int lvl; ThievingNPC(String name, int lvl){ this.name = name; this.lvl = lvl; } //from here and below are where you put your methods at public String getName(){ return name; } public int getLevel(){ return lvl; } } Some Default Enum Methods & Returns: These are some of the default methods that Enum's come with. There's many more, but these are the important ones, and the ones i like to use . *Format: (method name, return type) //comment if any. values(), Returns: an array of your enum variables. //Static valueOf(String s), Returns: an enum variables. //Static compareTo(E o), Returns: the distance between the two enum variable, using there ordinal(). ordinal(), Returns: the index in of the enum variable. name(), Returns: the exact enum variable name. toString(), Returns: the exact enum variable name. // if toString() isnt overrided. toString(), Returns: what ever you told the method to return. // if toString() is overrided. How to access the Enum and there variables (in order): Start with, the Enum name. followed by, the variable name. then, end with the method. Which returns the method. Example: ThievingNPC.MASTER_FARMER.getLevel(); Returns: 38 End of part one, beginner guide. Link to part two: link not yet ready1 point
-
1 point
-
my first language is Spanish. and once im done with my topic i re read and fix my grammar. I appreciate criticism1 point
-
1 point
-
My god... NA needs to do this. Garen is my hero. @Smart will kill me for posting this, but yolo.1 point
-
1 point
-
1 point
-
1 point
-
Why would you not want to watch a bunch of sexy ladies walk around with tits bouncing and ass's jiggling for an hour? OP is GAYYYYY1 point