SRL Archive - OSR Help

attacking methods


sibeliina

2012-01-05 10:06:32

tell me some methods : l coz got problems with attacking npcs : L

sibeliina

2012-01-05 10:13:56

and also where can i find the list of some codes example: FindBlackChatMessage(x)

fre

2012-01-05 14:58:29

You can find them in the simba/srl files in the includes.

jakeyboy29

2012-01-05 15:01:00

Try using auto colour!

There is a current useful one in the tut section by yohojo

sibeliina

2012-01-05 15:31:01

i tried it but it wont att the npc : L what kind code i should use? findobject? or findobjcustom?

Swatarianess

2012-01-08 12:53:33

FindColorsSpiralTolerance; then split the TPA into 10x10?

If you dunno what I mean try looking in the tutorial section. ^^

~Bro433

putonajonny

2012-01-10 13:33:45

Make your own function, there are object finding ones but the only way you can tailor it to your requirements is to write your own, here is one I wrote:
function FindAnObject(Var storex, storey : integer; Const UpText : TStringArray; Colours : TIntegerArray; Tolerance, xs, ys, xe, ye, Step : integer; RepeatUntilTrue : Boolean) : Boolean;
Var xss, yss, xee, yee : integer; EndIt : Boolean;
begin
xss := xs;
yss := ys;
xee := xs + Step;
yee := ys + Step;
Repeat
if FindColorTolerance(storex, storey, Colours[Random(GetArrayLength(Colours))], xss, yss, xee, yee, Tolerance) then
begin
MMouse(storex, storey,1, 1)
if(WaitUpTextMulti(UpText, 800+Random(200))) then
begin
Exit;
Result := True;
end;
end;
xss := xee;
xee := xss + Step;
if(xss >= xe) then
begin
xss := xs;
yss := yss + Step;
xee := xss + Step;
yee := yss + Step;
end else
begin
if(xee >= xe) then
xee := xe;
end;
if(yss >= ye) then
begin
xss := xs;
yss := ys;
xee := xss + Step;
yee := yss + Step;
EndIt := True;
end else
begin
if(yee >= ye) then
yee := ye;
end;


Until((not RepeatUntilTrue) and EndIt);

end;