SRL Archive - RS Scripts

Runescape CMB lvl formule


Laimonas171

2008-11-22 04:25:19

Someone please post here forumule to CALC RuneScape combat lvl forumle.. NOT PHP script.. i need all lvl includeing Summoning.
it should be with ATTACK, STRENGHT, DEFENCE, HITPOINTS, PRAYERS, RANGE, MAGE and SUMMONING.
in one formule. need just math simple. not scripting

lordsaturn

2008-11-22 11:17:00

http://www.srl-forums.com/forum/calccblvl-t41245.html

Markus

2008-11-22 11:30:55

You should be able to understand my function, if not, highest out of these formulas:

Laimonas171

2008-11-22 15:48:59

here is 3 formules, cmb range and mage.. i need one with all skills here is
(maxe(maxe(0.25*((atk+str) + ((atk+str) / 3)+def+hp+(0.5*pray)+(0.5*sum)), 0.25*(2*range+def+hp+(0.5*pray)+(0.5*sum))), (0.25*(2*mage+def+hp+(0.5*pray)+(0.5*sum)))));

and it work on scar.. i wanna use on visual basic.. that 3 formules i was found in google.. but i cant do one formule whit all three skill, range mage and summoning… and sure main cmb skills…

Markus

2008-11-22 16:46:51

From: Laimonas171
here is 3 formules, cmb range and mage.. i need one with all skills here is
(maxe(maxe(0.25*((atk+str) + ((atk+str) / 3)+def+hp+(0.5*pray)+(0.5*sum)), 0.25*(2*range+def+hp+(0.5*pray)+(0.5*sum))), (0.25*(2*mage+def+hp+(0.5*pray)+(0.5*sum)))));

and it work on scar.. i wanna use on visual basic.. that 3 formules i was found in google.. but i cant do one formule whit all three skill, range mage and summoning… and sure main cmb skills…

You know how the combat system works?
The combat system is class-based, basically either your range, mage, or atk+str decide what your combat level will be. This class-combat level is then added to the base combat level, which is made of def, hp, pray and summoning. The highest class-combat level is used.
So, if you got a high mage level, your range/melee skills wont make a difference to your combat level, so it isn't used.
And if you know a bit of visual basic, you should be able to convert my scar version to VB, maxe is basically if a > b then result := a else result := b;

Laimonas171

2008-11-25 07:43:12

From: Markus
You know how the combat system works?
The combat system is class-based, basically either your range, mage, or atk+str decide what your combat level will be. This class-combat level is then added to the base combat level, which is made of def, hp, pray and summoning. The highest class-combat level is used.
So, if you got a high mage level, your range/melee skills wont make a difference to your combat level, so it isn't used.
And if you know a bit of visual basic, you should be able to convert my scar version to VB, maxe is basically if a > b then result := a else result := b;


oh thank you :)

The_Scripts

2008-11-25 18:06:04

This formula does not seem to be 100% accurate.

One of my accounts has the following stats…
atk = 40;
str = 52;
def = 1;
hp = 43;
pray = 1;
sum = 1;
range = 1;
mage = 15;

The script then gives the following results…
Internal CB level: 41.75
Real CB level: 41

Problem is the account is level 40.

LiveNDieHye

2008-11-26 10:39:39

i think everyone knows this already but gj for trying

Markus

2008-11-26 11:21:20

From: The_Scripts
This formula does not seem to be 100% accurate.

One of my accounts has the following stats…
atk = 40;
str = 52;
def = 1;
hp = 43;
pray = 1;
sum = 1;
range = 1;
mage = 15;

The script then gives the following results…
Internal CB level: 41.75
Real CB level: 41

Problem is the account is level 40.


Got the 'bug'.
Basically, RS uses 13/10 (= 1.3), which I thought that it was a mistake and they meant 4/3 (= 1.3333 etc.), so I made the 3/2 * 4/3 = 12/6 = 2. But it is 1.3*1.5 = 1.95, so that caused a bit of a difference. Melee they used the normal 13/10, but I made that 4/3 too.
And I forgot the 'odd prayer levels don't count', fixed that too :)
Gives now cb 40.9 = 40 :)

Laimonas171

2008-11-26 13:26:54

ok i made something.. for me it calcs very good :)

VB6 calc Source in Attachment

[-jesus-]

2008-11-27 09:16:16

From: Laimonas171
ok i made something.. for me it calcs very good :)

VB6 calc Source in Attachment


I just started VB, but instead of having that giant area to the side, couldn't you have just used tooltips when you mouse over each skill rather than showing txt?

Laimonas171

2008-11-27 09:29:15

From: [-jesus-]
I just started VB, but instead of having that giant area to the side, couldn't you have just used tooltips when you mouse over each skill rather than showing txt?


if i good understand question then you double click on item in my spot it's textboxes

in right side of script window you see Change on most of other objects it is Click
Chouse MouseMove

then write

Label1.caption = "your text"
i made it on all text boxes and on the main form. if you have more questions or i can help you just text me :)
sorry for bad english. :rolleyes:

Ron

2009-05-29 03:18:07

This may or may not help, but the most accurate combat formula (that I could find) is moderated by a kid on the RuneScape forums.

http://forum.runescape.com/forums.ws?97,98,9,33330028,goto,1

I also based my calculations off of his when I wrote my stats grabber.

Narcle

2009-05-29 03:41:25

Hoi :
function combatLevel(attack, defence, strength, hp, prayer, ranged, magic, summoning: integer): Extended;
var
Base, melee, ranger, mage: extended;
begin
Base := defence + hp + floor(prayer / 2) + floor(summoning / 2)) * 0.25;

melee := (attack + strength) * 0.325;
ranger := floor(ranged * 1.5) * 0.325;
mage := floor(magic * 1.5) * 0.325;

Result := Base + Max(Max(melee, ranger), mage);
end;

This has not been tested, Max requires integers so I'm pretty sure this will give a error, just need to change extended to integers. I rather have a end result of extended though. So a > setup might have to be implemented.

mormonman

2009-05-29 03:50:55


function combatLevel(attack, defence, strength, hitpoints, prayer, ranged, magic, summoning) {
var advance;

var base = (defence + hitpoints + Math.floor(prayer / 2) + Math.floor(summoning / 2)) * 0.25;

var melee = (attack + strength) * 0.325;
var range = Math.floor(ranged * 1.5) * 0.325;
var mage = Math.floor(magic * 1.5) * 0.325;
var max = Math.max(melee, range, mage);

if(max == melee)
var type = 'Warrior';
else if(max == range)
var type = 'Ranger';
else if(max == mage)
var type = 'Mage';

advance = '<div style="text-align: left;">Combat Level: <span class="value"><b>'+Math.round((base + max) * 100) / 100+'</b> '+type+'</span></div><br />';

stolen from zybez's calculator… thank goodness it was in html

Edit: btw, the calculations part is in javascript…

XabdullahX

2009-05-29 04:55:37

In vb.net (maybe 6 too) it should look like this:
[NOT TESTED]
dim deflvl as integer = 99
dim hitlvl as integer = 99
dim praylvl as integer = 99
dim sumlvl as integer = 99

dim def as integer = deflvl * 100
dim hit as integer = hitpoints * 100
dim pray as integer
dim sum as integer

if pralvl mod 2 then
pray = (praylvl - 1) * 50
else
pray = praylvl *50
end if

if sumlvl mod 2 then
sum = (sumlvl - 1) * 50
else
sum = sumlvl *50
end if

dim base as integer = def + hit + pray + sum
msgbox ("Base found, it is: " & base)
[/NOT TESTED]

Keep going yourself

cant test, dont have vb at this comp :(

EDIT: Based on this: http://forum.runescape.com/forums.ws?97,98,9,33330028,goto,1 as Ron mentioned

Da 0wner

2009-05-29 11:28:38

function CombatLevel(Attack, Defence, Strength, Hitpoints, Prayer, Ranged, Magic, Summoning : integer) : integer;
var
E1, E2, E3 : extended;
I1, I2, I3 : integer;
Base, Maxx : extended;
begin
Base := (Defence + Hitpoints + Floor(Prayer /2) + Floor(Summoning / 2)) * 0.25;
E1 := (Attack + Strength) * 0.325;
E2 := Floor(Ranged * 1.5) * 0.325;
E3 := Floor(Magic * 1.5) * 0.325;
Maxx := MaxE(I1, MaxE(I2, I3));
Result := (Round(Base + Maxx) * 100) / 100;
end;

There you go, ported from JavaScript (mormonman's post) to SCAR/Pascal :D.

Gu3st...

2009-05-29 15:18:17

No one noticed that this was a gravedig?

Da 0wner

2009-05-29 15:30:24

I did, but it was gravedug by a developer so whatever.

Dynamite

2009-05-29 15:31:35

Yeah same and everyone seemed to be putting good input in instead of spam so…

T~M

Da 0wner

2009-05-29 15:58:34

Especially my function, works fine :D.

Bobarkinator

2009-05-29 18:41:08

From: Da 0wner
ported from Java (mormonman's post)



Hahahahahahahahahahaha.

Da 0wner

2009-05-29 19:20:34

Wat?

senrath

2009-05-29 20:35:27

From: Da 0wner
Wat?


I see no Java anywhere on this page. There's some Javascript, but no Java. Huge difference in the two.

Da 0wner

2009-05-30 02:36:48

Yeah, JavaScript, that's what I thought it was :D. I didn't look on the page just copied what mormonman said (he said it was java >.>). Works fine though.

mormonman

2009-05-30 02:39:53

From: Da 0wner
Yeah, JavaScript, that's what I thought it was :D. I didn't look on the page just copied what mormonman said (he said it was java >.>). Works fine though.


i said javascript.

Da 0wner

2009-05-30 02:47:30

Well, sorry it was like 3am :<.