WhoCares357
2007-05-26 16:32:56
For my alcher, I wanted to include the SRL function, FindLamp, and add something to it. I renamed the function FindLampEx (and gave all credits ;) ). However, once I tried to run the script, I got an error:
This is the procedure:
Line 528 is the line that has "var" on it. It's the line after the function name.
Line 528: [Error] (14874:1): Identifier expected in scriptThis is the procedure:
{/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\}
{ Edited FindLamp }
{\\\\\\\\\\\\\\\\\\\\\\\\\///////////////////////}
function FindLampEx(skill: string): Boolean; //Starblaster + Pups
var
LampTime: Integer;
begin
GameTab(4);
if FindColorTolerance(x, y, 1488053, 550, 200, 745, 465, 25) then
begin
Mouse(90, 441, 15, 3, true); //Only line that I added (only thing edited)
if (FindBitmapSpiralTolerance(Lamp, x, y, 550, 200, 745, 465, 25)) then
begin
Result := True;
if (Screenshots) then
SaveScreenshot('Lamp Random - Stupid3ooo - ' + TimeRunning + '.bmp');
WriteLn('******** SOLVED LAMP RANDOM ********');
WriteFileString(TheFile, '******** SOLVED LAMP RANDOM ********' + Chr(13))
Lamps := Lamps + 1;
Players[CurrentPlayer].Rand := 'Lamp';
Mouse(x, y, 1, 1, True);
Wait(1500 + Random(500));
MarkTime(LampTime);
repeat
case (LowerCase(Skill)) of
'strength': Mouse(191, 134, 12, 12, True);
'attack': Mouse(222, 136, 12, 12, True);
'ranged': Mouse(256, 134, 12, 12, True);
'magic': Mouse(289, 135, 12, 12, True);
'defence': Mouse(319, 136, 12, 12, True);
'hitpoints', 'hp': Mouse(176, 166, 12, 12, True);
'prayer', 'pray': Mouse(208, 163, 12, 12, True);
'agility': Mouse(239, 165, 12, 12, True);
'herblore': Mouse(271, 165, 12, 12, True);
'thieving', 'thief': Mouse(303, 164, 12, 12, True);
'crafting', 'craft': Mouse(335, 164, 12, 12, True);
'runecraft', 'runecrafting': Mouse(174, 193, 12, 12, True);
'slayer', 'slay': Mouse(205, 195, 12, 12, True);
'farming', 'farm': Mouse(239, 193, 12, 12, True);
'mining', 'mine': Mouse(270, 194, 12, 12, True);
'smithing', 'smith': Mouse(302, 194, 12, 12, True);
'fishing', 'fish': Mouse(334, 192, 12, 12, True);
'cooking', 'cook': Mouse(173, 220, 12, 12, True);
'firemaking', 'fire': Mouse(206, 220, 12, 12, True);
'woodcutting', 'wc': Mouse(240, 220, 12, 12, True);
'fletching', 'fletch': Mouse(274, 220, 12, 12, True);
'construction': Mouse(303, 220, 12, 12, True);
'hunting','hunt': Mouse(335, 220, 12, 12, True);
end;
Wait(500 + Random(200) + Random(100));
if (TimeFromMark(LampTime) > 30000) then
begin
Logout;
Exit;
end;
until (FindColorTolerance(x, y, 2303647, 155, 117, 370, 250, 0));
Mouse(261, 277, 1, 1, True);
Wait(500 + Random(150) + Random(150));
end;
end;
end;Line 528 is the line that has "var" on it. It's the line after the function name.