mousbros Posted March 12, 2020 Share Posted March 12, 2020 I wanna do something like if 100 tin ores mined then go to state trading but how should the script know how many tin ores it mined. maybe getInventory().containts(Tin ore) +1? I really appereciate your help Quote Link to comment Share on other sites More sharing options...
Gunman Posted March 12, 2020 Share Posted March 12, 2020 @mousbros Make a int called whatever you want. Then you have 2 options you can either track it based off what is in your bank when you go to bank or do int++ after everytime you mine the ore. 1 Quote Link to comment Share on other sites More sharing options...
mousbros Posted March 12, 2020 Author Share Posted March 12, 2020 21 minutes ago, Gunman said: @mousbros Make a int called whatever you want. Then you have 2 options you can either track it based off what is in your bank when you go to bank or do int++ after everytime you mine the ore. thank you im gonna try that out 1 Quote Link to comment Share on other sites More sharing options...
mousbros Posted March 12, 2020 Author Share Posted March 12, 2020 (edited) 1 hour ago, mousbros said: thank you im gonna try that out @Gunman case "MINING": final Area MINING_AREA1 = new Area (2982,3233,2990,3242); int ItemsMade = 0; if (!getInventory().isFull()) { if(MINING_AREA1.contains(myPosition()) && (getInventory().contains("Bronze pickaxe"))){ RS2Object ore = getObjects().closest(11362,11363); if (ore != null) { log ("Found ore"); if (!myPlayer().isAnimating()) { if (!myPlayer().isMoving()) { ore.interact("Mine"); antiban(); ItemsMade += 1; log("Made an item"); if (ItemsMade == 5) { log("Walking to Draynor"); getWalking().webWalk(Banks.DRAYNOR); } } } } } } I did something like this, knows when the item is made cuz I see the log. but it doesnt go to the draynor after 5 ''items are made'' Edited March 12, 2020 by mousbros 1 Quote Link to comment Share on other sites More sharing options...
Gunman Posted March 12, 2020 Share Posted March 12, 2020 @mousbros Pretty sure you're reseting the counter every time at the start of the case. Log the int at the start of the case and the end and see if it is being reset each time. Also you can do ItemsMade++; instead of ItemsMade +=1; 1 Quote Link to comment Share on other sites More sharing options...
mousbros Posted March 12, 2020 Author Share Posted March 12, 2020 12 minutes ago, Gunman said: @mousbros Pretty sure you're reseting the counter every time at the start of the case. Log the int at the start of the case and the end and see if it is being reset each time. Also you can do ItemsMade++; instead of ItemsMade +=1; yea your right, dumb of me. it just goes to 0 when the loop starts again. is there any trick that I can make it remember it how many times it did the loop Quote Link to comment Share on other sites More sharing options...
Gunman Posted March 12, 2020 Share Posted March 12, 2020 1 minute ago, mousbros said: yea your right, dumb of me. it just goes to 0 when the loop starts again. is there any trick that I can make it remember it how many times it did the loop Yeah....Move it out of the case. private int ItemsMade = 0; 1 Quote Link to comment Share on other sites More sharing options...
mousbros Posted March 12, 2020 Author Share Posted March 12, 2020 17 minutes ago, Gunman said: Yeah....Move it out of the case. private int ItemsMade = 0; love you made it 1 Quote Link to comment Share on other sites More sharing options...