Adblock breaks this site

rs_GetUpText doesn't work...

Discussion in 'Scar/Simba Help' started by Kasmember18, Jan 8, 2009.

  1. Kasmember18

    Kasmember18 Newcomer

    Joined:
    Jan 7, 2009
    Posts:
    10
    Referrals:
    0
    Sythe Gold:
    0
    rs_GetUpText doesn't work...

    Code:
    program New;
            {. Include SRL/SRL.Scar}
            
            Var
            Say: String;
            
    
    begin
         Repeat
         wait(1000);
          if rs_GetUpText = 'ock'  then
         Writeln('Found Rock')
         else
         Writeln('Found Nothing');
         until(false)
    end.

    No matter how long I hold the mouse over the rock it will never come up as Rock found...Please help I realy need it quick...
     
  2. cazax

    cazax Forum Addict

    Joined:
    Nov 13, 2007
    Posts:
    457
    Referrals:
    0
    Sythe Gold:
    0
    rs_GetUpText doesn't work...

    Change:
    rs_GetUpText = 'ock'
    To:
    Pos(rs_GetUpText, 'ock') > 0

    When you hover a rock it doesn't only says 'ock' it says '/ one more option' and other stuff.
     
  3. Kasmember18

    Kasmember18 Newcomer

    Joined:
    Jan 7, 2009
    Posts:
    10
    Referrals:
    0
    Sythe Gold:
    0
    rs_GetUpText doesn't work...

    Didn't work :(


    Code:
    program New;
            {. Include SRL/SRL.Scar}
            
            Var
            Say: String;
            
            Rockcolor, x, y: Integer;
    
    
         procedure Mine;
    
         begin
          Rockcolor:= 6832706 ;//Insert color here
    
         ClearDeBug;
    
         wait(1000);
         if FindColor(x, y, Rockcolor, 1, 1, 640, 640) then
         begin
         Writeln('Found Color.');
         MoveMouseSmooth(x, y);
         if Pos(rs_GetUpText, 'ock') > 0  then
         begin
         Writeln('Found Rock.')
         wait(1000);
         ClickMouse(x, y, True);
         end
         else
         Writeln('That color was not a rock.');
          end
            else
         Writeln('Color of rock not found.');
        end;//procedure
        
        Begin Mine;
    
    end.


    Error:
    Code:
    Found Color.
    That color was not a rock.
    Successfully executed
     
  4. cazax

    cazax Forum Addict

    Joined:
    Nov 13, 2007
    Posts:
    457
    Referrals:
    0
    Sythe Gold:
    0
    rs_GetUpText doesn't work...

    Your color is static, try using FindColorTolerance
     
  5. Kasmember18

    Kasmember18 Newcomer

    Joined:
    Jan 7, 2009
    Posts:
    10
    Referrals:
    0
    Sythe Gold:
    0
    rs_GetUpText doesn't work...

    It finds the color, moves over the rock, but it won't click on it because it's not a rock. But it is a rock.


    Its not regestering the
    It cant tell if it is a rock.
     
  6. cazax

    cazax Forum Addict

    Joined:
    Nov 13, 2007
    Posts:
    457
    Referrals:
    0
    Sythe Gold:
    0
    rs_GetUpText doesn't work...

    Put a wait(500);
    after movemousesmooth
     
  7. Kasmember18

    Kasmember18 Newcomer

    Joined:
    Jan 7, 2009
    Posts:
    10
    Referrals:
    0
    Sythe Gold:
    0
    rs_GetUpText doesn't work...

    That still didn't work, It goes over the rock but will not click on it.
    Please help me out.

    Thanks to everyone who has help thus far and is going to help.
     
  8. cazax

    cazax Forum Addict

    Joined:
    Nov 13, 2007
    Posts:
    457
    Referrals:
    0
    Sythe Gold:
    0
    rs_GetUpText doesn't work...

    Change ClickMouse to Mouse(X, Y, 0, 0, True);
     
  9. Kasmember18

    Kasmember18 Newcomer

    Joined:
    Jan 7, 2009
    Posts:
    10
    Referrals:
    0
    Sythe Gold:
    0
    rs_GetUpText doesn't work...

    That's not a valid function.

    Ugh, this is a royal pain in my butt.

    I don't think that the program gets past finding that it is a rock. It doesn't say "Found Rock". So the clicking wouldn't be the problem...I guess.
     
  10. Jethr0x

    Jethr0x Grand Master
    Banned

    Joined:
    Jan 24, 2007
    Posts:
    3,070
    Referrals:
    13
    Sythe Gold:
    0
    rs_GetUpText doesn't work...

    Due to the fact that Jagex's Anti-Macro System puts random spaces in names in the UpText:

    "Mine Rock" might be
    M ine Ro ck
    Mine R o ck
    etc.

    I suggest using
    Or just use reflection :p
     
  11. cazax

    cazax Forum Addict

    Joined:
    Nov 13, 2007
    Posts:
    457
    Referrals:
    0
    Sythe Gold:
    0
    rs_GetUpText doesn't work...

    Valid function? I have had the same problem while experimenting with ClickMouse and it sometimes doesn't click...
     
  12. Kasmember18

    Kasmember18 Newcomer

    Joined:
    Jan 7, 2009
    Posts:
    10
    Referrals:
    0
    Sythe Gold:
    0
    rs_GetUpText doesn't work...


    Where did you find that function? I looked in the manaul and it was not included.
    Can you sugest how to utalize that piece of code?
    also whats reflection?
     
< paying for private scar/auto lesson | lessons plz ?? >


 
 
Adblock breaks this site