Skip 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.

Please Hook 'getCombatLevel()'

Featured Replies

Character#getCombatLevel() -- Please implement this.

Untested combat level calculation

 

import org.osbot.script.Script;
import org.osbot.script.rs2.skill.Skill;
import org.osbot.script.rs2.skill.Skills;

public class CombatLevel {
	Script script;
	Skills Skills = script.client.getSkills();

	int[] LEVELS = { Skills.getLevel(Skill.ATTACK),
			Skills.getLevel(Skill.STRENGTH), Skills.getLevel(Skill.DEFENCE),
			Skills.getLevel(Skill.RANGED), Skills.getLevel(Skill.PRAYER),
			Skills.getLevel(Skill.MAGIC), Skills.getLevel(Skill.HITPOINTS) };
	double PRAYER = Math.floor(LEVELS[4] / 2);
	double BASE = (LEVELS[6] + LEVELS[2] + PRAYER) * 0.25;
	double MELEE = (LEVELS[0] + LEVELS[1]) * 0.325;
	double RANGED = 0.325 * (3 / 2 * LEVELS[3]);
	double MAGIC = 0.325 * (3 / 2 * LEVELS[5]);

	public int getCombatLevel() {
		if (MELEE > MAGIC && MELEE > RANGED) {
			return (int) (BASE + MELEE);
		}
		if (MAGIC > MELEE && MAGIC > RANGED) {
			return (int) (BASE + MAGIC);
		}
		if (RANGED > MELEE && RANGED > MAGIC) {
			return (int) (BASE + MAGIC);
		}
		return 0;
	}
}

Edited by Coordinates

Could work ^^(The code the above posted). But I'm not scripter

Built in get combat lvl would be very nice, useful when pking you don't have to right click, and can be used in scripts in the wilderness (Run Away if chareceter near combat level ) something like that,

I support though

 

edit: Could it always have player name above other peoples chareceters

 

thejohnsman123(68)

 

play56owner(39)

 

something along the lines of that?

Edited by W8621

  • 4 weeks later...
Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.