Jump to content

OSBot logger


nills3

Recommended Posts

Hello.

This thing really bugs me. Recently switched from poopbot (lmao it automatically changed to poopbot that's hilarious. heard some rumours about the source code being stolen) to osbot so I'm still tryna learn the ropes.

My script crashes, doing the simplest thing in the tutorials here. And I can't check the logger because it gets stuck, but I am still logged in-game.

If you're wondering what the code is;

final Bank bank = new Bank();

if (bank != null) {
				log("Bank isnt null");
					bank.open();
				} else {
					log ("Bank is null");
					
			}

Tried doing it both this way, and this way;

			  NPC banker = npcs.closest("Banker"); 
			  if (banker != null) {
			  banker.interact(("Bank")); 
			  sleepR(); 
			  bank.depositAll(); 
			  sleepR();
			  

Not sure why this doesn't work. But my main issue is the logger. I need to see what causes the crashes so.. Any ideas? Does it get logged anywhere else where I can check?

 f919faea1f46f550279ad9d9a1248528.thumb.png.f9e8d8e40a3380c2db029f6fd025fa4b.png

Edited by nills3
Link to comment
Share on other sites

7 minutes ago, nills3 said:

Hello.

This thing really bugs me. Recently switched from poopbot (lmao it automatically changed to poopbot that's hilarious. heard some rumours about the source code being stolen) to osbot so I'm still tryna learn the ropes.

My script crashes, doing the simplest thing in the tutorials here. And I can't check the logger because it gets stuck, but I am still logged in-game.

If you're wondering what the code is;


final Bank bank = new Bank();

if (bank != null) {
				log("Bank isnt null");
					bank.open();
				} else {
					log ("Bank is null");
					
			}

Tried doing it both this way, and this way;


			  NPC banker = npcs.closest("Banker"); 
			  if (banker != null) {
			  banker.interact(("Bank")); 
			  sleepR(); 
			  bank.depositAll(); 
			  sleepR();
			  

Not sure why this doesn't work. But my main issue is the logger. I need to see what causes the crashes so.. Any ideas? Does it get logged anywhere else where I can check?

 f919faea1f46f550279ad9d9a1248528.thumb.png.f9e8d8e40a3380c2db029f6fd025fa4b.png

1. Check if player is in correct area to bank

2. use getBank().open

3. Use conditional sleep to sleep until bank is open

 

Link to comment
Share on other sites

42 minutes ago, nills3 said:

Thank you for trying to help.

Remove this:
 

final Bank bank = new Bank()


You don't instantiate `Bank`, it's already instantiated for you and provided via the MethodProvider. If you are in your main Script class, you can access it using getBank()

Have a read through my tutorial if you haven't already, it might help you out a bit:

https://osbot.org/forum/topic/115124-explvs-scripting-101/

Edited by Explv
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...