Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • RuneLite/OpenOSRS Code Snippets


    Bonfire

    Recommended Posts

    Here are a few open-source code snippets from popular OSRS clients "RuneLite" and "OpenOSRS". These classes have provided me with a lot of insight into various game values like quest varps, projectile IDs, etc. Practically any value you'd need to reference when writing a script is in one of these classes. If a value you're looking for isn't in one of these, then it's most likely in another class of theirs.

    I do not claim ownership of this code. All of the authors have their copyrights listed at the top of each file and they are the rightful owners.

    As well as their drag-and-drop QuantityFormatter class, which helps with formatting numbers in the game (like turning "9000" into "9,000" and "14100000" into "14.1m"): https://github.com/open-osrs/runelite/blob/master/runelite-client/src/main/java/net/runelite/client/util/QuantityFormatter.java

    Do note though that some of these values may already exist as Enums or Classes in DreamBot's API (such as the animation IDs provided in the Animations class), so be sure to use the Enums/Classes already made for you if possible.

    Link to comment
    Share on other sites

    Added the QuestHelper plugin's ItemCollections which provides collections for practically every item you'd ever want to use. An example can be found below.

    If you're trying to see if the user has a charged amulet of glory, you can check the following collection:

    	private static final List<Integer> amuletOfGlories = ImmutableList.of(
    		ItemID.AMULET_OF_ETERNAL_GLORY,
    		ItemID.AMULET_OF_GLORY6,
    		ItemID.AMULET_OF_GLORY_T6,
    		ItemID.AMULET_OF_GLORY5,
    		ItemID.AMULET_OF_GLORY_T5,
    		ItemID.AMULET_OF_GLORY4,
    		ItemID.AMULET_OF_GLORY_T4,
    		ItemID.AMULET_OF_GLORY3,
    		ItemID.AMULET_OF_GLORY_T3,
    		ItemID.AMULET_OF_GLORY2,
    		ItemID.AMULET_OF_GLORY_T2,
    		ItemID.AMULET_OF_GLORY1,
    		ItemID.AMULET_OF_GLORY_T1
    	);

     

    Link to comment
    Share on other sites

    • 4 months later...

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.