From: Wu-Tang Clan
He definitely has a point. I am currently just going to get the big bad skills out of the way like herblore and agility and then its going to be straight legitting for the rest of my RS life.
:crying:
Anyways, if anyone of you are using Brandon's OGL plugin & library you can easily make this script. I tried to when the plugin was just released but for some reason, over time, an enormous amount of lag built up; I can only assume at that time there was a memory leak or two. Maybe I still have something laying around to get you going on your way…
Ah here 'tis, I hope it helps:
{$DEFINE SMART}
{$DEFINE CSMART}
{$i SRL/SRL.Simba}
{$i GLHook/GLHook.simba}
{$i SRL/SRL/misc/MouseHandler.simba}
{
Type 1 model: 3962916570
Type 2 model: 2419325344
Type 3 model: 3156053617
Type 4 model: 1915004297
}
Var
Obj_LividIDs: Array of Cardinal;
Procedure LoadVars;
begin
SetArrayLength(Obj_LividIDs, 4);
Obj_LividIDs := [3962916570, 2419325344, 3156053617, 1915004297];
end;
Function lividMenu: Boolean;
var
Pnt: TPoint;
begin
Result := GLHook_FindTextArea(Pnt, IntToBox(MIX1,MIY1,MIX2,MIY2), 'train', True, 4, 10);
end;
Function getMousePnt: TPoint;
var
X,Y: Integer;
begin
GetMousePos(X,Y);
Result := Point(X,Y);
end;
Function OGL_GetOptions: TStringArray;
var
B: TBox;
i: Integer;
tInfo: TTextInfoArray;
begin
tInfo := GLH_GetChooseOptions(B);
if (length(tInfo) < 1) then
Exit;
for i:=0 to High(tInfo) do
begin
SetArrayLength(Result, Length(Result)+1);
Result[High(Result)] := tInfo[i].Text;
end;
end;
Procedure CureLivid(ID: Integer; Pnt: TPoint);
var
mPnt: TPoint;
begin
case ID of
3962916570: mPnt := Point(590, 280);
2419325344: mPnt := Point(680, 280);
3156053617: mPnt := Point(590, 400);
1915004297: mPnt := Point(680, 400);
end;
AL_BrakeMMouse(Point(Pnt.X,Pnt.Y), 7, 7, True); //Y-50
//Writeln(ToStr(getMousePnt)+', '+glh_getuptext);
if GLH_WaitUpTextMulti(['Cure','re-p','-pl','lant','Dise','seas','d li','livid'], 300) then
begin
AL_FastClick(mouse_right);
//Writeln(ToStr(OGL_GetOptions));
if GLH_ChooseOption('Cure-plant Diseased livid') then
begin
AL_BrakeMMouse(Point(635, 310), 65, 70, True);
//if (not waitFunc(@lividMenu, 50, 3000)) then
//Exit;
if lividMenu then
begin
AL_MissMouse(mPnt, 10, 10);
if GLH_WaitUpText('Continue', 400) then
begin
//CheckedPauline := False;
AL_FastClick(mouse_left);
// XP increments
end;
//CheckedPauline := False;
Wait(randomRange(1715, 1970));
end;
end;
end;
end;
Function getModelsByIDs(IDs: Array of Cardinal): TModelArray;
var
i,Ptr,Size: Integer;
begin
for i:=0 to High(IDs) do
begin
Ptr := GLHGetModelsByID(IDs[i], Size);
SetLength(Result, Size);
Result := GLHook_IterateModels(Ptr, Size);
end;
end;
Procedure HandleLivids;
var
i,f,h: Integer;
Livids: TModelArray;
begin
Livids := getModelsByIDs(Obj_LividIDs);
if (length(Livids) < 1) then
begin
Writeln('No livids found...');
Exit;
end;
for f:=1 to 3 do
for i:=0 to High(Livids) do
CureLivid(Livids[i].ID, Point(Livids[i].SX,Livids[i].SY));
end;