Special Ed
2007-11-06 17:33:09
Well I was running Tara's chicken killer overnight one night and I woke up with an error with Box.scar, the next day I ran it again overnight, this time I got a problem with certer.scar.
Take a look at the code and what-not I've got some ideas on how to fix but I'm not sure….
For the second of the two, maybe their can be for points than 30,800… I'm not sure but its a though. As for the first one, I don't know what process picture is and it wasn't in Certer.scar so I haven't seen it yet.
Take a look at the code and what-not I've got some ideas on how to fix but I'm not sure….
******** SOLVED BOX RANDOM ********
Found a box, solving...
Question is:
What number is the Triangle
[Runtime Error] : Exception: Access violation at address 02093B0C in module 'BoxPlugin.dll'. Write of address 6FD6A14C in line 200 in script C:\Program Files\SCAR 3.12\includes\SRL/SRL/Core/AntiRandoms/Box.scar
{*******************************************************************************
function SolveBox: Boolean;
by: pups
Description: Solves the Box!
*******************************************************************************}
function SolveBox: Boolean;
var
side, st2: Integer;
shapeQ, shape, ans: string;
numQ, num: Integer;
x, y: Integer;
c: TCanvas;
begin
while OpenBox do
begin
WriteLn('Found a box, solving...');
Wait(1000);
GetQuestion(numQ, shapeQ);
if (shapeQ = '') and (numQ = 10) then
continue;
WriteLn('Question is:');
if shapeQ = '' then
WriteLn('Which shape has number ' + IntToStr(numQ))
else
WriteLn('What number is the ' + shapeQ);
st2 := GetSystemTime;
repeat
side := GetBoxSide;
c := GetBitmapCanvas(side);
if (ScreenShots) then
SaveBitmap(side, ScriptPath + 'box_debug.bmp');
ProcessPicture(c, shape, num, 0); //Line 200
FreeBitmap(side);
if (num = numQ) or (shape = shapeQ) then
begin
if num = numQ then
ans := shape
else
ans := IntToStr(num);
WriteLn('Answer is ' + ans);
TakeScreen('Solved box answer - '+Ans);
if FindText(x, y, ans, upchars, 116, 286, 183, 311) then
Mouse(120, 290, 30, 10, True);
if FindText(x, y, ans, upchars, 235, 286, 302, 311) then
Mouse(240, 290, 30, 10, True);
if FindText(x, y, ans, upchars, 350, 286, 417, 311) then
Mouse(355, 290, 30, 10, True);
NewBoxes := NewBoxes + 1;
WriteLn('******** SOLVED BOX RANDOM ********');
WriteFileString(TheFile, '******** SOLVED BOX RANDOM ********' +
Chr(13));
Result := True;
Break;
end;
until GetSystemTime > st2 + 12000;
Wait(1500 + Random(1000));
end;
end;
******** FOUND TALKING RANDOM TEXT********: Talk-to Giles
1. sword
2. axe
3. ring
[Runtime Error] : Out Of Range in line 49 in script C:\Program Files\SCAR 3.12\includes\SRL/SRL/Core/AntiRandoms/Certer.scar{*******************************************************************************
function FindCerterPixels : TPointArray;
by: SKy Scripter
Description: Returns All Certer Object Pixels.
*******************************************************************************}
function FindCerterPixels : TPointArray;
var
P : TPointArray;
ColorData : TIntegerArray;
i, a, BackGround : Integer;
begin
if (not(CerterScreen)) then Exit;
BackGround := GetColor(151, 151);
FindColorsTolerance(P, BackGround, 151, 151, 376, 294, 255 * 3);
ColorData := GetColors(P);
SetArrayLength(Result, 30800); // 30800 >> as many point possible
for i := 0 to Length(P)-1 do
if (ColorData[i] <> BackGround) then
begin // Line 49
Result[a] := P[i];
inc(a);
end;
SetArrayLength(Result, a);
end;For the second of the two, maybe their can be for points than 30,800… I'm not sure but its a though. As for the first one, I don't know what process picture is and it wasn't in Certer.scar so I haven't seen it yet.