Log in

View Full Version : simba find text



wantonman
08-10-2011, 03:53 AM
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????

Flight
08-10-2011, 04:19 AM
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?

wantonman
08-10-2011, 04:30 AM
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

Flight
08-10-2011, 04:49 AM
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:


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. ;)

wantonman
08-10-2011, 04:58 AM
cool thank you ill definitely have a go see

R_ChooseOption('Trade');

while the option menu is open it does not find this

Home
08-10-2011, 08:55 AM
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

wantonman
08-10-2011, 08:17 PM
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.


//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.

Smarter Child
08-17-2011, 11:16 AM
Try this out:

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.

Echo_
08-17-2011, 01:56 PM
...

Just a few improvements to what you have there.

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.

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

If not, your fonts might be outdated.