August 21, 20169 yr Hello guys i finished my shop buying script it works just fine, made simple paint which shows time and money spent but i;m struggling to create buys/hr in my paint.Currently i do it like this: once i bank i just do increase in 27 but due some lagg it can add upto 80+.So if sombody could post flawless solution that would be damn good
August 21, 20169 yr int itemCount = (int) getScript().getInventory().getAmount("Beer"); public int getIncrease(String name) { int count = 0; for (Item item : getScript().getInventory().getItems()) { if (item == null) break; if (item.getName().equals(name)) count++; } int increaseAmount = count - itemCount; itemCount = count; return increaseAmount; } Don't forget to handle when you bank and the increase becomes negative Edited August 21, 20169 yr by House
Create an account or sign in to comment