Jump to content

How do I check how many stacks of an Item I have?


creationx

Recommended Posts

Hi everyone! hope all is well. I am currently developing a paid script that I will be releasing to the community hopefully VERY soon and I had a couple of questions regarding scripting.

 

1. How do I go about checking how many stacks of an item I have? Like if I had 1 million Salmon, how would I  get the bot to read this information - Is it possible to extract this info without righclicking the item?

 

 

Link to comment
Share on other sites

Awesome, thanks loudpacks! I have another question: 

 

I want to find the color of something in a specific area on the screen and click it, how would I go about doing that?

 

I know Scar use to be FindColorTolerance(x, y, COLOR, x1, y1, x2, y2, tolerance); but I can't seem to find the mirror code here in OSBot.

 

 

edit: while I'm here I'll just ask all the questions I have:

 

I want to log data for the script to use later, how would I go about doing that?

Basically like creating a counter : so that everytime an action occurs it will add +1 to the counter, so that when I read the counters value later, it will have adjusted. 

 

So for example:

Counter = 0.

Action 1 performed, add + 1 to Counter.

Counter = 1. 

How much does Counter =?

Counter = 1. 

Action 1 performed, add + 1 to Counter.

How much does Counter =?

Counter = 2. 

 

Edited by creationx
Link to comment
Share on other sites

Awesome, thanks loudpacks! I have another question: 

 

I want to find the color of something in a specific area on the screen and click it, how would I go about doing that?

 

I know Scar use to be FindColorTolerance(x, y, COLOR, x1, y1, x2, y2, tolerance); but I can't seem to find the mirror code here in OSBot.

 

 

edit: while I'm here I'll just ask all the questions I have:

 

I want to log data for the script to use later, how would I go about doing that?

Basically like creating a counter : so that everytime an action occurs it will add +1 to the counter, so that when I read the counters value later, it will have adjusted. 

 

So for example:

Counter = 0.

Action 1 performed, add + 1 to Counter.

Counter = 1. 

How much does Counter =?

Counter = 1. 

Action 1 performed, add + 1 to Counter.

How much does Counter =?

Counter = 2. 

 

LOL have you read the API? Use interactions.

 

Then you can do:

int count = 0;

if(getItems().closest("Dildo") != null && getItems().closest("Dildo").interact("Take"){
count++;
log(count);
//sleep
}
Edited by LoudPacks
  • Like 1
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...