JuKKa
2008-05-04 13:48:26
in function SolveTalkingRandom(RawMenuText: string): Boolean;
we have
notice the " Lamps := Lamps + 1;"
now look in
we have Lamps := Lamps + 1; again..
what this does once it finds a genie and gets a lamp and everything is solved. It gets lamps = 2 when it should be 1.
we have
// Genie Handler.
if (Pos('Geni', RawMenuText) <> 0) or (Pos('enie', RawMenuText) <> 0) then
begin
Wait(1000 + Random(500));
if FindLamp(LampSkill) then
begin
Lamps := Lamps + 1;
SRLRandomsReport;
Exit;
end
else
begin
NOLamps := NOLamps + 1;
WriteLn('lamp missed');
SRLRandomsReport;
Exit;
end;
end;notice the " Lamps := Lamps + 1;"
now look in
function FindLamp(skill: string): Boolean;
var
LampTime, x, y, i: Integer;
begin
GameTab(4);
if FindColorTolerance(x, y, 1084300, MIX1, MIY1, MIX2, MIY2, 40) then
if (FindBitmapSpiralTolerance(Lamp, x, y, MIX1, MIY1, MIX2, MIY2, 40)) then
begin
Result := True;
TakeScreen('Lamp Random Solved');
WriteLn('******** SOLVED LAMP RANDOM ********');
WriteFileString(TheFile, '******** SOLVED LAMP RANDOM ********' + Chr(13));
Lamps := Lamps + 1;
Mouse(x, y, 1, 1, True);
Wait(1500 + Random(500));
MarkTime(LampTime);
for i:= 1 to 4 do
begin
case (LowerCase(Skill)) of
'attack': Mouse(178, 135, 12, 12, True);
'strength': Mouse(210, 135, 12, 12, True);
'ranged': Mouse(242, 135, 12, 12, True);
'magic': Mouse(274, 135, 12, 12, True);
'defence': Mouse(306, 133, 12, 12, True);
'crafting', 'craft': Mouse(338, 135, 12, 12, True);
'hitpoints', 'hp': Mouse(178, 165, 12, 12, True);
'prayer', 'pray': Mouse(210, 165, 12, 12, True);
'agility': Mouse(242, 165, 12, 12, True);
'herblore': Mouse(274, 165, 12, 12, True);
'thieving', 'thief': Mouse(306, 165, 12, 12, True);
'fishing', 'fish': Mouse(338, 165, 12, 12, True);
'runecraft', 'runecrafting': Mouse(178, 192, 12, 12, True);
'slayer', 'slay': Mouse(210, 192, 12, 12, True);
'farming', 'farm': Mouse(242, 192, 12, 12, True);
'mining', 'mine': Mouse(274, 192, 12, 12, True);
'smithing', 'smith': Mouse(306, 192, 12, 12, True);
'hunting', 'hunt', 'hunter': Mouse(338, 192, 12, 12, True);
'cooking', 'cook': Mouse(178, 220, 12, 12, True);
'firemaking', 'fire': Mouse(210, 220, 12, 12, True);
'woodcutting', 'wc': Mouse(242, 220, 12, 12, True);
'fletching', 'fletch': Mouse(274, 220, 12, 12, True);
'construction': Mouse(306, 220, 12, 12, True);
'summoning': Mouse(338, 220, 12, 12, True);
else Mouse(178, 165, 12, 12, True);
end;
Wait(500 + Random(200) + Random(100));
if FindColorTolerance(x, y, 2303647, 155, 117, 370, 250, 0) then Break;
if (TimeFromMark(LampTime) > 10000) then
begin
Result := False;
Logout;
Players[CurrentPlayer].Rand := 'Lamp';
Exit;
end;
end;
Mouse(261, 277, 1, 1, True);
Wait(500 + Random(150) + Random(150));
end;
end;we have Lamps := Lamps + 1; again..
what this does once it finds a genie and gets a lamp and everything is solved. It gets lamps = 2 when it should be 1.