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.

Can I get some advice on Progressive Combat level Logic?

Featured Replies

I've been stuck with this for a few days now, I'm not looking for any code but I do need some advice or guidance

__Scenario__

You want 30 Att, 30 Str, 30 Def

Issue 1: 

eatFoodtoHeal();
progressiveCombatCheck();
loot();
fightMonsters();

if you kill 100 Monsters that's 100 combat checks, the method list is long enough already, or maybe I'm just to sensitive?

Issue 2: progressiveCombatCheck

What would this look like? I thought of:

TrainAttack();

  • If myAttackLevel > setAttackLevel ( you want 30 attack and your attack is now 30 )  {TrainStrength}

Else If myStrengthLevel > setStrengthLevel{TrainDefence}

Else return 

Issue 2A: 

This sucks, what if I'm 1 attack and I want 30A 30S 30D, it's going to train from  1 - 30 attack with only 1 Strength? oh great.. 

 

What I'm trying to achieve:

Im not sure what this method is going to be called by, especially without doing issue 1

  • chooseRandomCombatSKill();
  • This will pick 1 / 3 choices AT RANDOM
  • Train attack 30% of set Level():
  • Train str 30%();
  • Train def30% ()

But what is going to call this method? When? Where?

Should I:

  • use onMessage to determine when iv leveled up x levels and it's time to change (feels bad because that's another Seperate Thread looping 100s and 1000s of times?)  
  • Do Issue 1 and go with checking your combat levels before or after you kill a monster? 1000s of times... 
  • I'm aware of Task/Node systems, but you will still get the issue of not knowing what condition will call the method, you would have to multi thread for just 1 method.... sad times indeed.

 

Please help me people of the scripting underworld ,

Roast me :ditto:?

 

 

Edited by Elixar
Formatting

Heres a quick snippet of the logic you would use for checks.

public int onLoop() throws InterruptedException {
		if (skills.getStatic(Skill.STRENGTH) >= 30 && (skills.getStatic(Skill.ATTACK) >=30 && (skills.getStatic(Skill.DEFENCE)) >=1)){
			def();
		}
		if (skills.getStatic(Skill.STRENGTH) >= 30 && (skills.getStatic(Skill.ATTACK)) >=1) {
			att();
		}
		if (skills.getStatic(Skill.STRENGTH) >= 1 && (skills.getStatic(Skill.STRENGTH)) < 30)) {
			str();
		}
	}
	return random(200, 300);
}

Then you would just need to make a voids for str,att,def.

in this order it would get strength to 30 and then change to attack, and if attack and str are >=30 it will do defence.

edit: just read you want to do 30% of the level before continuing, would just have to make 6 more of these calling the right levels you want.

		if (skills.getStatic(Skill.STRENGTH) >=10 && (skills.getStatic(Skill.STRENGTH)) <20)) {
			str();
		}

 

Edited by Thiccboi

  • Author
1 hour ago, Thiccboi said:

 


		if (skills.getStatic(Skill.STRENGTH) >=10 && (skills.getStatic(Skill.STRENGTH)) <20)) {
			str();
		}

 

This could work, Im just thinking that across 100 accounts you could tell they all use my script because they all

 

Got 10Att 10Str 10Def

Got 20Att 20Str 20Def

Sure you can set the end result to

30Att 30Str 1Def, but do you see how they all got to those levels through basically the same sequence? 

 

I mean I guess instead of

attack > 10

I could have 

Attack > 30% setAttackLevel(50)

Later...

Attack > 50% setAttackLevel(50)

This is getting quite complex :/ hmm.. would that work?! Interesting thoughts  @Thiccboi

Edited by Elixar

You could just swapToRandomStyle() after x levels. You don't need a separate thread either to keep track of new levels gained. It can all be done within the same thread.

Example:

1-4 Attack

1-3 Def

1-5 Strength

5 - 8 Strength (swapped to the same one)

3 - 7 Def

7 - 10 Def

4 - 8 Attack

 

You could do something like:

- Pick random skill that isn't at desired level
- Train it to min(desired level, current level + random(min levels before changing, max levels before changing))
- Repeat
 

You could simply just check for levels, i'm sure the api has methods for grabbing current level, change your combat style based off your current levels, yes it might "check" if your attack is say less than 30 multiple times but it costs practically nothing to do so in terms of cpu cycles. If you had this in a thread checking every 1ms then that'd be a different story, you only need to check in your code where it applies

  • Author

So this means I'm over thinking issue 1 right?

Issue 1

eatFoodtoHeal();
progressiveCombatCheck();
loot();
fightMonsters();

Will be the end result? I just worry that Over 10 hours its a lot of combat setting checks. I guess jagex wont see that... and my CPU probably doesn't care either because it will be only 20-ish extra lines which Is nothing to a PC/ botFarm right? 

Cheers for the help guys :gnome:

 

Edited by Elixar

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.