Roflme
2012-06-19 16:55:42
program RoflmeFletcher;
{$DEFINE SMART}
{$i SRL\SRL.simba}
{$i SRL\SRL\Misc\Debug.simba}
var
Bow, Knife, LogsCut: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
With Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
Active := true;
end;
end;
Procedure AntiBan;
begin
Case Random(500) of
0..2: HoverSkill('Fletching', false);
3: GameTab(23);
4..10: RandomMovement;
11..20: BoredHuman;
21..400: Wait(100+Random(75));
end;
SetAngle(SRL_ANGLE_HIGH);
Wait(200+Random(200));
end;
Procedure Bank;
begin
Writeln('Done fletching, finding bank...');
begin
repeat
SetAngle(SRL_ANGLE_HIGH);
OpenBankChest(SRL_BANK_SW);
until BankSCreen or PinScreen;
end;
if PinScreen then
begin
repeat
InPin(Players[0].Pin);
until BankScreen
end;
if BankScreen then
begin
Writeln('Successfully found bank');
Wait(520+random(209));
DepositAll;
Wait(305+random(107));
Withdraw(0, 0, 28);
Wait(503+random(212));
Closebank;
end;
end;
procedure Cut;
var
x, y: Integer;
begin
MouseItem(RandomRange(1,28),mouse_Left);
Wait(2000+random(200));
Knife := DTMFromString('mQwAAAHicY2ZgYGAHYkEGCBCC0vJA7KLDyVBfVcUQ5O/PgAwYkTAQAABvOwMs');
Bow := DTMFromString('mQwAAAHicY2ZgYBBggAAZIOaCsqWBeMX0iQyNJQUMNfnZDMiAEQkDAQCuPwTj')
if FindDTM(Knife, x, y, MCX1, MCY1, MCX2, MCY2) then
begin
Writeln('Found Knife');
MoveMouse(x, y);
ClickMouse2(true);
end;
if FindDTM(Bow, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Writeln('Found longbow image');
MoveMouse(x, y);
ClickMouse2(true);
Writeln('Fletching bows now');
end;
FreeDTM(Knife);
FreeDTM(Bow);
Antiban;
Writeln('Waiting for inventory to be finished...');
Wait(54321+random(2222));
LogsCut := LogsCut + 28;
FindNormalRandoms;
end;
procedure Report;
begin
ClearDebug;
Writeln('Roflme''s Fletcher');
Writeln('Logs Cut:' + IntToStr(LogsCut));
Writeln('Script has run for ' + TimeRunning);
end;
begin
Cleardebug;
Smart_Server := 9;
Smart_Members := false;
Smart_Signed := false;
Smart_SuperDetail := false;
SetupSRL;
DeclarePlayers;
LoginPlayer;
SetAngle(SRL_ANGLE_HIGH);
repeat
Bank;
Cut;
Report;
until(false);
end. Every time I run the script, it can bank and withdraw the logs just fine. I'm having problems with the Cut procedure:
procedure Cut;
var
x, y: Integer;
begin
MouseItem(RandomRange(1,28),mouse_Left);
Wait(2000+random(200));
Knife := DTMFromString('mQwAAAHicY2ZgYGAHYkEGCBCC0vJA7KLDyVBfVcUQ5O/PgAwYkTAQAABvOwMs');
Bow := DTMFromString('mQwAAAHicY2ZgYBBggAAZIOaCsqWBeMX0iQyNJQUMNfnZDMiAEQkDAQCuPwTj')
if FindDTM(Knife, x, y, MCX1, MCY1, MCX2, MCY2) then
begin
Writeln('Found Knife');
MoveMouse(x, y);
ClickMouse2(true);
end;
if FindDTM(Bow, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Writeln('Found longbow image');
MoveMouse(x, y);
ClickMouse2(true);
Writeln('Fletching bows now');
end;
FreeDTM(Knife);
FreeDTM(Bow);
Antiban;
Writeln('Waiting for inventory to be finished...');
Wait(54321+random(2222));
LogsCut := LogsCut + 28;
FindNormalRandoms;
end;My problem is, every time I load up the DTMs into the DTM Editor, they'll never match. When I open simba, and first create the DTM, I will then load the desktop image from multiple locations and camera views just to make sure the DTM matches. Then when I try to run the script, the script gets stuck at that same part: trying to click on the knife/bow.
But the part that frustrates me is when I then go back into the DTM editor and make sure the DTM is still working, it doesn't anymore! The same DTM that I had just used 5 minutes ago, that was finding matches, now doesn't get a match. I kept making new ones but have stopped because the script just continues to not click on the knife/bow and the DTM continues to not find a match in the editor.
Any help is appreciated. (And if you do help could you explain to me what exactly you did :) trying to learn and stop being a leech around these forums)
Thank you!
EDIT: I put the MCX, MCY and MIX, MIY coordinates because I've seen others use them in different scripts. Can anyone tell me what they actually are/do/mean? Does it just fill the coordinates as a variable?
