January 31, 201610 yr 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?
January 31, 201610 yr long salmonCount = getInventory().getAmount("Salmon"); long salmonCount = getBank().getAmount("Salmon"); Edited January 31, 201610 yr by LoudPacks
January 31, 201610 yr Author 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 January 31, 201610 yr by creationx
January 31, 201610 yr 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 January 31, 201610 yr by LoudPacks
January 31, 201610 yr Author I have read the API, but I have troubles understanding how to implement what it says. Please understand I'm new to Java and still learning. Thank you for your help guys.
January 31, 201610 yr I have read the API, but I have troubles understanding how to implement what it says. Please understand I'm new to Java and still learning. Thank you for your help guys. is allg, was just linking it incase u didnt see it
January 31, 201610 yr I have read the API, but I have troubles understanding how to implement what it says. Please understand I'm new to Java and still learning. Thank you for your help guys. I would suggest following the Tea Stall guide by Apaec in the scripting tutorial section.
January 31, 201610 yr You can make your own class with an internal Timer to check on conditions to increase your values. Add a getter for you to retrieve the values. Idk why you would need color detection, but try looking at the ColorPicker, that's all we have.
Create an account or sign in to comment