Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SkillTracker Paint

Featured Replies

g.drawString("" + getExperienceTracker().getGainedXPPerHour(Skill.ATTACK), 346, 415);

This gets the experience of one skill, but I want multiple skills in paint, so I tried 

g.drawString("" + getExperienceTracker().getGainedXPPerHour(Skill.ATTACK) + getExperienceTracker().getGainedXPPerHour(Skill.DEFENCE), 346, 415);

But it doesn't start on 0 and it starts at 9000 and something.

g.drawString("Strength XP gained: " + xpGainedstr + "    " + beginningstrLevel + " / " + currentstrLevel + " (+" + levelsstrGained + ")", 10, 285); 
g.drawString("Attack XP gained: " + xpGainedatt + "    " + beginningattLevel + " / " + currentattLevel + " (+" + levelsattGained + ")", 10, 300); 

This is what I use for something with more than 1 skill smile.png

Edited by IHB

g.drawString("" + getExperienceTracker().getGainedXPPerHour(Skill.ATTACK), 346, 415);

This gets the experience of one skill, but I want multiple skills in paint, so I tried 

g.drawString("" + getExperienceTracker().getGainedXPPerHour(Skill.ATTACK) + getExperienceTracker().getGainedXPPerHour(Skill.DEFENCE), 346, 415);

But it doesn't start on 0 and it starts at 9000 and something.

 

 

This is due to the String thinking + is concatenation, and you figuring the 2 Integers would be added. How java reads this is:

"" + "900" + "0"

Where you want code like:

Integer totalXpPerHour = getExperienceTracker().getGainedXPPerHour(Skill.ATTACK) + getExperienceTracker().getGainedXPPerHour(Skill.DEFENCE);
g.drawString("" + totalXpPerHour, 346, 415);

You could also do it like this, but I feel it is messier:

g.drawString("" + (getExperienceTracker().getGainedXPPerHour(Skill.ATTACK) + getExperienceTracker().getGainedXPPerHour(Skill.DEFENCE)), 346, 415);

Note the parenthesis around the addition parts, then the "" + to make it a String.

Edited by Lemons

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.