Java Code Examples for net.runelite.api.Client#getRealSkillLevel()
The following examples show how to use
net.runelite.api.Client#getRealSkillLevel() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HitPointsRenderer.java From plugins with GNU General Public License v3.0 | 6 votes |
@Override protected void update(Client client, StatusBarsOverlay overlay) { maximumValue = client.getRealSkillLevel(Skill.HITPOINTS); currentValue = client.getBoostedSkillLevel(Skill.HITPOINTS); restore = overlay.getRestoreValue(Skill.HITPOINTS.getName()); final int poisonState = client.getVar(VarPlayer.IS_POISONED); if (poisonState > 0 && poisonState < 50) { standardColor = COLOR_POISON; } else if (poisonState >= 1000000) { standardColor = COLOR_VENOM; } else { standardColor = COLOR_STANDARD; } }
Example 2
Source File: AgilitySession.java From plugins with GNU General Public License v3.0 | 6 votes |
void incrementLapCount(Client client) { calculateLapsPerHour(); ++totalLaps; int currentExp = client.getSkillExperience(Skill.AGILITY); int nextLevel = client.getRealSkillLevel(Skill.AGILITY) + 1; double courseTotalExp = course.getTotalXp(); if (course == Courses.PYRAMID) { // agility pyramid has a bonus exp drop on the last obstacle that scales with player level and caps at 1000 // the bonus is not already accounted for in the total exp number in the courses enum courseTotalExp += Math.min(300 + 8 * client.getRealSkillLevel(Skill.AGILITY), 1000); } int remainingXp; do { remainingXp = nextLevel <= Experience.MAX_VIRT_LEVEL ? Experience.getXpForLevel(nextLevel) - currentExp : 0; nextLevel++; } while (remainingXp < 0); lapsTillLevel = remainingXp > 0 ? (int) Math.ceil(remainingXp / courseTotalExp) : 0; int goalRemainingXp = client.getVar(VarPlayer.AGILITY_GOAL_END) - currentExp; lapsTillGoal = goalRemainingXp > 0 ? (int) Math.ceil(goalRemainingXp / courseTotalExp) : 0; }
Example 3
Source File: PrayerRenderer.java From plugins with GNU General Public License v3.0 | 5 votes |
@Override protected void update(Client client, StatusBarsOverlay overlay) { maximumValue = client.getRealSkillLevel(Skill.PRAYER); currentValue = client.getBoostedSkillLevel(Skill.PRAYER); standardColor = client.getVar(Varbits.QUICK_PRAYER) == 1 ? COLOR_ACTIVE : COLOR_STANDARD; restore = overlay.getRestoreValue(Skill.PRAYER.getName()); }
Example 4
Source File: GauntletPotion.java From plugins with GNU General Public License v3.0 | 5 votes |
@Override public StatsChanges calculate(Client client) { // Restores prayer similar to PrayerPotion but there aren't any possible boost so simplify the calculation final int restorePerc = (int) (client.getRealSkillLevel(Skill.PRAYER) * PRAYER_RESTORE_PERCENT); final StatChange prayer = heal(Stats.PRAYER, restorePerc + PRAYER_RESTORE_DELTA).effect(client); final StatChange runEnergy = heal(Stats.RUN_ENERGY, 40).effect(client); final StatsChanges changes = new StatsChanges(2); changes.setStatChanges(new StatChange[]{runEnergy, prayer}); return changes; }
Example 5
Source File: GauntletPotion.java From runelite with BSD 2-Clause "Simplified" License | 5 votes |
@Override public StatsChanges calculate(Client client) { // Restores prayer similar to PrayerPotion but there aren't any possible boost so simplify the calculation final int restorePerc = (int) (client.getRealSkillLevel(Skill.PRAYER) * PRAYER_RESTORE_PERCENT); final StatChange prayer = heal(Stats.PRAYER, restorePerc + PRAYER_RESTORE_DELTA).effect(client); final StatChange runEnergy = heal(Stats.RUN_ENERGY, 40).effect(client); final StatsChanges changes = new StatsChanges(2); changes.setStatChanges(new StatChange[]{runEnergy, prayer}); return changes; }
Example 6
Source File: SkillStat.java From plugins with GNU General Public License v3.0 | 4 votes |
@Override public int getMaximum(Client client) { return client.getRealSkillLevel(this.skill); }
Example 7
Source File: SkillStat.java From runelite with BSD 2-Clause "Simplified" License | 4 votes |
@Override public int getMaximum(Client client) { return client.getRealSkillLevel(this.skill); }