investmentideas Posted March 1, 2019 Share Posted March 1, 2019 Hi, I am making something fun, a script that sells the loot that I pick up from wherever I might be (i.e. wildy). I have created two string "groups" where Item group 5 consists of higher value and Item group 6 consists of lower value. I want the script to sell the items from group 5 only to a certain number, and then want the script to sell Item group 6, the problem is the way I have written it I believe, for example I do not know how to get it to now go to sell ITEMS6. Where would I insert the code? Any help is appreciated and I understand this code might not be efficient, still trying to learn Below is the code; if (getInventory().contains(ITEMS5)){ if (getStore().contains(ITEMS5)){ if (getStore().getAmount(ITEMS5) <= 4){ getStore().sell(String.valueOf(ITEMS5), 1); new ConditionalSleep(250, 125) { @Override public boolean condition() throws InterruptedException { return (getStore().getAmount(ITEMS5) >= 5); } }.sleep(); } } else { if(!getStore().contains(ITEMS5)){ getStore().sell(String.valueOf(ITEMS5), 5); new ConditionalSleep(250, 125) { @Override public boolean condition() throws InterruptedException { return (getStore().getAmount(ITEMS5) >= 5); } }.sleep(); } } } Quote Link to comment Share on other sites More sharing options...