Ok, heres the problems you had...:
1. You had DeclarePlayers; before the form...so the DeclarePlayers; doesnt know whats Edit1.Text and Edit2.Text...so heres the fixed version...:
SCAR Code:
program Miner;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\Mining.scar}
var
Loads : Integer;
Ox, Oy: Integer;
frmDesign : TForm;
Label1 : TLabel;
Label2 : TLabel;
Button1 : TButton;
Edit1 : TEdit;
Edit2 : TEdit;
const
Rock=2371663; //Put the color of the Rock here.
pick=False;//If you have your Pick equipped, true, if not, false.
LoadsM=44;//How many loads to mine?
RunDirection='N';//What direction would you like to run in case of a random?
Procedure DeclarePlayers;
Begin
HowManyPlayers := 4;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := Edit1.Text;
Players[0].Pass := Edit2.Text;
Players[0].Nick := 'game';
Writeln(inttostr(HowManyPlayers) + ' Players');
End;
procedure mine;
begin
repeat
if (FindMSColor(x,y,Rock)) then
MMouse(x,y,0,0);
ClickMouse(x,y,true);
wait(2500+random(100));
until(InvFull);
if(FindChatText('Lol'))or
(FindChatText('Rofl'))or
(FindChatText('Lmao'))or
(FindChatText('Roflmao'))then
begin
typesend('lol')
end;
end;
Procedure FindTheGas;
begin
if (not(Findgas(Ox,Oy))) then
begin
wait(100+random(100));
if (FindGas(Ox,Oy)) then
begin
wait(100+random(100));
RunAwayDirection(Rundirection);
Wait(1000+random(1000));
RunBack;
end;
end;
end;
procedure converse;
begin
if(FindChatText('Ok'))or
(FindChatText('K'))or
(FindChatText('No'))or
(FindChatText('Yes'))then
typesend('Im So BORED!!!!!!!!!!')
end;
procedure drop;
begin
if(pick)=True then
begin
typesend('brb...')
RunAwayDirection(RunDirection);
GameTab(4);
DropTo(1,28);
Wait(10000);
RunBack;
typesend('back')
Loads := Loads + 1;
end;
begin
if(pick)=False then
begin
typesend('brb...')
RunAwayDirection(RunDirection);
GameTab(4);
DropTo(2,28);
Wait(10000);
RunBack;
typesend('back')
Loads := Loads + 1;
If loads=LoadsM then
begin;
logout;
end;
end;
end;
end;
procedure ClickButton(sender: TObject); // Adding Buttons and Interactivity
begin
Writeln('Button Clicked!');
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;
end;
Procedure InitForm;
begin
///////////////// Generated from: daForm.dfm
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 271;
frmDesign.Height := 196;
frmDesign.Caption := 'frmDesign';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.ShowHint := True;
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 12;
Label1.Top := 15;
Label1.Width := 74;
Label1.Height := 20;
Label1.Caption := 'Username';
Label1.Font.Color := clWindowText;
Label1.Font.Height := -17;
Label1.Font.Name := 'MS Sans Serif';
Label1.Font.Style := [];
Label1.ParentFont := False;
Label2 := TLabel.Create(frmDesign);
Label2.Parent := frmDesign;
Label2.Left := 13;
Label2.Top := 57;
Label2.Width := 69;
Label2.Height := 20;
Label2.Caption := 'Password';
Label2.Font.Color := clWindowText;
Label2.Font.Height := -17;
Label2.Font.Name := 'MS Sans Serif';
Label2.Font.Style := [];
Label2.ParentFont := False;
Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.Left := 96;
Button1.Top := 100;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'Start';
Button1.TabOrder := 8;
Edit1 := TEdit.Create(frmDesign);
Edit1.Parent := frmDesign;
Edit1.Left := 98;
Edit1.Top := 15;
Edit1.Width := 121;
Edit1.Height := 21;
Edit1.TabOrder := 9;
Edit1.Text := 'Name';
Edit2 := TEdit.Create(frmDesign);
Edit2.Parent := frmDesign;
Edit2.Left := 98;
Edit2.Top := 58;
Edit2.Width := 121;
Edit2.Height := 21;
Edit2.TabOrder := 10;
Edit2.Text := 'Password';
Button1.Onclick := @ClickButton;
end;
procedure SafeInitForm; // Default Code
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal; // Default Code
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal; // Default Code
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
procedure AntiRandoms;
begin
FindTalk;
FindNormalRandoms;
if (FindFight = true) then
begin
RunAwayDirection(RunDirection);
Wait(10000 + random(2000));
RunBack;
end;
end;
procedure ShowFormModal; // Default Code
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal; // Default Code
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
procedure AntiRandoms;
begin
FindTalk;
FindNormalRandoms;
if (FindFight = true) then
begin
RunAwayDirection(RunDirection);
Wait(10000 + random(2000));
RunBack;
end;
end;
procedure ProgReport;
begin
Writeln('- - - - - - - - - - - - - - - - - - - - -');
Writeln('You have worked for : ' + ScriptTime2(2))
Writeln('You have Mined ' +IntToStr(Loads)+' loads,');
Writeln('You have gained Aprox ' +IntToStr(Loads*945)+(' XP! '));
Writeln('- - - - - - - - - - - - - - - - - - - - -');
Writeln('{Thank you for using Games Auto Miner!---}');
Writeln('Games Autos!---------------------------------------------- ');
Writeln(' _________ ');
Writeln(' / ________| __________ ');
Writeln('/ / | _______| ');
Writeln('| | ________ | \ / | | ______ ');
Writeln('| | / / \ \ | \ / | |_______ / /____| ');
Writeln('| | ____ / / \ \ | \ \_/ / | |_______| / /____ ');
Writeln('| | | | / /_______ \ | |\ _ /| | | |____ / ');
Writeln('\ \______| | / / \ \ | | | | |________ / / ');
Writeln(' \_________| / / \ \ | | | |__________| ___/ / ');
end;
begin
SetupSRL;
SafeInitForm;
SafeShowFormModal;
DeclarePlayers;
repeat
if(not (LoggedIn)) then
LoginPlayer;
until(false)
repeat
ActivateClient;
antirandoms;
mine;
converse;
drop;
ProgReport;
FindTheGas;
until(false)
end.