Pogba Posted February 5, 2017 Share Posted February 5, 2017 Hey, I'm trying to write my first script and so far I feel it's going ok, however, If I want it to loot items does the first letter of the item have to be capitals exactly as it shows or does it not matter? And how would I implement it to pick something up over a set value? Thanks Quote Link to comment Share on other sites More sharing options...
Juggles Posted February 5, 2017 Share Posted February 5, 2017 Quote Link to comment Share on other sites More sharing options...
Pogba Posted February 5, 2017 Author Share Posted February 5, 2017 1 minute ago, Juggles said: Oh thanks Juggles, I'll look see if I can understand it :P Quote Link to comment Share on other sites More sharing options...
House Posted February 5, 2017 Share Posted February 5, 2017 (edited) 8 minutes ago, Pogba said: If I want it to loot items does the first letter of the item have to be capitals exactly as it shows or does it not matter? This is basic java. String.toLowerCase().equals(String.toLowerCase()) And to answer how you can implement picking up items with values over X, You need to access a database of item values and when you find a new item on the ground which you have not stored the value of you query the value. You then make an item filter for nearby items and filter them based on their value you got earlier. (do NOT re-query every item every loop cycle but rather store the value if read once) Also for ideal income you should create your own unit of measurement for an items "worth" to pick up. What if you have an item worth 2M that is 10 tiles away and an item worth 1M 1 tile away. You generally want to grab the closer one if the worth of it is not too low. This can ofc be expanded and tweaked to your liking. Edited February 5, 2017 by House 1 Quote Link to comment Share on other sites More sharing options...
Pogba Posted February 5, 2017 Author Share Posted February 5, 2017 1 minute ago, House said: This is basic java. String.toLowerCase().equals(String.toLowerCase()) And to answer how you can implement picking up items with values over X, You need to access a database of item values and when you find a new item on the ground which you have not stored the value of you query the value. You then make an item filter for nearby items and filter them based on their value you got earlier. (do NOT re-query every item every loop cycle but rather store the value if read once) Also for ideal income you should create your own unit of measurement for an items "worth" to pick up. What if you have an item worth 2M that is 10 tiles away and an item worth 1M 1 tile away. You generally want to grab the closer one if the worth of it is not too low. Ah thanks House, thought I'd attempt to look at my own script before purchasing from someone, I'll probably fail but... Quote Link to comment Share on other sites More sharing options...
House Posted February 5, 2017 Share Posted February 5, 2017 Just now, Pogba said: Ah thanks House, thought I'd attempt to look at my own script before purchasing from someone, I'll probably fail but... You cant fail if you never stop typing 2 Quote Link to comment Share on other sites More sharing options...
Pogba Posted February 5, 2017 Author Share Posted February 5, 2017 Just now, House said: You cant fail if you never stop typing Haha true Quote Link to comment Share on other sites More sharing options...