Jump to content

How to see if inventory is full?


Tj2907

Recommended Posts

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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...