Results 1 to 9 of 9

Thread: simba find text

  1. #1
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default simba find text

    hey i need some help finding text in runescape... when right clicking an npc there's a list of things and im not sure how to use the find text functions...

    specifically when the function asks for what font? yeah font.. how am i supposed to know which font to put????

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Right-clicking will be done as "Options" because they exist within the right-click menu. For what you want, you'll have to be more specific, are you using SRL (color) or Reflection for finding text?

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    well i use color but im no expert so i think using both is appropriate, but yeah i just want to no of a good strategy to finding text weather it would be using color or a nice simple find textcommand

  4. #4
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Go into your 'text.scar' (in the SRL include) and you'll find plenty of procedures for finding text on your options menu.

    For example, here's the function for just seeing if an option exists:

    Simba Code:
    function OptionsExist(txt: TStringArray; MoveMouse: boolean): boolean;
    begin
      if MoveMouse then
        Result := ChooseOptionMultiEx(Txt, 'All', Move)
      else
        Result := ChooseOptionMultiEx(Txt, 'All', Nothing);
    end;

    Just play around with those procedures to see how they work and I guarantee you'll have it sorted out in now time.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  5. #5
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    cool thank you ill definitely have a go see

    R_ChooseOption('Trade');

    while the option menu is open it does not find this
    Last edited by BraK; 08-17-2011 at 02:31 PM.

  6. #6
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by wantonman View Post
    R_ChooseOption('Trade');

    while the option menu is open it does not find this
    Try this.

    R_WaitOption('Trade', 350);

    Or

    WaitOption('Trade', 350);

    ~Home

  7. #7
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    im not sure what it is but everything checks out but still it doesn't even recognize the option are open... sigh

    have you tried it? it seriously doesn't work... though maybe the result= script works but flight has

    if movemouse then
    result =

    welll i get error on movemouse.....

    but guys seriously, this is the script that i want to add the click option to.

    Simba Code:
    //must be in the tool leprechaun mini game zone
    program new;


    {$DEFINE SMART}
    {.include SRL/SRL.scar}
    {.include Reflection/Reflection.simba}

     const
      USERNAME        = 'user';
      PASSWORD        = 'pass';



    procedure locate;
    var x,y: integer;
    begin
    if findcolortolerance(x,y,263362,546,5,705,165,15) then
    mmouse(x,y,5,-5);
    clickmouse2(true);
    wait(12000 + Random(2000));
    if
    findcolortolerance(x,y,3239492,160,110,370,335,15)
    or
    findcolortolerance(x,y,7247300,160,110,370,335,15)
    then
    mmouse(x,y,5,-5);
    clickmouse2(false);
    end;


    begin
      Smart_Signed := true;
      Smart_Members := true;
      Smart_Server := 96;
      SetupSRL;
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      Players[0].Name := USERNAME;
      Players[0].Pass := PASSWORD;
      Players[0].Active:= True;
      LogInPlayer;
      clicknorth(true);
      locate;
    end.

    as you can see in the procedure locate, all it does is right click npc. I would like too add the click buy flags but im not able to get it to work.

    i can do it entirely by left clicking but it would be awesome to see how that works.

    feel free to test it out.
    Last edited by BraK; 08-17-2011 at 02:25 PM. Reason: Triple Post :/

  8. #8
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try this out:

    Simba Code:
    program new;
    {$DEFINE SMART}
    {.include SRL\SRL.scar}

     const
      USERNAME        = 'user';
      PASSWORD        = 'pass';

    Procedure Locate;
    var
     X, Y, I: integer;
     CA: TIntegerArray;
    begin
      CA := [263362, 3239492, 7247300];  //Defines the colors to a TIntegerArray
      for i := 0 to High(CA) do  //Loops through the array of colours.
      begin
        if FindColorTolerance(x, y, CA[i], MSX1, MSY1, MSX2, MSY2, 15)then //Changed your coordinates to default MainScreen coords
        begin
          MMouse(x, y, 0, 0); //I took out your random x/y, just try it like this FIRST.
          Wait(250 + Random(250)); //Little wait, so the script doesn't get ahead of itself ;)
          Mouse(x, y, 0, 0, false); //Right clicks the current x and y coords with 0 random offsets.
          ChooseOption('Buy'); //I set it to 'Buy' not sure if this is what you want so change to whatever you like.
        end;
      end;
    end;

    begin
      Smart_Signed := true;
      Smart_Members := true;
      Smart_Server := 96;
      SetupSRL;
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      Players[0].Name := USERNAME;
      Players[0].Pass := PASSWORD;
      Players[0].Active:= True;
      LogInPlayer;
      ClickNorth(true);
      Locate;
    end.

  9. #9
    Join Date
    Jan 2011
    Location
    Denver, CO
    Posts
    1,351
    Mentioned
    2 Post(s)
    Quoted
    72 Post(s)

    Default

    Quote Originally Posted by Smarter Child View Post
    ...
    Just a few improvements to what you have there.

    Simba Code:
    program new;
    {$DEFINE SMART}
    {$i SRL\SRL.scar}

     const
      USERNAME  = 'user';
      PASSWORD = 'pass';

    procedure Locate;
    var
     x, y, i: Integer;
     CA: TIntegerArray;
    begin
      CA := [263362, 3239492, 7247300];
      for i := 0 to High(CA) do
      begin
        if FindColorTolerance(x, y, CA[i], MSX1, MSY1, MSX2, MSY2, 15) then
        begin
          MMouse(x, y, 2, 2);
          Wait(100 + Random(50)); // Best to have a wait before checking uptext
          if IsUpText('NPC_NAME') then // Checking uptext of NPC, change this to their name
          begin
            GetMousePos(x, y);
            Mouse(x, y, 0, 0, False);
            Wait(200 + Random(100)); // This will help
            ChooseOption('Buy');
            Break; // You need to break out of the loop or the script will try to find the color 3 times no matter what
          end;
        end;
      end;
    end;

    begin
      Smart_Signed := true;
      Smart_Members := true;
      Smart_Server := 96;
      SetupSRL;
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      Players[0].Name := USERNAME;
      Players[0].Pass := PASSWORD;
      Players[0].Active:= True;
      LogInPlayer;
      ClickNorth(true);
      Locate;
    end.

    Try both scripts out wantonman, if they don't work for you check your fonts. You should see this in the debug whenever you start up Simba.

    Progress Report:
    Loaded fonts: BigChars, CharsNPC, CharsTrade, FriendChars, LoginChars, SmallChars, StatChars, UpChars, XPChars


    If not, your fonts might be outdated.

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
  •