Goku1 Posted October 23, 2015 Share Posted October 23, 2015 (edited) I am trying to figure out how the scripter gets the "get inventory" statement as an option to pick at 10:02 of this video: This is what I keep getting as for some reason I do not get the same option as the video scripter: http://puu.sh/kV6PD/3e152c8a5c.png Edited October 23, 2015 by Goku1 Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 23, 2015 Share Posted October 23, 2015 The tutorial you're using is outdated. Now you can just use: getInventory() with the methods: http://osbot.org/api/org/osbot/rs07/api/Inventory.html#deselectItem-- Quote Link to comment Share on other sites More sharing options...
Extreme Scripts Posted October 23, 2015 Share Posted October 23, 2015 The tutorial you're using is outdated. Now you can just use: getInventory() with the methods: http://osbot.org/api/org/osbot/rs07/api/Inventory.html#deselectItem-- Quote Link to comment Share on other sites More sharing options...
Goku1 Posted October 23, 2015 Author Share Posted October 23, 2015 (edited) The tutorial you're using is outdated. Now you can just use: getInventory() with the methods: http://osbot.org/api/org/osbot/rs07/api/Inventory.html#deselectItem-- Ok I am only worrying about making my first regular tree chopper. My only concern is with the onLoop Can you give me an example of typing the getInventory() for this project? What do I do with the methods listing you just gave me? Are they supposed to automatically fill out? I feel that I capable of filling out areas if you give me examples like this: getinventory(Place tree here). Edited October 23, 2015 by Goku1 Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 23, 2015 Share Posted October 23, 2015 Ok I am only worrying about making my first regular tree chopper. My only concern is with the onLoop Can you give me an example of typing the getInventory() for this project? What do I do with the methods listing you just gave me? Are they supposed to automatically fill out? I feel that I capable of filling out areas if you give me examples like this: getinventory(Place tree here). not sure what you mean... So getInventory() is used for inventory interactions . for example: getInventory().getAmount("Yew log"); will return the number of items with the name 'yew log' in your inventory. getInventory().dropAll() will drop all the items in your inventory etc... as for interacting with trees, do it the same as I've done for the tea thiever, just change the names to the trees feel free to pm me if you have any further questions apa Quote Link to comment Share on other sites More sharing options...
Goku1 Posted October 23, 2015 Author Share Posted October 23, 2015 not sure what you mean... So getInventory() is used for inventory interactions . for example: getInventory().getAmount("Yew log"); will return the number of items with the name 'yew log' in your inventory. getInventory().dropAll() will drop all the items in your inventory etc... as for interacting with trees, do it the same as I've done for the tea thiever, just change the names to the trees feel free to pm me if you have any further questions apa I tried to pm you but OSBot takes me to an offline page. I posted under the onLoop section this: public int onLoop(){ getInventory().getAmount("logs"); getInventory().dropAll("logs"); return random(200,300); } How does the onLoop section look to you? I have your thiever script example, would I post the tree interaction under the onStart or the onLoop section? Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 24, 2015 Share Posted October 24, 2015 I tried to pm you but OSBot takes me to an offline page. I posted under the onLoop section this: public int onLoop(){ getInventory().getAmount("logs"); getInventory().dropAll("logs"); return random(200,300); } How does the onLoop section look to you? I have your thiever script example, would I post the tree interaction under the onStart or the onLoop section? getInventory().getAmount("Logs"); does nothing on it's own, it just returns the number of logs in your invo. So for example int numberOfLogs = getInventory().getAmount("Logs"); //counts the number of logs in ur inventory and stores it in the 'numberOfLogs' variable log("Number of logs: " + numberOfLogs); //prints the number of logs in the console. So what your code would do as it stands would just empty your inventory. Take a look back at my tutorial and look at the framework I used with the state system and so on and try and figure out how the code flows. That should then help you understand how to write your woodcutter apa Quote Link to comment Share on other sites More sharing options...