Results 1 to 5 of 5

Thread: SCAR Glitch

  1. #1
    Join Date
    Dec 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default SCAR Glitch

    I've found an odd glitch with SCAR. I've tried this on 2.03, 3.0 and 3.03.

    I wrote this simple script to retrieve stats from a highscores page, and for some very odd reason only the title works. the rank works fine for the top player (medusa). Can anyone explain what's going on? I've had others test it with the same result, and I have had other programmers check my coding.

    SCAR Code:
    program Stats;
    var
      s: string;
      Player,title,level,rank,exp: string;

    begin
    Player:=readln('Who do you wish to check? (Main server)');
    Player:=lowercase(player);
      s:= getpage('http://eoinfo.no-ip.org/etop250.html');
      player:=trim(player);
      Writeln('Player: '+player);
      rank:=(Between('<TR><TD>','</TD><TD>'+player+'</TD><TD>', s));
      rank:=trim(rank);
      writeln('Rank: '+rank);
      title:=(Between('</TD><TD>'+player+'</TD><TD>', '</TD><TD>', s));
      Title:=trim(title);
      writeln('Title: '+title);
      exp:=(Between(player+'</TD><TD>'+title+'</TD<TD>', '</TD><TD>', s));
      exp:=trim(exp);
      writeln('EXP: '+exp);
      level:=(Between('</TD><TD>'+player+'</TD><TD>'+title+'</TD><TD>'+exp+'</TD><TD>', '</TD><TD>', s));
      writeln('Level: '+level);
    end.

    Any help is appreciated.

  2. #2
    Join Date
    Oct 2006
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I don't think this would work the way you are doing it for the rank, because Between looks for the first occurance of the first thing, then looks for the first occurance of the last thing, so when you do the rank it will return a huge string, from the very first <tr><td>. To see what I mean put in a name that is ranked >50. To fix this I would try to use pos to find the first position of the players name, then go back until you find '<tr><td>#'.

    The thing to find the title is good because it has reference to find the players name in it, so it wont return any mis-matches.

    To find the exp and the level i would delete everything before the players name, then delete everything before the players title. Then you look between '</TD><TD>', '</TD><TD>' and you should find it. Then delete the xp and look for the same thing again. If there is an easier way then can someone post it? I would be interested to see =), but I think this would work preety well even if people were moving around the hiscores and had similar stats or whatever...

  3. #3
    Join Date
    Dec 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, I think I see what you mean, And I tried this out, and it works perfectly now.
    SCAR Code:
    program Stats;
    var
      position:integer;
      s: string;
      Player,title,level,rank,exp: string;

    begin
    Player:=readln('Who do you wish to check? (Main server)');
    Player:=lowercase(player);
      s:= getpage('http://eoinfo.no-ip.org/etop250.html');
      s:= between('<BODY><FONT FACE="Verdana"><H2>Top 250 players for the Main Server</H2><TABLE class="topl" style="font-size: 16px;font-family: ''Verdana'';font-style: normal;font-weight: normal;" WIDTH="900"<TR><TD WIDTH="80"><B>Rank</B></TD><TD WIDTH="140"><B>Name</B></TD><TD WIDTH="170"><B>Title</B></TD><TD WIDTH="100"><B>Experience</B></TD><TD WIDTH="60"><B>Level</B></TD><TD WIDTH="90"><B>Gender</B></TD><TD WIDTH="120" NOWRAP="NOWRAP"><B>Rank Change</B></TD><TD WIDTH="100"><B>Flags</B></TD></TR>','</TABLE><P><A HREF="mailto:cascade42@gmx.net">cascade42@gmx.net</A></FONT></BODY></HTML>',s);
      player:=trim(player);
      position:=pos(player,s);
      delete(s,position+81,+100000);
      S:=trim(s);
      Writeln('Player: '+player);
      rank:=copy(s,position-13,4);
      rank:=trim(rank);
      delete(s,0,position);
      writeln('Rank: '+rank);
      title:=(Between('</TD><TD>'+player+'</TD><TD>', '</TD><TD>', s));
      Title:=trim(title);
      writeln('Title: '+title);
      exp:=(Between('<TD>'+title+'</TD><TD>', '</TD><TD>', s));
      exp:=trim(exp);
      writeln('EXP: '+exp);
      level:=(Between('</TD><TD>'+title+'</TD><TD>'+exp+'</TD><TD>', '</TD><TD>', s));
      writeln('Level: '+level);
    end.

  4. #4
    Join Date
    Apr 2007
    Posts
    186
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Great, i learned something new from you

  5. #5
    Join Date
    Mar 2007
    Posts
    81
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well ahh nvm...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. is it a glitch in scar?
    By a really really long name in forum OSR Help
    Replies: 8
    Last Post: 06-05-2008, 12:15 AM
  2. Possible glitch?
    By Runescapian321 in forum SRL Site Discussion
    Replies: 18
    Last Post: 04-19-2008, 09:20 PM
  3. Glitch? Wtf?
    By Ultra in forum RuneScape News and General
    Replies: 6
    Last Post: 03-02-2008, 12:29 AM
  4. SRL-ID Glitch...
    By yanix in forum News and General
    Replies: 12
    Last Post: 12-14-2007, 05:28 PM

Posting Permissions

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