i made a fix to this script to check when fletching, woodcutting, and waiting. It uses the make x, and istead of clicking sell 10 three times, it will keep doing sell 10 until it sold all of them. I currently edited it to make longbows instead of shortbows, but i dont feel like fixing the walking. I already finished my oak fletching so i might as well release this to you guys, and if anyone wants to fix the walking and maybe clean it up a little. It was lazy/sloppy coding as i didnt really feel like doing too much. Here it is for you guys. This also fixes the problem when it clicks chop oak over and over again, instead this checks if your in the process of woodcutting then waits a little and checks again, etc.
program kChop; //edited by Real Regulater
{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I P07Include.Simba}
var
x,y,shopDTM,invCounter,knifeDTM,aInteger,thaTime,logDTM,shortBowDTM,oakDTM,fletching,fletchtype: Integer;
procedure Settings;
begin
//fletching := 0-1 0=No, 1=Yes
fletching := 1
//fletching 0-3 0=nothing,, 1= short bow, 2= long bow 3 = crossbow
fletchtype := 1
end;
procedure DTMFree;
begin
FreeDTM(ShopDTM);
FreeDTM(knifeDTM);
FreeDTM(logDTM);
FreeDTM(oakDTM);
FreeDTM(shortBowDTM);
writeln('Freed DTM''s');
end;
procedure DTMZ;
begin
//shopDTM := DTMFromString('mQwAAAHicY2ZgYFjCxMCwDIqjgPxQIA4C4iNXbzB0BksBWYwMyIARCQMBACIZBmY=');
shopDTM := DTMFromString('mrAAAAHic42BgYFjKxMCwGojXAPFyIJ4PxYuAeBkQRwDVhANxLBAnAXEcEEcCcSgQhwAxKycjAyMjKmZgQGbjB4wEMAwAAI8dCDo=');
knifeDTM := DTMFromString('mrAAAAHic42BgYEhjYmDIBuICIC4B4iIgzgHidCBOBuKPQDWvgPghEN8E4mtAfB+InwPxewYQYCSA8QNidQMAf2MKpg==');
logDTM := DTMFromString('mWAAAAHicY2FgYOhjYmCYDsT9QNwLxNyMDAxcQCwAxKxAnOUlyZAXYsSwrs8fjNEBIxoGAQCU9wdX');
oakDTM := DTMFromString('mFQEAAHic42VgYJjAxMAwD4iXAPECIJ4GxN1A3A7lLwXiPiCeDcRToXKijAwMgkDMB8T/gWYwAGkWIOaG0pyMELG/QEoYqhYsQDImHVBsCwCL+Qpl');
shortBowDTM := DTMFromString('mlwAAAHicY2dgYOhiYmCYCsSzgHgOEC8G4vlA3A3EZowMDEZArAvEqkCsAMRaUDEGBkY8GDcgQhcAwXAFgw==');
writeln('Loaded DTM''s');
end;
Function IsCutting: Boolean;
var
PBox : TBox;
Begin
PBox := IntToBox(238, 149, 286, 186);
Result := (AveragePixelShift(PBox, 250, 350) > 350);
//Writeln(IntToStr(AveragePixelShift(PBox, 500, 650)));
End;
Function IsWcing: Boolean;
var
PBox: TBox;
Begin
PBox := IntToBox(238, 149, 286, 186);
Result := (AveragePixelShift(PBox, 250, 350) > 150);
//Writeln(IntToStr(AveragePixelShift(PBox, 500, 650)));
End;
Function IsFletching: Boolean;
var
PBox: TBox;
Begin
PBox := IntToBox(250, 145, 273, 175);
Result := (AveragePixelShift(PBox, 250, 350) > 75);
//Writeln(IntToStr(AveragePixelShift(PBox, 500, 650)));
End;
Function sell: Boolean;
begin
wait (100+Random(10));
writeln('Found the shortbow!');
MMouse(x,y,5,5);
ClickMouse2(mouse_right);
wait(1000+Random(200));
P07_ChooseOptionMulti(['10']);
end;
Function AntiBan: Boolean;
Begin
case random(300) of
0: P07_HoverSkill('woodcutting', random(5000));
1: P07_MakeCameraAngleLow;
2: P07_MakeCompassSouth;
3: P07_MakeCompassEast;
4: P07_MakeCompassWest;
5: MMouse(random(700), random(400), 0, 0);
end;
End;
procedure chopOak;
begin
If not IsWcing then
if P07_FindObjCustom(x,y, ['Oak'], [1199684, 3300694], 5) Then
ClickMouse2(mouse_left);
writeln('Choppin'' some oak!');
Wait (RandomRange(5000,6000))
end;
procedure waiting;
begin
MarkTime(thaTime);
aInteger := P07_InvCount
if IsCutting then
repeat
if TimeFromMark(thaTime) > 12000 then Break;
if not isCutting then break;
Wait(500);
Until (P07_InvCount > aInteger)
end;
procedure chopTree;
begin
If not IsWcing then
if P07_FindObjCustom(x,y, ['ree'], [1199684, 3300694], 5) Then
ClickMouse2(mouse_left);
writeln('Choppin'' some oak!');
Wait (RandomRange(5000,6000))
end;
procedure arrowShafter;
begin
writeln('We are shafting!');
wait(Random(1000));
if(findDTM(knifeDTM, x, y, P07_MIX1, P07_MIY1, P07_MIX2, P07_MIY2)) then
begin
MMouse(x,y,Random(10),Random(5));
ClickMouse2(mouse_left);
writeln('We found a knife!');
wait(Random(500));
if(findDTM(logDTM, x, y, P07_MIX1, P07_MIY1, P07_MIX2, P07_MIY2)) then
begin
MMouse(x,y,Random(10),Random(5));
wait(10+Random(5));
ClickMouse2(mouse_left);
writeln('SUP LOG');
MMouse(75, 408,Random(20),Random(15));
wait(10+Random(5));
ClickMouse2(mouse_right);
wait(10+Random(5));
P07_ChooseOptionMulti(['10']);
wait(20000+Random(10000));
end;
end;
end;
procedure shortBower;
begin
writeln('We are shortBowing!');
wait(Random(1000));
if(findDTM(knifeDTM, x, y, P07_MIX1, P07_MIY1, P07_MIX2, P07_MIY2)) then
begin
MMouse(x,y,Random(10),Random(5));
ClickMouse2(mouse_left);
writeln('We found a knife!');
wait(Random(500));
if(findDTM(oakDTM, x, y, P07_MIX1, P07_MIY1, P07_MIX2, P07_MIY2)) then
begin
MMouse(x,y,Random(10),Random(5));
wait(10+Random(5));
ClickMouse2(mouse_left);
writeln('SUP LOG');
MMouse(262,407,7,7);
wait(randomrange(15,100));
ClickMouse2(mouse_right);
P07_ChooseOptionMulti(['ke X', 'X']);
Wait(RandomRange(750,900));
SendKeys(IntToStr(RandomRange(27, 99)), 95, 35);
Wait(RandomRange(300, 400));
P07_UseKey(13);
wait(randomrange(10000,30000));
end;
end;
end;
procedure makeShortBows;
Begin
invCounter := P07_InvCount;
repeat
MarkTime(thaTime);
If not (P07_InvCount < invCounter) then
begin
If FindDTM(oakDTM, x, y, P07_MIX1, P07_MIY1, P07_MIX2, P07_MIY2) and not IsFletching then
shortBower;
end
else
invCounter := P07_Invcount;
repeat
Wait(5000);
until (TimeFromMark(thaTime) > 2000);
until not FindDTM(oakDTM, x, y, P07_MIX1, P07_MIY1, P07_MIX2, P07_MIY2)
end;
procedure dropOak;
begin
If P07_InvFull then
P07_DropAllExcept([1]);
Wait(200+Random(100))
end;
procedure walkShop;
begin
P07_MakeCompassSouth;
if P07_InvFull then
writeln('Trying to walk to shop!');
begin
if(findDTM(ShopDTM, x, y, 565, 7, 717, 157)) then
begin
writeln('Getting to tha shoppah!');
Mouse(x, y, random(10), random(10), true);
end;
P07_FFlag;
wait (1000+Random(200));
end;
end;
procedure walkOak;
begin
P07_MakeCompassNorth;
MMouse(608, 84, random(1),random(1));
ClickMouse2(mouse_left);
writeln('Walking back to the Oak');
end;
procedure openShop;
begin
if P07_FindObjCustom(x,y, ['hop', 'assistant'], [3367053, 5728897], 5) then
begin
Mouse(x,y, Random(2), Random(2), false);
P07_ChooseOptionMulti(['rade']);
writeln('Trading!');
end;
P07_FFlag;
wait(10+Random(5));
if(findDTM(shortBowDTM, x, y, P07_MIX1, P07_MIY1, P07_MIX2, P07_MIY2)) then
begin
invCounter := P07_InvCount;
repeat
walkShop;
openShop;
writeln('Trying to walk to shop!');
if(findDTM(ShopDTM, x, y, 565, 7, 717, 157)) then
begin
writeln('Getting to tha shoppah!');
Mouse(x, y, random(10), random(10), true);
end;
P07_FFlag;
wait (1000+Random(200));
MarkTime(thaTime);
If not (P07_InvCount < invCounter) then
begin
If FindDTM(shortBowDTM, x, y, P07_MIX1, P07_MIY1, P07_MIX2, P07_MIY2) and not sell then
sell;
end
else
invCounter := P07_Invcount;
repeat
Wait(200);
until (TimeFromMark(thaTime) > 2000);
until not FindDTM(shortBowDTM, x, y, P07_MIX1, P07_MIY1, P07_MIX2, P07_MIY2)
walkOak;
end;
end;
begin
SetupP07Include;
DTMZ;
AddOnTerminate('DTMFree');
Settings;
repeat
// chopTree;
// arrowShafter;
if(P07_InvFull) then
repeat
makeShortBows;
until not FindDTM(oakDTM, x, y, P07_MIX1, P07_MIY1, P07_MIX2, P07_MIY2)
else
walkShop;
openShop;
if not (P07_InvFull) then
repeat
AntiBan;
chopOak;
waiting;
until (P07_InvFull);
until(not P07_Loggedin);
end.