Results 1 to 20 of 20

Thread: Touble getting skill levels

  1. #1
    Join Date
    Mar 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Touble getting skill levels

    I've been trying to get the players skill levels for quite some time now and it refuses to work.
    I've tried GetSkillInfo('Woodcutting', False);
    and I've tried:
    SCAR Code:
    GetAllLevels;
    Wait(10000+Random(2000));
    Writeln('Woodcutting Level: ' + IntToStr(Players[0].Level[20]));
    But it keeps saying 0 (zero).

    Any idea what's going on? It opens tab 2 and then outputs that.

  2. #2
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure WCLvlImput;

    Var
      TP: TPoint;
      Box: TBox;
      TPA: TPointArray;
      Cts, LVL, C: Integer;

    Begin
      C := GetCurrentTab;
      If (C <> 2) Then
      Begin
        GameTab(2);
        Wait(500 + Random(500));
      End;
      TP := SkillToCoords(True, 'woodcutting');
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(0);
      TP := Point(TP.x + 7, TP.y + 13);
      FindColorsTolerance(TPA, 65535, TP.x - 2, TP.y - 2, TP.x + 15, TP.y + 15, 0);
      Box := GetTPABounds(TPA);
      LVL := StrToIntDef(GetNumbers(GetTextAtEx(Box.x1 - 2, Box.y1 - 1, 100,
        StatChars, False, True, 0, 5, 65535, 2, True, tr_Digits)),0);
      ColorToleranceSpeed(CTS);
      WriteLn('Wood Cutting Level = ' + IntToStr(LVL));
      GameTab(C);
    End;

  3. #3
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Timer View Post
    SCAR Code:
    If (CurrentTab <> 2) Then
    Begin
      GameTab(2);
      Wait(500 + Random(500));
    End;
    WriteLn('Wood Cutting Level = ' + IntToStr(GetSkillInfo('woodcutting', False));
    Not quite right.
    Better, faster, shorter, stronger:

    SCAR Code:
    begin
      WriteLn('Wood Cutting Level = ' + IntToStr(GetSkillInfo('woodcutting', False));
    end;

    Mshh. GetSkillInfo already switches to GameTab(2).

  4. #4
    Join Date
    Mar 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Line 89: [Error] (12828:5): Unknown identifier 'CurrentTab'

    I shouldn't need to include the GameTab.scar, should I?

  5. #5
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Use Mine..

    Umm, I Fixed It.

  6. #6
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
                      // Drag crosshair to client and press run.
    begin
      ActivateClient;
      Wait(500);
      WriteLn('Wood Cutting Level = ' + IntToStr(GetSkillInfo('woodcutting', False));
    end.

  7. #7
    Join Date
    Mar 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Also, Evil, yours gave me 0 .
    (I'm using smart), also you forgot to close 1 ")" on the above post.

  8. #8
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try Mine!!!

  9. #9
    Join Date
    Mar 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wood Cutting Level = 0
    That's Timer's script.

  10. #10
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Omfg.... Let Me See!!! I'l Try.

    EDIT: Ohh I Kicked Your Ass!!!

    Wood Cutting Level = 98

  11. #11
    Join Date
    Mar 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Did you change anything?
    It doesn't work for me >_>.

  12. #12
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It Does, Try This..

    Log It In...

    SCAR Code:
    {.Include SRL\SRL\Misc\Smart.Scar}
    {.Include SRL\SRL.Scar}

    Procedure WCLvlImput;
     
    Var
      TP: TPoint;
      Box: TBox;
      TPA: TPointArray;
      Cts, LVL: Integer;
     
    Begin
      If (GetCurrentTab <> 2) Then
      Begin
        GameTab(2);
        Wait(500 + Random(500));
      End;
      TP := SkillToCoords(True, 'woodcutting');
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(0);
      TP := Point(TP.x + 7, TP.y + 13);
      FindColorsTolerance(TPA, 65535, TP.x - 2, TP.y - 2, TP.x + 15, TP.y + 15, 0);
      Box := GetTPABounds(TPA);
      LVL := StrToIntDef(GetNumbers(GetTextAtEx(Box.x1 - 2, Box.y1 - 1, 100,
        StatChars, False, True, 0, 5, 65535, 2, True, tr_Digits)),0);
      ColorToleranceSpeed(CTS);
      WriteLn('Wood Cutting Level = ' + IntToStr(LVL));
    End;

    Begin
      SmartSetupEx(123, False, True);
      SetTargetDC(SmartGetDC);
      While Not LoggedIn Do
        Wait(10);
      Wait(2000 + Random(50));
      WCLvlImput;
    End.

  13. #13
    Join Date
    Mar 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wait, I don't understand any of that script, how am I supposed to know how to use it if I don't know what any of the functions are?
    I'm new to making autoers .

  14. #14
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, When You Are Autoing And Want To Tell The Wc Level, Call My Procedure I Said On The 1st Post.

  15. #15
    Join Date
    Mar 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok then, but I thought it was supposed to be simpler than that, that seems like quite a bit of work just to print out a progress report of what your new level is >_>.

  16. #16
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thats because mine is flawless

  17. #17
    Join Date
    Mar 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You mean that this is the only way to do this?
    I know there's gotta be a shorter, easier way to do this.
    I'm not really interested in only getting this to work, I want to learn how to do it too...

  18. #18
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Look at my coding... You'll learn from it...

  19. #19
    Join Date
    Mar 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well I just tired it on my pure and it said I have 0 wood cutting still (I tried the procedure you posted above). I copied it and pasted it word for word.

  20. #20
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm... Re-Start Scar, DO NOT DRAG CROSSHAIR.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Best Places To train/auto (low levels and High levels)
    By hobohotel33 in forum Skill Guides
    Replies: 32
    Last Post: 03-09-2009, 08:26 PM
  2. Skill type/levels based on a const
    By HarryJames in forum OSR Help
    Replies: 1
    Last Post: 01-11-2009, 06:50 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
  •