SCAR Code:
{
__________________________________________________________
|| Me_ntals Willow Cutter ||
|| Soon to be Banker/Power cutter ||
|| Suggestion? Post it! ||
|| Thanks the SRL team ||
|| Espically starblaster ||
||_______________________________________________________||
}
{.include srl/srl.scar}
{.include SRL/SRL/Skill/WoodCutting.scar}
var
LogDTM, cUser, willows, i, LoadNumber:integer;
StartScript: Boolean;
frmDesign : TForm;
CPlayer , PPlayer , BeginScript , Cancel , NPlayer, DPlayer : TButton;
GroupBox1 : TGroupBox;
Label1 , Label2 , Label3 , Label4 , Label5 : TLabel;
UName , Pword , Loads : TEdit;
Activity : TComboBox;
EdgeWillowCutterFileName: String;
procedure DeclareDTM;
begin
LogDTM := DTMFromString('78DA632C66626078CA8002527D75191E02694' +
'620FE0F048CC94035CF18D000231209A4F3806AEE10505343A49A' +
'3744D8F511BF1A00056F0DE4');
end;
{__________________________________________
| Loading |
|__________________________________________|}
Procedure SavePlayersInForm(No: Integer);
Begin
Players[no].Name := UName.Text;
Players[no].Pass := Pword.Text;
Players[no].Active := StrToBool(Activity.Text);
Players[no].Integer1 := StrToIntDef(Loads.Text, 0);
end;
Procedure LoadPlayersInForm(no: Integer);
Begin
try
UName.Text := Players[no].Name;
Pword.Text := Players[no].Pass;
Activity.Text := BoolToStr(Players[no].Active);
Loads.Text := IntToStr(Players[no].Integer1);
except
end;
end;
procedure SaveUs2;
var
f, CharsFile: Integer;
begin
If (EdgeWillowCutterFileName = '') then EdgeWillowCutterFileName := 'Characters'
CharsFile := RewriteFile(ScriptPath + EdgeWillowCutterFileName + '.dat', False)
For f := 0 to GetArrayLength(players) - 1 do
begin
WriteFileString(CharsFile, 'name' +IntToStr(f)+ '=' +players[f].Name+ Chr(13))
WriteFileString(CharsFile, 'pass' +IntToStr(f)+ '=' +players[f].Pass+ Chr(13))
WriteFileString(CharsFile, 'active' +IntToStr(f)+ '=' +BoolToStr(players[f].Active)+ Chr(13))
WriteFileString(CharsFile, 'load' +IntToStr(f)+ '=' +IntToStr(players[f].Integer1)+ Chr(13))
end;
CloseFile(charsfile)
end;
procedure LoadUs2;
var
f, CharsFile, Temp: Integer;
begin
if (EdgeWillowCutterFileName = '') then EdgeWillowCutterFileName := 'Characters';
CharsFile := OpenFile(ScriptPath + EdgeWillowCutterFileName + '.dat', False)
if (CharsFile < 0) then
begin
SaveUs2;
CharsFile := OpenFile(AppPath + filename + '.dat', False)
if (CharsFile < 0) then
begin
WriteLn('Error Loading Chars');
Exit;
end
end
ReadFileString(CharsFile, CharsFileString, FileSize(CharsFile))
CloseFile(CharsFile)
Temp := CountPlayers;
If (Temp <= 0) then Temp:= 1;
SetArrayLength(players, Temp);
HowManyPlayers := GetArrayLength(players)
for f := 0 to HowManyPlayers - 1 do
begin
players[f].Name := GetFileData(f, 'name')
players[f].Pass := GetFileData(f, 'pass')
players[f].Active := StrToBool(GetFileData(f, 'active'))
players[f].Integer1 := StrToIntDef(GetFileData(f, 'load'), 0)
//Writeln('Loading Player: '+IntToStr(f));
end
CloseFile(CharsFile);
end;
{__________________________________________
| Form |
|__________________________________________|}
procedure Inititate(Sender: TObject);
begin
label5.Caption := 'Player '+IntToStr(cUser);
Players[cUser].Name := UName.Text;
Players[cUser].Pass := Pword.Text;
if (activity.Text = 'True') then
Players[cUser].Active := True
else
Players[cUser].Active := False;
cUser := GetArrayLength(Players) - 1;
end;
procedure LeftPlayer(sender: TObject);
begin
try
players[currentplayer + 1].name := players[currentplayer + 1].name
except
Exit;
end
SavePlayersInForm(CurrentPlayer);
CurrentPlayer := CurrentPlayer + 1;
label5.caption := 'Player '+IntToStr(CurrentPlayer);
LoadPlayersInForm(CurrentPlayer);
end;
procedure RightPlayer(sender: TObject);
begin
if (Currentplayer <> 0) then
begin
SavePlayersInForm(CurrentPlayer);
CurrentPlayer := CurrentPlayer - 1;
label5.caption := 'Player '+IntToStr(CurrentPlayer);
LoadPlayersInForm(CurrentPlayer);
end
end;
procedure Backspace(sender: TObject);
Begin
repeat
if (GetArrayLength(players) = 1) then break
SetArrayLength(players, GetArrayLength(players) - 1)
CurrentPlayer := GetArrayLength(Players) - 1;
label5.caption := 'Player '+IntToStr(CurrentPlayer);
LoadPlayersInForm(CurrentPlayer);
until (True)
end;
procedure AddUser(sender: TObject);
begin
SavePlayersInForm(CurrentPlayer);
SetArrayLength(Players, GetArrayLength(Players) + 1);
CurrentPlayer := GetArrayLength(Players) - 1;
Players[GetArrayLength(Players) - 1].Active := True;
label5.caption := 'Player '+IntToStr(CurrentPlayer);
LoadPlayersInForm(CurrentPlayer);
end;
procedure CancelScript(sender: TObject);
var
v: TVariantArray;
begin
SavePlayersInForm(CurrentPlayer);
SetArrayLength ( V, 0);
Writeln('Script Cancelled');
SaveUs2;
frmDesign.ModalResult:= mrOk;
StartScript := False;
end;
procedure FormClose2(sender: TObject; var CanClose: Boolean);
begin
SavePlayersInForm(CurrentPlayer);
SaveUs2;
HowManyPlayers := GetArrayLength(players)
CanClose := True
end;
Procedure BScript(Sender: TObject);
var
v: TVariantArray;
begin
SavePlayersInForm(CurrentPlayer);
SaveUs2;
SetArrayLength ( V, 0);
frmDesign.ModalResult:= mrOk;
StartScript := True;
Label5.Caption := 'Player '+IntToStr(cUser);
end;
procedure InitForm;
Begin
LoadUs2;
frmDesign := CreateForm;
frmDesign.Left := 262;
frmDesign.Top := 167;
frmDesign.BorderStyle := bsSingle;
frmDesign.Caption := 'Edge Cutter';
frmDesign.ClientHeight := 293;
frmDesign.ClientWidth := 377;
frmDesign.Color := clCream;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -13;
frmDesign.Font.Name := 'Comic Sans MS';
frmDesign.Font.Style := [];
frmDesign.KeyPreview := True;
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
NPlayer := TButton.Create(frmDesign);
NPlayer.OnClick:= @LeftPlayer;
NPlayer.Parent := frmDesign;
NPlayer.Left := 255;
NPlayer.Top := 28;
NPlayer.Width := 75;
NPlayer.Height := 25;
NPlayer.Caption := 'Next';
NPlayer.Font.Color := clWindowText;
NPlayer.Font.Height := -13;
NPlayer.Font.Name := 'Comic Sans MS';
NPlayer.Font.Style := [];
NPlayer.ParentFont := False;
NPlayer.TabOrder := 0;
CPlayer := TButton.Create(frmDesign);
CPlayer.OnClick:= @AddUser;
CPlayer.Parent := frmDesign;
CPlayer.Left := 186;
CPlayer.Top := 28;
CPlayer.Width := 67;
CPlayer.Height := 25;
CPlayer.Caption := 'Create';
CPlayer.Font.Color := clWindowText;
CPlayer.Font.Height := -13;
CPlayer.Font.Name := 'Comic Sans MS';
CPlayer.Font.Style := [];
CPlayer.ParentFont := False;
CPlayer.TabOrder := 1;
DPlayer := TButton.Create(frmDesign);
DPlayer.OnClick:= @Backspace;
DPlayer.Parent := frmDesign;
DPlayer.Left := 116;
DPlayer.Top := 29;
DPlayer.Width := 68;
DPlayer.Height := 25;
DPlayer.Caption := 'Delete';
DPlayer.Font.Color := clWindowText;
DPlayer.Font.Height := -13;
DPlayer.Font.Name := 'Comic Sans MS';
DPlayer.Font.Style := [];
DPlayer.ParentFont := False;
DPlayer.TabOrder := 2;
PPlayer := TButton.Create(frmDesign);
PPlayer.OnClick:= @RightPlayer;
PPlayer.Parent := frmDesign;
PPlayer.Left := 39;
PPlayer.Top := 29;
PPlayer.Width := 75;
PPlayer.Height := 25;
PPlayer.Caption := 'Previous';
PPlayer.Font.Color := clWindowText;
PPlayer.Font.Height := -13;
PPlayer.Font.Name := 'Comic Sans MS';
PPlayer.Font.Style := [];
PPlayer.ParentFont := False;
PPlayer.TabOrder := 3;
Cancel := TButton.Create(frmDesign);
Cancel.OnClick:= @CancelScript;
Cancel.Parent := frmDesign;
Cancel.Left := 200;
Cancel.Top := 258;
Cancel.Width := 75;
Cancel.Height := 25;
Cancel.Caption := 'Cancel';
Cancel.Font.Color := clWindowText;
Cancel.Font.Height := -13;
Cancel.Font.Name := 'Comic Sans MS';
Cancel.Font.Style := [];
Cancel.ParentFont := False;
Cancel.TabOrder := 4;
BeginScript := TButton.Create(frmDesign);
BeginScript.OnClick:= @BScript;
BeginScript.Parent := frmDesign;
BeginScript.Left := 90;
BeginScript.Top := 258;
BeginScript.Width := 75;
BeginScript.Height := 25;
BeginScript.Caption := 'Ok';
BeginScript.TabOrder := 6;
GroupBox1 := TGroupBox.Create(frmDesign);
GroupBox1.Parent := frmDesign;
GroupBox1.Left := 43;
GroupBox1.Top := 61;
GroupBox1.Width := 285;
GroupBox1.Height := 190;
GroupBox1.Color := clActiveCaption;
GroupBox1.DragMode := dmAutomatic;
GroupBox1.Font.Color := clWindowText;
GroupBox1.Font.Height := -13;
GroupBox1.Font.Name := 'Comic Sans MS';
GroupBox1.Font.Style := [];
GroupBox1.ParentColor := False;
GroupBox1.ParentFont := False;
GroupBox1.TabOrder := 5;
Label1 := TLabel.Create(GroupBox1);
Label1.Parent := GroupBox1;
Label1.Left := 42;
Label1.Top := 43;
Label1.Width := 70;
Label1.Height := 18;
Label1.Caption := 'User Name:';
Label1.Font.Color := clWindowText;
Label1.Font.Height := -13;
Label1.Font.Name := 'Comic Sans MS';
Label1.Font.Style := [];
Label1.ParentFont := False;
Label2 := TLabel.Create(GroupBox1);
Label2.Parent := GroupBox1;
Label2.Left := 50;
Label2.Top := 73;
Label2.Width := 61;
Label2.Height := 18;
Label2.Caption := 'Password:';
Label2.Font.Color := clWindowText;
Label2.Font.Height := -13;
Label2.Font.Name := 'Comic Sans MS';
Label2.Font.Style := [];
Label2.ParentFont := False;
Label3 := TLabel.Create(GroupBox1);
Label3.Parent := GroupBox1;
Label3.Left := 68;
Label3.Top := 103;
Label3.Width := 42;
Label3.Height := 18;
Label3.Caption := 'Active:';
Label3.Font.Color := clWindowText;
Label3.Font.Height := -13;
Label3.Font.Name := 'Comic Sans MS';
Label3.Font.Style := [];
Label3.ParentFont := False;
Label4 := TLabel.Create(GroupBox1);
Label4.Parent := GroupBox1;
Label4.Left := 69;
Label4.Top := 133;
Label4.Width := 39;
Label4.Height := 18;
Label4.Caption := 'Loads:';
Label5 := TLabel.Create(GroupBox1);
Label5.Parent := GroupBox1;
Label5.Left := 112;
Label5.Top := 8;
Label5.Width := 46;
Label5.Height := 23;
Label5.Caption := 'Player '+IntToStr(cUser);
Label5.Font.Color := clWindowText;
Label5.Font.Height := -16;
Label5.Font.Name := 'Comic Sans MS';
Label5.Font.Style := [];
Label5.ParentFont := False;
UName := TEdit.Create(GroupBox1);
UName.Parent := GroupBox1;
UName.Left := 118;
UName.Top := 40;
UName.Width := 121;
UName.Height := 26;
UName.ParentShowHint := False;
UName.ShowHint := True;
UName.TabOrder := 4;
UName.Text := Players[0].Name;
Pword := TEdit.Create(GroupBox1);
Pword.Parent := GroupBox1;
Pword.Left := 117;
Pword.Top := 70;
Pword.Width := 121;
Pword.Height := 26;
Pword.Hint := 'Password';
Pword.ParentShowHint := False;
Pword.PasswordChar := '*';
Pword.ShowHint := True;
Pword.TabOrder := 1;
Pword.Text := Players[0].Pass;
Loads := TEdit.Create(GroupBox1);
Loads.Parent := GroupBox1;
Loads.Left := 118;
Loads.Top := 130;
Loads.Width := 121;
Loads.Height := 26;
Loads.OEMConvert := True;
Loads.ParentShowHint := False;
Loads.ShowHint := True;
Loads.TabOrder := 2;
Loads.Text := IntToStr(Players[0].Integer1);
Activity := TComboBox.Create(GroupBox1);
Activity.Parent := GroupBox1;
Activity.Left := 117;
Activity.Top := 100;
Activity.Width := 122;
Activity.Height := 26;
Activity.ItemHeight := 18;
Activity.ParentShowHint := False;
Activity.ShowHint := True;
Activity.TabOrder := 3;
Activity.Text := BoolToStr(Players[0].Active);
Activity.Items.Add('True');
Activity.Items.Add('False');
end;
procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
{__________________________________________
| Sigantures |
|__________________________________________|}
Procedure Siganture;
Begin
Writeln('_______________________________');
Writeln('| Me_ntal"s |');
Writeln('| Edgeville |');
Writeln('| Willow Cutter |');
Writeln('|______________________________|');
end;
procedure Report;
begin
ClearDebug;
Writeln('_______________________________');
Writeln('| |');
Writeln('| Me_ntal"s |');
Writeln('| Edgeville |');
Writeln('| Willow Cutter |');
Writeln('|______________________________|');
Writeln('')
Writeln(' Total Running Time : ' +TimeRunning);
Writeln('')
Writeln(Players[CurrentPlayer].Name);
Writeln('Willows Cut :'+IntToStr(Willows));
Writeln('Exp Gained :'+FloatToStr(Willows*62.5));
end;
procedure Summary;
begin
AddToReport('');
AddToReport(Players[CurrentPlayer].Name)
AddToReport('Worked for : 'IntToStr(Players[CurrentPlayer].Worked));
AddToReport('Willows Cut :'+IntToStr(Willows));
AddToReport('Exp Gained :'+FloatToStr(Willows*62.5));
AddToReport('Wc level :'+IntToStr(Players[CurrentPlayer].Level[20]));
AddToReport('');
end;
{__________________________________________
| Randoms |
|__________________________________________|}
Function FindFastRandoms:Boolean; //By WT-Fakawi.
begin
for i := 1 to 16 do
begin
case I of
1: CloseWindow;
2: if FindTalk then
Result := True;
3: if FindDead then
Result := True;
4: if FindMod then
Result := True;
5: if FindMime then
Result := True;
6: if FindMaze then
Result := True;
7: if FindQuiz then
Result := True;
8: if FindDemon then
Result := True;
9: if FindScapeRune then
Result := True;
10: if FindTalk then
Result := True;
11: if FindLamp(LampSkill) then
Result := True;
12: if (FindNewBox) then
begin
Result := True;
if (UseBoxSolver) then
SolveBox
else
GambleNewBox;
end;
14:
begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
16: if RC then
Result := True;
end;
Wait(1);
end;
end;
{__________________________________________
| AntiBan |
|__________________________________________|}
Procedure WereHuman;
Begin
If not(LoggedIn) then Exit;
Begin
Case Random(20) of
0: RandomRClickEvery(2 + Random(8));
1: HoverSkill('random', false);
2: RotateEvery(20 + Random(10));
3: LeaveScreenEvery(5 + Random(5));
4: HoverSkill('Woodcutting', false);
5: BoredEvery(9 + Random(24));
6: Begin
GameTab(1 + Random(12));
Wait(1500 + Random(500));
GameTab(4);
end;
7: SleepAndMoveMouse(1000 + Random(1000));
8: MMouse(Random(MIX2), Random(MIY2), 0, 0);
end;
end
end;
procedure Randomfind;
begin
FindFastRandoms;
FindNormalRandoms;
Report;
end;
{__________________________________________
| Banking |
|__________________________________________|}
procedure DropLogs;
begin
if (InvFull) then
begin
repeat
if(FindDTM(LogDTM, x, y, 552, 203, 742, 469))then
begin
Mouse(x, y, 2, 2, False);
ChooseOption(x, y, 'Drop');
Randomfind;
Willows := Willows + 1;
end;
until(Not(FindDTM(LogDTM, x, y, 552, 203, 742, 469)));
end else
exit;
end;
procedure bankreq;
begin
if (InvFull) then
begin
DropLogs;
end else
exit;
end;
{__________________________________________
| Main Loop |
|__________________________________________|}
Procedure Doload;
Var
cx, cy: Integer;
begin
if (InvFull) then bankreq;
repeat
begin
If not(LoggedIn)then Exit;
WereHuman;
If (FindColorSpiralTolerance(x,y, 3160112, msx1,msy1,msx2,msy2, 5))and
not(FindColorSpiralTolerance(cx, cy, 515029, MSX1, MSY1, 180, 25, 20))and
not(FindColorSpiralTolerance(cx, cy, 122333, MSX1, MSY1, 123, 15, 10))and
not(FindColorSpiralTolerance(cx, cy, 65535, MSX1, MSY1, 180, 25, 20))then
Begin
MMouse(x, y, 3, 3);
if(IsUpTextMulti('hop', 'own', 'illo'))then
begin
Wait(100 + Random(100));
Mouse(x,y,3,3, false);
Wait(100 + Random(35));
ChooseOption(x, y, 'Chop');
MMouse(x, y, 6, 6);
Randomfind;
end;
repeat
begin
wait(500+Random(1000));
If (InvFull) then bankreq;
end;
until (not(IsUpText('hop')));
end;
end;
until (InvFull)
end;
{__________________________________________
| Setups |
|__________________________________________|}
Procedure SetupScript;
Begin
ClearDebug;
Wait(500)
rs_DeleteUID;
ActivateClient;
LoginPlayer;
If (Not(LoggedIn)) then
Begin
Loginplayer;
end;
end;
Procedure SetupPlayer;
begin
HighestAngle;
MakeCompass('E');
FindAxeHeadColor;
Report;
end;
{__________________________________________
| Main Loop |
|__________________________________________|}
begin
setupsrl;
LoadUs;
ClearDebug;
cUser := 0;
Willows := 0;
Siganture;
SafeInitForm;
SafeShowFormModal;
If not(StartScript) then TerminateScript;
SetupScript;
SetupPlayer;
repeat
repeat
Doload;
Bankreq;
Report;
until (Willows >= Players[CurrentPlayer].Integer1)
if(Willows >= Players[CurrentPlayer].Integer1)then
begin
Summary;
LogOut;
NextPlayer(True);
Willows := 0;
SetupPlayer;
end;
until False;
end.