SRL Archive - SRL Archives

New objective functions


JPHamlett

2009-09-18 04:21:06


Function setobjective(skill : string; level : integer) : boolean;
var
TP : tpoint;
begin
if not gametab(tab_stats) then exit;
TP := SkillToCoords(True, Skill)
mouse(TP.x + 7,TP.y + 13, 5, 5, false);
waitoption('ject', 2500);
wait(10 + random (2));
chooseoption('ject');
typesend(inttostr(level));
end;

ill add more when gametab is fixed

YoHoJo

2009-09-18 05:25:54

Not sure exactly what objectives can be used for in autoing, but itll make a great antiban feature, snappy work chap.

Cazax

2009-09-18 06:40:18

This would fit in AntiBan.scar in core folder. You need to set the result because or it'll always return false. You can also set a quest as objective.

JAD

2009-09-18 06:52:15

WaitOption waits for an option and selects it. So for efficiency purposes, the second ChooseOption should be taken out:


Function setobjective(skill : string; level : integer) : boolean;
var
TP : tpoint;
begin
if not gametab(tab_stats) then exit;
TP := SkillToCoords(True, Skill)
mouse(TP.x + 7,TP.y + 13, 5, 5, false);
Result := waitoption('ject', 2500);
typesend(inttostr(level));
end;

Also made it result as Cazax mentioned.

Good job though :)

JPHamlett

2009-09-20 01:37:31

anything gonna happen to this?