Pancakes
06-27-2007, 11:02 AM
Can anybody weed out this error for me?
program PowerMiner;
{.include SRL/SRL.scar}
type
//This type is for the rocks, it gives the rocks
//all unique details about themselves.
iRock = record
Color : Integer;
Uptxt : string;
RockLevel : Integer;
Experience : Integer;
end;
const
// COLORS
ClayColor=7578089;
CopperColor=4882380;
TinColor=10197927;
IronColor=1910335;
SilverColor=12434885;
CoalColor=2834753;
GoldColor=1881051;
MithrilColor=7359564;
AdamantiteColor=6322272;
RuniteColor=0;
var
Clay : iRock;
Copper : iRock;
Tin : iRock;
Iron : iRock;
Silver : iRock;
Coal : iRock;
Gold : iRock;
Mithril : iRock;
Adamantite : iRock;
Runite : iRock;
procedure SetRockValues;
//This procedure sets information about the rock types.
begin
with Clay do
begin
Color := ClayColor;
Uptxt := 'lay';
RockLevel := 1;
Experience := 5;
end;
with Copper do
begin
Color := CopperColor;
Uptxt := 'oppe';
RockLevel := 1;
Experience := 17.5;
end;
with Tin do
begin
Color := TinColor;
Uptxt := 'in';
RockLevel := 1;
Experience := 17.5;
end;
with Iron do
begin
Color := IronColor;
Uptxt := 'ron';
RockLevel := 15;
Experience := 35;
end;
with Silver do
begin
Color := SilverColor;
Uptxt := 'ilve';
RockLevel := 20;
Experience := 40;
end;
with Coal do
begin
Color := CoalColor;
Uptxt := 'oal';
RockLevel := 30;
Experience := 50;
end;
with Gold do
begin
Color := GoldColor;
Uptxt := 'old';
RockLevel := 40;
Experience := 65;
end;
with Mithril do
begin
Color := MithrilColor;
Uptxt := 'thri';
RockLevel := 55;
Experience := 80;
end;
with Adamantite do
begin
Color := AdamantiteColor;
Uptxt := 'amant';
RockLevel := 70;
Experience := 95;
end;
with Runite do
begin
Color := RuniteColor;
Uptxt := 'unit';
RockLevel := 85;
Experience := 125;
end;
end;
procedure SetRetaliation(Retaliate : Boolean);
//This procedure is used to set retaliation.
var
x : Integer;
y : Integer;
begin
if (Not(Retaliate)) then
begin
GameTab(1);
Wait (20 + Random(80));
if FindColorSpiralTolerance(x, y, 1711220, 610, 367, 620, 393, 7) then
Mouse(x, y, 0, 0, True);
end;
end;
procedure DisguiseX;
//This procedure is used to disguise Scar.
var
varDisguise : Integer;
begin
varDisguise:= Random(10);
case varDisguise of
0: DisguiseScar('iTunes');
1: DisguiseScar('New Folder');
2: DisguiseScar('Untitled - Wordpad');
3: DisguiseScar('Untitled - Notepad');
4: DisguiseScar('Google - Microsoft Internet Explorer');
5: DisguiseScar('Untitled - Paint');
6: DisguiseScar('CommandPrompt');
7: DisguiseScar('Windows Live Messenger - Log In');
8: DisguiseScar('Yahoo - Microsoft Internet Explorer');
9: DisguiseScar('Google - Mozilla Firefox');
10: DisguiseScar('Yahoo - Mozilla Firefox');
end;
end;
procedure SetupScript;
begin
SetupSRL; //Setup SRL to make sure we compile.
ClearDebug; //Clear the Debug window, looks nicer.
ActivateClient; //Activate Runescape Client, so we can WORK!
DisguiseX; //Changes the caption of SCAR to a random string.
Wait(200 + Random(500)); //We wait now for a little bit.
SetRun(True); //Sets running to on.
SetRetaliation(False); //Sets retaliation to false.
end;
begin
SetupScript;
Writeln(Mithril.RockLevel);
end.
Thanks.
program PowerMiner;
{.include SRL/SRL.scar}
type
//This type is for the rocks, it gives the rocks
//all unique details about themselves.
iRock = record
Color : Integer;
Uptxt : string;
RockLevel : Integer;
Experience : Integer;
end;
const
// COLORS
ClayColor=7578089;
CopperColor=4882380;
TinColor=10197927;
IronColor=1910335;
SilverColor=12434885;
CoalColor=2834753;
GoldColor=1881051;
MithrilColor=7359564;
AdamantiteColor=6322272;
RuniteColor=0;
var
Clay : iRock;
Copper : iRock;
Tin : iRock;
Iron : iRock;
Silver : iRock;
Coal : iRock;
Gold : iRock;
Mithril : iRock;
Adamantite : iRock;
Runite : iRock;
procedure SetRockValues;
//This procedure sets information about the rock types.
begin
with Clay do
begin
Color := ClayColor;
Uptxt := 'lay';
RockLevel := 1;
Experience := 5;
end;
with Copper do
begin
Color := CopperColor;
Uptxt := 'oppe';
RockLevel := 1;
Experience := 17.5;
end;
with Tin do
begin
Color := TinColor;
Uptxt := 'in';
RockLevel := 1;
Experience := 17.5;
end;
with Iron do
begin
Color := IronColor;
Uptxt := 'ron';
RockLevel := 15;
Experience := 35;
end;
with Silver do
begin
Color := SilverColor;
Uptxt := 'ilve';
RockLevel := 20;
Experience := 40;
end;
with Coal do
begin
Color := CoalColor;
Uptxt := 'oal';
RockLevel := 30;
Experience := 50;
end;
with Gold do
begin
Color := GoldColor;
Uptxt := 'old';
RockLevel := 40;
Experience := 65;
end;
with Mithril do
begin
Color := MithrilColor;
Uptxt := 'thri';
RockLevel := 55;
Experience := 80;
end;
with Adamantite do
begin
Color := AdamantiteColor;
Uptxt := 'amant';
RockLevel := 70;
Experience := 95;
end;
with Runite do
begin
Color := RuniteColor;
Uptxt := 'unit';
RockLevel := 85;
Experience := 125;
end;
end;
procedure SetRetaliation(Retaliate : Boolean);
//This procedure is used to set retaliation.
var
x : Integer;
y : Integer;
begin
if (Not(Retaliate)) then
begin
GameTab(1);
Wait (20 + Random(80));
if FindColorSpiralTolerance(x, y, 1711220, 610, 367, 620, 393, 7) then
Mouse(x, y, 0, 0, True);
end;
end;
procedure DisguiseX;
//This procedure is used to disguise Scar.
var
varDisguise : Integer;
begin
varDisguise:= Random(10);
case varDisguise of
0: DisguiseScar('iTunes');
1: DisguiseScar('New Folder');
2: DisguiseScar('Untitled - Wordpad');
3: DisguiseScar('Untitled - Notepad');
4: DisguiseScar('Google - Microsoft Internet Explorer');
5: DisguiseScar('Untitled - Paint');
6: DisguiseScar('CommandPrompt');
7: DisguiseScar('Windows Live Messenger - Log In');
8: DisguiseScar('Yahoo - Microsoft Internet Explorer');
9: DisguiseScar('Google - Mozilla Firefox');
10: DisguiseScar('Yahoo - Mozilla Firefox');
end;
end;
procedure SetupScript;
begin
SetupSRL; //Setup SRL to make sure we compile.
ClearDebug; //Clear the Debug window, looks nicer.
ActivateClient; //Activate Runescape Client, so we can WORK!
DisguiseX; //Changes the caption of SCAR to a random string.
Wait(200 + Random(500)); //We wait now for a little bit.
SetRun(True); //Sets running to on.
SetRetaliation(False); //Sets retaliation to false.
end;
begin
SetupScript;
Writeln(Mithril.RockLevel);
end.
Thanks.