Everything posted by LoudPacks
-
Anyone botting the new DMM Seasonal?
I've had an influx of ~30 sales on my nature chest theiver so it looks to me that lots of people are.
-
Something needs to be done
I feel out of the loop. What the fuck is going on lmao
-
how do you use scriptExecutor?
Main.java lets u add a TaskScript. In main you can add(new TaskOne()); In side of TaskOne you have isActive which makes that specific task active when it return true. It also contains the looped code for said task. With it, you can write several "Tasks" or scripts that can all be added to the queue and ran within the main.java. I usually separate different tasks within a single script into different taskscripts, but you could also use different taskscripts as different scripts. For example, TaskOne() onActive() returns true if if the bank contains less than 500 bows, and will cut logs into bows, TaskTwo() might return true if you have 500 + bows in the bank, and could be set to perform a different task, like begin alching the bows. In this case I guess you could say you have two different scripts all within the same script. One for fletching, one for alching. Main: public void onStart() { super.onStart(); Settings settings = new Settings(this); settings.setCallback(b -> { start = System.currentTimeMillis(); //addTask(new Task()); addTask(new EatTask()); addTask(new OpenBankTask()); addTask(new BankingTask()); addTask(new SpiritTreeTask()); addTask(new GrandTreeTask()); addTask(new LadderOneTask()); addTask(new DaeroTask()); addTask(new WaydarTask()); addTask(new LumboTask()); addTask(new WalkToDungTask()); addTask(new WalkToSpotTask()); addTask(new CombatTask()); }); } In this case, I have different tasks for different steps in my script. These could easily be replaced with completely unrelated tasks, allowing you to have multiple scripts in one. Example Task import lemons.api.tasks.templates.AbstractTask; public class Task extends AbstractTask { private final long startAmount; @Override public void onStart() { super.onStart(); } public void onTaskStart() { //setup code startAmount = getInventory().getAmount(995); } public void run() { //code is looped getInventory().interact(995, "Drop"); } @Override public void onTaskFinish() { } @Override public boolean isActive() { return (getInventory().contains(995)); } }
-
how do you use scriptExecutor?
Lem0n API does this, you could check it out cause its open source and built off of the regular OSBot API.
-
What you doing on valentines day?
Learning about phylogeny and the origin of photosynthesis. I also got a new rx for my contacts. I also moved into my dads new house.
-
Anybody cop Retro Jordans Today?
I got the son of mars and the retro 6 golden moments in white
-
Anyone used a Chromecast before?
Its fucked unless your using a laptop you can only stream with chrome apps.
-
Super Bowl!
Me too I feel like a total dunce now.
-
The difference between dynamic and static skill levels
Mind-blowing. Keep up the gewd werk.
-
[Quick-guide] How to print onStart() error details
It might be a virus im too scared to try it :
-
[NOOB] Check Health
Checks if your health is above x%: private boolean healthAbovePercent(double p) { boolean flag = false; double dynamicLvl = getSkills().getDynamic(Skill.HITPOINTS); double staticLvl = getSkills().getStatic(Skill.HITPOINTS); if (dynamicLvl >= staticLvl * p) { flag = true; } return flag; } Note: don't flame I like to post basic snippets to help beginning scripters. Being able to search for simple snippets makes it easier to learn at the beginning.
-
How do I check how many stacks of an Item I have?
I would suggest following the Tea Stall guide by Apaec in the scripting tutorial section.
-
How do I check how many stacks of an Item I have?
LOL have you read the API? Use interactions. Then you can do: int count = 0; if(getItems().closest("Dildo") != null && getItems().closest("Dildo").interact("Take"){ count++; log(count); //sleep }
-
How do I check how many stacks of an Item I have?
long salmonCount = getInventory().getAmount("Salmon"); long salmonCount = getBank().getAmount("Salmon");
-
LogicSorter - Sorts your bank!
Yea dude it would DESTROY the method if hella heads had organized banks.
-
Another approach to anti-ban implementation in scripts
They put everyone's name into a hat and have several weekly drawings to determine who gets banned.
-
Tuna Potatoes [AIO]
why u do dis. Now the prices will really crash. There's a paid one on the SDN.... so you basically just screwed all of them. :salty:
-
Green Dragon Raper - Efficient, Human-like
Just a suggestion for health and eating, you can do it by % rather than a hard-coded value: if (getSkills().getDynamic(Skill.HITPOINTS) <= getSkills().getStatic(Skill.HITPOINTS) * .35) { //if health is less than 35% }
-
Weed is really overrated
Yea these people are dumb lmao. I smoke more weed (dabs) than probably anyone who would wear that shit and the only weed clothing I have is a structural model of the THC molecule and you can't even tell what it is unless you know chemistry.
-
GroundItem Monitor | Detect New Ground Items
what Will something like this suffice? monitorThread = new Thread(){ public void run() { inventoryMonitor = new InventoryMonitor(getScript()) { @Override public void onChange() { for (Item i : getChanges()) { if(i != null){ lootCount += i.getAmount(); lootValue += CheckPrice.get(i.getId()); } } } }; groundMonitor = new GroundMonitor(getScript(), Settings.lootThresh, Settings.zoneArea) { @Override public void onChange() { for (org.osbot.rs07.api.model.GroundItem i : getChanges()) { if(i != null){ log(i.getName() + " : " + CheckPrice.get(i.getId())); } } } }; while(!monitorThread.isInterrupted()){ if (inventoryMonitor != null && !getBank().isOpen() && inventoryMonitor.hasChanged()) { inventoryMonitor.onChange(); inventoryMonitor.update(); } if (groundMonitor != null && !getBank().isOpen() && groundMonitor.hasChanged()) { groundMonitor.onChange(); groundMonitor.update(); } } } }; monitorThread.start();
-
I didn't watch it live, but divica i see what you're doing
Cheap advertising lmao
-
GroundItem Monitor | Detect New Ground Items
Don't know if anyone will use but I needed something with this functionality and came up with this. Any feedback is appreciated, I'm always trying to learn new things. GroundMonitor.java: import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.script.Script; public abstract class GroundMonitor { //My implementation filters out items less than price x, but I removed because it was specific to my needs private ArrayList<GroundItem> cache = new ArrayList<GroundItem>(); private Script ctx; public GroundMonitorRelease(Script ctx, int valueThreshold) { updateContext(ctx); update(); } public void updateContext(Script ctx) { this.ctx = ctx; } public abstract void onChange(); public boolean hasChanged() { return getChanges().length > 0; } public void update() { for (GroundItem item : ctx.getGroundItems().getAll()) { if (item != null) { cache.add(item); } } } public GroundItem[] getChanges() { List<GroundItem> items = new ArrayList<GroundItem>(); ArrayList<GroundItem> ci = new ArrayList<GroundItem>(); int changes = 0; for(GroundItem q : ctx.getGroundItems().getAll()){ if(q != null){ items.add(q); } } for (GroundItem item : items) { if (item != null) { int id = item.getId(); if (!contains(ci, id) && !cached(item)) { ci.add(item); changes++; } } } Collections.sort(ci, new Comparator<GroundItem>(){ @Override public int compare(GroundItem o1, GroundItem o2) { int d0 = CheckPrice.get(o1.getId()); //Use distance instead of price int d1 = CheckPrice.get(o2.getId()); //Use distance instead of price return (d0 < d1 ? -1 : //It will return the closer one first (d0 == d1 ? 0 : 1)); } }); return Arrays.copyOf(ci.toArray(new GroundItem[ci.size()]), changes); } private boolean cached(GroundItem item){ return cache.contains(item); } private boolean contains(ArrayList<GroundItem> list, int id) { for (GroundItem i : list) { if (i == null) continue; if (i.getId() == id) { return true; } } return false; } } Main.java (onStart): groundMonitor = new GroundMonitor(getScript()) { @Override public void onChange() { for (GroundItem i : getChanges()) { if(i != null){ log(i.getName() + " : " + CheckPrice.get(i.getId())); } } } }; Main.java (onPaint): if (groundMonitor != null && groundMonitor.hasChanged()) { groundMonitor.onChange(); groundMonitor.update(); }
-
The current state of the Scripter II rank
Lets not point any fingers lol I still learn new things all the time, I just think it should be more difficult to attain SII.
-
The current state of the Scripter II rank
There's hella and personally I think the 5 question test should be switched to a 15 question test requiring a score of 85% or higher and to be done in real time over skype.
-
Custom Obstacle Handing?
Okay so I came up with this. Now it will try and walk. How do I go about handling the rockfall when its in front of the player? if(!inZone()){ LocalPathFinder path = new LocalPathFinder(getBot()); LinkedList<Position> generatedPath = path.findPath(getRandomZone().zone.getRandomPosition(), generateModifiedClippingData()); getLocalWalker().walking.walkPath(generatedPath); } In getting the clipping data I also get a List<RS2Object> of all the rockfalls. Should I just iterate through that list and "mine" the closest one? Is there a better way of doing this?