• Log in or sign up for an account here: https://www.sythe.org/login

C++ max hit calculator help?

  • Thread starter Thread starter Core-Ruption
  • Start date Start date
C

Core-Ruption

Guest
ok so I have this done so far...

Code:
#include <iostream>
#include <stdlib.h>

int main(int argc, char *argv[])
{

//below: showing welcome text  
  
  cout << "Welcome to BETA DevCore's RS2 Max Hit Calculator!" << endl;

//below: is getting strength level and showing you what you entered  
  
  cout << "What is your strength level?" << endl;
  int strength;
  cin >> strength;
  cout << "Your strength level = " << strength << endl;
  cout << endl;

//below: is getting weapon power and showing you what you entered  
  
  cout << "What is your weapon's power " << endl;
  int weaponp;
  cin >> weaponp;
  cout << "Your weapon's power = " << weaponp << endl;
  cout << endl;

//below: showing you strength and weapon power last check  
  
  cout << "Your strength level = " << strength << " and your weapon power = " << weaponp << endl; 
  cout << endl;

//below: calculations!


  system("PAUSE");	
  return 0;
}

//iron schimmy = (+ )
//steel schimmy = (+15)
//black schimmy = (+ )
//mith schimmy = (+ )
//addy schimmy = (+ )
//rune schimmy = (+ )
//iron 2h = (+ )
//steel 2h = (+ )
//black 2h = (+ )
//mith 2h = (+ )
//addy 2h = (+ )
//rune 2h = (+ )

now I need help with the formula? I know that each strength level has .10 added on to it and that the strength level starts at 1.25

EXAMPLE

(STR LVL 1) = 1.25 + .10 = 1.35 (STR LVL 2) = 1.35 + .10 = 1.45 (STR LVL 3)

so with that figured out how would I go about pogramming that?

and I also will need help with the Weapon Power part?

Thank you,

Core-Ruption
 
ya I have this so far I had it in the program but I was getting really confused.. :confused:

ok so for every +1 strength level you + .10 and for evey +1 weapon power it's .033

so If I had 25 strength and a weapon power of 10 then I could hit = ?

So you just have to figure out how to figure a formula to get your
 
Code:
maxHit = ceil((strength * 0.10) + (weaponPower * 0.033));

I think that should be it. ceil because otherwise it is impossible to hit anything at str1 without a weapon.
 
Runescape Gamblingrunescape gambling
Back
Top