Results 1 to 8 of 8

Thread: Need help finding/clicking a color.

  1. #1
    Join Date
    Feb 2012
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help finding/clicking a color.

    This is a small piece of my script, I need it to find the coordinates of that green plant thing on the stall, then click it basicly. thats all im stuck on. Right now it just moves the mouse to (0,0) for whatever reason. This isn't RS so i have to write all my own procedures mostly.

    Code:
    program Awesomestuff;
    {$I SRL/SRL.simba} 
    var
      a, r: integer;
    
      Procedure Thieveit;
      begin
      if(FindColor(a, r, 1348368, MMX1, MMY1, MMX2, MMY2))then
      wait(150);
      Mouse(a, r,1,1,true);
      end;
      begin
    SetupSRL;
    ActivateClient;
    Thieveit;
    end.

    Thanks a ton - Andy.

  2. #2
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    MMX1, MMY1, MMX2, MMY2

    should be MS

    then you can try changing findcolor to findcolortolerance.

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  3. #3
    Join Date
    Feb 2012
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    On a private server? and when i change it to if(FindColor(a, r, 1816597, MS))then
    it still just moves mouse to (0,0)
    Last edited by iridektm; 02-13-2012 at 09:19 PM.

  4. #4
    Join Date
    Feb 2012
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    please help i really need this finished

  5. #5
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    if(FindColor(a, r, 1816597, MS))
    should be

    if(FindColor(a, r, 1348368, MSX1, MSY1, MSX2, MSY2))then

  6. #6
    Join Date
    Feb 2012
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It doesnt work, im using that, It moves the mouse to (0,0) and just sits there

  7. #7
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    You need begin/end after an if statement if you want it to do more than one thing. Chances are it's not returning the color for some reason (thus making x,y=0,0).


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  8. #8
    Join Date
    Feb 2012
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @Harry, I love you haha, ive been trying to get this answered for so long now, *Tucks first script under belt* thanks Man!

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
  •