Jump to content

Can I get some advice on Progressive Combat level Logic?


Elixar

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...