Jump to content

How to see if inventory is full?


Recommended Posts

Posted
4 minutes ago, Tj2907 said:

Okay that works, but in the video he has client.getInventory

Will it function the same?

Ehh you're probably writing all your code in one class?

 

The guy in the video you're watching is probably using a Task based method of programming which involves using multiple classes and a method provider, he's called it client I guess. In every class he uses client.theMethod, for you just remove the .client before everything you're following.

Posted (edited)
10 minutes ago, Tj2907 said:

Okay that works, but in the video he has client.getInventory

Will it function the same?

thats basically saying " If the inventory is full, do this/these actions " for example 

 

if (getInventory().isFull()){
	getInventory().dropAll();
}

if the inventory is full, drop everything in the inventory.

Edited by TrekToop11
edit for clarification.
Posted
8 minutes ago, IHB said:

Ehh you're probably writing all your code in one class?

 

The guy in the video you're watching is probably using a Task based method of programming which involves using multiple classes and a method provider, he's called it client I guess. In every class he uses client.theMethod, for you just remove the .client before everything you're following.

 

6 minutes ago, TrekToop11 said:

thats basically saying " If the inventory is full, do this/these actions " for example 

 


if (getInventory().isFull()){
	getInventory().dropAll();
}

if the inventory is full, drop everything in the inventory.

Alright thanks guys!

3 minutes ago, Chris said:

dont watch an old video :???: 

use the API docs :think:

http://osbot.org/api

I was watching an old video because I am trying to learn how to properly use the API with a video representation because it is easier to learn that way

Posted
5 minutes ago, IHB said:

You're watching the same draynor chopper video I watched I think?

@Chris is right that's very old for OSBot 1

 

You're better off having a look through the tutorial section on the actual forum :)

https://osbot.org/forum/forum/250-tutorials/

Well I tried to follow by looking at the pictures on some of the forum topics but it was harder for me to understand it all compared to a video. I'm just using the video as like reference I guess to learn to use the API

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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