SCAR Code:
Program LongbowFletcher;
{.include srl/srl.scar}
{.include srl/srl/misc/Users.scar}
var
Loads, Tries, x, y, AntiBanned, Responded: integer;
frmDesign : TForm;
GroupBox1 : TGroupBox;
Edit1 : TEdit;
Edit2 : TEdit;
Edit3 : TEdit;
Edit4 : TEdit;
Edit5 : TEdit;
Button1 : TButton;
Loads1 : Integer;
Const
SleepTimeInMin = 50;
procedure StartClick(sender: TObject);
begin
frmDesign.ModalResult:= mrOk;
Loads1:= StrToInt(Edit5.text)
end;
Procedure Form;
Begin
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 300;
frmDesign.Height := 350;
frmDesign.Caption := 'frmDesign';
frmDesign.Color := clMaroon;
frmDesign.Font.Color := clRed;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'Comic Sans MS';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
GroupBox1 := TGroupBox.Create(frmDesign);
GroupBox1.Parent := frmDesign;
GroupBox1.Left := 16;
GroupBox1.Top := 16;
GroupBox1.Width := 249;
GroupBox1.Height := 273;
GroupBox1.Caption := 'DR'#39's any longbow maker setup';
GroupBox1.Font.Color := clWindowText;
GroupBox1.Font.Height := -11;
GroupBox1.Font.Name := 'Comic Sans MS';
GroupBox1.Font.Style := [];
GroupBox1.ParentFont := False;
GroupBox1.TabOrder := 0;
Edit1 := TEdit.Create(GroupBox1);
Edit1.Parent := GroupBox1;
Edit1.Left := 144;
Edit1.Top := 64;
Edit1.Width := 73;
Edit1.Height := 23;
Edit1.TabOrder := 1;
Edit1.Text := 'Password';
Edit2 := TEdit.Create(GroupBox1);
Edit2.Parent := GroupBox1;
Edit2.Left := 16;
Edit2.Top := 64;
Edit2.Width := 73;
Edit2.Height := 23;
Edit2.TabOrder := 2;
Edit2.Text := 'Username';
Edit3 := TEdit.Create(GroupBox1);
Edit3.Parent := GroupBox1;
Edit3.Left := 16;
Edit3.Top := 96;
Edit3.Width := 73;
Edit3.Height := 23;
Edit3.TabOrder := 3;
Edit3.Text := 'PIN';
Edit4 := TEdit.Create(GroupBox1);
Edit4.Parent := GroupBox1;
Edit4.Left := 144;
Edit4.Top := 96;
Edit4.Width := 73;
Edit4.Height := 23;
Edit4.TabOrder := 4;
Edit4.Text := 'Nickname';
Edit5 := TEdit.Create(GroupBox1);
Edit5.Parent := GroupBox1;
Edit5.Left := 80;
Edit5.Top := 136;
Edit5.Width := 73;
Edit5.Height := 23;
Edit5.TabOrder := 5;
Edit5.Text := 'Loads';
Button1 := TButton.Create(GroupBox1);
Button1.Parent := GroupBox1;
Button1.Left := 48;
Button1.Top := 200;
Button1.Width := 145;
Button1.Height := 41;
Button1.Caption := 'Start Any Longbow Maker';
Button1.TabOrder := 6;
Button1.OnClick := @StartClick
end;
procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('Form', v);
end;
procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
Var
Knife, Log, Longoption: integer;
Procedure LoadDTMs;
Begin
Knife := DTMFromString('78DA6354626060906000036608C550535CCC2' +
'007A41981F83F1030AA001952A86AD62F5E045703028C208E3CAA' +
'9A504B2E54350A404201554DB6072FAA1A6920A18AAAA6A7A9115' +
'50DC82DEAA86A4A737351D5A861FA0B248BAC06000BE50E33');
Log := DTMFromString('78DA639CC9C4C0F088010514FAF2318832323' +
'00011C37F2060EC06AA79CC800618914820DD0154F386809A5940' +
'35EF08A8590254F38A809AC940351FF0AB0100D0AD0DF2');
Longoption := DTMFromString('78DA63D4606060906100036608C5E067CAC5F' +
'010483302F17F20605403322451D584DB70C3D58000A3269090C7' +
'6D0E588D2190D0465573F3E8625435CA40C20A55CD95837330D58' +
'4A2AA01011435D240228C801A1B206187AA26D79B0F558D1990D0' +
'4255E3ACC781AA461C4808A1AA89B1470B1F50F809A3AA4974E24' +
'15103006C031A39');
End;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := Edit2.text;
Players[0].Pass := Edit1.text;
Players[0].Nick := Edit4.text;
Players[0].Integers[0] := Loads1;
Players[0].Strings[0] := Edit3.text;
Players[0].Active := True;
end;
Procedure Fletch;
Begin
If not LoggedIn then
Exit;
If (FindDTM(Knife,x,y,MIX1,MIY1,MIX2,MIY2))then
Begin
Mouse(x, y, 1, 1, true);
WriteLN('Clicked Knife');
WriteLN('Clicking log');
Exit;
end;
Wait (500 + random(300));
If not (FindDTM(Knife,x,y,MIX1,MIY1,MIX2,MIY2))then
Begin
WriteLN('Couldnt find knife');
WriteLN('Make sure one was in your inventory');
WriteLN('Logging out and terminating script');
Logout;
TerminateScript;
Exit;
end;
If (FindDTM(Log,x,y,MIX1,MIY1,MIX2,MIY2))then
Begin
Mouse(x, y, 2, 2, true);
WriteLN('Clicked Log');
WriteLN('Waiting to make longbow');
Exit;
end;
If not (FindDTM(Log,x,y,MIX1,MIY1,MIX2,MIY2))then
Begin
WriteLN('Couldnt find any logs');
WriteLN('Must have had an error banking');
WriteLN('Logging out and terminating script');
Logout;
TerminateScript;
Exit;
end;
Wait(500 + random(300));
If (FindDTM(Longoption,x,y,MIX1,MIY1,MIX2,MIY2)) then
Begin
Mouse(x, y, 3, 3, false);
ChooseOption('X');
TypeSend('27');
WriteLN('Making longs(u)');
end;
Wait(500 + random(300));
Loads:=Loads+1;
end;
Procedure GetThingFromBank;
Var
Resultx : Boolean;
Begin
If not LoggedIn then
Exit;
Repeat
If FindObjCustom(x,y,['Use','Bank','Booth'],[5405328,5339277,804444],5) then
Mouse(x,y,0,0,False);
ChooseOption('uickly');
Wait(1000+Random(2000));
Tries:=Tries+1;
If PinScreen Then
InPin(Players[CurrentPlayer].Strings[1]);
FixBank;
ResultX := BankScreen;
Until(BankScreen) or (Tries >= 6);
If BankScreen then
Begin
MMouse(95-Random(5), 77+Random(5),2,2);
If IsUpText('ogs') then
Begin
Mouse(95-Random(5), 77+Random(5),2,2,False);
ChooseOption('All');
wait(1000+Random(200));
CloseBank;
end;
end;
end;
Procedure AntiBan;
Begin
If not LoggedIn then
Exit;
Case random(9) of
1: Begin
KeyDown(VK_Down);
Wait(random(1000));
KeyUp(VK_Down);
KeyDown(VK_Up);
Wait(500 + random(1000));
KeyUp(VK_Up);
MakeCompass('n');
end;
2: Begin
KeyDown(VK_Left);
Wait(random(1000));
KeyUp(VK_Left);
KeyDown(VK_Right);
Wait(random(1000));
KeyUp(VK_Right);
MakeCompass('n');
end;
3: Begin
KeyDown(VK_Left);
Wait(random(1000));
KeyUp(VK_Left);
KeyDown(VK_Right);
Wait(random(1000));
KeyUp(VK_Right);
MakeCompass('n');
end;
4: Begin
KeyDown(VK_Up);
KeyDown(VK_Left);
Wait(random(1000));
KeyUp(VK_Up);
Wait(random(800));
KeyUp(VK_Left);
MakeCompass('n');
end;
5: Begin
HoverSkill('random', False);
end;
6: Begin
HoverSkill('Fletching', False);
end;
7: Begin
PickupMouse;
end;
8: Begin
AlmostLogout;
end;
9: Begin
BoredHuman;
end;
end;
AntiBanned := AntiBanned + 1;
end;
Function InChatLine(myString: string): Boolean;
Begin
Result := ( pos(myString, TheLine) <> 0 );
End;
procedure LevelRespond;
var
Chats : TStringArray;
I, L: Integer;
Begin
If not LoggedIn then
Exit;
Chats := ['tching l', 'hing lv', 'hing le', 'tchin lvl', 'etch lv'];
for I := 0 to 4 do
begin
if InChat(Chats[i]) then
begin
inc(Responded);
L := GetSkillInfo('fletching', False);
case Random(11) of
0: TypeSend(IntToStr(L)+', close to'+IntToStr(L+1));
1: TypeSend('Me '+ IntToStr(L));
2: TypeSend(IntToStr(L) + ' over here');
3: Begin
TypeSend('Lemme check...');
Wait(500 + random(3000));
TypeSend('...' + IntToStr(L));
end;
4: TypeSend('Im ' + IntToStr(L));
5: TypeSend('only ' + IntToStr(L));
6: TypeSend('Pfft, only ' + IntToStr(L));
7: begin
TypeSend('onky ' + IntToStr(L));
TypeSend('*only');
end;
8: TypeSend('My Fletching is only ' + IntToStr(L) + ' ...lol');
9: TypeSend('Not very good...only '+IntToStr(L));
10: TypeSend(IntToStr(L) + ', going for 99')
end;
wait(1000 + Random(500));
Exit;
end;
end;
end;
Procedure Siggy;
Begin
ClearDebug;
WriteLN('Dude_Richard.......')
Wait(1000)
WriteLN('Presents.......')
Wait(1200)
WriteLN('The One the Only.......')
Wait(1300)
WriteLN('Any Longbow Maker v1.0!')
Wait(1500)
End;
Begin
SetupSRL;
LoadDTMs;
Siggy;
SafeInitForm;
SafeShowFormModal;
DeclarePlayers;
ActivateClient;
LoginPlayer;
LevelRespond;
Repeat
GetThingFromBank;
Fletch;
Wait(550 + random(350));
until (Loads >= Players[CurrentPlayer].Integers[0])
FreeDTM(longoption);
FreeDTM(log);
FreeDTM(knife);
end.