Results 1 to 16 of 16

Thread: Coverd Symbols?

  1. #1
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default Coverd Symbols?

    Hmm, i been looking and searching around and couldnt find anything about coverd symbols. Anyone please post a link somewhere or post something which can find covered symbols like a bank symbol.

    Thanks.

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by bobbohobbo View Post
    Hmm, i been looking and searching around and couldnt find anything about coverd symbols. Anyone please post a link somewhere or post something which can find covered symbols like a bank symbol.

    Thanks.
    PM Boreas, he might be able to help you out.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  3. #3
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    I suppose you could try to decreasing the symbol accuracy by assigning a value between 0 and 1 to SymbolAccuracy. 0.8 is the default so something lower than that might help. The thing is though if you set it too low then it might confuse two different symbols. Like when I set SymbolAccuracy to 0.5, SRL confuses the water fountain symbol with the quest symbol. Also make sure to change SymbolAccuracy back to 0.8 after you set it.

  4. #4
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    program New;
    {.include srl/srl.scar}
     
    function InIntArray(TheInt:integer;TheArray:array of integer):boolean;
    var i:integer;
    begin
      repeat
        if TheArray[i]=TheInt then
          result:=true;
        i:=i+1;
      until ((i=getarraylength(TheArray)) or (result));
    end;
     
    procedure RemoveFromTPA(Index:integer; var TPA:array of tpoint);
    var swapTP:tpoint;
    AL:integer;
    begin
      AL:=getarraylength(TPA);
      swapTP:=TPA[AL-1];
      TPA[AL-1]:=TPA[Index];
      TPA[Index]:=swapTP;
      setarraylength(TPA,AL-1);
    end;
    procedure CrowdedWait;
    var tmpx1,tmpy1,i:integer;
    begin
    case random(2) of
    1: begin
    gametab(2);
    i:=random(23);
    Tmpx1:=547+(((((i)+2)mod 3))*(611-547));
    Tmpy1:=207+(((((i)-1)/3))*(238-207));
    MMouse(Tmpx1+random(63),Tmpy1+random(30),0,0);
    end;
    0:
    begin
    gametab(5);
    Mouse(592,415,random(32),random(32),true);
    end;
    end;
    end;
     
    function EYCScreen:boolean;
    var EYCDTM,tmpx,tmpy:integer;
    begin
      EYCDTM := DTMFromString('78DA635464606050664001FF67C8836946289' +
           'F518648353A04D42812A1C69908BBDC8830C783B03900F9410E64' +
           '');
      result:= FindDTM(EYCDTM,tmpx,tmpy,26,34,184,50);
    end;
    procedure CloseEYC;
    begin
      if EYCScreen then
        Mouse(478+random(15),34+random(15),0,0,true);
    end;
     
    type ColorTPA = record
    color:integer;
    tpa: array of tpoint;
    end;
    function FindCrowdedSymbol(var mx, my:integer; Symbol:string;Tries:integer):boolean;
    var
    PlayerDotCTPA:array of ColorTPA;
    client,Tried,tab,parray,parray2,tx,ty,t,tmpcolor,mmbmp,dropdot,AL,PointsLeft:integer;
    ColorArray: array of integer;
    tmpbool:boolean;
     
    begin
      tab:= GetCurrentTab;
      MMbmp:=BitmapFromString(mmx2-mmx1,mmy2-mmy1,'');
      setarraylength(colorarray,6);
      ColorArray[0]:=16711422;
      ColorArray[1]:=15527148;
      ColorArray[2]:=13816530;
      ColorArray[3]:=14869218;
      ColorArray[4]:=12961221;
      ColorArray[5]:=65536;
     
      repeat
        t:=getsystemtime;
        result := FindSymbol(mx,my,Symbol);
        if result then
          exit;
        dropdot:= DTMFromString('78DA6354666060606340012FA134238C56021' +
             '2ECA86A3EA2AB5104121CA86A6EA2AB51C634E71C921A66200600' +
             '386A0432');
        setarraylength(colorarray,6);
        if FindDTM(dropdot,tx,ty,mmx1,mmy1,mmx2,mmy2)then
        begin
          setarraylength(colorarray,18);
          ColorArray[6]:=getcolor(tx,ty);
          ColorArray[7]:=getcolor(tx,ty+1);
          ColorArray[8]:=getcolor(tx-1,ty-1);
          ColorArray[9]:=getcolor(tx-1,ty);
          ColorArray[10]:=getcolor(tx-1,ty+1);
          ColorArray[11]:=getcolor(tx-1,ty+2);
          ColorArray[12]:=getcolor(tx-2,ty-1);
          ColorArray[13]:=getcolor(tx-2,ty);
          ColorArray[14]:=getcolor(tx-2,ty+1);
          ColorArray[15]:=getcolor(tx-2,ty+2);
          ColorArray[16]:=getcolor(tx-3,ty);
          ColorArray[17]:=getcolor(tx-3,ty+1);
        end;
        freedtm(dropdot);
        CopyClientToBitmap(MMbmp,mmx1,mmy1,mmx2,mmy2);
        AL:=getarraylength(colorarray);
        setarraylength(PlayerDotCTPA,AL);
        for parray:=0 to AL-1 do
        begin
          PlayerDotCTPA[parray].color:=colorarray[parray];
          FindColorsSpiralTolerance(mmcx,mmcy,PlayerDotCTPA[parray].tpa,
           PlayerDotCTPA[parray].color,mmx1,mmy1,mmx2,mmy2,0);
        end;
        CrowdedWait;
        repeat
        for parray:=0 to AL-1 do
        begin
          for parray2:=0 to getarraylength(PlayerDotCTPA[parray].tpa)-1 do
          begin
            tmpcolor:=getcolor(PlayerDotCTPA[parray].tpa[parray2].x,PlayerDotCTPA[parray].tpa[parray2].y);
            if not(InIntArray(tmpcolor,ColorArray)) then
            begin
              FastSetPixel(mmbmp,PlayerDotCTPA[parray].tpa[parray2].x-mmx1,PlayerDotCTPA[parray].tpa[parray2].y-mmy1,tmpcolor);
              RemoveFromTPA(parray2,PlayerDotCTPA[parray].tpa);
            end;
          end;
        end;
        PointsLeft:=0;
        for parray:=0 to AL-1 do
        begin
         PointsLeft:=PointsLeft+getarraylength(PlayerDotCTPA[parray].tpa);
        end;
     
        begin
          client:= GetClientWindowHandle;
          SetTargetBitmap(mmbmp);
          tmpbool:=FindSymbolIn(tx,ty,'bank',0,0,mmx2-mmx1,mmy2-mmy1);
          SetClientWindowHandle(client);
        end;
       // writeln('points '+inttostr(pointsleft));
        until (tmpbool or ((getsystemtime-t)>60000) or (PointsLeft<10));
        if tmpbool then
        begin
          //writeln('symbol found on try '+inttostr(Tried)+' in '+inttostr(getsystemtime-t)+'ms');
          result:=true;
          mx:=tx+mmx1;
          my:=ty+mmy1;
          gametab(tab);
          Freebitmap(mmbmp);
          exit;
        end;
        Tried:=Tried+1;
        //writeln('trying again try '+inttostr(Tried));
        CloseEYC;
        logout;
        loginplayer;
      until Tried>Tries;
      result:=false;
      mx:=0;
      my:=0;
      gametab(tab);
      Freebitmap(mmbmp);
    end;
     
    var myx,myy:integer;
    begin
    setupsrl;
    setarraylength(players,1);
    Players[0].name:='';
    Players[0].pass:='';
    Players[0].nick:='';
    Players[0].active:=true;
    loginplayer
    FindCrowdedSymbol(myx,myy,'bank',3);
    writeln(inttostr(myx)+' '+inttostr(myy));
    end.

  5. #5
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Well, they answered your question, I think, but you could try to search next time , It would save some time.

    Also, since I gotta help you if I report you, you could always try to find a deformed bitmap... I just don't know how deformed...


    NOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOB
    You, Bobbohobbo, have been reported for being a NOOB.
    Your
    Current violations include
    1. Not Searching for
    This brings you to a new total of (3) Noob Points!

    For more information on Bobbohobbo please go Here.

    For more information from This database please go Here.

    For more information on The Noob Points System please go Here.

    For more information on Noobs please go Here.

    NOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOB
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  6. #6
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by r0b0t1 View Post
    Well, they answered your question, I think, but you could try to search next time , It would save some time.
    He did say he searched and couldn't find it....

    Quote Originally Posted by bobbohobbo View Post
    i been looking and searching around and couldnt find anything about coverd symbols.

  7. #7
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Oh... Geez. Well, bobo, if you're mad or anything, pm lordgreggreg to get them removed... *caugh*
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  8. #8
    Join Date
    Oct 2006
    Posts
    1,071
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    EDIT: Justice.

  9. #9
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    done, robot, please be more careful next time. it is better to not report 10 noobs, than to report one person wrongly. cheers.
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  10. #10
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Thanks everyone.

    R0bot you should get a noob point for not reading the post *nah jokes all good*

    Thanks Boreas for the functions/procedures.

  11. #11
    Join Date
    Aug 2007
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice one Boreas,

    How do those functions work though?

  12. #12
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    The idea behind it is that even if a symbol is partially covered (too much to be identified without lowering accuracy so much so that it could be incorrect) the whole time, parts of it will be uncovered, although not all the parts will be uncovered at the same time.

    So, it copies the minimap to bitmap, and makes a list of all white and red dots, specifically the points and colors within them. Then it looks at the real minimap (by this time some players have moved) and looks at the spots on the list. If a spot on the list doesn't have the color anymore (meaning a player that was there intitially moved away), it updates the bitmap to what is there now. Eventually, the bitmap gets less and less covered.

    During this time, it tries to find the symbol on the bitmap, and stops when it finds it. If it is really covered, after about a minute (not doing anything for 1.5 minutes will log you out), it will log out and log in and try again, as this makes the symbol move. It will try this the number of times specified in the parameters (Tries). After that many tries, it will give up and return 0,0 and false. Also, it tries normally finding the symbol first, and it does a little antiban for an excuse for not doing anything for up to a minute.

    If you have any other questions about it please ask.

  13. #13
    Join Date
    Feb 2006
    Location
    New Zealand
    Posts
    1,330
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Although lowering accuracy is easier ahaha. But nice boreas non the less. Aslong as the symbols arent to similar to other stuff around the map and you dont go to low. I never had problem with bank symbol or yew symbols being covered and just lowering tolerance.

  14. #14
    Join Date
    Nov 2006
    Posts
    1,103
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    meh symbol finding wont be a problem with the new srl
    Infractions, reputation, reflection, the dark side of scripting, they are.

  15. #15
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    I might be blind, but I think that in the symbol.scar it says something about that FindSymbol does find symbols partially covered by players.

  16. #16
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by n3ss3s View Post
    I might be blind, but I think that in the symbol.scar it says something about that FindSymbol does find symbols partially covered by players.
    It does but sometimes the symbol is covered too much for it to pick up like the bank symbol when there are a lot of people playing.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Symbols
    By Jackrawl in forum OSR Help
    Replies: 6
    Last Post: 11-01-2007, 07:45 PM
  2. Help With Symbols ;)
    By mage of begu in forum OSR Help
    Replies: 10
    Last Post: 03-13-2007, 02:46 PM
  3. The Symbols Hit RS
    By Ejjman in forum RS has been updated.
    Replies: 3
    Last Post: 05-22-2006, 07:37 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
  •