Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public State getState() {
- if(gui.usefood || gui.usepotions || gui.useranged) {
- return State.CHECKITEMS;
- }
- if(gui.usefood && getInventory().contains(food)) {
- float percent = getSkills().getDynamic(Skill.HITPOINTS)*100/getSkills().getStatic(Skill.HITPOINTS);
- if(Math.round(percent) <= gui.jSlider2.getValue()) {
- return State.EAT;
- }
- } else {
- return State.TO_BANK;
- }
- if(handleatthillgiant.isAtHillGiants()) {
- return State.FIGHT;
- } else {
- return State.TO_HILLGIANTS;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement