-
Posts
5883 -
Joined
-
Last visited
-
Days Won
18 -
Feedback
100%
Everything posted by Botre
-
Integer.toHexString(int)
-
(Short introduction to yet another tool, blablabla.) No more commenting out debug logs, no more explicit conditional logging, no more spamming your users with debug logs they have no use for. Log to the osbot console, a file or any other log processor you can think of. Log processors automatically filter out log objects that do not meet the processor's levlel requirement. Each log processor can have its own requirements, you might not want to spam the user with debug or trace messages in the console, but storing those messages in a file (where they don't harass the user) could be a valuable practice. Code example: OSBot log: [INFO][Bot #1][03/04 05:54:17 PM]: Started script : Simplog Example [INFO][Bot #1][03/04 05:54:28 PM]: Welcome user [INFO][Bot #1][03/04 05:54:27 PM]: Terminating script Simplog Example... [INFO][Bot #1][03/04 05:54:27 PM]: Bye user [INFO][Bot #1][03/04 05:54:27 PM]: Script Simplog Example has exited! File log: After changing the processor levels to: logger.addProcessor(new OSBotLogProcessor(this, LOG_DEV_DEBUG)); logger.addProcessor(new TextFileLogProcessor(new File("C:/Users/bjorn/Desktop/TextTest.txt"), LOG_DEV_DEBUG)); OSBot log: [INFO][Bot #1][03/04 05:58:54 PM]: Started script : Simplog Example [INFO][Bot #1][03/04 05:58:54 PM]: Goblins found: 5 [INFO][Bot #1][03/04 05:58:55 PM]: Goblins found: 5 [INFO][Bot #1][03/04 05:58:55 PM]: Goblins found: 6 [INFO][Bot #1][03/04 05:58:56 PM]: Goblins found: 7 [INFO][Bot #1][03/04 05:58:56 PM]: Goblins found: 7 [INFO][Bot #1][03/04 05:58:57 PM]: Goblins found: 7 [INFO][Bot #1][03/04 05:58:57 PM]: Goblins found: 7 [INFO][Bot #1][03/04 05:58:58 PM]: Goblins found: 7 [INFO][Bot #1][03/04 05:58:58 PM]: Goblins found: 7 [INFO][Bot #1][03/04 05:58:59 PM]: Goblins found: 7 [INFO][Bot #1][03/04 05:58:59 PM]: Terminating script Simplog Example... [INFO][Bot #1][03/04 05:58:59 PM]: Bye user [INFO][Bot #1][03/04 05:58:59 PM]: Script Simplog Example has exited! File log: [2016-03-04T16:58:54Z] LOG SESSION STARTED [2016-03-04T16:58:54Z] Welcome user [2016-03-04T16:58:54Z] Goblins found: 5 [2016-03-04T16:58:55Z] Goblins found: 5 [2016-03-04T16:58:55Z] Goblins found: 6 [2016-03-04T16:58:56Z] Goblins found: 7 [2016-03-04T16:58:56Z] Goblins found: 7 [2016-03-04T16:58:57Z] Goblins found: 7 [2016-03-04T16:58:57Z] Goblins found: 7 [2016-03-04T16:58:58Z] Goblins found: 7 [2016-03-04T16:58:58Z] Goblins found: 7 [2016-03-04T16:58:59Z] Goblins found: 7 [2016-03-04T16:58:59Z] Bye user [2016-03-04T16:58:59Z] LOG SESSION STOPPED
-
"Walk-here" is actually a tile action, not an entity action. I just didn't bother filtering the null actions out since this is just a testing / demonstration snippet, but since you're my special friend: if(action == null) continue; log("\t" + action);
-
@ScriptManifest(author = "Botre", info = "", logo = "", name = "Selection Listener Example", version = 0) public class SelectionListenerExample extends Script implements SelectionListener<NPC> { private Sapi sapi; @Override public void onStart() throws InterruptedException { super.onStart(); sapi = new Sapi(this); sapi.registerMouseAdapter(); sapi.setSelector(Module.NPC); sapi.getNpcSelector().getSelectionListeners().add(this); } @Override public int onLoop() throws InterruptedException { //... return 500; } @Override public void onPaint(Graphics2D g2d) { super.onPaint(g2d); for (NPC npc : sapi.getNpcSelector().getSelection()) { Painter.defaultEntity().paint(g2d, this, npc); } } @Override public void onExit() throws InterruptedException { sapi.unregisterMouseAdapter(); super.onExit(); } @Override public void onSelection(List<NPC> selection) { for (NPC npc : selection) { if(npc != null) { log("Selected npc with name: " + npc.getName()); if(npc.getActions() == null) continue; log("This npc has the following actions:"); for (String action : npc.getActions()) { log("\t" + action); } } } } }
-
-
It has been 2 years since I started scripting
Botre replied to Botre's topic in Community Discussion
Some private scripts, but mainly free apps to making scripting easier for other people ^^ -
I'm very grateful for having discovered this community that made me deeply fall in love with programming and gave me the opportunity to practice my passion consistently and in a fun way. I learned a lot from many awesome people and worked with many swell chaps. 2 years ago I didn't know anything about coding, OSBot gave me the resources and motivation to continually get better and acquire new skill sets, oh and let's not forget about the snickers money, gotta love that snickers money. Thank you Shout out to @Alek & @Apaec.
-
As one of our own fell today, we shall light a candle in his honor [*]
Botre replied to Muffins's topic in Spam/Off Topic
Still miss the squidward Stress -
Fletcher: Bank Withdraw unnoted Willow longbow(u) IA 1-14 Required - Stop Bank Withdraw unnoted Bowstring IA 1-14 Required - Stop Item on Item Willow longbow(u) Bowstring Widget 13 37 Make all Wait Not in inventory Willow longbow(u) or Bowstring Timeout: 30s (default) Bank Deposit all Cooker: Bank Withdraw unnoted Raw tuna IA 1-28 Required - Stop Item on Object Raw tuna Fire Widget 13 37 Cook all Wait Not in inventory Raw tuna Timeout: 45s (default) Bank Deposit all Alcher: Inventory contains Nature rune Required - Stop Inventory contains Adamant platebody Required - Stop Spell High Level Alchemy Wait Time 600-900 Click item Adamant platebody Wait Time 600-900 Miner: #Mine: Inventory Contains Rune pickaxe Required - #Bank Inventory Not full Required - #Bank Mine Rock Coal (13, 3, 7, 0 :: 17, 8, 0) #Bank: Walk CAMELOT_BANK Bank Deposit all Coal Bank Withdraw unnoted Rune pickaxe IA 1 Required - Stop #Mine
-
Anyone planning to buy/play Black desert online?
Botre replied to mudrlantik's topic in Spam/Off Topic
-
Looks sexy af. Haven't used one yet :x
-
Yes. But I won't need it.
-
He trolled the wrong person one too many times.
-
Zooming: Grid snapping (left-corner): Font & Color selectors
-
What does getUsername() return?
-
Pretty sure this qualifies as a "method".