Results 1 to 8 of 8

Thread: not working:S

  1. #1
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default not working:S

    im trying to find how many pixles of water it finds on the minimap. this is what i did.
    SCAR Code:
    FindWaterColor;
      C:=CountColorD(WaterColor,MMX1,MMY1,MMX2,MMY2,0)
      writeln('water = '+ inttostr(c)+' pixles')
    it always comes to zero. ive tried different colors too. ive done basically the same thing in my not even close to done leosolver. it worked there but it was in the ms not mm. help?

  2. #2
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sorry, this maybe a very nooby question, but why are you trying to find out how many pixels of water there are?

  3. #3
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no not nooby at all. well in fally east bank you can see the water right. but from each bank booth there is different amounts of water showing. now what im going to do is have my script find out what bank booth it is at by the amount of pixles are showing. someone is going to be shaking their head because there is probably a way easier way to do it. but the main reason for it is so i can get it to go to the most left bank booth and find the exact perfect north by finding if there is water in one specific spot and road in another and if the road or water isnt in the specified coord then it will spin until they are both in the right position. ta-da. perfect north.

  4. #4
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I would have to see the whole procedure ... pwnaz0r@hotmail.com or pm.. Is a result and that is a function or what?

    EDIT: yea there are alot of ways to do it simpler and this is not very reliable because just as the minimapicons, I believe that the pixels vary too, thus you would have to do something like

    SCAR Code:
    If(PixelCount <= 18)
    etc and ranges are not usually good unless they are exact ranges, not ranges that can change

    Join the fastest growing merchanting clan on the the net!

  5. #5
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have a solution for you to find perfect north

    SRL
    PerfectNorth;


  6. #6
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no really...that is not the north i want. i want it so the mm is actually north not the compass. and i dont think they vary that much because watercolor is static and im pretty sure that the whole water is the same. i really just want to know why doesnt CountColorD not work here??? ive used it before for ms but it doesnt work on mm.

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

    Default

    You can scan every pixel on the MM. It should take about 1 second or so.

    Code:
    function CountWaterPixels:integer;
    var a,b,count:integer;
    begin
      If WaterColor=0 then WaterColor:=FindWaterColor;
      a:=MMX1-1;
      b:=MMY1-1;
      repeat
        a:=a+1;
        repeat
          b:=b+1;
          If FindColor(x,y,WaterColor,a,b,a,MMY2) then 
          begin
            b:=y;
            count:=count+1;
          end else b:=MMY2;
        until b>=MMY2;
        b:=MMY1-1;
      until a>=MMX2;
      result:=count;
    end;
    That should do it.

  8. #8
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks a lot! ill see how it goes!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. is srl working yet.
    By th3ko in forum NOTA
    Replies: 2
    Last Post: 10-20-2008, 08:06 PM
  2. ~~~~Working Edge cooker WORKING~~~
    By NiCbaZ in forum RS3 Outdated / Broken Scripts
    Replies: 5
    Last Post: 10-29-2007, 11:16 PM
  3. [Working on].:Autoseller:.[/Working on]
    By dritar in forum First Scripts
    Replies: 10
    Last Post: 10-07-2007, 06:13 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
  •