SRL Archive - SRL Archives

[FIXED] Lamp & Genie - inc(lamps) x2


JuKKa

2008-05-04 13:48:26

in function SolveTalkingRandom(RawMenuText: string): Boolean;
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.

Camaro'

2008-05-05 06:59:52

From: JuKKa
in function SolveTalkingRandom(RawMenuText: string): Boolean;
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.


Wow, good catch!

Gu3st...

2008-05-05 13:14:12

hmm.. then every script that is registred and got a lamp would have 2, 4, 6, 8, 10, 12 etc. lamps… O.o Nice catch

EDIT:

Hy's fight cave: Lamps : 824 should be 412.
Forefeather: Lamps : 196 should be 143.
Wizzup Ess Miner: Lamps : 110 should be 55.
Tara's chic killer: Lamps : 315 <— Ø.ø maybe it didnt found the lamp in FindLamp();
VEM and banker: Lamps : 1356 should be 678.

ShowerThoughts

2008-05-05 13:18:05

From: Zytex!
hmm.. then every script that is registred and got a lamp would have 2, 4, 6, 8, 10, 12 etc. lamps… O.o Nice catch

EDIT:

Hy's fight cave: Lamps : 824 should be 412.
Forefeather: Lamps : 196 should be 143.
Wizzup Ess Miner: Lamps : 110 should be 55.
Tara's chic killer: Lamps : 315 <— Ø.ø maybe it didnt found the lamp in FindLamp();
VEM and banker: Lamps : 1356 should be 678


If you used tara's script you most of the time had full inv so not many lamps to solve ;)

JuKKa

2008-05-05 15:05:34

From: Zytex!
hmm.. then every script that is registred and got a lamp would have 2, 4, 6, 8, 10, 12 etc. lamps… O.o Nice catch

EDIT:

Hy's fight cave: Lamps : 824 should be 412.
Forefeather: Lamps : 196 should be 143.
Wizzup Ess Miner: Lamps : 110 should be 55.
Tara's chic killer: Lamps : 315 <— Ø.ø maybe it didnt found the lamp in FindLamp();
VEM and banker: Lamps : 1356 should be 678.


I remember this is a old bug. I just never reported it. This is a bug that has been be4 srl 4 (if i reme correctly)

n3ss3s

2008-05-06 12:01:24

Good find, in :)

MylesMadness

2008-05-06 20:25:09

or out :p