-
Posts
669 -
Joined
-
Last visited
-
Days Won
3 -
Feedback
100%
Everything posted by PolishCivil
-
PricedItem class - Track items gained, and their value.
PolishCivil replied to Deffiliate's topic in Snippets
Eclipse: Ctrl + a & Ctrl + Shift + F Intellij: Ctrl + Alt + L Also u can mix it with: package dependencies.api; import dependencies.api.listeners.ATInventoryListener; import org.osbot.script.Script; import java.util.ArrayList; import java.util.Arrays; /** * @author Xavier */ public class ATInventoryTracker implements Runnable { private Script script; private int[] ids, stacks; private int updateRate = 200; private final ArrayList<ATInventoryListener> listeners; private boolean running = true; private boolean ignoreName; public ATInventoryTracker(Script script) { super(); this.script = script; listeners = new ArrayList<>(); } public void start() { new Thread(this).start(); } public void addListener(ATInventoryListener listener) { if (listener != null) { listeners.add(listener); } } public ArrayList<ATInventoryListener> getListeners() { return listeners; } @Override public void run() { do { try { if (ids == null || stacks == null) { ids = script.client.getInterface(149).getChild(0).getInv(); stacks = script.client.getInterface(149).getChild(0).getInvStackSizes(); } else { int[] new_ids = script.client.getInterface(149).getChild(0).getInv(); int[] new_stacks = script.client.getInterface(149).getChild(0).getInvStackSizes(); //forgot about moved :p I just need added atm for (int i = 0; i < ids.length; i++) { if (new_ids[i] == ids[i] && new_stacks[i] == stacks[i]) { continue; } if (new_ids[i] != ids[i]) { if (ids[i] - 1 != -1) { dispatchRemoved(i, ids[i] - 1, stacks[i]); } if (new_ids[i] - 1 != -1) { dispatchAdded(i, new_ids[i] - 1, new_stacks[i]); } } else if (new_stacks[i] != stacks[i]) { int difference = new_stacks[i] - stacks[i]; if (difference > 0) { dispatchAdded(i, ids[i] - 1, Math.abs(difference)); } else { dispatchRemoved(i, ids[i] - 1, Math.abs(difference)); } } } ids = Arrays.copyOf(new_ids, new_ids.length); stacks = Arrays.copyOf(new_stacks, new_stacks.length); sleep(updateRate); } } catch (Exception e) { e.printStackTrace(); } } while (running); } public void stop() { running = false; } public void setIgnoreName(boolean ignoreNames){ ignoreName = ignoreNames; } private void sleep(int updateRate) { try { Thread.sleep(updateRate); } catch (InterruptedException ex) { //ignore } } private void dispatchRemoved(int slot, int id, int stack) { for (ATInventoryListener listener : listeners) { listener.itemRemoved(slot, id, stack); } } private void dispatchAdded(int slot, int id, int stack) { for (ATInventoryListener listener : listeners) { listener.itemAdded(slot, id, stack, ignoreName ? null : script.client.getInventory().getItemForId(id).getName()); } } private void dispatchMoved(int fromSlot, int toSlot, int id, int stack) { for (ATInventoryListener listener : listeners) { // listener.itemMoved(fromSlot, toSlot, id, stack); } } } -
Nice calc
-
Attention to all users xavier is green hippo, because he use crt from nokia
-
what happens when you snort powdered alcohol
PolishCivil replied to Oliver's topic in Spam/Off Topic
I snort powdered sugar. -
Yea lol... You thought I hold there water to drink? Jeez what a stupid question
-
Bitch please.
-
XD i bought everything from scripting ;3
-
@deff very nice ;O\!
-
Guess how my looked 15 min ago.
-
^^ mine (inb4 picture iz bad)
-
Buy atmega8 and make diode blink. (my first code ever created) There is book C for microcontrollers in my country so search for sth like this.
-
Cuz iOS is for rich ppl!
-
Lol we dont need such much code to know if someone is good scripter/programmer. I don't even need script's code to review. Btw aint you just administrator?
-
I doubt you write very secret code. Just use proguard or make own asm renamer, mabye some text encoder and thats all you need. You can find ZKM cracked on google.
-
OSBot 2.1.4-5 - Integrated anti-ban, optimized interactions, minor API changes
PolishCivil replied to
Laz's topic in ReleasesI cba to rewrite it ;o -
OSBot 2.1.4-5 - Integrated anti-ban, optimized interactions, minor API changes
PolishCivil replied to
Laz's topic in ReleasesAmd mouse is kinda crazy -
OSBot 2.1.4-5 - Integrated anti-ban, optimized interactions, minor API changes
PolishCivil replied to
Laz's topic in Releasesomg ;o why mouse is so slow -
"being the one that actually can see their source" I bet someone can share piece of code to be OSD.
-
OSBot 2.1.4-5 - Integrated anti-ban, optimized interactions, minor API changes
PolishCivil replied to
Laz's topic in ReleasesCool 2bad i wrote own interactions ;/ -
http://pastebin.com/8ztibTv5 public boolean samePosition(Position one, Position two) { if(one.getX() != two.getX()) return false; if(one.getY() != two.getY()) return false; if(one.getZ() != two.getZ()) return false; return true; } http://pastebin.com/KJc43RXz http://pastebin.com/SsVuJ8q3 MAGIC Now tell me... Honestly.... OSD? He's working for other bot! Demote demote demote!
-
We are not bitching about 'idea' idea is cool (also copy) but work is... IMO not good (very polite). I really doubt i deserve my rank ;( I cant read it ;(
-
Yea Dash must be god if he can read all this super tiny class names. IF YOU GUYS ARE NOT ABLE TO READ THIS NAMING, YOU WILL NEVER GET OSD!!!! So yh ;( Nitrousek you loose.
-
Everyone wins except SSF creator.
-
Abracadabra let's poll appear.