Results 1 to 17 of 17

Thread: Symbol help

  1. #1
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Symbol help

    Hi.

    I am trying to make a al kharid fisher-cooker-banker.

    For now I am on the fishing part.

    How can i make it so that it goes to the second fishing symbol, if it didn't found anything at the first fishing symbol? and also, if it didn't found anything at the second fishing symbol that it will go to the first fishing symbol.

    Thanks for your time


    Edit: Another question. How do i use
    SCAR Code:
    const  smooth;
    Description:
         If you want human-like mouse movements.

  2. #2
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    if (not (<Insert wat it didn't find here>,x, y)) then
    FindSymbol(x,y,'Fishing spot'(or whatever the name for fish symbol is)
    Mouse(x,y)

    err that's very rough. Not sure if it will work but off the top of my head that's what I can think of. But I have the worst memory ever
    Sleeping...

  3. #3
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea, I allready tryed that, but then it clicks on the fishing symbol where it allready is... =/

  4. #4
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    o yeah didn't think of that....well you could do like a findcolor just in a box. I'm assuming you know how to do that. and do if not findcolor(blahblahblah(in the first box)) then findcolor(blahblah(in the second box)) I suggest using the colour of the background of the symbol because there aren't really many other things that have that colour. and if you're just looking in a box it won't click on other symbols. or you could just use finbitmapin which will find a bmp in a box. that would work better.
    Sleeping...

  5. #5
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    2 Questions:

    1- I know how to do bitmaps but making the background of the symbols black will take some time..

    2- Actually I dont knwo how to use a findcolor in a box *shame* =/
    I searched the code and its
    SCAR Code:
    function FindColorAbstract(var  x, y: Integer; Color, Tol, x1, y1, x2, y2, x3, y3, x4, y4: Integer): Boolean;
    By: BenLand100
    Description:
         Searches in an abstract box (see Math.scar) for a color and tolerance and the first one found in x, y

    can you explain how to use it?

  6. #6
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    No because I've got no idea what that is rofl. I suggest using bitmaps. it won't take long at all just use the icon thats a paintbucket make it black and click on the places you want to fill in. ok finding color in a box is just FindColor(var x,y: Integer; color,xs,ys,xe,ye: Integer) ok now I will go thru this with u. FindColor will find the color you tell it to look for in a certain area.

    now where it says var x,y this is where you put x,y or 2 different letters that will store the co ordinates of where it found the color. you have to set these as integer's unless you already have SRL included which you should.

    color just means you insert the number you get in the debug box from when you pick a colour.

    Now xs,ys,xe,ye:Integer is the looking in the box bit. Picture an imaginary square around the area you want to look in. now click on colour picker and click the top left corner of your imaginary square. you should get the colour number and in brackets you should have to numbers. replace xs,ys with those 2 numbers. now using the colour picker click the bottom right of ur imaginary square. repeat the step above except this time replace xe,ye instead of xs,ys (which should already be replaced with 2 numbers)

    And that's it ur done. you probly already knew that but just making sure. so that will look for the colour you pick in a certain box. except i highly suggest use bitmapin will be a lot more safer gl
    Sleeping...

  7. #7
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, now the findcolor thingie is clear to mea, Thanks alot! (Yes, you get a rep )

    I will try first with a bitmap of the 3 rocks

  8. #8
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    rocks? just make a bmp of the fishing symbol
    Sleeping...

  9. #9
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh sorry, that thing about the rocks needed to go in my other topic

    Why should i make a btm of the fishing symbol if i have this:
    SCAR Code:
    function FindSymbol(var  rx, ry: Integer; Name: String): Boolean;

    I am a little bit confused ... I know how to make a bmp, but still, how do i use it to fix my problem?

  10. #10
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    well like u said before if you just use find symbol it will click on 1 of the 2 fishing symbols but you don't know which one. whereas if you use bitmapin you can just make a bmp of fishing symbol and then using bitmapin you can look in a box for it.
    http://www.villavu.com/forum/showthread.php?t=1609 that's a link to a TUT that has a list of functions u can use with bmp's including bitmapin. I highly suggest use that one. If you have any questions just post em here and I will help sort them out. But you may find it has a little bit similar to findcolor so look over that first and if you still have questions then I will be more than happy to help. gl
    Sleeping...

  11. #11
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea, but the fishing symbol moves every time you log in, so the background of the fishing symbol doesn't work anymore =/

  12. #12
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    ??? how doesn't it work. give me a prnt screen of the area u need this for
    Sleeping...

  13. #13
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have a punishment -> I can't play on the internet now for a whole week =/

    I will be back at Monday 30 March 2007

    Btw; gratz on member!

  14. #14
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    aww that sux...what did you do? lol. and thx
    Sleeping...

  15. #15
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    My fucking brother was soo anoying so i almost breaked (however you typ it) his legs he sux ..
    Srl simply rocks.

  16. #16
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Grab a color from the fishing symbol (FindSymbol already searches for a color after it finds the bitmap, so you can do Getcolor(x,y)) and then you can search from the top or bottom of the screen for that color.

    Look at Yakman's InLumby procedure for how to do it.

    Code:
    function InLumby:boolean; //Modified from Yakman
    begin
      if not(LoggedIn) then exit;
      if not(WaterSymbolColor>0) then
      begin
        if FindSymbol(x,y,'water') then
        begin
          WaterSymbolColor:=GetSymbolColor(x,y,'water');
          Writeln('WaterSymbolColor = '+intToStr(WaterSymbolColor));
          Wait(1000);
          result:=InLumby;
          exit;
        end else
        begin
          result:=false;
          exit;
        end;
      end;
      if FindColor(x,y,WaterSymbolColor,MMX1,MMY1,MMX2,MMCY) then
      if FindColor(x,y,WaterSymbolColor,MMX1,MMCY,MMX2,MMY2) then
      begin
        result:=true;
        Players[CurrentPlayer].Loc:='Lumby';
      end;
    end;
    If you want to move to the bottom one search from the bottom up. If you want to move to the top one search from the top down.

  17. #17
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    lol sunday 30th march? think u mean April :P
    Sleeping...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. New MM symbol.
    By the flea in forum RS has been updated.
    Replies: 5
    Last Post: 05-13-2007, 02:26 AM
  2. Need Symbol Help
    By steth1010 in forum OSR Help
    Replies: 6
    Last Post: 05-04-2007, 12:21 AM
  3. Symbol Name
    By 3Garrett3 in forum OSR Help
    Replies: 3
    Last Post: 03-31-2007, 05:43 PM
  4. clicking the quest symbol then the bank symbol
    By RudeBoiAlex in forum OSR Help
    Replies: 7
    Last Post: 03-22-2007, 11:14 PM
  5. Symbol help
    By fugate in forum OSR Help
    Replies: 4
    Last Post: 01-21-2007, 02:18 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
  •