Results 1 to 13 of 13

Thread: iHP - HP Washing Calculation Program

  1. Default iHP - HP Washing Calculation Program


    Last edited by god; 2009-07-23 at 04:58 AM.

    Long you live and high you'll fly and smiles you'll give and tears you'll cry and all you touch and all you see is all your life will ever be.


  2. Default


    Pirate pl0x
    Jesus, the original drama whore

    Quote Originally Posted by Kawasari Mimoto View Post
    ...I raped her...

  3. Default


    works for warriors, bowmens, and thieves o_O

    Long you live and high you'll fly and smiles you'll give and tears you'll cry and all you touch and all you see is all your life will ever be.

  4. Default


    Quote Originally Posted by god View Post
    works for warriors, bowmens, and thieves o_O
    pirates are people too
    Jesus, the original drama whore

    Quote Originally Posted by Kawasari Mimoto View Post
    ...I raped her...

  5. Default


    Quote Originally Posted by god View Post
    works for warriors, bowmens, and thieves o_O
    Yeah, Pirates is what I meant.

  6. Default


    If you have the formula, post it here and i can put it in, or you can just implement it yourself, if you know vb :)

    Long you live and high you'll fly and smiles you'll give and tears you'll cry and all you touch and all you see is all your life will ever be.

  7. Default


    Fuck your rapidshit. lolVB. Reading Source. afk.
    Code:
    If cmbClass.Text = "Thief(2nd)" Then
      txtWashable.Text = txtCurMP.Text - txtMP.Text
      txtWashable.Text = txtWashable.Text / 12
      txtAfter.Text = 20 * txtWashable.Text + txtCurHP.Text
    
    ElseIf cmbClass.Text = "Thief(3rd/4th)" Then
      txtWashable.Text = txtCurMP.Text - txtMP.Text
      txtWashable.Text = txtWashable.Text / 12
      txtAfter.Text = 20 * txtWashable.Text + txtCurHP.Text
    These are the same thing, you don't have to put them into two separate conditions.
    same with
    Code:
    ElseIf cmbClass.Text = "Fighter" Then
      txtWashable.Text = txtCurMP.Text - txtMP.Text
      txtWashable.Text = txtWashable.Text / 4
      txtAfter.Text = 50 * txtWashable.Text + txtCurHP.Text
    
    ElseIf cmbClass.Text = "Spearman/DK" Then
      txtWashable.Text = txtCurMP.Text - txtMP.Text
      txtWashable.Text = txtWashable.Text / 4
      txtAfter.Text = 50 * txtWashable.Text + txtCurHP.Text
    I'm pretty sure, but not 100%, that the syntax would be
    Code:
    If cmbClass.Text = "Thief(2nd)" OR cmbClass.Text = "Thief(3rd/4th)" Then
      txtWashable.Text = txtCurMP.Text - txtMP.Text
      txtWashable.Text = txtWashable.Text / 12
      txtAfter.Text = 20 * txtWashable.Text + txtCurHP.Text
    I haven't touched VB in four years.
    Last edited by JoeTang; 2009-04-18 at 05:14 PM.

  8. Default


    i haven't either...i just downloaded it again last night to write this program because i was too lazy to keep calculating how much mp i needed to wash lol

    oh and, ive done all that because im more used to java...usually i just use else ifs and i kept forgetting vb doesnt need semi colons lol

    Long you live and high you'll fly and smiles you'll give and tears you'll cry and all you touch and all you see is all your life will ever be.

  9. Default


    Java uses double pikes (||) to denote OR operators in conditional statements. Personally, I would go the route of Select Case for that particular function type, with a variable change, and a single formula elsewhere, since the formula gets executed regardless of job, and there are only x and y differences for each class.
    Can't recall the syntax for a Select Case in VB, so a switch statement in java:
    Code:
    int x;
    int y;
    switch (cmbClass.Text)
    {
      case "Thief (2nd)":
      case "Thief(3rd/4th)":
        x = 12;
        y = 20;
      case "Fighter":
      case "Spearman/DK":
        x = 4;
        y = 50;
      default:
        x = 0;
        y = 0;
    }
      txtWashable.Text = int.ParseInt(txtCurMP.Text) - int.ParseInt(txtMP.Text);
      txtWashable.Text = int.ParseInt(txtWashable.Text) / x;
      txtAfter.Text = y * int.ParseInt(txtWashable.Text) + int.ParseInt(txtCurHP.Text);

  10. Default


    lol, well, i also wanted a simple gui instead of it being through a terminal (or command in windows case) without having to mess with swing. i get lazy when it comes to coding.

    1 hour in vb > 3 hours in java

    Long you live and high you'll fly and smiles you'll give and tears you'll cry and all you touch and all you see is all your life will ever be.

  11. Default


    I believe the formula for both pirates is the same:

    level x 18 + 111 (minimum mp to wash 1 point)

    Works for Corsairs at any rate.

  12. Default


    Quote Originally Posted by JoeTang View Post
    Java uses double pikes (||) to denote OR operators in conditional statements. Personally, I would go the route of Select Case for that particular function type, with a variable change, and a single formula elsewhere, since the formula gets executed regardless of job, and there are only x and y differences for each class.
    Can't recall the syntax for a Select Case in VB, so a switch statement in java:
    Code:
    int x;
    int y;
    switch (cmbClass.Text)
    {
      case "Thief (2nd)":
      case "Thief(3rd/4th)":
        x = 12;
        y = 20; break;
      case "Fighter":
      case "Spearman/DK":
        x = 4;
        y = 50; break;
      default:
        x = 0;
        y = 0;
    }
      txtWashable.Text = int.ParseInt(txtCurMP.Text) - int.ParseInt(txtMP.Text);
      txtWashable.Text = int.ParseInt(txtWashable.Text) / x;
      txtAfter.Text = y * int.ParseInt(txtWashable.Text) + int.ParseInt(txtCurHP.Text);
    If you don't break it will not do what you expect :P


    ed: Yeah, Swing would be the reason I never updated my damage calculator for 4th job skills. I'd need about 30 checkbox/radio buttons with associated skill name + levels. :/


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •