PDA

View Full Version : Help With Converting Your Script To SRL 4!



YoHoJo
08-19-2007, 02:56 AM
Well SRL 4 is out, and some minor changes need to be made to all scripts in order for them to compile and work again.
If you need any help with converting you script to SRL 4, please post the error you get here, along with a few lines of code and the SRL members and I will jump all over it and fix it like the c0de wh0res we are!

Here Is a Tutorial By Starblaster for fixing player array changes:
http://www.srl-forums.com/forum/showthread.php?t=17157

This aid is for SCRIPTERS ONLY.
I/We will not be updating other peoples scripts for you, dern leechers!

Sp0rky
08-19-2007, 03:32 AM
program RoflCakes;

{.include SRL/SRL.scar}

begin
SetupSRL;
ClickExactMMColor(123456);
end.


Knock yourself out :p

lordsaturn
08-19-2007, 03:52 AM
One question...why is it that the whole extended folder was removed?

matviy
08-19-2007, 04:07 AM
Why was the WeAreDead removed? And why were Forester, and plant anti-randoms removed?

Ransom
08-19-2007, 04:17 AM
read the official thread guys. this is beta. only the core works for now. skill and misc are still down. it's beta. be patient.

Sp0rky
08-19-2007, 04:31 AM
read the official thread guys. this is beta. only the core works for now. skill and misc are still down. it's beta. be patient.

Color is in core :eek:

mongo1
08-19-2007, 04:36 AM
if anyone could update dontpanic's flax picker i would pay them 100k

RAM
08-19-2007, 04:48 AM
if anyone could update dontpanic's flax picker i would pay them 100k

First, he will probably update the script himself, be patient...Second, we don't script on this forum for money....Third, at least make a worth while offer....go google the price of a script....

YoHoJo
08-19-2007, 06:42 AM
@Spork- That script compiles fine for me...

@matviy, we are dead is also still in SRL4

BlueWorld
08-19-2007, 07:25 AM
Wizzups autominer plox update it :)

YoHoJo
08-19-2007, 08:46 AM
This aid is for SCRIPTERs ONLY.
I/We will not be updating other peoples scripts for you, dern leechers!

nielsie95
08-19-2007, 08:51 AM
Maybe you can add a small tut on the new playerarray?
And a list of easy things to fix (ChooseOption).

ShowerThoughts
08-19-2007, 10:39 AM
just wanna know why this isnt working dont work to long it on okay its really hard:p
program MultiSkills;
{.include SRL/.scar}






procedure ToChickenPen;
begin
HighestAngle;
MakeCompass('N');
FindRoadColor;
RadialRoadWalk(RoadColor, 63, 436, 83, 0, 0);
RadialRoadWalk(RoadColor, 70, 435, 57, 0, 0);
RadialRoadWalk(RoadColor, 26, 396, 66, 0, 0);
RadialRoadWalk(RoadColor, 26, 396, 66, 0, 0);
RadialRoadWalk(RoadColor, 332, 698, 71, 0, 0);
RadialRoadWalk(RoadColor, 315, 678, 72, 0, 0);
RadialRoadWalk(RoadColor, 337, 699, 65, 0, 0);
RadialRoadWalk(RoadColor, 337, 699, 65, 0, 0);
RadialRoadWalk(RoadColor, 337, 699, 65, 0, 0);
end;





begin
SetupSrl;
activateclient;
ToChickenPen;
end.

what is an array ?
a place to store files or are only x and y places to store files and others...
to store coords i mean

YoHoJo
08-19-2007, 04:25 PM
@HerMPie.

Change you include line to
{.include SRL\SRL.scar}

Sp0rky
08-19-2007, 04:42 PM
@Spork- That script compiles fine for me...


Grrr, I get a runtime error >_>


[Runtime Error] : Exception: Access violation at address 00000000. Read of address 00000000 in line 249 in script C:\Program Files\SCAR 3.12\includes\SRL/SRL/Core/Color.scar

Whats my problem here?

R0b0t1
08-19-2007, 04:51 PM
You want somthing to fix? Go at it. 1.5k+ lines of ownage :p. And its not even done yet.


{.Script Info:
# ScriptName = MiniMiner
# Author = r0b0t1
# Description = Mines and drops, but will bank if at VEM
# Version = 0.1
# Date =
# Comments = Player creating like RsN's
/Script Info}
program MiniMiner;
{Fill in rotations and hit start!}
{.Include SRL/SRL.scar}
{Santa helped with tabs, and Fizzi with pick finding.}

Const {you can use +Random(); to randomize}
Rotations=5; {How many times will it loop through players?}

Var RockColor: Integer;

Var
TerminateReason: String;
Termin: Boolean;

Type TRock = record
Name: String;
Color: Integer;
end;

Var
Rock: Array [0..8] of TRock;

Var
frmDesign : TForm;
PageControl1 : TPageControl;
TabPages : Array [1..3] Of TTabSheet;
btnHelp : TButton;
chCustColors : TCheckBox;
chShwStatus : TCheckBox;
chExtReport : TCheckBox;
btnReportBug : TButton;
chAutoColor : TCheckBox;
btnChooseClr : TButton;
var
frmColorPick : TForm;
Label1 : TLabel;
Label2 : TLabel;
Label3 : TLabel;
Label4 : TLabel;
Label5 : TLabel;
Label6 : TLabel;
Label7 : TLabel;
Label8 : TLabel;
Label9 : TLabel;
Edit : Array [0..8] of TEdit;
{Edit1 : TEdit;
Edit2 : TEdit;
Edit3 : TEdit;
Edit4 : TEdit;
Edit5 : TEdit;
Edit6 : TEdit;
Edit7 : TEdit;
Edit8 : TEdit;
Edit9 : TEdit;}
var
edUser : TEdit;
edPass : TEdit;
edNick : TEdit;
edLoc : TEdit;
cmbActive : TComboBox;
cmbPick : TComboBox;
cmbBank : TComboBox;
cmbRock : TComboBox;
btnPrev : TButton;
btnDelPlayer : TButton;
btnCreaPlayer : TButton;
btnNext : TButton;
edLoads : TEdit;

var
i : Integer;
cUser : Integer;

Procedure AddPlayer;
begin;
SetArrayLength(Players, GetArrayLength(Players) + 1);
Players[GetArrayLength(Players) - 1].Name := 'Name';
Players[GetArrayLength(Players) - 1].Pass := 'Pass';
Players[GetArrayLength(Players) - 1].Nick := 'Nick';
Players[GetArrayLength(Players) - 1].Active := True;
Players[GetArrayLength(Players) - 1].Loc := 'Location';
Players[GetArrayLength(Players) - 1].Strings[0] := 'Rock';
Players[GetArrayLength(Players) - 1].Integer[0] := 0
Players[GetArrayLength(Players) - 1].Booleans[0] := True; {Pick Wielded}
Players[GetArrayLength(Players) - 1].Booleans[1] := True; {Bank If available}
end;

Procedure InitPlayers;
begin;
Players[cUser].Nick := edNick.Text;
Players[cUser].Name := edUser.Text;
Players[cUser].Pass := edPass.Text;
Players[cUser].Loc := edLoc.Text;
Players[cUser].Integer[0]:= StrToInt(edLoads.Text);
If (cmbActive.Text = 'True') Then
Players[cUser].Active:= True
else
Players[cUser].Active:= False;
{--------------------------------}
If (cmbPick.Text = 'True') Then
begin;
Players[cUser].Booleans[0]:= True;
end else
Players[cUser].Booleans[0]:= False;
{---------------------------------}
If (cmbBank.Text = 'True') Then
begin;
Players[cUser].Booleans[1]]:= True;
end else
Players[cUser].Booleans[1]]:= False;
{---------------------------------}
Case lowercase(cmbRock.Text) of
'tin': Players[cUser].Strings[0]:= 'tin';
'copper': Players[cUser].Strings[0]:= 'copper';
'iron': Players[cUser].Strings[0]:= 'iron';
'silver': Players[cUser].Strings[0]:= 'silver';
'coal': Players[cUser].Strings[0]:= 'coal';
'gold': Players[cUser].Strings[0]:= 'gold';
'mithril': Players[cUser].Strings[0]:= 'mithril';
'adamant': Players[cUser].Strings[0]:= 'adamant';
'runite': Players[cUser].Strings[0]:= 'runite';
end;
cUser := GetArrayLength(Players) - 1;
end;

Procedure CreatePlayer;
begin;
Players[cUser].Nick:= edNick.Text;
Players[cUser].Name:= edUser.Text;
Players[cUser].Pass:= edPass.Text;
Players[cUser].Loc:= edLoc.Text;
Players[cUser].Integer[0]:= StrToInt(edLoads.Text);
If (cmbActive.Text = 'True') Then
Players[cUser].Active:= True
else
Players[cUser].Active:= False;
{--------------------------------}
If (cmbPick.Text = 'True') Then
begin;
Players[cUser].Booleans[0]:= True;
end else
Players[cUser].Booleans[0]:= False;
{---------------------------------}
If (cmbBank.Text = 'True') Then
begin;
Players[cUser].Booleans[1]]:= True;
end else
Players[cUser].Booleans[1]]:= False;
{---------------------------------}
Case lowercase(cmbRock.Text) of
'tin': Players[cUser].Strings[0]:= 'tin';
'copper': Players[cUser].Strings[0]:= 'copper';
'iron': Players[cUser].Strings[0]:= 'iron';
'silver': Players[cUser].Strings[0]:= 'silver';
'coal': Players[cUser].Strings[0]:= 'coal';
'gold': Players[cUser].Strings[0]:= 'gold';
'mithril': Players[cUser].Strings[0]:= 'mithril';
'adamant': Players[cUser].Strings[0]:= 'adamant';
'runite': Players[cUser].Strings[0]:= 'runite';
end;
AddPlayer;
cUser := GetArrayLength(Players) - 1;
edLoc.Text:= Players[cUser].Loc;
edNick.Text:= Players[cUser].Nick;
edUser.Text:= Players[cUser].Name;
edPass.Text:= Players[cUser].Pass;
Players[cUser].Integer[0] := StrToInt(edLoads.Text);
If (Players[cUser].Active) then
cmbActive.Text:= 'True'
else
cmbActive.Text:= 'False';
{--------------------------------}
If (Players[cUser].Booleans[0]) Then
begin;
cmbPick.Text:= 'True';
end else
cmbPick.Text:= 'False';
{---------------------------------}
If (Players[cUser].Booleans[1]]) Then
begin;
cmbBank.Text:= 'True';
end else
cmbBank.Text:= 'False';
{---------------------------------}
Case lowercase(Players[cUser].Strings[0]) of
'tin': cmbRock.Text:= 'tin';
'copper': cmbRock.Text:= 'copper';
'iron': cmbRock.Text:= 'iron';
'silver': cmbRock.Text:= 'silver';
'coal': cmbRock.Text:= 'coal';
'gold': cmbRock.Text:= 'gold';
'mithril': cmbRock.Text:= 'mithril';
'adamant': cmbRock.Text:= 'adamant';
'runite': cmbRock.Text:= 'runite';
end;
end;

Procedure ForwardPlayer;
begin;
Players[cUser].Nick:= edNick.Text;
Players[cUser].Name:= edUser.Text;
Players[cUser].Pass:= edPass.Text;
Players[cUser].Loc:= edLoc.Text;
Players[cUser].Integer[0]:= StrToInt(edLoads.Text);
If (cmbActive.Text = 'True') Then
Players[cUser].Active:= True
else
Players[cUser].Active:= False;
{--------------------------------}
If (cmbPick.Text = 'True') Then
begin;
Players[cUser].Booleans[0]:= True;
end else
Players[cUser].Booleans[0]:= False;
{---------------------------------}
If (cmbBank.Text = 'True') Then
begin;
Players[cUser].Booleans[1]]:= True;
end else
Players[cUser].Booleans[1]]:= False;
{---------------------------------}
Case lowercase(cmbRock.Text) of
'tin': Players[cUser].Strings[0]:= 'tin';
'copper': Players[cUser].Strings[0]:= 'copper';
'iron': Players[cUser].Strings[0]:= 'iron';
'silver': Players[cUser].Strings[0]:= 'silver';
'coal': Players[cUser].Strings[0]:= 'coal';
'gold': Players[cUser].Strings[0]:= 'gold';
'mithril': Players[cUser].Strings[0]:= 'mithril';
'adamant': Players[cUser].Strings[0]:= 'adamant';
'runite': Players[cUser].Strings[0]:= 'runite';
end;
If (cUser + 1 > GetArrayLength(Players) - 1) Then
cUser := 0
else
cUser := cUser + 1;
edLoc.Text:= Players[cUser].Loc;
edNick.Text:= Players[cUser].Nick;
edUser.Text:= Players[cUser].Name;
edPass.Text:= Players[cUser].Pass;
Players[cUser].Integer[0] := StrToInt(edLoads.Text);
If (Players[cUser].Active) then
cmbActive.Text:= 'True'
else
cmbActive.Text:= 'False';
{--------------------------------}
If (Players[cUser].Booleans[0]) Then
begin;
cmbPick.Text:= 'True';
end else
cmbPick.Text:= 'False';
{---------------------------------}
If (Players[cUser].Booleans[1]]) Then
begin;
cmbBank.Text:= 'True';
end else
cmbBank.Text:= 'False';
{---------------------------------}
Case lowercase(Players[cUser].Strings[0]) of
'tin': cmbRock.Text:= 'tin';
'copper': cmbRock.Text:= 'copper';
'iron': cmbRock.Text:= 'iron';
'silver': cmbRock.Text:= 'silver';
'coal': cmbRock.Text:= 'coal';
'gold': cmbRock.Text:= 'gold';
'mithril': cmbRock.Text:= 'mithril';
'adamant': cmbRock.Text:= 'adamant';
'runite': cmbRock.Text:= 'runite';
end;
end;

Procedure BackPlayer;
begin;
Players[cUser].Nick:= edNick.Text;
Players[cUser].Name:= edUser.Text;
Players[cUser].Pass:= edPass.Text;
Players[cUser].Loc:= edLoc.Text;
Players[cUser].Integer[0]:= StrToInt(edLoads.Text);
If (cmbActive.Text = 'True') Then
Players[cUser].Active:= True
else
Players[cUser].Active:= False;
{--------------------------------}
If (cmbPick.Text = 'True') Then
begin;
Players[cUser].Booleans[0]:= True;
end else
Players[cUser].Booleans[0]:= False;
{---------------------------------}
If (cmbBank.Text = 'True') Then
begin;
Players[cUser].Booleans[1]]:= True;
end else
Players[cUser].Booleans[1]]:= False;
{---------------------------------}
Case lowercase(cmbRock.Text) of
'tin': Players[cUser].Strings[0]:= 'tin';
'copper': Players[cUser].Strings[0]:= 'copper';
'iron': Players[cUser].Strings[0]:= 'iron';
'silver': Players[cUser].Strings[0]:= 'silver';
'coal': Players[cUser].Strings[0]:= 'coal';
'gold': Players[cUser].Strings[0]:= 'gold';
'mithril': Players[cUser].Strings[0]:= 'mithril';
'adamant': Players[cUser].Strings[0]:= 'adamant';
'runite': Players[cUser].Strings[0]:= 'runite';
end;
If (cUser - 1 < 0) Then
cUser := GetArrayLength(Players) - 1
else
cUser := cUser - 1;
edLoc.Text:= Players[cUser].Loc;
edNick.Text:= Players[cUser].Nick;
edUser.Text:= Players[cUser].Name;
edPass.Text:= Players[cUser].Pass;
Players[cUser].Integer[0]:= StrToInt(edLoads.Text);
If (Players[cUser].Active) then
cmbActive.Text:= 'True'
else
cmbActive.Text:= 'False';
{--------------------------------}
If (Players[cUser].Booleans[0]) Then
begin;
cmbPick.Text:= 'True';
end else
cmbPick.Text:= 'False';
{---------------------------------}
If (Players[cUser].Booleans[1]]) Then
begin;
cmbBank.Text:= 'True';
end else
cmbBank.Text:= 'False';
{---------------------------------}
Case lowercase(Players[cUser].Strings[0]) of
'tin': cmbRock.Text:= 'tin';
'copper': cmbRock.Text:= 'copper';
'iron': cmbRock.Text:= 'iron';
'silver': cmbRock.Text:= 'silver';
'coal': cmbRock.Text:= 'coal';
'gold': cmbRock.Text:= 'gold';
'mithril': cmbRock.Text:= 'mithril';
'adamant': cmbRock.Text:= 'adamant';
'runite': cmbRock.Text:= 'runite';
end;
end;

Procedure DeletePlayer(Sender: TObject);
var
lo, na, ni, ro: string;
ac, pic, ba: Boolean;
loa: Integer;
begin;
lo := Players[GetArrayLength(Players) - 1].Loc;
na := Players[GetArrayLength(Players) - 1].Name;
ni := Players[GetArrayLength(Players) - 1].Nick;
ac := Players[GetArrayLength(Players) - 1].Active;
loa := Players[GetArrayLength(Players) - 1].Integer[0]; {loads}
ro := Players[GetArrayLength(Players) - 1].Strings[0]; {Rock}
pic := Players[GetArrayLength(Players) - 1].Booleans[0]; {Pick wielded}
ba := Players[GetArrayLength(Players) - 1].Booleans[1]]; {Bank}
Players[cUser].Loc := lo;
Players[cUser].Name := na;
Players[cUser].Nick := ni;
Players[cUser].Active := ac;
Players[cUser].Integer[0] := loa; {Loads}
Players[cUser].Strings[0] := ro; {Rock}
Players[cUser].Booleans[0] := pic; {Pick Wielded}
Players[cUser].Booleans[1]] := ba; {Bank}
SetArrayLength(Players, GetArrayLength(Players) - 1);
if (cUser + 1 > GetArrayLength(Players) - 1) then
cUser := 0
else
cUser := cUser + 1;
edLoc.Text:= Players[cUser].Loc;
edNick.Text:= Players[cUser].Nick;
edUser.Text:= Players[cUser].Name;
edPass.Text:= Players[cUser].Pass;
Players[cUser].Integer[0] := StrToInt(edLoads.Text);
If (Players[cUser].Active) then
cmbActive.Text:= 'True'
else
cmbActive.Text:= 'False';
{--------------------------------}
If (Players[cUser].Booleans[0]) Then
begin;
cmbPick.Text:= 'True';
end else
cmbPick.Text:= 'False';
{---------------------------------}
If (Players[cUser].Booleans[1]) Then
begin;
cmbBank.Text:= 'True';
end else
cmbBank.Text:= 'False';
{---------------------------------}
Case lowercase(Players[cUser].Strings[0]) of
'tin': cmbRock.Text:= 'tin';
'copper': cmbRock.Text:= 'copper';
'iron': cmbRock.Text:= 'iron';
'silver': cmbRock.Text:= 'silver';
'coal': cmbRock.Text:= 'coal';
'gold': cmbRock.Text:= 'gold';
'mithril': cmbRock.Text:= 'mithril';
'adamant': cmbRock.Text:= 'adamant';
'runite': cmbRock.Text:= 'runite';
end;
end;

Procedure StartPlayers2(Sender: TObject);
begin;
edLoc.Text := Players[cUser].Loc;
edNick.Text := Players[cUser].Nick;
edUser.Text := Players[cUser].Name;
edPass.Text := Players[cUser].Pass;
If (Players[cUser].Active) then
cmbActive.Text := 'True'
else
cmbActive.Text := 'False';
end;


Procedure GetHelp;
begin;;
OpenWebPage('http://www.villavu.com/forum/showthread.php?t=400');
end;

Procedure ReportBug;
begin;;
OpenWebPage('http://www.srl-forums.com/forum/private.php?do=newpm&u=4338');
end;

Procedure InitMainForm;
begin;;
frmDesign := CreateForm;
frmDesign.Left := 374;
frmDesign.Top := 116;
frmDesign.Width := 335;
frmDesign.Height := 289;
frmDesign.BorderStyle := bsSizeToolWin;
frmDesign.Caption := 'MiniMiner 1.0 by r0b0t1';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;

PageControl1 := TPageControl.Create(frmDesign);
PageControl1.Parent := frmDesign;
PageControl1.Align := alClient;

for i := 1 to 3 do // Amount of Tabs
begin;
TabPages[i] := TTabSheet.Create(frmDesign);
TabPages[i].PageControl := PageControl1; // We Must Identify are Page Control
end;

TabPages[1].Caption := 'Help'; // The Caption of the title
TabPages[2].Caption := 'Settings';
TabPages[3].Caption := 'Players';

{Tab 1 - "Help"}
btnHelp := TButton.Create(frmDesign);
btnHelp.Parent := TabPages[1];
btnHelp.Left := 100;
btnHelp.Top := 104;
btnHelp.Width := 109;
btnHelp.Height := 25;
btnHelp.Caption := 'Click For Help';
btnHelp.TabOrder := 1;
btnHelp.OnClick := @ButtonClicks;
{Tab 2 - "Settings"}
chCustColors := TCheckBox.Create(frmDesign);
chCustColors.Parent := TabPages[2];
chCustColors.Left := 34;
chCustColors.Top := 75;
chCustColors.Width := 97;
chCustColors.Height := 17;
chCustColors.Hint := 'Do you want to pick your own colors?';
chCustColors.Caption := 'Custom Colors';
chCustColors.ParentShowHint := False;
chCustColors.ShowHint := True;
chCustColors.TabOrder := 8;

chShwStatus := TCheckBox.Create(frmDesign);
chShwStatus.Parent := TabPages[2];
chShwStatus.Left := 34;
chShwStatus.Top := 139;
chShwStatus.Width := 97;
chShwStatus.Height := 17;
chShwStatus.Hint := 'Print status to debug box';
chShwStatus.Caption := 'Show status';
chShwStatus.ParentShowHint := False;
chShwStatus.ShowHint := True;
chShwStatus.TabOrder := 9;

chExtReport := TCheckBox.Create(frmDesign);
chExtReport.Parent := TabPages[2];
chExtReport.Left := 34;
chExtReport.Top := 107;
chExtReport.Width := 97;
chExtReport.Height := 17;
chExtReport.Hint := 'Useful for devs';
chExtReport.Caption := 'Report';
chExtReport.Checked := True;
chExtReport.ParentShowHint := False;
chExtReport.ShowHint := True;
chExtReport.State := cbChecked;
chExtReport.TabOrder := 10;

btnReportBug := TButton.Create(frmDesign);
btnReportBug.Parent := TabPages[2];
btnReportBug.Left := 178;
btnReportBug.Top := 79;
btnReportBug.Width := 75;
btnReportBug.Height := 25;
btnReportBug.Caption := 'Report Bug';
btnReportBug.TabOrder := 11;
btnReportBug.OnClick := @ButtonClicks;

chAutoColor := TCheckBox.Create(frmDesign);
chAutoColor.Parent := TabPages[2];
chAutoColor.Left := 34;
chAutoColor.Top := 45;
chAutoColor.Width := 97;
chAutoColor.Height := 17;
chAutoColor.Hint := 'Automatic coloring';
chAutoColor.Caption := 'Use AutoColor';
chAutoColor.Checked := True;
chAutoColor.ParentShowHint := False;
chAutoColor.ShowHint := True;
chAutoColor.State := cbChecked;
chAutoColor.TabOrder := 12;

btnChooseClr := TButton.Create(frmDesign);
btnChooseClr.Parent := TabPages[2];
btnChooseClr.Left := 178;
btnChooseClr.Top := 119;
btnChooseClr.Width := 75;
btnChooseClr.Height := 25;
btnChooseClr.Caption := 'Choose colors';
btnChooseClr.Font.Color := clWindowText;
btnChooseClr.Font.Height := -11;
btnChooseClr.Font.Name := 'MS Sans Serif';
btnChooseClr.Font.Style := [];
btnChooseClr.ParentFont := False;
btnChooseClr.TabOrder := 13;
btnChooseClr.OnClick := @ButtonClicks;

{Tab 3 - "Players"}

edUser := TEdit.Create(frmDesign);
edUser.Parent := TabPages[3];
edUser.Left := 16;
edUser.Top := 32;
edUser.Width := 121;
edUser.Height := 21;
edUser.TabOrder := 8;
edUser.Text := 'Username';

edPass := TEdit.Create(frmDesign);
edPass.Parent := TabPages[3];
edPass.Left := 16;
edPass.Top := 56;
edPass.Width := 121;
edPass.Height := 21;
edPass.PasswordChar := '*';
edPass.TabOrder := 9;
edPass.Text := 'Password';

edNick := TEdit.Create(frmDesign);
edNick.Parent := TabPages[3];
edNick.Left := 16;
edNick.Top := 80;
edNick.Width := 121;
edNick.Height := 21;
edNick.TabOrder := 10;
edNick.Text := 'Nickname';

edLoc := TEdit.Create(frmDesign);
edLoc.Parent := TabPages[3];
edLoc.Left := 16;
edLoc.Top := 104;
edLoc.Width := 121;
edLoc.Height := 21;
edLoc.TabOrder := 11;
edLoc.Text := 'Location';

edLoads := TEdit.Create(frmDesign);
edLoads.Parent := TabPages[3];
edLoads.Left := 144;
edLoads.Top := 56;
edLoads.Width := 121;
edLoads.Height := 21;
edLoads.TabOrder := 20;
edLoads.Text := 'Loads';

cmbActive := TComboBox.Create(frmDesign);
cmbActive.Parent := TabPages[3];
cmbActive.Left := 16;
cmbActive.Top := 152;
cmbActive.Width := 121;
cmbActive.Height := 21;
cmbActive.ItemHeight := 13;
cmbActive.TabOrder := 12;
cmbActive.Text := 'Active';
cmbActive.Items.Add('True');
cmbActive.Items.Add('False');

cmbPick := TComboBox.Create(frmDesign);
cmbPick.Parent := TabPages[3];
cmbPick.Left := 16;
cmbPick.Top := 176;
cmbPick.Width := 121;
cmbPick.Height := 21;
cmbPick.ItemHeight := 13;
cmbPick.TabOrder := 13;
cmbPick.Text := 'Pick Wielded';
cmbPick.Items.Add('True');
cmbPick.Items.Add('False');

cmbBank := TComboBox.Create(frmDesign);
cmbBank.Parent := TabPages[3];
cmbBank.Left := 144;
cmbBank.Top := 32;
cmbBank.Width := 121;
cmbBank.Height := 21;
cmbBank.ItemHeight := 13;
cmbBank.TabOrder := 14;
cmbBank.Text := 'Bank (If available)';
cmbBank.Items.Add('True');
cmbBank.Items.Add('False');

cmbRock := TComboBox.Create(frmDesign);
cmbRock.Parent := TabPages[3];
cmbRock.Left := 16;
cmbRock.Top := 128;
cmbRock.Width := 121;
cmbRock.Height := 21;
cmbRock.ItemHeight := 13;
cmbRock.TabOrder := 15;
cmbRock.Text := 'Rock';
cmbRock.Items.Add('tin');
cmbRock.Items.Add('copper');
cmbRock.Items.Add('iron');
cmbRock.Items.Add('silver');
cmbRock.Items.Add('coal');
cmbRock.Items.Add('gold');
cmbRock.Items.Add('mithril');
cmbRock.Items.Add('adamant');
cmbRock.Items.Add('runite');

btnPrev := TButton.Create(frmDesign);
btnPrev.Parent := TabPages[3];
btnPrev.Left := 160;
btnPrev.Top := 92;
btnPrev.Width := 75;
btnPrev.Height := 25;
btnPrev.Caption := '<';
btnPrev.TabOrder := 16;
btnPrev.OnClick := @ButtonClicks;

btnDelPlayer := TButton.Create(frmDesign);
btnDelPlayer.Parent := TabPages[3];
btnDelPlayer.Left := 160;
btnDelPlayer.Top := 124;
btnDelPlayer.Width := 75;
btnDelPlayer.Height := 25;
btnDelPlayer.Caption := 'Delete Player';
btnDelPlayer.TabOrder := 17;
btnDelPlayer.OnClick := @ButtonClicks;

btnCreaPlayer := TButton.Create(frmDesign);
btnCreaPlayer.Parent := TabPages[3];
btnCreaPlayer.Left := 160;
btnCreaPlayer.Top := 156;
btnCreaPlayer.Width := 75;
btnCreaPlayer.Height := 25;
btnCreaPlayer.Caption := 'Create Player';
btnCreaPlayer.TabOrder := 18;
btnCreaPlayer.OnClick := @ButtonClicks;

btnNext := TButton.Create(frmDesign);
btnNext.Parent := TabPages[3];
btnNext.Left := 160;
btnNext.Top := 188;
btnNext.Width := 75;
btnNext.Height := 25;
btnNext.Caption := '>';
btnNext.TabOrder := 19;
btnNext.OnClick := @ButtonClicks;
end;

Procedure SafeInitMainForm;
var
v: TVariantArray;
begin;
SetArrayLength(v, 0);
ThreadSafeCall('InitMainForm', v);
end;

Procedure ShowFormModal;
begin;
frmDesign.ShowModal;
end;

Procedure SafeShowFormModal;
var
v: TVariantArray;
begin;;
SetArrayLength(v, 0);
ThreadSafeCall('ShowFormModal', v);
end;

{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{Second Form}///}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}

Procedure CustomColorsNotSafe;
begin;;
frmColorPick := CreateForm;
frmColorPick.Left := 250;
frmColorPick.Top := 114;
frmColorPick.Width := 428;
frmColorPick.Height := 263;
frmColorPick.BorderStyle := bsSizeToolWin;
frmColorPick.Caption := 'Choose Custom Colors';
frmColorPick.Color := clBtnFace;
frmColorPick.Font.Color := clWindowText;
frmColorPick.Font.Height := -11;
frmColorPick.Font.Name := 'MS Sans Serif';
frmColorPick.Font.Style := [];
frmColorPick.Visible := True;
frmColorPick.PixelsPerInch := 96;
Label1 := TLabel.Create(frmColorPick);
Label1.Parent := frmColorPick;
Label1.Left := 8;
Label1.Top := 16;
Label1.Width := 23;
Label1.Height := 13;
Label1.Caption := 'Tin:';
Label2 := TLabel.Create(frmColorPick);
Label2.Parent := frmColorPick;
Label2.Left := 8;
Label2.Top := 48;
Label2.Width := 37;

Label2.Height := 13;
Label2.Caption := 'Copper:';
Label3 := TLabel.Create(frmColorPick);
Label3.Parent := frmColorPick;
Label3.Left := 8;
Label3.Top := 80;
Label3.Width := 21;
Label3.Height := 13;
Label3.Caption := 'Iron:';
Label4 := TLabel.Create(frmColorPick);
Label4.Parent := frmColorPick;
Label4.Left := 8;
Label4.Top := 112;
Label4.Width := 29;
Label4.Height := 13;
Label4.Caption := 'Silver:';
Label5 := TLabel.Create(frmColorPick);
Label5.Parent := frmColorPick;
Label5.Left := 8;
Label5.Top := 144;
Label5.Width := 24;
Label5.Height := 13;
Label5.Caption := 'Coal:';
Label6 := TLabel.Create(frmColorPick);
Label6.Parent := frmColorPick;
Label6.Left := 8;
Label6.Top := 176;
Label6.Width := 25;
Label6.Height := 13;
Label6.Caption := 'Gold:';
Label7 := TLabel.Create(frmColorPick);
Label7.Parent := frmColorPick;
Label7.Left := 8;
Label7.Top := 208;
Label7.Width := 30;
Label7.Height := 13;
Label7.Caption := 'Mithril:';
Label8 := TLabel.Create(frmColorPick);
Label8.Parent := frmColorPick;
Label8.Left := 208;
Label8.Top := 16;
Label8.Width := 45;
Label8.Height := 13;
Label8.Caption := 'Adamant:';
Label9 := TLabel.Create(frmColorPick);
Label9.Parent := frmColorPick;
Label9.Left := 208;
Label9.Top := 48;
Label9.Width := 34;
Label9.Height := 13;
Label9.Caption := 'Runite:';
Edit[0] := TEdit.Create(frmColorPick);
Edit[0].Parent := frmColorPick;
Edit[0].Left := 56;
Edit[0].Top := 8;
Edit[0].Width := 121;
Edit[0].Height := 21;
Edit[0].TabOrder := 8;
Edit[1] := TEdit.Create(frmColorPick);
Edit[1].Parent := frmColorPick;
Edit[1].Left := 56;
Edit[1].Top := 40;
Edit[1].Width := 121;
Edit[1].Height := 21;
Edit[1].TabOrder := 9;
Edit[2] := TEdit.Create(frmColorPick);
Edit[2].Parent := frmColorPick;
Edit[2].Left := 56;
Edit[2].Top := 72;
Edit[2].Width := 121;
Edit[2].Height := 21;
Edit[2].TabOrder := 10;
Edit[3] := TEdit.Create(frmColorPick);
Edit[3].Parent := frmColorPick;
Edit[3].Left := 56;
Edit[3].Top := 104;
Edit[3].Width := 121;
Edit[3].Height := 21;
Edit[3].TabOrder := 11;
Edit[4] := TEdit.Create(frmColorPick);
Edit[4].Parent := frmColorPick;
Edit[4].Left := 56;
Edit[4].Top := 136;
Edit[4].Width := 121;
Edit[4].Height := 21;
Edit[4].TabOrder := 12;
Edit[5] := TEdit.Create(frmColorPick);
Edit[5].Parent := frmColorPick;
Edit[5].Left := 56;
Edit[5].Top := 168;
Edit[5].Width := 121;
Edit[5].Height := 21;
Edit[5].TabOrder := 13;
Edit[6] := TEdit.Create(frmColorPick);
Edit[6].Parent := frmColorPick;
Edit[6].Left := 56;
Edit[6].Top := 200;
Edit[6].Width := 121;
Edit[6].Height := 21;
Edit[6].TabOrder := 14;
Edit[7] := TEdit.Create(frmColorPick);
Edit[7].Parent := frmColorPick;
Edit[7].Left := 264;
Edit[7].Top := 8;
Edit[7].Width := 121;
Edit[7].Height := 21;
Edit[7].TabOrder := 15;
Edit[8] := TEdit.Create(frmColorPick);
Edit[8].Parent := frmColorPick;
Edit[8].Left := 264;
Edit[8].Top := 48;
Edit[8].Width := 121;
Edit[8].Height := 21;
Edit[8].TabOrder := 16;
end;

Procedure CustomColors;
var
v: TVariantArray;
begin;
SetArrayLength(v, 0);
ThreadSafeCall('CustomColorsNotSafe', v);
end;

Procedure ShowFormModal2;
begin;
frmColorPick.ShowModal;
end;

Procedure SafeShowFormModal2;
var
v: TVariantArray;
begin;
SetArrayLength(v, 0);
ThreadSafeCall('ShowFormModal2', v);
end;

Procedure CustomColor;
begin;
CustomColors;
SafeShowFormModal2;
end;

Procedure ButtonClicks(Sender: TObject);
begin;
Case Sender of
btnHelp: GetHelp;
btnReportBug: ReportBug;
btnChooseClr: CustomColor;
end;
end;

Procedure SetupPlayerVariables;
begin;
HowManyBooleans:= 2;
LoadPlayerArray;
end;

{-----------------------------------------------------------------------------}
{--------------------------Oth functions--------------------------------------}
Var MPHDTMTol, PHDTMTol, MPHDTMColor, PHDTMColor, PHDTMSize: Integer;
Var PickHeadMP: TDTMPointDef;
Var PickHeadSP: Array[0..4] of TDTMPointDef;
Var PickHeadSkele: TDTM;
Var r0bPickDTM: Integer;

Procedure MakePickHeadDDTM;
begin;
MPHDTMTol:= 255;
PHDTMTol:= 5;
MPHDTMColor:= 3680034;
PHDTMColor:= 65536;
PHDTMSize:= 1;

PickHeadMP.x:= 29;
PickHeadMP.y:= 16;
PickHeadMP.AreaSize:= 1;
PickHeadMP.AreaShape:= 0;
PickHeadMP.Color:= MPHDTMColor;
PickHeadMP.Tolerance:= MPHDTMTol;

PickHeadSP[0].x:= 14;
PickHeadSP[0].y:= 19;
PickHeadSP[0].AreaSize:= PHDTMSize;
PickHeadSP[0].AreaShape:= 0;
PickHeadSP[0].Color:= PHDTMColor;
PickHeadSP[0].Tolerance:= PHDTMTol;

PickHeadSP[1].x:= 28;
PickHeadSP[1].y:= 14;
PickHeadSP[1].AreaSize:= PHDTMSize;
PickHeadSP[1].AreaShape:= 0;
PickHeadSP[1].Color:= PHDTMColor;
PickHeadSP[1].Tolerance:= PHDTMTol;

PickHeadSP[2].x:= 31;
PickHeadSP[2].y:= 14;
PickHeadSP[2].AreaSize:= PHDTMSize;
PickHeadSP[2].AreaShape:= 0;
PickHeadSP[2].Color:= PHDTMColor;
PickHeadSP[2].Tolerance:= PHDTMTol;

PickHeadSP[3].x:= 42;
PickHeadSP[3].y:= 25;
PickHeadSP[3].AreaSize:= PHDTMSize;
PickHeadSP[3].AreaShape:= 0;
PickHeadSP[3].Color:= PHDTMColor;
PickHeadSP[3].Tolerance:= PHDTMTol;

PickHeadSP[4].x:= 24;
PickHeadSP[4].y:= 20;
PickHeadSP[4].AreaSize:= PHDTMSize;
PickHeadSP[4].AreaShape:= 0;
PickHeadSP[4].Color:= PHDTMColor;
PickHeadSP[4].Tolerance:= PHDTMTol;

PickHeadSkele.MainPoint:= PickHeadMP;
PickHeadSkele.SubPoints:= PickHeadSP;
r0bPickDTM:= AddDTM(PickHeadSkele);
end;

Function R0bGetPickColor(Var PickColHolder:Integer; SetDTMNewCol: Boolean): Boolean;
Var I, XDTM, YDTM: Integer;
begin;
If not (FindDTM(r0bPickDTM, XDTM, YDTM, MIX1, MIY1, MIX2, MIY2)) Then
begin;
For I:=0 to 6 do
begin;
MakePickHeadDDTM;
PHDTMSize:= PHDTMSize + 1;
PHDTMTol:= PHDTMTol + 5;
FindDTM(r0bPickDTM, XDTM, YDTM, MIX1, MIY1, MIX2, MIY2);
If (I = 6) Then
Result:= False;
end;
end;
PHDTMSize:= 1;
PHDTMTol:= 10;
PickColHolder:= GetColor(XDTM, YDTM);
Result:= True;
If (SetDTMNewCol) Then
begin;
PickHeadMP.Color:= PickColHolder;
PickHeadMP.Tolerance:= PHDTMTol;
end;
If not (Result) Then
WriteLn('Pick not found');
FreeDTM(r0bPickDTM);
end;

Function R0bFindPickHead(Var r0bPickCol: Integer): Boolean; //Input pick color.
Var I, B, C, PX, PY, x1, x2, y1, y2:Integer; //Same as used in above func.
Var r0bPickHeadColor, r0bPickHandle: Integer;
Var FoundHead, BreakLoop, Dropped: Boolean;
begin;
MakePickHeadDDTM;
r0bPickHandle:= DTMFromString('78DA63B461606038CE8002C4045918FE036 94' +
'620FE0F048C0E40C61E0634C0C8C00A5503E6390189FD44A8 D94B' +
'408D3990B84A408D2990B8885F0D00A6FC0B62');
r0bPickHead:= DTMFromString('78DA63CC63606038CA80028C8C5219FE036 94' +
'620FE0F048C3940C6610634C0C8C00A5503E61503899304D4 9400' +
'893D04D42412360700DC550BDF');
For I:=0 to 6 do
begin;
PX:= MSCX;
PY:= MSCY;
For B:=0 to 6 do
begin;
Case B of //Case by WT-Fakawi. I changed the letter :p
1: begin x1:= MSx1; y1 := MSy1 + 20; x2 := MSCx; y2:= MSCy; end;
2: begin x1:= MSCx; y1 := MSy1 + 20; x2 := MSx2; y2:= MSCy; end;
3: begin x1:= MSx1; y1 := MSCy; x2 := MSCx; y2:= MSy2; end;
4: begin x1:= MSCx; y1 := MSCy; x2 := MSx2; y2:= MSy2; end;
5: begin x1:= MSCx - 50; y1 := MSCy - 50; x2 := MSCx + 50; y2:= MSCy + 50; end;
6: begin x1:= MSx1; y1 := MSy1 + 20; x2 := MSx2; y2:= MSy2; end;
end;
For C:=0 to 10 do
begin;
BreakLoop:= FindColorSpiralTolerance(PX, PY, r0bPickCol, x1, y1, x2, y2, C);
If (BreakLoop) Then
Break;
end;
If not (BreakLoop) Then //If it doesn't find the pick color in the part
Continue; //of the MainScreen (above case) it goes to the
If BreakLoop Then //next loop.
begin;
Mouse(PX, PY, 1, 1, False);
Wait(500+Random(150));
If (ChooseOption(x, y, 'ake') Then
begin;
FFlag(0);
Wait(3000+Random(500));
FoundHead:= True;
Break;
end else
begin;
WriteLn('Did not find ''take'' option');
Result:= False;
Exit;
end;
end;
If (FoundHead) Then
Break;
end;
If (FoundHead) Then
Break;
end;
If
If (FoundHead) Then
begin;
WriteLn('Found Head, Attaching...');
If (WearingItem(5)) Then
TakeOff(5);
If not (GameTab(4)) Then
GameTab(4);
Wait(300+Random(200));
If (InvFull) Then
begin;
MouseItem(10+Random(5), False);
Wait(500+Random(200));
ChooseOption(x, y, 'rop');
Dropped:= True;
end;
end;
If (FindDTM(r0bPickHandle, PX, PY, MIX1, MIY1, MIX2, MIY2) Then
begin;
Mouse(PX, PY, 1, 1, False);
ChooseOption(x, y, 'se');
If (FindDTM(r0bPickHead, PX, PY, MIX1, MIY1, MIX2, MIY2)) Then
Mouse(PX, PY, 2, 2, True);
end else
begin;
WriteLn('Pick head not found in inventory');
Exit;
end;
end else
begin;
WriteLn('Pick Handle not found in inventory');
Exit;
end;
If (Dropped) and (EquipPick) Then
begin;
If not (FindDTM(r0bPickDTM, PX, PY, MIX1, MIY1, MIX2, MIY2)) Then
begin;
WriteLn('Problem locating finished pick');
Exit;
end;
Mouse(PX, PY, 3, 3, True);
WriteLn('We have attached the head.');
WriteLn('But we have dropped an item.');
WriteLn('Sorry. :)');
end;
end;
FreeDTM(r0bPickHandle);
FreeDTM(r0bPickHead);
FreeDTM(r0bPickDTM);
end;

Function FindFastRandoms: Boolean; //WT-Fakawi, I made major changes
Var i:Integer;
Var Pmod, UnKnown: Boolean;
begin;
For i := 1 to 12 Do
begin;
Case I of
1: If FindDead then
begin
UnKnown:= True;
Players[CurrentPlayer].loc:= 'Dead';
Result:= True;
end;
2: If FindMod then
begin
Pmod := True;
Result:= True;
end;
3: If FindMime then
begin
UnKnown := True;
Result := True;
Players[CurrentPlayer].loc:= 'Mime';
end;
4: If FindMaze then
begin
Result := True;
UnKnown := True;
Players[CurrentPlayer].loc:= 'Maze';
end;
5: If FindQuiz then
begin;
Result := True;
SolveQuiz;
end;
6: If FindDemon then
Result := True;
7: If NoGameTab then
begin
UnKnown := True;
Players[CurrentPlayer].loc := 'No GameTab';
end;
8: If InBlack then
begin
Result:= True;
UnKnown := True;
Players[CurrentPlayer].loc := 'InBlack';
end;
9: If FindFrogCave Then
begin
SolveFrogSwamp;
Result:= True;
end;
10: if FindScapeRune then
begin
Result := True;
UnKnown:= True;
Players[CurrentPlayer].loc:= 'ScapeRune';
end;
11: if FindTalk then // Call it twice
Result := True;
end;
Wait(1);
end;
If (UnKnown = True) Then
begin;
Info:= Players[CurrentPlayer].loc;
WriteLn('Lost Player. Reason: ' + Info);
NextPlayer(False);
end;
If (Pmod = true) Then
begin;
Logout;
WriteLn('Found Player Moderator. Logging out for 5-6 minutes.');
Wait(5*60000+Random(60000));
WriteLn('Time up, logging back in.');
LogIn;
end;
end;


Procedure AntiBan;
begin;
case Random(19) of
0: IdleTime(1000 + Random(200), 500, 1.0);
1: IdleTime(1000 + Random(350), 1075, 1.0);
2: SleepAndMoveMouse(2500 + Random(2500));
3: SleepAndMoveMouse(2500 + Random(1500));
4: SleepAndmoveMouse(500 + Random(500));
5: IdleTime(100 + Random(250), 750, 0.5);
6: RotateEvery(0+Random(5));
7: BoredEvery(0+Random(5));
8: LeaveScreenEvery(0+Random(5));
9: begin;
Case Random(10) of
1: HoverSkill('mining', False);
2: HoverSkill('cooking' , False);
3: HoverSkill('fishing', False);
4: HoverSkill('attack', False);
5: HoverSkill('defence', False);
6: HoverSkill('strength', False);
7: HoverSkill('crafting', False);
end;
end;
end;

Procedure AntiBanAndRandoms;
begin;
FindTalk;
FindNormalRandoms;
FindFastRandoms;
end;
{-----------------------------------------------------------------------------}
{-----------------------------Coloring----------------------------------------}
Procedure SetRockColorsCustom;
Var D: Integer;
begin;
If (chCustColors.Checked) Then
begin;
For D:=0 to 8 do
begin;
If (Edit[D].Text <> '') Then
begin;
Try
Rock[D].Color:= StrToInt(Edit[D].Text);
Except
WriteLn('Values in the text fields on form ''frmCustColors'' in-valid');
end;
end;
end;
end;

Var
TinCol, CopperCol, IronCol, SilverCol, CoalCol:Array [0..5] of Integer;
MithrilCol, AdamantCol, RuniteCol: Array [0..5] of Integer;

Function BetterColor(Colors: TIntegerArray): Integer; //Wizzup?
Var
I: Integer;
H, S, L: Array Of Extended;
bH, bS, bL: Extended;
begin;
SetLength(H, Length(Colors);
SetLength(S, Length(Colors);
SetLength(L, Length(Colors);
For I := 0 To Length(Colors) - 1 Do
begin;
ColorToHSL(Colors[i], H[i], S[i], L[i]);
bH := bH + H[i];
bS := bS + S[i];
bL := bL + L[i];
End;
If Length(Colors) < 0 Then
Begin
bH := bH Div Length(Colors);
bS := bS Div Length(Colors);
bL := bL Div Length(Colors);
End;
Result := HSLToColor(bH, bS, bL);
End;

Procedure SetRockArrayColors;
begin
TinCol[0]:= 5855584;
TinCol[1]:= 6842479;
TinCol[2]:= 5921634;
TinCol[3]:= 7960963;
TinCol[4]:= 3890794;
TinCol[5]:= 4671566;
CopperCol[0]:= 4945799;
CopperCol[1]:= 5143210;
CopperCol[2]:= 4945314;
CopperCol[3]:= 5011624;
CopperCol[4]:= 3890818;
CopperCol[5]:= 4879492;
IronCol[0]:= 10042;
IronCol[1]:= 1977158;
IronCol[2]:= 2569302;
IronCol[3]:= 1844541;
IronCol[4]:= 537162;
IronCol[5]:= 1646903;
SilverCol[0]:= 11316664;
SilverCol[1]:= 11908799;
SilverCol[2]:= 12632264;
SilverCol[3]:= 12632264;
SilverCol[4]:= 11513785;
SilverCol[5]:= 11316664;
CoalCol[0]:= 1714730;
CoalCol[1]:= 1715249;
CoalCol[2]:= 2768960;
CoalCol[3]:= 2636603;
CoalCol[4]:= 1516323;
CoalCol[5]:= 2043181;
GoldCol[0]:= 1883881;
GoldCol[1]:= 1345703;
GoldCol[2]:= 1547455;
GoldCol[3]:= 1884396;
GoldCol[4]:= 1147809;
GoldCol[5]:= 1750751;
MithrilCol[0]:= 8016721;
MithrilCol[1]:= 5585209;
MithrilCol[2]:= 5782331;
MithrilCol[3]:= 5979709;
MithrilCol[4]:= 7491148;
MithrilCol[5]:= 4402477;
AdamantCol[0]:= 5861465;
AdamantCol[1]:= 6190428;
AdamantCol[2]:= 5202767;
AdamantCol[3]:= 6388321;
AdamantCol[4]:= 4017213;
AdamantCol[5]:= 6519906;
RuniteCol[0]:= 11643512;
RuniteCol[1]:= 8485975;
RuniteCol[2]:= 12103804;
RuniteCol[3]:= 12235388;
RuniteCol[4]:= 11577462;
RuniteCol[5]:= 11182706;
end;

Procedure SetRockColors;
begin;
Rock[0].Name:= 'tin';
Rock[0].Color:= BetterColor(TinCol);
Rock[1].Name:= 'copper';
Rock[1].Color:= BetterColor(CopperCol);
Rock[2].Name:= 'iron';
Rock[2].Color:= BetterColor(IronCol);
Rock[3].Name:= 'silver';
Rock[3].Color:= BetterColor(SilverCol);
Rock[4].Name:= 'coal';
Rock[4].Color:= BetterColor(CoalCol);
Rock[5].Name:= 'gold';
Rock[5].Color:= BetterColor(GoldCol);
Rock[6].Name:= 'mithril';
Rock[6].Color:= BetterColor(MithrilCol);
Rock[7].Name:= 'adamant';
Rock[7].Color:= BetterColor(AdamantCol);
Rock[8].Name:= 'runite';
Rock[8].Color:= BetterColor(RuniteCol);
end;

Procedure SetPlayerRockColor; //Call after switching players.
Var I:Integer;
begin;
RockColor:= 0;
For I:=0 to GetArrayLength(Rock) - 1 do
begin;
If (Players[CurrentPlayer].Strings[0] = Rock[I].Name) Then
RockColor:= Rock[I].Color;
end;
If (RockColor = 0) Then
RaiseException(erCustomError, 'Value stored in ''cmbRock.Text'' is in valid.');
end;

{_________________________________________________ ____________________________}
{---------------------------MINING PROCEDURES---------------------------------}
Function MineDropRock: Boolean;
Var I, B, C, D, x1, x2, y1, y2, OX, OY, r0bOre, OreCount, InvCount: Integer;
Var OX2, OY2, SlotX1, SlotX2, SlotY1, SlotY2: Integer;
Var BreakLoop, RockFound: Boolean;
begin;
If (InvCount < 1) Then
InvCount:= 1;
r0bOre := DTMFromString('78DA6314666460886340012D95D50CFF813 45' +
'086E13F1030F20359010C188019AA0604183980AC704C35AC C86A' +
'9881AC34026A0481AC6C026A6481AC14026A1481AC48026A2 481A' +
'C204C359C486A00B8F10A2B');
For B:=0 to 6 do
begin;
Case B of //Case by WT-Fakawi. I changed the letter :p
1: begin x1:= MSx1; y1 := MSy1 + 20; x2 := MSCx; y2:= MSCy; end;
2: begin x1:= MSCx; y1 := MSy1 + 20; x2 := MSx2; y2:= MSCy; end;
3: begin x1:= MSx1; y1 := MSCy; x2 := MSCx; y2:= MSy2; end;
4: begin x1:= MSCx; y1 := MSCy; x2 := MSx2; y2:= MSy2; end;
5: begin x1:= MSCx - 50; y1 := MSCy - 50; x2 := MSCx + 50; y2:= MSCy + 50; end;
6: begin x1:= MSx1; y1 := MSy1 + 20; x2 := MSx2; y2:= MSy2; end;
end;
For C:=0 to 15 do
begin;
BreakLoop:=FindColorSpiralTolerance(OX, OY, RockColor, x1, y1, x2, y2, C);
If (BreakLoop) Then
Break;
end;
If not (BreakLoop) Then
Continue;
If (BreakLoop) Then
begin;
Mouse(OX, OY, 2, 2, False);
If (ChooseOption(x, y, 'ine')) Then
begin;
RockFound:= True;
end else
begin;
WriteLn('Trouble finding rock')
RockFound:= False;
end;
end;
If not (RockFound) Then
begin;
For D:=0 to 5 do
begin;
Case lowercase(Players[CurrentPlayer].Strings[0]) of
'tin': RockColor:= TinCol[D];
'copper': RockColor:= CopperCol[D];
'iron': RockColor:= IronCol[D];
'silver': RockColor:= SilverCol[D];
'coal': RockColor:= CoalCol[D];
'gold': RockColor:= GoldCol[D];
'mithril': RockColor:= MithrilCol[D];
'adamant': RockColor:= AdamantCol[D];
'runite': RockColor:= RuniteCol[D];
end;
For C:= 0 to 15 do
begin;
BreakLoop:=FindColorSpiralTolerance(OX, OY, RockColor, x1, y1, x2, y2, E)
If (BreakLoop) Then
Break;
end;
If (BreakLoop) Then
begin;
Mouse(OX, OY, 2, 2, False);
If (ChooseOption(x, y, 'ine')) Then
begin;
RockFound:= True;
end else
begin;
WriteLn('Trouble finding rock')
RockFound:= False;
end;
end;
If not (RockFound) Then
begin;
WriteLn('Could not find rock')
Result:= False;
Exit;
end;
If (RockFound) Then
Break;
end;
If (RockFound) Then
Break;
end;
If (RockFound) Then
Break;
end;
If (Players[CurrentPlayer].Booleans[0]) And (InvCount < 1) Then //first slot
inc(InvCount);
Case InvCount of
1: begin;
SlotX1:= 555;
SlotY1:= 210;
SlotX2:= 605;
SlotY2:= 255;
end;
2: begin;
SlotX1:= 605;
SlotY1:= 210;
SlotX2:= 650;
SlotY2:= 255;
end;
3: begin;
SlotX1:= 650;
SlotY1:= 210;
SlotX2:= 690;
SlotY2:= 250;
end;
4: begin;
SlotX1:= 690;
SlotY1:= 210;
SlotX2:= 730;
SlotY2:= 255;
end;
5: begin;
SlotX1:= 555;
SlotY1:= 255;
SlotX2:= 605;
SlotY2:= 290;
end;
6: begin;
SlotX1:= 605;
SlotY1:= 255;
SlotX2:= 650;
SlotY2:= 290;
end;
7: begin;
SlotX1:= 650;
SlotY1:= 255;
SlotX2:= 690;
SlotY2:= 290;
end;
8: begin;
SlotX1:= 690;
SlotY1:= 255;
SlotX2:= 730;
SlotY2:= 290;
end;
9: begin;
SlotX1:= 555;
SlotY1:= 290;
SlotX2:= 605;
SlotY2:= 325;
end;
10: begin;
SlotX1:= 605;
SlotY1:= 290;
SlotX2:= 650;
SlotY2:= 325;
end;
11: begin;
SlotX1:= 650;
SlotY1:= 290;
SlotX2:= 690;
SlotY2:= 325;
end;
12: begin;
SlotX1:= 690;
SlotY1:= 290;
SlotX2:= 730;
SlotY2:= 325;
end;
13: begin;
SlotX1:= 555;
SlotY1:= 325;
SlotX2:= 605;
SlotY2:= 365;
end;
14: begin;
SlotX1:= 605;
SlotY1:= 325;
SlotX2:= 650;
SlotY2:= 365;
end;
15: begin;
SlotX1:= 650;
SlotY1:= 325;
SlotX2:= 690;
SlotY2:= 365;
end;
16: begin;
SlotX1:= 690;
SlotY1:= 325;
SlotX2:= 730;
SlotY2:= 365;
end;
17: begin;
SlotX1:= 555;
SlotY1:= 365;
SlotX2:= 605;
SlotY2:= 400;
end;
18: begin;
SlotX1:= 605;
SlotY1:= 365;
SlotX2:= 650;
SlotY2:= 400;
end;
19: begin;
SlotX1:= 650;
SlotY1:= 365;
SlotX2:= 690;
SlotY2:= 400;
end;
20: begin;
SlotX1:= 690;
SlotY1:= 365;
SlotX2:= 730;
SlotY2:= 400;
end;
21: begin;
SlotX1:= 555;
SlotY1:= 400;
SlotX2:= 605;
SlotY2:= 435;
end;
22: begin;
SlotX1:= 605;
SlotY1:= 400;
SlotX2:= 650;
SlotY2:= 435;
end;
23: begin;
SlotX1:= 650;
SlotY1:= 400;
SlotX2:= 690;
SlotY2:= 435;
end;
24: begin;
SlotX1:= 690;
SlotY1:= 400;
SlotX2:= 730;
SlotY2:= 435;
end;
25: begin;
SlotX1:= 555;
SlotY1:= 435;
SlotX2:= 605;
SlotY2:= 470;
end;
26: begin;
SlotX1:= 605;
SlotY1:= 435;
SlotX2:= 650;
SlotY2:= 470;
end;
27: begin;
SlotX1:= 650;
SlotY1:= 435;
SlotX2:= 690;
SlotY2:= 470;
end;
28: begin;
SlotX1:= 690;
SlotY1:= 435;
SlotX2:= 730;
SlotY2:= 470;
end;
If (FindDTM(r0bOre, OX2, OY2, SlotX1, SlotY1, SlotX2, SlotY2)) Then
inc(InvCount);
If (InvCount = 28) Then
begin;
If not (Players[CurrentPlayer].Booleans[1]) Then
begin;
If (Players[CurrentPlayer].Booleans[1]) Then
DropTo(2, 28);
else
DropTo(1, 28);
end;
end;
end;

Procedure

begin
ClearDebug;
SetupSRL;
SetRockArrayColors;
SetRockColors;
If (chCustColors.Checked) Then
SetColorsCustom;
Try
GetSelf.WindowState := wsMinimized;
SafeInItMainForm;
SafeShowFormModal;
Except
WriteLn('Error with form. Please send a message to r0301@gmail.com if '+
'problem persist');
{----------------------------}
FreeForm(frmDesign);
ActivateClient;
SetupPlayerVariables;
end.


Lol.

R0b0t1
08-19-2007, 04:52 PM
Computer screwed. Soz.

ShowerThoughts
08-19-2007, 05:56 PM
dotn double post

rotflmfwao
08-19-2007, 06:02 PM
Okay... You guys asked for it! Here's my bananas script!
(I'll update my srl in a sec)

EDIT: don't flame me please, but... Do you guys have an estimate on when the full release will be out?

EDIT2:I updated my SRL, ima get on getting the errors for you people :)
Also, while you're at it, if its not too much to ask, could you check my SRL stats stuff please?

drnewheart
08-19-2007, 07:28 PM
program New;
{.include SRL\SRL.Scar}

const
Tele = 247;
SpeedOfMouse = 25;
AntiBanAmount = 15;
var
Teled: integer;


procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
end;

Procedure Login;
Begin
If (Not(LoggedIn)) then
begin
LoginPlayer;
WriteLn('Logged In!');
End;
end;

procedure AntiBan;
begin
if (not (loggedIn)) then Exit;
case Random(antibanamount) of

0: begin
HoverSkill('Random', false);
wait(500 + Random(75));
Gametab(4);
end;

1: begin
HoverSkill('Magic', false);
wait(2364 + Random(413));
GameTab(4);
end;

2: PickUpMouse;

3: AlmostLogOut;

4: begin
LowestAngle;
wait(10 + random(10));
HighestAngle;
end;

5: SleepAndMoveMouse(15000 + random(7500));

end;
Writeln('Doing AntiBan');
end;

procedure proggie;
begin
Case Random(3) of

0:begin
Writeln('__________________________________');
Writeln('Teled ' + IntToStr(Teled) + ' Times');
Writeln('Ran For '+TimeRunning);
Writeln('Dr.Newheart''s Simple Cammy Teleporter');
Writeln('__________________________________');
end;
end;
end;

Procedure Teleport;
Begin
repeat
Mouse(743, 187, 8, 8, True);
AntiBan;
Wait(1200+Random(500));
If FindColorSpiral(x,y,16645886,681,299,700,320) then
Mouse(x,y,3,3,True);
Teled := Teled + 1;
Wait(1000+random(250));
Proggie;
until Teled = Tele;
end;

Procedure Setup;
begin
SetupSRL;
DeclarePlayers;
Writeln('Declared Players');
MouseSpeed:= SpeedOfMouse;
ActivateClient;
end;

begin
Setup;
Teleport;
Proggie;
Logout;
end.

Please Help. I dont know whats wrong :p It says:
Line 249: [Error] (1066:11): Unknown identifier 'ScanExactMinimapD' in script C:\Program Files\SCAR 3.11 SRL4BETA\includes\SRL/SRL/Core/Color.scar

I am Using Scar 3.11 DIVI with SRL 4 obviously lolz

Everyone says that core is working but Color is in core and its not working,

I seem to have this problem with every script. I am not a leecher. I have several scripts, can someone please help me?

Wizzup?
08-19-2007, 09:04 PM
Wizzups autominer plox update it :)
Thats one for my signature. ;)

lordsaturn
08-19-2007, 09:53 PM
program New;
{.include SRL\SRL.Scar}

const
Tele = 247;
SpeedOfMouse = 25;
AntiBanAmount = 15;
var
Teled: integer;


procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
end;

Procedure Login;
Begin
If (Not(LoggedIn)) then
begin
LoginPlayer;
WriteLn('Logged In!');
End;
end;

procedure AntiBan;
begin
if (not (loggedIn)) then Exit;
case Random(antibanamount) of

0: begin
HoverSkill('Random', false);
wait(500 + Random(75));
Gametab(4);
end;

1: begin
HoverSkill('Magic', false);
wait(2364 + Random(413));
GameTab(4);
end;

2: PickUpMouse;

3: AlmostLogOut;

4: begin
LowestAngle;
wait(10 + random(10));
HighestAngle;
end;

5: SleepAndMoveMouse(15000 + random(7500));

end;
Writeln('Doing AntiBan');
end;

procedure proggie;
begin
Case Random(3) of

0:begin
Writeln('__________________________________');
Writeln('Teled ' + IntToStr(Teled) + ' Times');
Writeln('Ran For '+TimeRunning);
Writeln('Dr.Newheart''s Simple Cammy Teleporter');
Writeln('__________________________________');
end;
end;
end;

Procedure Teleport;
Begin
repeat
Mouse(743, 187, 8, 8, True);
AntiBan;
Wait(1200+Random(500));
If FindColorSpiral(x,y,16645886,681,299,700,320) then
Mouse(x,y,3,3,True);
Teled := Teled + 1;
Wait(1000+random(250));
Proggie;
until Teled = Tele;
end;

Procedure Setup;
begin
SetupSRL;
DeclarePlayers;
Writeln('Declared Players');
MouseSpeed:= SpeedOfMouse;
ActivateClient;
end;

begin
Setup;
Teleport;
Proggie;
Logout;
end.



Please Help. I dont know whats wrong :p It says:


Line 249: [Error] (1066:11): Unknown identifier 'ScanExactMinimapD' in script C:\Program Files\SCAR 3.11 SRL4BETA\includes\SRL/SRL/Core/Color.scar


I am Using Scar 3.11 DIVI with SRL 4 obviously lolz

Everyone says that core is working but Color is in core and its not working,

I seem to have this problem with every script. I am not a leecher. I have several scripts, can someone please help me?


You probably didn't install the plugins correctly. Try re-DLing SRL and reinstall the plugins. Also make sure SCAR isn't open when you do install them. The plugins are located in a folder inside SRL called 'copy to plugins' or something of that sort.

joerobo
08-20-2007, 12:41 PM
hi was wondering if someone could help me.. firstly is there an srl4 manual? when i open my manual it still seems to be srl3.8 :( if therewas then i could sort it all out myself :), assuming there isnt one, can somebody suggest an alternative to FindObjMulti- i spose i could just copy out the function from the old srl, but was wondering whether there was a replacement which would be easier? cheers

edit- sry shud have searched ...... found that its been replaced with findobjcustom- can sum1 tell me whether it takes the same (cant think of the word) variables etc. lol

edit2- sry all this has turned out to be a slightly pointless post, ive gone to the srl and found that it takes different arguements(?) nd now i have to learn arrays...:( edit- woops it sorta gives u an example nd it all makes sense now :):):)

drnewheart
08-20-2007, 01:06 PM
You probably didn't install the plugins correctly. Try re-DLing SRL and reinstall the plugins. Also make sure SCAR isn't open when you do install them. The plugins are located in a folder inside SRL called 'copy to plugins' or something of that sort.

Thanks LordSaturn Rep+ for you!

MasterKill
08-24-2007, 05:58 AM
thanks for the link ;)