Log in

View Full Version : Can Someone Check this?



ILikeSmoothHeads
02-22-2012, 10:00 PM
Hi, I've been following yohojo's tutorials and one of the functions he uses isn't working for me... maybe it's because SRL updated or something, I don't know. So if anyone could help me that would be awesome!

program Chopper;
//{$DEFINE SMART}
{$i SRL\SRL.simba}


Const
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery= 120;
Breakfor= 5;
Version= '1.0Beta';
NumbOfPlayers=1;
StartPlayer=0;



procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
Integers[1] := 4; //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
Integers[2] := 4; //Seconds to try mining rock before clicking another.
end;

end;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('Antiban') GameTab(tab_Stats) HoverSkill('Woodcutting', False) GameTab(28) End;
1: Begin StatsGuise('Antiban') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('Antiban') GameTab(tab_Inv) ExamineInv; GameTab(28) End;
3: Begin StatsGuise('Antiban') RandomAngle(1); End;
4: Begin StatsGuise('Antiban') GameTab(tab_Stats); Wait(3000 + Random(800)); End;
5: Begin StatsGuise('Antiban') GameTab(tab_Stats) HoverSkill('random', False) GameTab(28) End;
End;
End;


Function ChopDown:Boolean;
Var
Sex, SeY, PlusOne, TreeCounter: Integer;
Begin
PlusOne:= InvCount +1;
Sex:=MSCX;
Sey:=MSCY;
If FindObjTPA(Sex, Sey, 3161417, 5, 1, 15, 60, 40, ['Cho']) Then
begin
StatsGuise('Hooray we found a tree!');
GetMousePos(seX, Sey);
Case Random(2) of
0: Mouse(seX, seY, 5, 5, True);
1: begin
Mouse(seX, seY, 5, 5, False);
WaitOption('Chop', 500);
end;
end;

Flag;


repeat
MarkTime(TreeCounter);
Antiban;
wait(500);
If InvCount=PlusOne Then
WriteLn('We got a log!');
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000)
end;
end;


Procedure DropLogs;
var
sex, sey, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;

begin
LogDTM := DTMFromString('mwQAAAHic42RgYJjGxMDQC8SdQDwBiOcA8R IgXgDFM4H4CVDdXSB+BsQfgfgtEL8C4sdAfAeIbwNxkK0KQ5Cl JEN9mjmQxwTG9vrSYNrRUIbB10qJgRD4D8SMRGA4AADbsBK7') ;
LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19, 23,27,4,8,12,16,20,24,28];

For I:=0 To 27 Do
begin
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM, sex, sey, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
begin

MouseItem(LogPattern[I],False);
ChooseOption('dro');

end;
end;

end;




Begin


SetupSRL;
DeclarePlayers;
Repeat;
ChopDown;
If InvFull Then
DropLogs;
Until (false)

End.


[Hint] (57:10): Variable 'Result' never used at line 56
[Error] (106:37): Type mismatch at line 105
Compiling failed.

RISK
02-22-2012, 10:15 PM
Change 'False' to 'MOUSE_RIGHT' in 'MouseItem(LogPattern[I], False);'.