if 556, 51 = a certain colour

Discussion in 'Scar/Simba Help' started by slj90, Jun 7, 2009.

if 556, 51 = a certain colour
  1. Unread #1 - Jun 7, 2009 at 11:20 AM
  2. slj90
    Joined:
    Jun 7, 2009
    Posts:
    4
    Referrals:
    0
    Sythe Gold:
    0

    slj90 Newcomer

    if 556, 51 = a certain colour

    hey guys, im new to scripting scar, so need a little help with this, its not for runescape though, basicly i want it to press the spacebar and release it if a certain colour is at the given posistion.. the code i have so far, which doesn't work is below

    Code:
    program New;
    const
    PerfColor= 8449704;
    begin
    If (Getcolor(556, 51)) = (PerfColor) then
    begin
    Writeln('Woo')
    end else
    Writeln('Boo')
    end.
    thanks for any help
     
  3. Unread #2 - Jun 7, 2009 at 3:13 PM
  4. lordy noob
    Joined:
    Jan 4, 2006
    Posts:
    22
    Referrals:
    0
    Sythe Gold:
    0

    lordy noob Newcomer

    if 556, 51 = a certain colour

    you ment like it presses space if it finds the color? or press space and release it if color found?
    this script presses the spacebar if the color is in the given coords
    Code:
    const
    color = 7890190;//the color you want to look for
    
    procedure Findcolor;
    begin
    if(GetColor(407,256)=color)then//coords here
    KeyDown(32);
    wait(1000)//time to hold spacebar down
    KeyUp(32);
    end;
    
    begin
    repeat
    Findcolor;
    if(IsFunctionKeyDown(1))then   //stops the script if funcionkey 1 down = left ctrl
    begin
    exit;
    end;
    until(false)
    end.
    
     
  5. Unread #3 - Jun 7, 2009 at 3:30 PM
  6. lordy noob
    Joined:
    Jan 4, 2006
    Posts:
    22
    Referrals:
    0
    Sythe Gold:
    0

    lordy noob Newcomer

    if 556, 51 = a certain colour

    this one releases spacebar if color found
    Code:
    const
    color = 7890190;//the color you want to look for
    
    procedure Findcolor;
    begin
         if(GetColor(407,256)=color)then // coords here
                                        begin
                                             KeyUp(32);
                                             end else
                                        begin
                                             Keydown(32);
                                             end;
    end;
    
    begin
    repeat
    Findcolor;
    if(IsFunctionKeyDown(1))then   //stops the script if funcionkey 1 down = left ctrl
    begin
    exit;
    end;
    until(false)
    end.
    
     
< Procedure Bug and More... | if 556, 51 = a certain colour >

Users viewing this thread
1 guest


 
 
Adblock breaks this site