Results 1 to 6 of 6

Thread: My Number of Water Runes Made Proc (NEED HELP!)

  1. #1
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default My Number of Water Runes Made Proc (NEED HELP!)

    Ok, so this isnt a MAJOR deal, but i would really like this to work, because its for the progress report, so like i said, it can go without fixing, but i would like it in the progress report. Here it is:
    Code:
    Procedure NumWaterRunesMade;
    Var
    RCLevel:Integer;
    Begin
      RCLevel:=GetSkillLevel('Runecrafting');
        If Players[CurrentPlayer].Boolean1=True  Then
        Begin
          For RCLevel :=1 to 18 do
          RunesMade:=28;
        End;
    
        If Players[CurrentPlayer].Boolean1=False Then
        Begin
          For RCLevel := 1 to 18 do
          RunesMade:=27;
        End;
    
        If Players[CurrentPlayer].Boolean1=True Then
        Begin
          For RCLevel := 19 to 37 do
          RunesMade:=56;
        End;
    
        If Players[CurrentPlayer].Boolean1=False Then
        Begin
          For RCLevel := 19 to 37 do
          RunesMade:=54;
        End;
    
        If Players[CurrentPlayer].Boolean1=True Then
        Begin
          For RCLevel := 38 to 56 do
          RunesMade:=84;
        End;
    
        If Players[CurrentPlayer].Boolean1=False Then
        Begin
          For RCLevel := 38 to 56 do
          RunesMade:=81;
        End;
    
        If Players[CurrentPlayer].Boolean1=True Then
        Begin
          For RCLevel := 57 to 75 do
          RunesMade:=112;
        End;
    
        If Players[CurrentPlayer].Boolean1=False Then
        Begin
          For RCLevel := 57 to 75 do
          RunesMade:=108
        End;
    
        If Players[CurrentPlayer].Boolean1=True Then
        Begin
          For RCLevel := 76 to 94 do
          RunesMade:=140;
        End;
    
        If Players[CurrentPlayer].Boolean1=False Then
        Begin
          For RCLevel := 76 to 94 do
          RunesMade:=135;
        End;
    
        If Players[CurrentPlayer].Boolean1=True Then
        Begin
          For RCLevel := 95 to 99 do
          RunesMade:=168;
        End;
    
        If Players[CurrentPlayer].Boolean1=False Then
        Begin
          For RCLevel := 95 to 99 do
          RunesMade:=162;
        End;
    End;
    So, the problem is that it just skips to the very last If..Then and uses the last possible "RunesMade" variable declaration. My runecrafting is 36, and it's saying that i can make 162 runes per trip. I only make 54 with a tally. Boolean1:=True - Tiara on.
    Boolean1:=False - Talisman.

  2. #2
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Probably wanna use a Case (var) Of statement... lemme work on it brb with the code (might not get finished, gotta eat dinner XP
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  3. #3
    Join Date
    Oct 2006
    Location
    Texas
    Posts
    1,450
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Cases might be easier.

    SCAR Code:
    Case Players[CurrentPlayer].Boolean1 of
    True : Begin
             If(RCLevel = 9) Or (RCLevel > 37) Then
          RunesMade:=54;
        End;
       If(RCLevel = 38) or (RCLevel > 56) Then
          RunesMade:=84;
        End;
     End;

    And so on.

  4. #4
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, thanks to Buckley, I get it now. Thanks!

  5. #5
    Join Date
    Oct 2006
    Location
    Texas
    Posts
    1,450
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    No problem.

  6. #6
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    BTW, you will probably want to put RClevel in your global variables, not the procedures local ones, just a thought.
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Checking if a number is a whole number or not?
    By Sandstorm in forum OSR Help
    Replies: 4
    Last Post: 10-26-2008, 04:40 PM
  2. help with proc
    By Stevee in forum OSR Help
    Replies: 1
    Last Post: 07-27-2007, 06:49 PM
  3. What is wrong with Proc?
    By TheGodfather in forum OSR Help
    Replies: 2
    Last Post: 02-15-2007, 06:36 AM

Posting Permissions

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