Results 1 to 3 of 3

Thread: TotalLevel/XP

  1. #1
    Join Date
    Jul 2010
    Posts
    1,115
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default TotalLevel/XP

    Can we add Total as an option for getxp/getlevel.

    Total level would just get the bottom level, and if you hover it, it shows the xp. i think it would be good to add those as skill constants because it wont hurt to have them, and if people want to use them they can for various things that get lots of different xp.

    I would write my own procedure for it, but i feel that we already have the entire outline for it, so why not just have it be added in like 3 places. Also if i just added it to mine then anyone using my scripts that have that included would need it as well.

    tl;dr Seems trivial to add it and it cant hurt anyone to add one more constant to be used in 2 or so functions

  2. #2
    Join Date
    Jul 2010
    Posts
    1,115
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    I was looking at how its setup, and we already have the constant, we just need to figure out how to get the total level and if we mouseover that level we can see the xp.

  3. #3
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Made this, it gets your player's Overall Experience: (Modified from Nielsie95's "GetXP')

    [To test, target the RS client, whilst being logged in]
    Simba Code:
    Program New;
    {$DEFINE SRL5}
    {$i SRL/srl.simba}

    Function GetTotalXP: Integer;
    Var
      b: TBox;
      TPA: TPointArray;
    Begin
      Result := -1;
      If (Not GameTab(Tab_Stats)) Then
        Exit;
      MMouse(620, 444, 105, 12);
      Wait(400+Random(200));
      If (WaitFindColors(TPA, 15133931, MIX1, MIY1, MIX2, MIY2, 0, 3000)) Then
      Begin
        b := GetTPABounds(TPA);
        Wait(400+random(150));
        Result := StrToIntDef(GetNumbers(GetTextAt(653, 421, 0, 1, 4, 4305653, 0, 80, SmallChars)), -1);
      End;
    End;

    Begin
      SetupSRL;
      GameTab(Tab_Stats);
      WriteLn(IntToStr(GetTotalXP));
    End.

    :>

    E: I suppose it couldn't hurt to add in some failsafes like checking to see if we can use our inventory or not(i.e. can't if we're in the bankscreen or maybe a random event), or making sure we're logged in
    Last edited by Le Jingle; 05-08-2012 at 08:35 PM.

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
  •