C++ max hit calculator help?

Discussion in 'Programming General' started by Core-Ruption, Dec 7, 2007.

C++ max hit calculator help?
  1. Unread #1 - Dec 7, 2007 at 4:13 PM
  2. Core-Ruption
    Referrals:
    0

    Core-Ruption Guest

    C++ max hit calculator help?

    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
     
  3. Unread #2 - Dec 9, 2007 at 12:47 AM
  4. Core-Ruption
    Referrals:
    0

    Core-Ruption Guest

    C++ max hit calculator help?

    no help... hmm
     
  5. Unread #3 - Dec 9, 2007 at 4:03 PM
  6. htaed
    Joined:
    Dec 19, 2005
    Posts:
    336
    Referrals:
    0
    Sythe Gold:
    0

    htaed Forum Addict
    Banned

    C++ max hit calculator help?

  7. Unread #4 - Dec 10, 2007 at 11:27 AM
  8. Core-Ruption
    Referrals:
    0

    Core-Ruption Guest

    C++ max hit calculator help?

    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
     
  9. Unread #5 - Dec 10, 2007 at 11:59 AM
  10. IRFE
    Referrals:
    0

    IRFE Guest

    C++ max hit calculator help?

    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.
     
< Highscore Lookup | java >

Users viewing this thread
1 guest


 
 
Adblock breaks this site