Results 1 to 6 of 6

Thread: Find current level

  1. #1
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Find current level

    How would I make the script check if it has the correct level in that certain skill?

    Example, You need 76 fishing to fish sharks; and 73 with fishing potions. How would i find out if the players fishing level was 76/73 so that if it is lower such as 75/73 , 74/73, OR 73/73 it would drink a fishing potion?

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    {*******************************************************************************
    Function GetSkillLevel(skill: Variant): Integer;
    By: Raymond
    Description: Gets the max level for a particular skill.
    *******************************************************************************}

    And:

    SCAR Code:
    {*******************************************************************************
    function GetSkillInfo(Skill: Variant; Amount : Boolean): Integer;
    By: Raymond
    Description: Gets the amount / level of a skill.
    E.G.
    0/15
    Amount = True will return 0.
    Amount = False will return 15 (The actual level).
    Returns -1 if the level couln't be grabbed succesfully
    *******************************************************************************}

  3. #3
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Naum View Post
    SCAR Code:
    {*******************************************************************************
    Function GetSkillLevel(skill: Variant): Integer;
    By: Raymond
    Description: Gets the max level for a particular skill.
    *******************************************************************************}

    And:

    SCAR Code:
    {*******************************************************************************
    function GetSkillInfo(Skill: Variant; Amount : Boolean): Integer;
    By: Raymond
    Description: Gets the amount / level of a skill.
    E.G.
    0/15
    Amount = True will return 0.
    Amount = False will return 15 (The actual level).
    Returns -1 if the level couln't be grabbed succesfully
    *******************************************************************************}
    But wouldn't that always find out your current fishing level, and not 78/76? If not, than how would I set it up?

    EDIT: nevermind, i know how to set it up

    SCAR Code:
    if GetSkillInfo('fishing', True) < 76 then drinkfishingpot;
    <<Is that right?
    Last edited by DeSnob; 05-16-2010 at 04:24 PM.

  4. #4
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by DeSnob View Post
    But wouldn't that always find out your current fishing level, and not 78/76? If not, than how would I set it up?
    I think that GetSkillLevel returns the numerator. So it would return the 78 if the fishing level was 78/76.

  5. #5
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    I think that GetSkillLevel returns the numerator. So it would return the 78 if the fishing level was 78/76.
    Actually it doesn't, it returns the level

    SCAR Code:
    function GetSkillLevel(Skill: Variant): Integer;
    begin
      Result := GetSkillInfo(Skill, False);
    end;
    False = return level

  6. #6
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by DeSnob View Post
    Actually it doesn't, it returns the level

    SCAR Code:
    function GetSkillLevel(Skill: Variant): Integer;
    begin
      Result := GetSkillInfo(Skill, False);
    end;
    False = return level
    Ah okay. Then he can just use GetSkillInfo('fishing', True);

Thread Information

Users Browsing this Thread

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

Posting Permissions

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