Hi All!
Thought I'd have a crack at a simple OSRS High Level Alchemy script:
I haven't set it up to utilise SMART, and it also relies on having the item-to-be-alched in that spot under the spell. In order to detect whether or not the animation had finished, I used the orb of my fire staff and also implemented an occasional random mouse move to different locations on the High-Alch spell for some - at least what I think is - more human movement. Apart from that doesn't have any antiban - hadn't decided on what to include, wasn't sure on how to include...
Here it is:
Simba Code:
program HighLevelAlchemy;
{$I SRL/OSR.simba}
{$I RSWalker/Walker.simba}
procedure spellOpen();
var spellTab: TPointArray;
begin
if srl.FindColors(spellTab, CTS2(1382990, 11, 0.05, 0.23), Box(727, 170, 760, 200)) > 1 then
writeLn('Spellbook is open! Found ', Length(spellTab), ' points.');
end;
procedure waitLoop();
var staffTop: TPointArray
var endAnim: Boolean
begin
repeat
wait(randomRange(100,200));
if srl.FindColors(staffTop, CTS2(1255656, 5, 0.04, 1.59), MainScreen.GetBounds) > 20 then
endAnim := True;
wait(RandomRange(75,195));
writeLn('waiting');
until(endAnim = True);
end;
procedure initialise();
var alchSpell: TPointArray;
begin
if srl.FindColors(alchSpell, CTS2(3358022, 3, 1.23, 1.25), Box(710, 304, 719, 310)) > 50 then
Mouse.Move(alchSpell[Random(Length(alchSpell))]);
end;
procedure highAlch();
var alchSpell: TPointArray;
var randomInt: Integer;
begin
randomInt := RandomRange(1,10);
if srl.FindColors(alchSpell, CTS2(3358022, 3, 1.23, 1.25), Box(710, 304, 719, 310)) > 50 then
begin
writeLn('start');
if randomInt < 8 then
begin
Mouse.Hold(mouse_Left);
wait(RandomRange(70,90));
Mouse.Release(mouse_Left);
wait(RandomRange(250,400));
Mouse.Hold(mouse_Left);
wait(RandomRange(70,90));
Mouse.Release(mouse_Left);
sleep(1500);
waitLoop();
end;
if randomInt < 7 then
begin
Mouse.Move(alchSpell[Random(Length(alchSpell))]);
Mouse.Hold(mouse_Left);
wait(RandomRange(70,90));
Mouse.Release(mouse_Left);
wait(RandomRange(250,400));
Mouse.Hold(mouse_Left);
wait(RandomRange(70,90));
Mouse.Release(mouse_Left);
sleep(1500);
waitLoop();
end;
end;
end;
begin
clearDebug();
srl.Setup([]);
spellOpen();
initialise();
repeat
highAlch();
until(false)
end.
Any feedback/thoughts/improvements would be much appreciated. Cheers!