Everything posted by Botre
-
Custom quick dropping method [Req]
public void dropAll(Script script, ArrayList<String> exceptionList) throws InterruptedException { Item[] i = script.inventory.getItems(); for (Item inventoryItem : i) { if ((exceptionList == null || !exceptionList.contains(inventoryItem.getName())) && Arrays.asList(inventoryItem.getDefinition().getActions()).contains("Drop")) { int s = script.inventory.getSlot(inventoryItem); Timer failsafe = new Timer(); while (script.inventory.getSlot(inventoryItem) == s && failsafe.getElapsed() < 5000L) { inventoryItem.interact("Drop"); Script.sleep(Script.random(600, 1200)); } } if (script.inventory.isItemSelected()) { script.inventory.deselectItem(); } } } Not sure if it's faster considering it relies on the API's interaction method.
-
I'm ready for OSB2
Don't mind the .AIOMagic naming, I turned that project into my OSB2 library I'll rename the packages later Come at me haters
-
OSBot 2.1.12 - Bugfixes and Interaction Improvements
Please list all the LOCAL scripts you have been using.
-
OSBot 2.1.12 - Bugfixes and Interaction Improvements
Yessss
-
good quote
- 1-99 agility the (LEGIT) - 99 defence pure
Holy fuck Didn't expect you to be at 98 already wtf man Ö What's next ?- Buying signature advertising space, your signature space has value!
Not placing any new ads until the OSB2 store is officially open- Experience distance (OSB2)
If you have any criticisms / ideas to improve the snippet I'll gladly listen If you are here only to bash on someone trying help and learn then you should probably just leave.- Experience distance (OSB2)
Experience distance: package xp.Botrepreneur; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; public class XpDistance { /** * @author Botrepreneur * @Version: 00.11 */ private static final int[] XP = { 0, 83, 174, 276, 388, 512, 650, 801, 969, 1154, 1358, 1584, 1833, 2107, 2411, 2746, 3115, 3523, 3973, 4470, 5018, 5624, 6291, 7028, 7842, 8740, 9730, 10824, 12031, 13363, 14833, 16456, 18247, 20224, 22406, 24815, 27473, 30408, 33648, 37224, 41171, 45529, 50339, 55649, 61512, 67983, 75127, 83014, 91721, 101333, 111945, 123660, 136594, 150872, 166636, 184040, 203254, 224466, 247886, 273742, 302288, 333804, 368599, 407015, 449428, 496254, 547953, 605032, 668051, 737627, 814445, 899257, 992895, 1096278, 1210421, 1336443, 1475581, 1629200, 1798808, 1986068, 2192818, 2421087, 2673114, 2951373, 3258594, 3597792, 3972294, 4385776, 4842295, 5346332, 5902831, 6517253, 7195629, 7944614, 8771558, 9684577, 10692629, 11805606, 13034431 }; public static int getLevelExperience(int level) { return XP[level - 1]; } public static int getDistanceBetweenLevels(int levelA, int levelB) { int d = 0; if (levelA > levelB) { d = XP[levelA - 1] - XP[levelB - 1]; } else if (levelB > levelA) { d = XP[levelB - 1] - XP[levelA - 1]; } return d; } public static int getXpUntilLevel(Script script, Skill skill, int level) { int d = XP[level - 1] - script.skills.getExperience(skill); return d > 0 ? d : 0; } public static int getXpUntilNextLevel(Script script, Skill skill) { int d = XpDistance.XP[script.skills.getStatic(skill)] - script.skills.getExperience(skill); return d > 0 ? d : 0; } public static int getXpPastCurrentLevel(Script script, Skill skill) { int d = script.skills.getExperience(skill) - XpDistance.XP[script.skills.getStatic(skill) - 1]; return d > 0 ? d : 0; } public static int getPercentageUntilNextLevelFromZero(Script script, Skill skill) { int p = script.skills.getExperience(skill) * 100 / XpDistance.XP[script.skills.getStatic(skill)]; return p > 0 ? p : 0; } public static int getPercentageUntilNextLevelFromCurrentLevel(Script script, Skill skill) { int p = XpDistance.getXpUntilNextLevel(script, skill) * 100 / (XpDistance.XP[script.skills.getStatic(skill)] - XpDistance.XP[script.skills.getStatic(skill) - 1]); return p > 0 ? p : 0; } }- Who is interacting with me ? (OSB2)
Mainly useful for combat situations with aggressive monsters: package myplayer.Botrepreneur; import java.util.ArrayList; import java.util.List; import java.util.Random; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; public class WhoIsInteractingWithMe { /** * @author Botrepreneur * @Version: 00.21 */ public static List<NPC> getList(Script script) { List<NPC> returnList = new ArrayList<NPC>(); List<NPC> allList = script.npcs.getAll(); if (allList != null && !allList.isEmpty()) { for (NPC npc : allList) { if (npc != null && npc.getInteracting() != null && npc.getInteracting().getName().equals(script.myPlayer().getName())) { returnList.add(npc); } } } return returnList; } public static NPC getRandom(Script script) { List<NPC> list = WhoIsInteractingWithMe.getList(script); return list != null && !list.isEmpty() ? list.get(new Random().nextInt(list.size()) - 1) : null; } public static NPC getClosest(Script script) { double lowestDistance = Double.MAX_VALUE; List<NPC> allList = script.npcs.getAll(); List<NPC> closestList = new ArrayList<NPC>(); if (allList != null && !allList.isEmpty()) { for (NPC npc : allList) { if (npc == null || !npc.exists() || npc.getInteracting() == null || !npc.getInteracting().getName().equals(script.myPlayer().getName())) { continue; } if (npc.getPosition().distance(script.myPosition()) < lowestDistance) { closestList.clear(); closestList.add(npc); lowestDistance = npc.getPosition().distance(script.myPosition()); } else if (npc.getPosition().distance(script.myPosition()) == lowestDistance) { closestList.add(npc); } } } return closestList != null && !closestList.isEmpty() ? closestList.get(new Random().nextInt(closestList.size()) - 1) : null; } }- OSBot1 vs OSBot2 bug amount & cpu usage?
Does it less or more bugged than OSBot1? More bugs atm. Does it consume less or more CPU? Same performance for me. Does its random solvers flawless? No Will OSBot1 emulator will work flawless in OSBot2? Doubt it. Am I forced to go to OSBot2 now, or can continue use OSBot1? Yes you are forced to go OSB2 So, support of OSBot1 ended? Not yet- The Office?
- The Office?
Ricky Gervais is an acquired taste I guess ? :p- The Office?
I only saw the UK series, loved it- Uber Dragon
- Hypothetical price check
- How famous is the person above you ?
98/10- APA Yak Killer [OSB2]
- Die Ligomo
- Sphere
- FREE: [Shrooms] premium money making script, free 24h trials!
Enjoy, love your avatar btw- APA Rock Crabs
Nice progress bars (a)- Inactivity
Cya soon Bonne chance mon ami ;)- [ACHIEVED] 80 - 99 Agility using Rooftops [ACHIEVED]
Gratz- Today is the day we celebrate
No fucking way My whole OSBot life is a lie - 1-99 agility the (LEGIT) - 99 defence pure