SCAR Code:
{*******************************************************************************
procedure InitForm;
By: IceFire908.
Description: Initializes the form.
*******************************************************************************}
procedure InitForm;
var
FormInfo: TStringArray;
I, II: Byte;
begin
LoadPlayersFromFile;
FormInfo := ['go to the previous player', '<<', 'create a new player', 'Create Player', 'delete a player', 'Delete Player', 'go to the next player', '>>', 'start Rune Crafter ReBorn', 'Start RCrB', 'player is going to be used', '68', '214', 'you are using a small pouch', '336', '205', 'you are using a medium pouch', '412', '205', 'you are using a large pouch', '336', '225', 'you are using a gaint pouch', '412', '225', 'rune to craft at a location', 'skill to chose in the genie random event', '[Air] (FEB)', '[Mind] (FWB)', '[Water] (DB)', '[Earth] (VEB)', '[Fire] (AKB)', '[Body] (EB)', 'Agility', 'Attack', 'Construction', 'Cooking', 'Crafting', 'Defence',
'Farming', 'Firemaking', 'Fishing', 'Fletching', 'Herblore', 'Hitpoints', 'Hunting', 'Magic', 'Mining', 'Prayer', 'Ranged', 'Runecrafting', 'Slayer', 'Smithing', 'Strength', 'Thieving', 'Woodcutting', 'Current player # being viewed', '14', '51', 'Player # 0.', 'Check if player is going to be used', '84', '216', 'Player Active.', 'Type in your username here', '13', '90', 'Username:', 'Type in your password here', '216', '90', 'Password:', 'Type in the 2nd, 3rd, and 4th letters of your username here', '15', '120', 'Nickname:', 'Type in your bank pin here', '223', '120', 'Bank Pin:', 'Type in the amount of loads to do per a round here',
'38', '150', 'Loads:', 'Type in the amount of essence to craft', '217', '150', 'Essences:', 'Select a rune to craft at a location', '19', '180', 'Runecraft:', 'Select a skill to chose in the genie random event', '216', '180', 'Lamp Skill:', 'Check if you are using a small pouch', '352', '207', 'S Pouch.', 'Check if you are using a medium pouch', '428', '207', 'M Pouch.', 'Check if you are using a large pouch', '353', '227', 'L Pouch.', 'Check if you are using a gaint pouch', '428', '227', 'G Pouch.', '83', '88', '283', '88', '83', '118', '283', '118', '83', '148', '283', '148'];
Form := CreateForm;
with Form do
begin
Caption := 'Rune Crafter ReBorn v' + VersionNumber + ' by IceFire908. Powered by SRL.';
SetBounds(162, 102, 497, 268);
BorderStyle := BSToolWindow;
OnPaint := @LoadBackground;
OnCloseQuery := @FormClosed;
ShowHint := True;
end;
for I := 0 to 4 do
begin
Buttons[I] := TButton.Create(Form);
with Buttons[I] do
begin
Parent := Form;
Hint := 'Click to ' + FormInfo[(2 * I)] + '.';
SetBounds((69 + (88 * I)), 61, 85, 19);
if (I = 4) then
SetBounds(176, 208, 136, 29);
Caption := FormInfo[(1 + (2 * I))];
OnClick := @ButtonClick;
end;
end;
for I := 0 to 4 do
begin
CheckBoxes[I] := TCheckBox.Create(Form);
with CheckBoxes[I] do
begin
Parent := Form;
Hint := 'Check if ' + FormInfo[(10 + (3 * I))] + '.';
SetBounds(StrToInt(FormInfo[(11 + (3 * I))]), StrToInt(FormInfo[(12 + (3 * I))]), 17, 17);
end;
end;
for I := 0 to 1 do
begin
ComboBoxes[I] := TComboBox.Create(Form);
with ComboBoxes[I] do
begin
Parent := Form;
Hint := 'Select a ' + FormInfo[25 + I] + '.';
SetBounds((83 + (200 * I)), 178, 121, 21);
OnKeyPress := @OnKeyPress;
for II := 0 to (5 + (17 * I)) do
Items.Add(FormInfo[(27 + (6 * I) + II)]);
end;
end;
for I := 0 to 13 do
begin
Labels[I] := TLabel.Create(Form);
with Labels[I] do
begin
Parent := Form;
Font.Color := CLWhite;
Hint := FormInfo[(56 + (4 * I))] + '.';
SetBounds(StrToInt(FormInfo[(57 + (4 * I))]), StrToInt(FormInfo[(58 + (4 * I))]), 16, 66);
Font.Height := -13;
case I of
0, 1, 10, 11, 12, 13: Font.Height := -11;
end;
Caption := FormInfo[(59 + (4 * I))];
end;
end;
for I := 0 to 5 do
begin
Edits[I] := TEdit.Create(Form);
with Edits[I] do
begin
Parent := Form;
Hint := FormInfo[(64 + (4 * I))] + '.';
SetBounds(StrToInt(FormInfo[(112 + (2 * I))]), StrToInt(FormInfo[(113 + (2 * I))]), 121, 21);
case I of
1, 3: PasswordChar := '*';
end;
end;
end;
DeclareFormFromPlayers(0);
end;