Bonfire 332 Share Posted April 27, 2021 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. Varbits: https://github.com/runelite/runelite/blob/master/runelite-api/src/main/java/net/runelite/api/Varbits.java Player Varps: https://github.com/runelite/runelite/blob/master/runelite-api/src/main/java/net/runelite/api/VarPlayer.java Quest Varps (Completion): https://github.com/runelite/runelite/blob/master/runelite-api/src/main/java/net/runelite/api/Quest.java Quest Varps (Stages): https://github.com/Zoinkwiz/quest-helper/blob/master/src/main/java/com/questhelper/QuestVarPlayer.java Quest Varbits (Stages): https://github.com/Zoinkwiz/quest-helper/blob/master/src/main/java/com/questhelper/QuestVarbits.java Quest Stage Mappings: https://github.com/Zoinkwiz/quest-helper/tree/master/src/main/java/com/questhelper/quests Projectile IDs (when looking for certain attacks, AoE damage, etc.): https://github.com/open-osrs/runelite/blob/master/runelite-api/src/main/java/net/runelite/api/ProjectileID.java Animation IDs: https://github.com/open-osrs/runelite/blob/master/runelite-api/src/main/java/net/runelite/api/AnimationID.java Item IDs: https://github.com/open-osrs/runelite/blob/master/runelite-api/src/main/java/net/runelite/api/ItemID.java NPC IDs: https://github.com/open-osrs/runelite/blob/master/runelite-api/src/main/java/net/runelite/api/NpcID.java Model IDs: https://github.com/open-osrs/runelite/blob/master/runelite-api/src/main/java/net/runelite/api/ModelID.java Object (GameObject) IDs: https://github.com/runelite/runelite/blob/master/runelite-api/src/main/java/net/runelite/api/ObjectID.java Widget (Interface) IDs: https://github.com/runelite/runelite/blob/master/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java ItemCollections (Collections for every item imaginable): https://github.com/Zoinkwiz/quest-helper/blob/master/src/main/java/com/questhelper/ItemCollections.java 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 More sharing options...
flipjazz 13 Share Posted April 27, 2021 Wow, thanks for sharing this. The Quest Helper plugin is a really great reference; maybe I'll give writing some quest scripts a try (can't imagine the work needed to figure out the varbits on your own!). Link to comment Share on other sites More sharing options...
Bonfire 332 Author Share Posted May 10, 2021 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 More sharing options...
Hosfad 154 Share Posted October 10, 2021 Great resources coming from a great man Thanks bon Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.