SRL Archive - Senior News and General

ignore this


n3ss3s

2009-08-14 16:55:27


{******************************************************************************)
(* *)
(* A L I R A P E R *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script rapes Ali Morrisane's and Aubury's Sudoku *)
(* REQUIRMENTS: The Feud done, and started the Rogue Trader minigame *)
(* INSTRUCTION: Open the Sudoku screen of the large sudoku (really, small *)
(* is way too easy, I do that one while owning TzTok-Jad) *)
(* then run the script :) If you want it to be safe for your *)
(* char, set const 'Rule7Proof' to true, it'll give you the *)
(* solution in the debug window. *)
(* *)
(******************************************************************************}
{$DEFINE SRL_SMART}
program ALIRAPER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}

const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
procedure debug(s : string); begin if debugmode then writeln(s) else Status(s); end;



var
Playground : Array of Array of byte;
lolz : TStringArray;
DTM : array [1..9] of integer;
ownarr : array [1..9] of TPoint;
FailTime, Solved, ReportTime, A: integer;
NorthLast, UnSolvable: Boolean;
abc: Integer;

//STOOOOOOF
// mind = 1 1536183
// fire = 2 1121931 -414252
// earth= 3 736087 -800096
// law = 4 12000535 +10464352
// water= 5 9115153 +7578970
// body = 6 11016981 +9480798
// chaos= 7 1542839 +6656
// death= 8 1315861 (splittpa+length?)
// air = 9 ^ -220322
//STOOOOOOF
ColourArray: array [1..9] of integer;

const
XStart = 116;
YStart = 8;
XOff = 37;
YOff = 37;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

SRLid:= '';
SRLpassword:= '';

Players[0].Name := 'xxxxxxxx';
Players[0].Pass := 'xxxxx';
Players[0].Nick := 'xxx';
Players[0].Active := true;
end;


Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
debug('Getting rune colours');
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := ColourArray[1] - 414252;
ColourArray[3] := ColourArray[1] - 800096;
ColourArray[4] := ColourArray[1] + 10464352;
ColourArray[5] := ColourArray[1] + 7578970;
ColourArray[6] := ColourArray[1] + 9480798;
ColourArray[7] := ColourArray[1] + 6656;
ColourArray[8] := ColourArray[1] -220322;
SetLength(playground, 9);
for i := 0 to 8 do
SetLength(playground[i], 9);
ColorToleranceSpeed(1);
for y := 0 to 8 do
begin
//s := '';
SS := '';
for x := 0 to 8 do
begin
d := 0;
for i := 1 to 8 do
begin
if FindColorTolerance(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5, 3) then
begin
d := i;
break;
end;
end;
if d = 8 then
if(countcolortolerance(colourarray[i],x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5,3)) <= 14
then d := 9;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except writeln(inttostr(d)) end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
//if DisplayDetails then
writeln(ss);
end;{}
end;

type
SuSquare = record
Number,c : Integer;
Possibilities : Array of byte;
InBox : TBox;
end;
SuStack = record
x, y,num : byte;
end;
var
Solver : Array[0..8] of Array[0..8] of SuSquare;
Stack : Array of SuStack;
InStack : Array of boolean;
Survived : Boolean;
TmpStack : SuStack;
Str: String;
I,ii,x,y,C,xx,yy,minx,maxx,miny,maxy,x1,y1,x2,y2,TotalEmpty,
Row, StackPos : integer;
SearchBoxes : array[0..8] of tbox;
Procedure BoxToInt( Box : TBox; var xx1,yy1,xx2,yy2 : integer);
begin;
xx1 := Box.x1;
yy1 := Box.y1;
xx2 := Box.x2;
yy2 := Box.y2;
end;

Procedure LoadPossibilities;
var
Tmp : Array of byte;
begin;
Tmp := [1,2,3,4,5,6,7,8,9];
for x := 0 to 8 do
for y := 0 to 8 do
begin;
minx := trunc(x div 3)*3;
miny := trunc(y div 3)*3;
Solver[x][y].InBox := IntToBox(Minx,Miny,Minx + 2,Miny + 2);
SetLength(Solver[x][y].possibilities,9);// := [1,2,3,4,5,6,7,8,9];
end;
for y := 0 to 8 do
begin;
Tmp := [1,2,3,4,5,6,7,8,9];
for x := 0 to 8 do
if Solver[x][y].Number <> 0 then
tmp[Solver[x][y].Number-1] := 0;
for x := 0 to 8 do
if Solver[x][y].Number = 0 then
for i := 0 to 8 do
Solver[x][y].possibilities[i] := tmp[i];
end;
for x := 0 to 8 do
begin;
Tmp := [1,2,3,4,5,6,7,8,9];
for y := 0 to 8 do
if Solver[x][y].Number <> 0 then
tmp[Solver[x][y].Number-1] := 0;
for y := 0 to 8 do
if Solver[x][y].Number = 0 then
for i := 0 to 8 do
if tmp[i] = 0 then
Solver[x][y].possibilities[i] := tmp[i];
end;
for xx := 0 to 2 do
for yy := 0 to 2 do
begin;
Minx := xx * 3;
Miny := yy * 3;
Maxx := Minx + 2;
Maxy := miny + 2;
Tmp := [1,2,3,4,5,6,7,8,9];
for x := minx to maxx do
for y := miny to maxy do
if Solver[x][y].number <> 0 then
tmp[Solver[x][y].Number-1] := 0;
for x := minx to maxx do
for y := miny to maxy do
if Solver[x][y].Number = 0 then
for i := 0 to 8 do
if tmp[i] = 0 then
Solver[x][y].possibilities[i] := tmp[i];
end;
for x := 0 to 8 do
for y := 0 to 8 do
begin;
c := 0;
for i := 0 to 8 do
if Solver[x][y].possibilities[i] > 0 then
inc(c);
Solver[x][y].c := c;
end;
end;

Procedure AddToStack(x,y,num : byte);
begin;
if InStack[y*9+x] then
exit
else
InStack[y*9+x] := true;
inc(StackPos);
Stack[StackPos].x := x;
Stack[StackPos].y := y;
Stack[StackPos].num := num;
end;

Procedure ChangeNumber(xpos,ypos: integer; number : byte);
var
Num : Integer;
begin;
InStack[ypos*9+xpos] := false;
Dec(TotalEmpty);
Solver[xpos][ypos].Number := Number;
Num := Number - 1;
Solver[xpos][ypos].c := 0;
Solver[xpos][ypos].Possibilities := [0,0,0,0,0,0,0,0,0];
BoxToInt(Solver[xpos][ypos].inbox,x1,y1,x2,y2);
for xx := x1 to x2 do
for yy := y1 to y2 do
if Solver[xx][yy].possibilities[Num] > 0 then
begin;
Solver[xx][yy].possibilities[Num] := 0;
Solver[xx][yy].c := Solver[xx][yy].c - 1;
if Solver[xx][yy].c = 1 then
for I := 0 to 8 do
if Solver[xx][yy].possibilities[i] > 0 then
begin;
AddToStack(xx,yy, Solver[xx][yy].possibilities[i]);
Break;
end;
end;
for yy := 0 to 8 do
if Solver[xpos][yy].possibilities[Num] > 0 then
begin;
Solver[xpos][yy].possibilities[Num] := 0;
Solver[xpos][yy].c := Solver[xpos][yy].c - 1;
if Solver[xpos][yy].c = 1 then
for I := 0 to 8 do
if Solver[xpos][yy].possibilities[i] > 0 then
begin;
AddToStack(xpos,yy, Solver[xpos][yy].possibilities[i]);
Break;
end;
end;
for xx := 0 to 8 do
if Solver[xx][ypos].possibilities[Num] > 0 then
begin;
Solver[xx][ypos].possibilities[Num] := 0;
Solver[xx][ypos].c := Solver[xx][ypos].c - 1;
if Solver[xx][ypos].c = 1 then
for I := 0 to 8 do
if Solver[xx][ypos].possibilities[i] > 0 then
begin;
AddToStack(xx,ypos, Solver[xx][ypos].possibilities[i]);
Break;
end;
end;
end;

Function SudokuMenu: Boolean;
var
TPA: TPointArray;
begin
FindColorsTolerance(TPA, 797794, 0, 0, 95, 85, 0);
Result := High(TPA) > 50;
end;
{
function EnterSudoku: boolean;
var
x, y, z, y1, x1, z1, x2, y2, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
canExit: Boolean;
begin
// DisplayDebugImgWindow(280, 270);
RandomArr := [1,2,3,4,5,6,7,8,9];
for i := 0 to 8 do
swap(randomarr[random(9)], randomarr[random(9)]);
SetLength(randompoints, 9);
for x := 0 to 8 do
SetLength(randompoints[x], 9);
for x := 0 to 8 do
for y := 0 to 8 do
randompoints[x][y] := point(x, y);
for i := 1 to 81 do
Swap(randompoints[random(9)][random(9)], randompoints[random(9)][random(9)]);
for y := 0 to 8 do
begin
ss := '';
for x := 0 to 8 do
begin
try
SS := SS + lolz[Solver[x][y].number-1] + ' | ';
except
end;
SafeDrawBitmap(dtm[Solver[x][y].number], getdebugcanvas, x*30+(x/3*4), y*29+(y/3*4)); //Draw sudoku at debug (with roster).
end;
if DisplayDetails then
writeln(ss);
end;
if rule7proof then exit;
for z1 := 1 to 9 do
begin
if Not SudokuMenu then
Exit;
z := randomarr[z1-1];
MouseBox(ownarr[z].x, ownarr[z].y, ownarr[z].x+20, ownarr[z].y+20, 1);
for y1 := 0 to 8 do
begin
for x1 := 0 to 8 do
begin
if Not SudokuMenu then
Exit;
x := randompoints[x1][y1].x;
y := randompoints[x1][y1].y;
SafeDrawBitmap(dtm[Solver[x][y].number], getdebugcanvas, x*30+(x/3*4), y*29+(y/3*4)); //Draw sudoku at debug (with roster).
if (not(getcolor(X*XOff+XStart+10, Y*YOff+YStart+10) = 498170) or (getcolor(X*XOff+XStart+10, Y*YOff+YStart+10) = 114921)) then
continue;
if Solver[x][y].number = z then
begin
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
SafeDrawBitmap(dtm[Solver[x][y].number], getdebugcanvas, x*30+((x) div 3 * 4), y*29+((y) div 3 * 4));
end;
end;
end;
end;
wait(750);
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
// if not FindColor(x2, y2, 65536, X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8) then
if(GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 498170) or (GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 114921)then
try
MouseBox(ownarr[Solver[x][y].Number].x, ownarr[Solver[x][y].Number].y, ownarr[Solver[x][y].Number].x+20, ownarr[Solver[x][y].Number].y+20, 1);
wait(300 + Random(400));
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
wait(100 + Random(400));
CanExit:= False;
except
end;
until(CanExit) or (not(LoggedIn))
//writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
MouseBox(14, 61, 89, 78, 1);
Result := true;
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(100);

if not SudokuMenu then
begin
Status('Sudoku Solved!');
Exit;
end;

if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
Mouse(13, 13, 13, 13, true);//Closes Sudoku Menu
Result := False;
Exit;
end;
end; }

{
Function getNext(TPA: TPointArray; P: TPoint): TPoint;

Var
I: Integer;
Begin
SortTPAFrom(TPA, P);
For I := 0 To High(TPA) Do
If TPA[i].x > 0 Then
Begin
Result := TPA[i];
TPA[i] := Point(0, 0);
Exit;
End;
Result := Point(0, 0);
End; }


function EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
CurPoint : TPoint;
canexit : boolean;
//n3sWasHere: TPointArray;
//clicky, ffsx, ffsy: Integer;
//lol: TPoint;
begin
if (UnSolvable) then
exit;
MarkTime(sudotime);
randomarr := [1, 2, 3, 4, 5, 6, 7, 8, 9]; //Array of the runes we gonna enter
for z := 1 to 100 do //100 random swaps should suffice? :p
swap(randomarr[random(9)], randomarr[random(9)]);

SetLength(randompoints, 9);
for y := 0 to 8 do //Create 9x9 grid.
setlength(randompoints[y], 9);

for y := 0 to 8 do //fill 9x9 grid with points
for x := 0 to 8 do
randompoints[y][x] := point(x, y);

for i := 0 to 10000 do
try
swap(randompoints[random(9)][random(9)], randompoints[random(9)][random(9)]);
except
writeln('exception thrown.');
end;

for y := 0 to 8 do
for x := 0 to 8 do
try
SafeDrawBitmap(dtm[Solver[x][y].number], getdebugcanvas, x*30+(x/3*4), y*29+(y/3*4)); //Draw sudoku at debug (with roster).
except
end;

for z := 0 to 8 do
begin
//SetArrayLength(n3sWasHere, 0);
CurrentRune := RandomArr[z];
Mouse(OwnArr[CurrentRune].x, OwnArr[CurrentRune].y, 20, 20, true); //Click the rune
for y := 0 to 8 do
for x := 0 to 8 do
begin
CurPoint := RandomPoints[y][x];
debug(inttostr(curpoint.x));
debug(inttostr(length(playground)));
debug('-');





if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
debug('Op: '+inttostr(curpoint.x)+', '+inttostr(curpoint.y)+' moet een '+lolz[currentrune-1]);
if (getcolor(CurPoint.x*xoff+xstart+15, CurPoint.y*yoff+ystart+15) = 498170) or (getcolor(CurPoint.x*xoff+xstart+15, CurPoint.y*yoff+ystart+15) = 114921) then
begin
Mouse(CurPoint.x*xoff+xstart+10, CurPoint.y*yoff+ystart+10, 20, 20, true);
//SetArrayLength(n3sWasHere, GetArrayLength(n3sWasHere) + 1);
//n3sWasHere[High(n3sWasHere)] := Point(CurPoint.x * xoff + xstart + 10 + Random(20), CurPoint.y * yoff + ystart + 10 + Random(20));
end;
end;
end;
{ GetMousePos(ffsx, ffsy);
SortTPAFrom(n3sWasHere, Point(ffsx, ffsy));
Lol := n3sWasHere[0];
Repeat
Mouse(Lol.x, Lol.y, 0, 0, True);
Lol := getNext(n3sWasHere, Lol);
Until(Lol.x = 0);
writeln('wat'); }
end;
repeat
CanExit:= True;
wait(500 + Random(400));
for x:= 0 to 8 do
for y:= 0 to 8 do
// if not FindColor(x2, y2, 65536, X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8) then
if(GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 498170) or (GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 114921)then
try
MouseBox(ownarr[Solver[x][y].Number].x, ownarr[Solver[x][y].Number].y, ownarr[Solver[x][y].Number].x+20, ownarr[Solver[x][y].Number].y+20, 1);
wait(300 + Random(400));
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
wait(100 + Random(400));
CanExit:= False;
except
end;
//wait(500 + Random(400));
until(CanExit) or (not(LoggedIn))
writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
MouseBox(14, 61, 89, 78, 1);
Result := true;
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(100);

if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;

if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
Mouse(13, 13, 13, 13, true);//Closes Sudoku Menu
Result := False;
Exit;
end;
end;


procedure LoadArrays;
begin

OwnArr[1] := Point(20, 100); //Mind
dtm[1]:= BitmapFromString(30, 29, 'beNqdletOE1EUhfGnD2HCI/g' +
'OJKRqJESCBCUNShpERNI0FREkFcGKgFiRCsjFSkUuUrlZLASKmuhr' +
'+Ne38EtWsnMyMx0ak5Wmnc58e5219zlzeu7v6RmqqamoM58NZ+6uf' +
'txfXz/Y+lwqFI52do73dk++7n//dvDz6PA/+Hpk8/1yYeXDdj6/t/' +
'apuLkh+OH2F/gG/3VyXCVft+Wy2dV38xtLi1u5HHBsA8c5fCTzLvx' +
'3uRwO59/sxMRCJiPy2uICtgXHOVKJQDjPXqytrYTNpNNGzs/NyTaC' +
'/2f8AqKEquA/EB6IHR9+YuTlmTcrs2+Bi495kVWFVSDMc8WF+21zJ' +
'dX3YCyVElkQBB/zlFAVSqiKFmK30VMX7ienh4amRkdnX04ie2pp+j' +
'VSCVXRQvQvVQgH8yRTLhaBu7b5nujufpxMijw99nxm/AUy+PyrKfK' +
'5fOm85F8I+dBZZpJRF9zI8a6ugUTi2eDg5MhT4IhYKKEqxjT5F0I4' +
'tJWZIfYfpZLgfN7v7OyPx0cGHhE1opWUUBWjaSF0QT+1EKQSCDjOF' +
'Ysy4fNeLNbX2zvc/xA4zokFUUIQK8ESVELXaYf4ghMLmWObTIx851' +
'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Xk20' +
'E30qoCv4D4YHYydGnRl6df7O28Ba4+JhHlPhzfo4ogTBP8i7cb5tv' +
'UgMPJ1IpI6/MvQaOME8JVRFW0kYwTzL01IX7yemRkZnx8YVX02hxd' +
'gaphFCUcMlIGyEczJNMpVQC7trmOdHb+ySZFHlu4sX85EuEeVUxlF' +
'UxKSvM01mSYdQFN3K8p2cokXg+PDw99gw40kJVoYQ+aiMeOCIrwlE' +
'yxP6jXBacvw+6uwfj8bGhx0SNaKWtInlkH7URD1kdAY5zxaJM+Hs/' +
'Fhvo7x8dfAQc58SCbKE2ErgLSwkysZA5tsnEyHdvdyb7+mii4Lwsv' +
'gu3LQBHLllTSuYETjcZFSN3dXSoicCR3geO9ExEesC8Jx/lL8+MCm' +
'nTSiPfam1V1PQRvt43/8j8Y94NRyJ5kXXPcDyNfKO5+V7XHaIW3JY' +
'AR/Kvb2gu8sCJnah1SCHTRyM3RSKxaJSogRtf4dhyNxl3eIysUwmZ' +
'QOy88BBtayNqJL5rXp01vttZiWmBTAdlW1gjyzZHxuBa5U/ezLvTA' +
'lk3DGl77iWlzWAb3MwbxDVvsetCYDw01a5hI19tbCQThkTwQPNu8s' +
'SibuqGZEIY7MD7ny9bmq6RCXDjm3PP2CgWuimyzqbfsJEjDQ3MNhN' +
'ILB64Z2aIRd3UqIgf/oMFHOfEwpH3J2Nw48u8fpcDDXt+u8nc5bvy' +
'VzFmCFbS8dEotrdch486b7ZzvVCIrGwvtVgN4YeoRqvV+OGquvYfY' +
'L9Zvw==');
OwnArr[9] := Point(20, 200); //air
OwnArr[7] := Point(70, 250); //chaos
DTM[7]:= BitmapFromString(30, 29, 'beNqdle1KVGEUhe1XdAHSr8B' +
'L6AYESZIpSSwxsWSwRMzMZBgmM03MtMnUzExzzI9MMx1z8qsxFR0q' +
'qNsQoZvoVw8s2LycM3McgsUwnJn32eusvfc5idN/EyeooOBULp14N' +
'pi5ufRxe2VlZ+3zbiq1v7FxsLV5+HX7+7edn/t7/8HXkdX3c6mFD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3CWqq7sSpEuvDWfurX892' +
'Nw82v5eKZVOdndP9/fODg/Ofx79Ojn+D74u2fq8Wlr7slMo7G98K2' +
'8VBT/e+QHf4L/PTmvk69/y2ez6p8XiyvJ2Pg+c2MBJDh8pvBP+p1o' +
'Nh/PX7PT0UiYj8sbyErEFJzmShS+ca2/U1wdhM+m0kQu5nGIj+GYh' +
'F/L7wn2xU2OjRl6d/7C28BG4+IRH5oIFIjzNO+He2PySGng6mUoZe' +
'WXuPXBEeCzkcu16US5mQXiaYaZOuJecHhmZnZhYeDuDFt/NIlnIBQ' +
'vI3huhHMLTTLVcBu6MzfdEb++LZFLkucnX81NvEOHNBQsE2XsjWBC' +
'eydIMqy64keM9PUOJxKvh4Znxl8ARtWAhFywQWOS9EblQjpqh9otK' +
'RXA+n3R3D8bj40PPqRoxSizkgoVcREauG7GJACe5alEnfD6OxQb6+' +
'8cGnwEnObUgl4WRvUUJTi10Tmw6MfLD+53Jvj6GKLjx7RYMK1lLBo' +
'dM5xTONFkVI3d1dGiIwI0P3PgusheuzKwKbTNKI99rbVXVzNGX7yW' +
'74CLrOcPxNPKd5uZHXQ+oWnDjAxffl6zJCk7VOkGQmaORmyKRWDRK' +
'1cCNb+F9sciWU2Q7+BRi54Uv0bY2qkbiO8MHkQ1ObMhMULGFNbJic' +
'2SccPGDsNpJxYasI0PbrueS2maxDW58X6wtvB4IrIe22hnYyDcbG+' +
'mEJRHcGd6FtYW32NoQFtv3+c+PLU236AS48QV3kW0hiW2F0LY3sJE' +
'jDQ3sNhtILS64a2eA2zmy5OEvLOAkpxaOvG8zghtf4fVe9g3senfT' +
'uZPvlNfFmCFYScdHq9jechs+6rzbzuMFI7qye6klagg/RDVGDeKHK' +
'/Dafzorm1Y=');
lolz := ['mind ', 'fire ', 'earth', ' law ', 'water', 'body ', 'chaos', 'death', ' air ', ' '];
end;


function SudokuSolver: boolean;
var
EmptyStone : SuSquare;
EmptyStack : SuStack;
begin
UnSolvable := false;
ClearReport;
//Cleardebug;
Status('Solving Sudoku...');
for i := 0 to 8 do
for ii := 0 to 8 do
Solver[i][ii] := EmptyStone;
SetLength(Stack,0);
SetLength(InStack,0);
SetLength(PlayGround,0);
Survived := False;
TmpStack := EmptyStack;
Str := '';
i := 0;ii:=0;x:=0;y:=0;c:=0;xx := 0;yy := 0; minx := 0;maxx := 0;miny := 0;Maxy:=0;x1:=0;y1:=0;x2 :=0;y2 :=0;TotalEmpty := 0;
row := 0;StackPos := 0;
for i := 0 to 8 do
SearchBoxes[i] := IntToBox(0,0,0,0);
SetLength(PlayGround,9);
for i := 0 to 8 do
SearchBoxes[i] := IntToBox(i div 3*3,i mod 3*3,i div 3*3 + 2,i mod 3*3+2);
SetLength(stack,9*9);
SetLength(InStack,9*9);
LoadPlayground;
// Solver[0][0].Possibilities := ReturnPossibilities(Playground[0], Solver[0][0].c);
// for I := 0 to Solver[0][0].c do
// Writeln(inttostr(Solver[0][0].Possibilities[i]));

for x := 0 to 8 do
for y := 0 to 8 do
if PlayGround[y][x] = 0 then
inc(TotalEmpty)
else
Solver[x][y].Number := Playground[y][x];
for x := 0 to 8 do
for y := 0 to 8 do
begin
end;
// begin;
SetLength(PlayGround,0);
for y := 0 to 8 do
begin;
str := '';
for x := 0 to 8 do
begin;
if Solver[x][y].number > 0 then
Str := Str + Inttostr(Solver[x][y].number) + '|'
else
Str := Str + ' |';
end;
if DisplayDetails then
Writeln(str);
// Writeln('-------------');
end;
if DisplayDetails then
Writeln(inttostr(TotalEmpty));
LoadPossibilities;
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + inttostr(solver[0][y].Possibilities[i]);
// Writeln(inttostr(solver[0][y].Possibilities[i]));
if DisplayDetails then
addtoreport(inttostr(solver[0][y].c) + '-' + str);
end;
StackPos := -1;
for x := 0 to 8 do
for y := 0 to 8 do
if Solver[x][y].c = 1 then
for i := 0 to 8 do
if Solver[x][y].possibilities[i] > 0 then
begin;
AddToStack(x,y,Solver[x][y].possibilities[i]);
Break;
end;
while totalempty > 0 do
if StackPos > -1 then
begin;
Dec(Stackpos);
ChangeNumber( Stack[Stackpos+1].x,stack[stackpos+1].y,stack[stackpos+1].num);
Continue;
end else
begin;
for i := 0 to 8 do
for ii := 0 to 8 do
begin;
c := 0;
for x := SearchBoxes[i].x1 to Searchboxes[i].x2 do
for y := SearchBoxes[i].y1 to Searchboxes[i].y2 do
if (Solver[x][y].possibilities[ii] > 0) then
if c = 0 then
begin;
TmpStack.x := x;
TmpStack.y := y;
TmpStack.num := ii;
inc(c);
end else
inc(c);
if c = 1 then
AddToStack(tmpstack.x,tmpstack.y,tmpstack.num + 1);
end;
for y := 0 to 8 do
for ii := 0 to 8 do
begin;
c := 0;
for x := 0 to 8 do
if (Solver[x][y].possibilities[ii] > 0) then
if c = 0 then
begin;
TmpStack.x := x;
TmpStack.y := y;
TmpStack.num := ii;
inc(c);
end else
inc(c);
if c = 1 then
AddToStack(tmpstack.x,tmpstack.y,tmpstack.num + 1);
end;
for x := 0 to 8 do
for ii := 0 to 8 do
begin;
c := 0;
for y := 0 to 8 do
if (Solver[x][y].possibilities[ii] > 0) then
if c = 0 then
begin;
TmpStack.x := x;
TmpStack.y := y;
TmpStack.num := ii;
inc(c);
end else
inc(c);
if c = 1 then
AddToStack(tmpstack.x,tmpstack.y,tmpstack.num + 1);
end;
if StackPos = -1 then
begin;
Survived := False;
for i := 0 to 8 do
for ii := 0 to 8 do
begin;
c := 0;
for y := SearchBoxes[i].y1 to Searchboxes[i].y2 do
for x := SearchBoxes[i].x1 to Searchboxes[i].x2 do
if (Solver[x][y].possibilities[ii] > 0) then
if c = 0 then
begin;
Row := y;
inc(c);
Break;
end else
inc(c);
if c = 1 then
for x := 0 to 8 do
if not ((x >= SearchBoxes[i].x1) and ( x <= SearchBoxes[i].x2)) then
if Solver[x][row].possibilities[ii] > 0 then
begin;
Survived := True;
Solver[x][row].possibilities[ii] := 0;
end;
c := 0;
for x := SearchBoxes[i].x1 to Searchboxes[i].x2 do
for y := SearchBoxes[i].y1 to Searchboxes[i].y2 do
if (Solver[x][y].possibilities[ii] > 0) then
if c = 0 then
begin;
Row := x;
inc(c);
Break;
end else
inc(c);
if c = 1 then
for y := 0 to 8 do
if not ((y >= SearchBoxes[i].y1) and ( y <= SearchBoxes[i].y2)) then
if Solver[row][y].possibilities[ii] > 0 then
begin;
Survived := True;
Solver[row][y].possibilities[ii] := 0;
end;
end;
if Survived = false then
begin;
Writeln('Unsolvable sudoku..');
UnSolvable := True;
Break;
end;
end;
end;
result := EnterSudoku
end;

procedure Report;
var
SpH, H,M,S: integer;
begin
ConvertTime(gettimerunning, H, M, S);
SpH := Round((Solved * 3600.0) / (GetTimeRunning / 1000.0));
Writeln('Sudoku Solver ' + inttostr(H) + 'h:' + inttostr(M) + 'm:' + inttostr(S)+'s');
Writeln('Solved: '+ inttostr(Solved)+' | SpH: ' + IntToStr(SpH));
SendSRLReport;
ReportTime := GetSystemTime + 310000;
end;

procedure ScriptTerminate;
var
i: integer;
begin
for i := 1 to 9 do
FreeBitmap(DTM[i]);
Disguise('End Sudoku');
end;

function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
while (not SudokuMenu) and LoggedIn do
Wait(100);

if not (SudokuMenu or LoggedIn) then
Exit;

MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Disguise('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
Result := true;
Exit;
end;
wait(100);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Mouse(13, 13, 13, 13, true);
wait(500);
end;
Result:= LoggedIn;
end;


function TalkToAli: boolean;
var
i, x, y, L, T: integer;
M: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Result:= ChooseOption('orris');
if(Result)then exit;
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 7887684, 75, 55, 441, 290, 20);
ATPA := SplitTPA(TPA, 20);
L := High(ATPA)
for i := 0 to L do
begin
writeln('hi');
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(250+random(150));
if IsUpText('orris') then
begin
if FindTextTPA(clBlack, 0, MCX1, MCY1, MCX2, MCY2,'nough coins', NPCChars, Nothing) then
begin
Writeln('Not enough coins in inventory.');
Report;
TerminateScript;
end;
GetMousePos(x, y);
case Random(10) of
100: begin
Mouse(x, y, 0, 0, false);
wait(25+random(25));
result := ChooseOption('orris');
end;
else begin
Mouse(x, y, 0, 0, True);
T:= GetSystemTime;
while (GetSystemTime - T) < 500 do
begin
Result:= FindColor(x, y, 255, x - 20, y - 20, x + 20, y + 20);
if(Result)then break;
end;
end;
end;
FFlag(0);
Wait(200+random(200));
if(Result)then exit;
end;
end;
end;

var
SleepTime: Integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;

begin
SetupSRL;
ClearDebug;
displaydebugimgwindow(300, 300);

writeln(' ALI RAPER!');
writeln(' by Markus');
writeln(' Modded & Improved by Narcle');
writeln(' Credits to:');
writeln(' Ray for his awesome Sudoku solver');
writeln(' King of Knives for his somehow lesser sudoku solver (sorry!)');
writeln(' n3ss3s for showin me da minigame');
writeln(' Wizzup? for mental support and reminding me of that game ;)');
Writeln('');

DeclarePlayers;
ScriptID := '1037';
LoadArrays;
ReportTime := GetSystemTime + 310000;
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;

NorthLast:= True;
MakeCompass('N');
SetAngle(False);
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];

repeat

// if xCoinAmount('inv') < 59000 then
// TerminateScript;
debug('hoi?');
if SudokuMenu then
DoSudoku;

for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(1000);
end;

if(A = 11)then
begin
if(NorthLast)then
MakeCompass('315')
else
MakeCompass('N');
NorthLast:= not NorthLast;
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(1000);
end;
end;

if A < 11 then
repeat
ClickContinue(True, False);
If FindNPCChatText('Select an Option', Nothing) Then
for Countage := ChatPhase To 2 Do
If Not FindNPCChatText(Chats[Countage], ClickLeft) Then
If Countage = 2 Then
ChatPhase := 0;
if(GetColor(54, 61) = 1319729)then
begin
DoSudoku;
break;
end;
until(not(LoggedIn));

if(not(LoggedIn))then exit;

{if TimeFromMark(SleepTime) > 30 * 60000 then
begin
SleepTime := RandomRange(3*60000, 6*60000);
Disguise('Sleeping for ' + IntToSTr(Round(SleepTime / 60000)) + ' mins.');
LogOut;
Wait(SleepTime);
MarkTime(SleepTime);
LoginPlayer;
Wait(RandomRange(58000, 62000));
MarkTime(FailTime);
end;}

if (TimeFromMark(FailTime) > 600000) then
TerminateScript;

if (GetSystemTime > ReportTime) then
Report;
until false;
end.

http://85.17.90.18/repositories/srl-opendev


This is just to get my sudoku vers and updated SRL to my laptop, as the priv message char limit is too low for sending scripts :<


Zeph: I accidentally put in pass and user first, if someone stealz I kno hu it iz!!!

Nava2

2009-08-14 18:09:38

hi


The message you have entered is too short. Please lengthen your message to at least 3 characters.

HyperSecret

2009-08-14 21:33:23

ignored ;)

Jason2gs

2009-08-15 10:22:25

not ignored.

The Claw

2009-08-15 12:26:18

How can I ignore something you just pointed my attention to??

Widget

2009-08-15 13:27:24

Subscribed to thread

Markus

2009-08-15 15:17:20

zomg its sudoku

Method

2009-08-15 18:22:19

Having some sort of website where you could paste large amounts of text that would remain private for you would really help right now.

n3ss3s

2009-08-15 18:36:29

Method, I cbf start playing games with private pastebins and shit opposed to the whole internet getting sudoku :(

Method

2009-08-15 18:43:30

I guess I won't bother mentioning any other mediums of data transfer, then.

ZephyrsFury

2009-08-15 20:36:58

From: method
i guess i won't bother mentioning any other mediums of data transfer, then.


usb?

mixster

2009-08-15 22:33:31

I am unsure as to which part of this thread I must ignore. May someone be kind enough to point me to which part I must ignore?

Method

2009-08-15 23:56:54

From: ZephyrsFury
usb?


Did you lowercase my post in your quote or was that automatically done somehow?

ZephyrsFury

2009-08-16 13:04:59

From: method
did you lowercase my post in your quote or was that automatically done somehow?


if i post in all caps it auto lowercases it including quotes apparently.

The Claw

2009-08-16 17:27:49

From: ZephyrsFury
if i post in all caps it auto lowercases it including quotes apparently.


Testing.

The Claw

2009-08-16 17:28:05

From: the claw
testing.


testing.

edit: :eek:

Method

2009-08-16 18:19:04

Well that's pretty nifty.

mixster

2009-08-16 21:03:44

Well it looks like something useful has come from this topic.
/me tips his hat towards n3s

Mr.Klean

2009-08-17 01:08:01

I LIKE CAPSLOCK. a

R0b0t1

2009-08-17 07:25:26

asfhrgjkhrjkshgkjrhgkjehiuyrit93475847jshdkjhd.pastebin.com


… Like that wouldn't work?

Yakman

2009-08-17 14:53:11

security through obscurity is fail

Nava2

2009-08-17 17:52:58

From: Yakman
security through obscurity is fail


Eh, it's usually enough to keep people from finding it for 24h

Markus

2009-09-02 13:43:44

ty, needed a working sudoku version ;) <3

mixster

2009-09-02 20:00:54

I think this topic needs to be stickied tbh.

mastaraymond

2009-09-02 21:40:35

Mail yourself, idiot

Nava2

2009-09-03 01:28:08

Click your heels and say "I wish I was in Kansas".

R0b0t1

2009-09-03 01:52:41

Dude, I did it and it worked. I'm in Kansas. Now can we get a sticky on this thread?

mixster

2009-09-03 01:54:35

I tried, but it went a bit wrong and I ended up in the Canary islands. I think it's an improvement though, so I won't make too big of a fuss.

Bobarkinator

2009-09-03 02:11:15

I'm in Kansas too!

Nava2

2009-09-03 06:56:19

OH SHI-

I'm close to Sid now.. I fear my belly button.

mixster

2009-09-03 12:17:14

I think we may need another topic with poll to get this stickied

The Claw

2009-09-03 16:43:13

And the rowers keep on rowing

Nava2

2009-09-03 16:47:19

They hit the duck again…

The Claw

2009-09-03 16:59:41

Not the duck again

Nava2

2009-09-03 17:50:02

The duck again.