SRL Archive - OSR Help

Uptext???


DeSnob

2010-01-30 08:41:43

Seriously..? Uptext isn't working :mad:

I was working on my script and it can't recognize uptext. Is there any way to make my own function? I really need this!

Gu3st...

2010-01-30 08:50:07

Are you running SCAR 3.23 BETA (better known as scarprerelease)?

DeSnob

2010-01-30 08:59:39

From: Zyt3x
Are you running SCAR 3.23 BETA (better known as scarprerelease)?


yup, used SVN. Have latest SRL Dev too. I don't know what's wrong:


program new;
{.Include SRL\SRL\Misc\SMART.SCAR}
{.include srl/srl.scar}

Var
x, y: Integer;
Lobster: Integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];

Name := ' ';
Pass := ' ';
Nick := ' ';
Active := True;
Pin := '';
Integers[0] := 1000;{Inventories without logging out?}
Strings[1] := 'lobster';{What do you want to fish? Look to the top of the script}
Booleans[1] := False; {Drop?}
end;
end;

procedure AntiBan;
var
Z: Integer;
begin
Z:= 1+random(20);
case Random(140) of
0: MMouse(x, y, 50+random(6), 50+random(3));
1: PickUpMouse;
2: if (Z = 10) then HoverSkill('fishing', false) else RandomMovement;
end;
end;

procedure AntiRandoms;
var
Z: Integer;
R: String;
begin
Z:= 1+random(20);
case Random(50) of
0: R:= 'Fishing';
1: R:= 'Mining';
2: R:= 'Woodcutting';
3: R:= 'Crafting';
4: if (Z = 10) then R:= 'Fishing' else R:= 'Cooking';
end;
FindNormalRandoms;
LampSkill := R;
end;

procedure LoadItemBitmaps;
begin
Lobster:= BitmapFromString(5, 7, 'beNozlo43l023VuDj5S1wUCp' +
'3VU20kANygWygSKWbGpwLlAKKJFvKw7n1nuoQrpuGKARBuEBlENTs' +
'rcHAwOStLR6kLxkBANHVFdw=');
end;

function FindFish: Boolean;
begin
GameTab(tab_Inv);
if FindBitmapToleranceIn(Lobster, x, y, MIX1, MIY1, MIX2, MIY2, 7) then
begin
Writeln('Found Lobster!');
MMouse(x, y, 5, 5);
if IsUpText('Lobster') then
begin
wait(100+random(450));
Mouse(x, y, 0, 0, False);
wait(100+random(250));
ChooseOption('rop');
Result := True;
end else
Writeln('Wrong object? Could not find uptext of object.');
end else
Writeln('Couldn''t find lobster.');
FreeBitmap(Lobster);
end;


begin
Smart_Server := 91;// |Edit to which world you want.
Smart_Members := True;// |do not touch
Smart_Signed := True;// |do not touch
Smart_SuperDetail := False;// |do not touch
ClearDebug;
SetUpSRL;
DeclarePlayers;
LoginPlayer;
LoadItemBitmaps;
if FindFish then Writeln('Yippie!');//testing lobster finding
end.

I also tried 'obste', 'aw lobst' , 'Raw Lob'

Gu3st...

2010-01-30 09:05:08

Hmm.. Edit "Writeln('Wrong object? Could not find uptext of object.');" to "Writeln('Wrong object? Could not find uptext of object. UPTEXT: ' + GetUpText);" and tell me what the debug box says

DeSnob

2010-01-30 09:11:08

Found Lobster!//hovers over raw lobster
Wrong object? Could not find uptext of object. UPTEXT:

Timer

2010-01-30 09:31:09

Delete scar.exe and then update your scarprerelease folder.. Tell me how that goes! ^^

DeSnob

2010-01-30 09:38:56

Found Lobster!
Wrong object? Could not find uptext of object. UPTEXT:

I re-installed the whole SCAR folder and it still gives me the same results :(

Mr. Doctor

2010-01-30 11:25:13

Are you using Dev or Public SVN? If public use dev,


http://www.villavu.com/repositories/srl-opendev

Wanted

2010-01-30 11:27:11

MMouse(x, y, 5, 5);
Wait(250 + Random(100)); //Important.
if (IsUpTextMultiCustom(['aw L', 'Lob', 'obster', 'bste'])) then

DeSnob

2010-01-30 11:31:39

IceFire- THANK YOU

Wanted

2010-01-30 11:36:36

Just remember the wait between MMouse and uptext, the game doesn't respond instantly.

DeSnob

2010-01-30 11:38:17

K :)

Bad Boy JH

2010-01-31 23:41:19

What I think also is possible, is you were searching for 'lobster' when the uptext, which would return false, because it would read 'Lobster' which is why you see many scripts use 'obster' instead of 'lobster' or 'Lobster'