SRL Archive - OSR Help

how do i use this?


sibeliina

2012-01-06 15:35:57


function FindMainScreenHits(Bar: Integer): Integer;
var
TIA: TIntegerArray;
begin
TIA := GetHitsIn(MSCX, MSCY, MSX1, MSY1, MSX2, MSY2);
try
Result := TIA[bar];
except
Result := -1;
end;
end;

when i try add it as function its gives :
[Error] (121:10): Duplicate identifier 'FINDMAINSCREENHITS' at line 120
Compiling failed.

YoHoJo

2012-01-06 15:42:30

Is that from inside SRL?
If so just do FindMainScreenHitsIn(1) tonged your players hits I think.

You dont need that actual chunk of code in your script, just the line above.
I think :p.

Why not just use getmmlevel? That will tell you how many hits left by reading your HP by the minimap.

sibeliina

2012-01-06 15:46:36

yes is :P but what does (1) do in the code?

well didint find getmmlevel from inside srl :O i just looked fighting.scar/.simba :) time to test this : P btw anyideas how to make bot wait till npc is dead and the loot shows up?

P1nky

2012-01-06 15:48:10

From: sibeliina
yes is :P but what does (1) do in the code?


Bar: Integer

sibeliina

2012-01-06 15:50:27

ok tried to add it but now it gives error : l

tried it like this:
procedure Guardkiller;
var x, y: integer;
begin
if FindObj(x, y, 'ttack', Guardcolor, 10) then
writeln('moi');
FindMainScreenHitsIn(1);
begin
Mouse(x, y, 2, 2, false);
ChooseOption('ttack');


end;

end;

and it gives error like this :
[Error] (73:3): Unknown identifier 'FindMainScreenHitsIn' at line 72
Compiling failed.


damn this is hard lol

YoHoJo

2012-01-06 15:51:34

My GUESS is that the function finds all health bars on the main screen, sorts them outwards from mscx, mscy and puts them into a TPA, so either 0 or 1 would be your health bar.

sibeliina

2012-01-06 15:53:16

From: YoHoJo
My GUESS is that the function finds all health bars on the main screen, sorts them outwards from mscx, mscy and puts them into a TPA, so either 0 or 1 would be your health bar.


so i need to change 1 to 0`?

still gives:

[Error] (76:5): Unknown identifier 'FindMainScreenHitsIn' at line 75
Compiling failed.

:L

P1nky

2012-01-06 15:56:09

From: sibeliina
so i need to change 1 to 0`?

still gives:

[Error] (76:5): Unknown identifier 'FindMainScreenHitsIn' at line 75
Compiling failed.

:L


Where is the function located at in SRL?

sibeliina

2012-01-06 16:00:01

its located
C:\Simba\Includes\SRL\SRL\skill\fighting.simba

weequ

2012-01-06 16:02:07

From: sibeliina
its located
C:\Simba\Includes\SRL\SRL\skill

That isn\t included in srl by default. You have to include that file at the top of you script.

P1nky

2012-01-06 16:04:00

{$i SRL\SRL\Skill\fighting.simba} 
Here you go Mate.

sibeliina

2012-01-06 16:05:36

u put it like this:

program new;
{$Define Smart}
{$i srl/srl.scar}
{C:\Simba\Includes\SRL\SRL\skill\fighting.simba}

still same error


From: P1nky
{$i SRL\SRL\Skill\fighting.simba} 
Here you go Mate.

didint help : L

begginer

2012-01-06 16:07:04

{$Define Smart}
{$i srl/srl.simba}
{C:\Simba\Includes\SRL\SRL\skill\fighting.simba}

All now should be like .simba
Try that

sibeliina

2012-01-06 16:09:14

:google:
From: begginer
{$Define Smart}
{$i srl/srl.simba}
{C:\Simba\Includes\SRL\SRL\skill\fighting.simba}

All now should be like .simba
Try that


lol still same error <.<