dutchxxje Posted February 25, 2016 Posted February 25, 2016 hello guys how can i make a counter for total made X like every 4 experience i get in crafting has to be +1 made anyone know how to make this? and can help with this?
Chris Posted February 25, 2016 Posted February 25, 2016 (edited) private int counter; if something made counter += (int) getInventory().getAmount("name here"); Edited February 25, 2016 by Sinatra
dutchxxje Posted February 25, 2016 Author Posted February 25, 2016 private int counter; if something made counter += (int) getInventory().getAmount("name here"); it really has to go on expierence every 4 crafting xp gained is +1 made since i dont loot anything i just click on it so it had to be something like total xp gained =4 4=1 or something like that
Chris Posted February 25, 2016 Posted February 25, 2016 it really has to go on expierence every 4 crafting xp gained is +1 made since i dont loot anything i just click on it so it had to be something like total xp gained =4 4=1 or something like that gfx.drawString((getExperienceTracker().getGainedXP(Skill.RUNECRAFTING)/7)+"",150,95); // essence used
dutchxxje Posted February 25, 2016 Author Posted February 25, 2016 (edited) private int counter; if something made counter += (int) getInventory().getAmount("name here"); EDIT fixed I know its not clean looking but this was my fix this.totalmade = (this.skills.getExperience(Skill.CRAFTING) - this.startExperiencecrafting); this.madeHour = ((int)(this.totalmade * 3600000.0D / (System.currentTimeMillis() - this.startTime))); this.madetotal = totalmade / 4; this.makehour = madeHour / 4; Edited February 25, 2016 by dutchxxje