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.

Joseph

Trade With Caution
  • Joined

  • Last visited

Everything posted by Joseph

  1. that will be coming up next, after i finish teaching them how to create them . And also ill be teaching them like little handy tricks you could do with enums
  2. 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 ready
  3. Joseph replied to Alek's topic in Archive
    then what will happen to all the people who have SDN rank now
  4. Thats what i had in mind
  5. Joseph replied to Reid's topic in Snippets
    its isnt really to special, especially for people who know how to code this. This is really meant for those who have trouble with painting graphic on script. They could use this to study, learn, and experiment.
  6. what website would you use? i appreciate the snippet
  7. Google image: imaginary foundation Those are the type of picture I use for my wallpaper.
  8. You could pm if you like
  9. Ty ill try it out in a few
  10. Is there an alternative?
  11. This topic is worthless. Having a free script or premium script released on the SDN don't prove anything. Just because you could run an alcher script for days doesn't mean it should be premium, now if you had an AIO that's a different story. Just because you have a premium script out doesn't mean shit, that offical rank does.
  12. fuck that shit i play old gba pokemon games on my iphone using "gba4ios" <~~~~google that
  13. question
  14. Edit: Why does walkMiniMap spam clicks even though i added a sleep method after? Also does it have to do with maybe being like a 4 square tile object? code: if (ghost!=null) { this.walkMiniMap(ghost.getPosition()); sleep(1000); }
  15. Where was this tutorial when I needed it way back. Nice little tutorial .
  16. ill look at the api for a little bit see if i could help you out. edit: i was checking the interfaces for the cc. And it looks like your going to have to be working with parents, childrens within childrens
  17. couldnt you grab interfaces text, then convert the string into an int
  18. Joseph replied to Joseph's topic in Archive
    Thank you guy, I already found out what i was goign to do. Within the gui class create a boolean. Add a event handler on the start button, which inverts the boolean. On the onStart() add a sleep until that gui.boolean become false.
  19. you would join the cc, loop through the people in the list and their world, and look for the world with the most people in that cc. Or maybe look for someone with rank, and join their world.
  20. Joseph replied to Joseph's topic in Snippets
    if you want to be all fancy you could do that with your toString(). i was just to lazy to do that. Also, the only reason why i put an argument inside the parameter because without, you wouldnt know which direction you are facing, without using player#getRotation. That the point of having toString a static method. So when you call the enum you could use that method. With out having to choose one of the actual enum option, and since you have a argument, you could simply add in your player getRotation(). for example: instead of doing this log(Direction.NORTH_WEST.toString()); log(Direction.SOUTH.toString()); log(Direction.EAST.toString()); log(Direction.NORTH.toString()); you could do log(Direction.toString(myPlayer().getRotation()));
  21. Joseph replied to Joseph's topic in Archive
    i might just use a while loop to sleep while the gui is active
  22. Joseph posted a topic in Archive
    sleep on the onStart() while the gui is alive. or add a if statement (gui isnt visible) within the onLoop()
  23. it really doesnt lol
  24. Joseph replied to Joseph's topic in Snippets
    i was actually doing that now for my script. ill add it in a bit edit: added it in

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.