[PoC] Rogue Trader Sudoku solver
Markus
2008-09-06 07:55:03
ALI RAPER!
by Markus
Modded & Improved by Narcle
Proven ways to increase profits and times etc, outside of the script: - Finish the rogue traders minigame rather than just unlocking the sudoku part (reduces talking time by a significant amount, requires Iclairins helper)
- Remove/Decrease the last wait in Mouse in Mouse.scar (also has a large effect, this script clicks alot)
Unconfirmed, requiring more studies: - Ring of Wealth (2 say yes, 2 say no)
- The quest Contact (Markus mentioned it ages ago, not sure if it does anything - he completed Itchlarins helper at the same time also, I believe?)
- The quest Hobbit mentioned around page 20, +- a few (cant be bothered checking, also reduces talking time but rumoured to decrease runes per sudoku or something?)
Credits to: Ray for his awesome Sudoku solver
King of Knives for his somehow lesser sudoku solver (sorry!)
n3ss3s for showin me da minigame
Wizzup? for mental support and reminding me of that game ;)
See Narcle's post at page 4 for the latest version! (or rather, have fun searching the entire thread for the latest, lol)
n3ss3s
2008-09-06 07:56:29
Hooray!
Wizzup?
2008-09-06 07:58:09
I'll get you a sudoku solver in C within a few weeks. I promise. ;)
Markus
2008-09-06 07:59:04
<3 you then, King of Knives' solver isn't perfect, and fails to solve approx 50% of all sudokus :(
King of Knives
2008-09-06 08:57:12
From: Markus
King of Knives' solver isn't perfect, and fails to solve approx 50% of all sudokus :(
Amen!
mastaraymond
2008-09-06 09:26:52
Here's my solver, it should be able to solve all easy sudoku's! :).
program Hoi;
var
Playground : Array of Array of byte;
Procedure LoadPlayground;
var
str: string;
i,ii : integer;
l,Handled : integer;
begin
SetLength(playground,9);
for i := 0 to 8 do
SetLength(playground[i],9);
str := '7,4,,8,,,9,,,,3,9,,4,,8,2,,5,2,,6,,,,1,4,,8,,3,,6,4,,,,,6,,1,7,,8,2,,,,5,,,,9,3,1,7,,2,8,5,,6,9,,,,1,7,4,,5,8,,5,2,,,,1,,7';
l := length(str);
Handled := 0;
for i := 1 to l do
begin;
if str[i] <> ',' then
begin;
PlayGround[handled mod 9][handled div 9] := StrToInt(Str[i]);
inc(I);
end;
inc(handled);
end;
for i := 0 to 8 do
begin;
str := '';
for ii := 0 to 8 do
begin;
if playground[ii][i] > 0 then
Str := Str + Inttostr(playground[ii][i]) + '|'
else
Str := Str + ' |';
end;
Writeln(str);
// Writeln('-------------');
end;
exit;
{ Playground[0] := [0,0,8,0,0,0,2,0,9];
Playground[1] := [0,0,1,0,0,0,0,0,8];
Playground[2] := [5,0,0,6,2,8,0,0,0];
Playground[3] := [0,0,7,0,0,2,3,5,0];
Playground[4] := [8,0,0,1,0,0,0,0,6];
Playground[5] := [0,5,4,3,0,0,1,0,0];
Playground[6] := [0,0,0,8,3,5,0,0,1];
Playground[7] := [3,0,0,0,0,0,9,0,0];
Playground[8] := [1,0,6,0,0,0,8,0,0];}
{ Playground[0] := [5,0,0,0,0,6,1,0,8];
Playground[1] := [1,0,0,9,0,0,2,0,6];
Playground[2] := [7,6,0,1,0,0,0,9,0];
Playground[3] := [0,0,0,0,0,0,0,2,4];
Playground[4] := [0,1,0,0,9,0,0,5,0];
Playground[5] := [2,4,0,0,0,0,0,0,0];
Playground[6] := [0,5,0,0,0,3,0,8,2];
Playground[7] := [4,0,7,0,0,9,0,0,1];
Playground[8] := [8,0,6,2,0,0,0,0,9]; }
{ Playground[0] := [0,0,3,7,0,1,5,6,0];
Playground[1] := [0,0,0,0,0,9,1,7,0];
Playground[2] := [0,0,0,0,0,0,0,0,8];
Playground[3] := [0,6,5,0,0,0,2,1,0];
Playground[4] := [0,0,9,4,0,0,0,0,6];
Playground[5] := [4,0,0,0,0,0,7,0,0];
Playground[6] := [0,1,0,0,0,0,0,0,0];
Playground[7] := [0,0,0,0,0,0,0,5,3];
Playground[8] := [0,3,0,0,9,8,0,2,0]; }
{ Playground[0] := [1,0,0,0,0,0,0,0,2];
Playground[1] := [0,9,0,4,0,0,0,5,0];
Playground[2] := [0,0,6,0,0,0,7,0,0];
Playground[3] := [0,5,0,9,0,3,0,0,0];
Playground[4] := [0,0,0,0,7,0,0,0,0];
Playground[5] := [0,0,0,8,5,0,0,4,0];
Playground[6] := [7,0,0,0,0,0,6,0,0];
Playground[7] := [0,3,0,0,0,9,0,8,0];
Playground[8] := [0,0,2,0,0,0,0,0,1]; }
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;
begin
ClearReport;
// Cleardebug;
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;
Writeln(str);
// Writeln('-------------');
end;
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]));
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..');
Break;
end;
end;
end;
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;
Writeln(str);
// Writeln('-------------');
end;
str := '';
for x := 0 to 8 do
for y := 0 to 8 do
str := str + inttostr(solver[x][y].number) + ',';
Writeln(str);
end.
Markus
2008-09-07 03:17:50
Love you Ray, it works perfect :D
n3ss3s
2008-09-07 05:17:23
How many mills've you made?
Edit, you named it Ali Raper afterall :p
mastaraymond
2008-09-07 07:34:52
From: Markus
Love you Ray, it works perfect :D
Really? I'm glad to hear that! :D
Now teach me howto make mills in r00nscape! :D
Markus
2008-09-07 15:13:31
Now with semi-legit mode!
Smartzkid
2008-09-07 17:52:51
Mems, right?
Smartzkid
2008-09-07 21:59:25
Darn.
n3ss3s
2008-09-08 01:20:31
Markus, I cbf to do The Feud etc on my pure, so can I some time do it on yours so I get like 1,5M from teh boxxing and you get 500k of it?
Then ->> Med BH xfer
Markus
2008-09-08 06:56:43
Can I do it first on my own main? ;)
n3ss3s
2008-09-08 07:25:18
By 'Yours' I meant any account of yours that can do it…
Markus
2008-09-08 12:28:23
if anyone could support me at Quick find code: 14-15-474-57580681 it'd be very nice :)
n3ss3s
2008-09-09 11:48:34
Ray's hack is failing! :o It gives duplicates :( Managed to solve one. I also there's something wrong with the detection since it tried to give a different rune even there was a 'preset' one.
mastaraymond
2008-09-09 12:41:09
From: n3ss3s
Ray's hack is failing! :o It gives duplicates :( Managed to solve one. I also there's something wrong with the detection since it tried to give a different rune even there was a 'preset' one.
Not my fault ;).
Markus
2008-09-09 13:14:39
My rune detection works 100% in all of my tests :garfield:
Narcle
2008-09-13 14:38:45
/me pissed his members account has 1 more day till ban is up
Markus
2008-09-13 15:10:55
posted new version, less detectable and with rule 7 proof (semi-legit) mode :)
Narcle
2008-09-20 18:44:38
Markus you should make it repeatable. The Global vars doesn't let it work right. >.>
Markus
2008-09-21 03:19:38
Ask Ray, he made the actual solver :p But will take a look at it.
Narcle
2008-09-27 22:28:12
New and Improved by me!
I got Ray to make it repeatable by making the Solver parts function variables.
I added TalkToAli and made it go through his conversation, solve the Sudoku then repeat.
I only added a "solved counter" that is show in the Disguise. Also put in SMART and stuff.
Attachment below. Be careful with it. ;)
Smartzkid
2008-09-28 00:30:56
Dang I wish I had mems now :p
Markus
2008-09-28 02:16:28
hm, I got 1 day of p2p left ;)
Lets rape :D
mastaraymond
2008-09-28 09:20:13
From: Markus
hm, I got 1 day of p2p left ;)
Lets rape :D
I think you forgot the Free the Solver array ;). Was a quite easy fix after all.
n3ss3s
2008-09-28 12:22:35
Sweet Jesus! Is it repeating now?
Nice job Narcle, and btw, what's your timezone? I don't think you're
not answering on msn just for fun lol…
Unless you're afraid of a "can I get on pl0z?" :p
Markus
2008-09-28 13:39:37
Ha! Take that Jagex! Already made 2m today, going for the one santa a week :D
the scar noob
2008-09-28 15:32:15
From: Markus
Ha! Take that Jagex! Already made 2m today, going for the one santa a week :D
you're sick:p
-Tsn.
Markus
2008-09-28 16:09:11
Seems like we all love this ;)
Bobarkinator
2008-09-28 16:14:01
From: Markus
Seems like we all love this ;)
I love when you see someone else while autoing XD
bullzeye95
2008-09-28 16:52:16
I come back and have like 10 messages from Markus and Raymond saying "omg i r c u lolz" :p
Narcle
2008-09-28 19:45:46
Ur welcome guys :p
@n3ss3s
I've been sleeping at a weird time again, so I'm missing ur msgs.
mastaraymond
2008-09-29 08:05:28
I wouldn't release the script to the mass though :).
n3ss3s
2008-09-29 08:26:57
NevaR! Or that's really up to you guys, but for now, I haven't gotten a single random while sudokuing, and if it goes even to SRL Members, we start getting them. This is the first real fast way for money that doesn't involve actual effort before that, e.g 91 RCing for the 1M / h while nature crafting.
Should definetly stay SSRL+.
Markus
2008-09-29 11:01:51
As long as one line of my code is still in there, this was, is, and will always be SSRL :)
the scar noob
2008-09-29 14:22:55
From: Markus
As long as one line of my code is still in there, this was, is, and will always be SSRL :)
Can you plz tell me what the script does? What the requirements are etc?:p
-Tsn.
n3ss3s
2008-09-29 14:44:44
a) P2P
b) The Feud -quest done
c) Talked to Ali so that you can talk to Aubury to make him do business with Ali. (Ali Morrisane of Al-Kharid, SW of Duel Arena)
d) Cash (I started with 100k, I now have… ~6m)
Markus
2008-09-29 14:46:11
(* DESCRIPTION: This script rapes Ali Morrisane's and Aubury's Sudoku *)
(* REQUIREMENTS: 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. *)
(* *)
Smartzkid
2008-09-29 20:40:19
How much do you get per sudoku?
Narcle
2008-09-29 21:43:22
From: Smartzkid
How much do you get per sudoku?
I averaged it out to like 10k gold per sudoku. 400-500k per hour
n3ss3s
2008-09-30 01:51:20
08:45 <n3ss3s> Woot!
08:45 <n3ss3s> Now I can get my master wand from the arena
08:45 <n3ss3s> OH MY FUCKING GOD!!!
08:45 <n3ss3s> NO!!!!
08:46 <n3ss3s> NOOOO!!!!
08:46 <n3ss3s> FUCKING DIPSHIT JAGEX!
08:46 <n3ss3s> "you need to have a teacher wand first"
08:46 <n3ss3s> mother fuckers
08:46 <n3ss3s> yay now I had to buy fucking 2x infinity boots
FAAAAK!!
Markus
2008-09-30 11:18:25
From: Smartzkid
How much do you get per sudoku?
Sudoku dependent, but you get around 25% of what you pay: if you pay 10k you usually have around 2,5k profit.
Btw, 20% more profit an hour if you do Wanted! and that other quest :)
n3ss3s
2008-09-30 12:00:06
Hisus! Does the conversation affect that much? Do you mean that if you do them, you'll get 45% of what you pay, or 20% of the 25%?
Markus
2008-09-30 12:02:08
From: n3ss3s
Hisus! Does the conversation affect that much? Do you mean that if you do them, you'll get 45% of what you pay, or 20% of the 25%?
Avg. time of doing a Sudoku on a char who has all quests done: 55 secs
Avg. time of doing a Sudoky with only The Feud done: 67 secs
Around 20% difference, so you can do 20% more sudoku's an hour, the 25% margin remains.
the scar noob
2008-09-30 12:14:13
K where can I buy a pin plz?:p:p
-Tsn.
n3ss3s
2008-09-30 12:18:22
If you live in NL, I think you can call yourself…
the scar noob
2008-09-30 13:35:19
From: n3ss3s
If you live in NL, I think you can call yourself…
Belgium, and it has to be by sms, not by phone which option isn't able over here.
-Tsn.
Narcle
2008-09-30 14:49:58
From: Markus
Avg. time of doing a Sudoku on a char who has all quests done: 55 secs
Avg. time of doing a Sudoky with only The Feud done: 67 secs
Around 20% difference, so you can do 20% more sudoku's an hour, the 25% margin remains.
Yeah I've been meaning to get that quest done.
Wanted is the name of quest?
Markus
2008-09-30 16:44:04
Well not sure, Contact and Icthlarin's little helper have to do with it too, me+friend did all of them at his char, but we didnt keep track of which quest caused which effect. I suggest you do all the quests, they got some nice rewards (and are necessary for RFD ;)).
Smartzkid
2008-09-30 17:21:24
My todo list:
-Buy a pin
-Do 'The Feud'
And then I can use this?
How long does it take to complete The Feud?
Narcle
2008-09-30 21:29:27
From: Smartzkid
My todo list:
-Buy a pin
-Do 'The Feud'
And then I can use this?
How long does it take to complete The Feud?
A hour? Its not hard just you have like a "to do list."
Markus
2008-10-01 05:26:32
You need 31 thieving to do The Feud, and it isn't a big quest like MM/Regicide/DT, will take an hour or so, maybe a bit more :)
Some combat skills are recommended as you need to fight/survive a bit, forgot how exactly as I didn't do the quest myself and wasn't attending.
n3ss3s
2008-10-01 07:45:19
You have to kill 2x 75lvls, won't be a problem for your char Narcle :p
Edit: Overly epic, after 2 sudoku sessions after the one I have running atm, I have 10M + :)
Markus
2008-10-02 13:59:58
Registered script ID 1037 for this, please all edit your scripts to use this :)
pwnaz0r
2008-10-04 17:26:39
WHOO! I am about to join in on this action :)
EDIT Anyone want to comfort me in the fact that Jagex won't find this and ban everysingle account that can do sudoku this fast and accurate? maybe someone who is watching amount of code that is sent during it or something?
Ruroken
2008-10-04 19:54:09
Whos selling pins? :D
n3ss3s
2008-10-05 02:51:36
EDIT Anyone want to comfort me in the fact that Jagex won't find this and ban everysingle account that can do sudoku this fast and accurate? maybe someone who is watching amount of code that is sent during it or something?
I've gotten something like a total of 13M from purely sudokuing, and even the 100k I had to get started were from autoflaxing, and not a single random during a sudokuing session…
the scar noob
2008-10-05 06:04:44
From: n3ss3s
I've gotten something like a total of 13M from purely sudokuing, and even the 100k I had to get started were from autoflaxing, and not a single random during a sudokuing session…
That, my friends, is the ultimae script;)
-Tsn.
pwnaz0r
2008-10-05 09:55:55
Have you left it on when you went somewhere?
Narcle
2008-10-05 10:11:12
Once i get my member back… was going to make it better. Make a fail safe if it fails to solve the sudoku. Maybe Markus will post this one on first page. :p
mastaraymond
2008-10-05 12:23:46
From: Narcle
Once i get my member back… was going to make it better. Make a fail safe if it fails to solve the sudoku. Maybe Markus will post this one on first page. :p
Does it fail to solve a sudoku sometimes then?
n3ss3s
2008-10-05 12:54:08
I sometimes get some runtime exception, and debug says unsolvable sudoku.
Have you left it on when you went somewhere?
I don't have to go anywhere to auto :rolleyes:
pwnaz0r
2008-10-05 13:07:50
I meant like when your not watching it :)
n3ss3s
2008-10-05 14:50:43
Yes :) Quite scary to leave like 9M for a bot to deal with, but I added FindNormalRandoms and FindFight so even I didn't get any randoms/fights, I would've not died :)
pwnaz0r
2008-10-05 15:49:53
Where did you put it at? just right after you click on him?
Markus
2008-10-05 16:02:38
Meh, I often go to Ali with 10m in my inv, and leave it running. No randoms/whatsoever :p
Ejjman
2008-10-05 17:51:55
Gah, I got it working, but the misclickage is getting annoying on smart xP
Its super fast without rule 7, I likey :P
Narcle
2008-10-06 05:37:45
I made a new version and its bad ass.
Thanks to Widget for letting me borrow his account. (since mine is on 10 day ban)
Added:- Tons of Fail safes (virtually will go forever)
- Major Fail safe (if inactive for over 10 mins will terminate script)
- Progress Report and SRL-Stats
- Status's
- Smart Signed/World
- 'DisplayDetails' Option (all those debug/report stuff Ray/Markus had)
Someone convince Markus to post it on first post. :p
mastaraymond
2008-10-06 08:17:53
From: Narcle
I made a new version and its bad ass.
Thanks to Widget for letting me borrow his account. (since mine is on 10 day ban)
Added:
- Tons of Fail safes (virtually will go forever)
- Major Fail safe (if inactive for over 10 mins will terminate script)
- Progress Report and SRL-Stats
- Status's
- Smart Signed/World
- 'DisplayDetails' Option (all those debug/report stuff Ray/Markus had)
Someone convince Markus to post it on first post. :p
I added it to the first post..
Besides, you should make it output the sudoku its trying to solve + a BMP of the begin situation.. This I "might" be able to improve the actual solving.. >.<..
Narcle
2008-10-06 09:02:27
From: mastaraymond
I added it to the first post..
Besides, you should make it output the sudoku its trying to solve + a BMP of the begin situation.. This I "might" be able to improve the actual solving.. >.<..
The Debug stays. I just made it optional. :P
pwnaz0r
2008-10-06 18:44:18
I like the new version Narcle :p
Right now im working on an equation to estimate exact profit, will get that to you for report as soon as this next load is done.
Also, it takes about 25 sudokus to use up one mill (how convenient :)). just to let you know, maybe you can estimate time left or something :).
bullzeye95
2008-10-06 18:44:30

Wonder who that is..
pwnaz0r
2008-10-06 18:57:47
HAHA I see him too. :D I go to world 100 nows.. thats my world… no one take it :)
bullzeye95
2008-10-06 19:16:29
CoinAmount is broken… it won't find 0s.
pwnaz0r
2008-10-06 19:28:21
Examine coins, amount comes up in inventory. Have to do it that way anyways to get the whole number when yo uget to 100k+
Widget
2008-10-06 22:05:39
I saw you too :p

Sudoku Solver 1h:34m:3s
Solved: 69 | SpH: 44
Took us... 44328 msecs!!!!
Took us... 39531 msecs!!!!
Took us... 36937 msecs!!!!
Took us... 42063 msecs!!!!
Successfully executed
For some reason it got really fast as it went on (52937ms for first solve), but i have 4.8M now so I won't complain :D (most money I've ever had at all.)
Boreas
2008-10-06 22:30:31
Interesting thread, maybe interesting enough for me to install windows :p
What kind of logic does it use to solve, and do you get more money if you solve it faster?
n3ss3s
2008-10-07 01:32:47
What kind of logic does it use to solve, and do you get more money if you solve it faster?
The profit is stable, a few Ks of random, but naturally profit per hour increases if you solve it faster… Although it's shit fast already…
Narcle
2008-10-07 04:24:59
From: bullzeye95
CoinAmount is broken… it won't find 0s.
Aww is it? Need a dev to fix it!
From: Widget
I saw you too :p
Sudoku Solver 1h:34m:3s
Solved: 69 | SpH: 44
Took us... 44328 msecs!!!!
Took us... 39531 msecs!!!!
Took us... 36937 msecs!!!!
Took us... 42063 msecs!!!!
Successfully executed
For some reason it got really fast as it went on (52937ms for first solve), but i have 4.8M now so I won't complain :D (most money I've ever had at all.)
Forgot to mention. Because I added Solved/Sudokus per hour I changed the timing. These "Took us… 42063 msecs!!!!" are how long it takes from the start of the sudoku to the end. It doesn't include the talking bit anymore since I added SpH.
Markus
2008-10-07 06:21:10
Coin amount works fine for me if you get the patched 0 ;)
Anyways, yet another M richter. Total bank value 55m now? :p
bullzeye95
2008-10-07 07:30:33
Oh.. where can I get that patched 0?
/fails
the scar noob
2008-10-07 07:45:22
Plz, I need a pin :p
-Tsn.
HyperSecret
2008-10-08 19:41:04
anyone get banned using this yet?
if not then i may purchase a pin and get started
bullzeye95
2008-10-08 20:11:44
I can't find the patched 0 :rolleyes:
Help, someone? :p
Ejjman
2008-10-08 23:23:06
Sudoku Solver 1h:46m:6s
Solved: 114 | SpH: 64
4585k at the beginning.
5691k at the end.
So we looking at 500k per hour decent. Muy bueno!
Markus
2008-10-09 04:21:32
And I managed to increase my main's bank value from 500k->3,5m :D D legs ftw?
Zero bans as so far from this, and as long as we keep this private I think we can use this safely for a while :)
Widget
2008-10-09 17:28:10
Sudoku Solver 3h:43m:47s
Solved: 174 | SpH: 47
Here's my edits:
Procedure LoadPlayGround;
var
X,Y,D,i: Integer;
s, ss : string;
begin
SetLength(playground, 9);
for i := 0 to 8 do
SetLength(playground[i], 9);
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.2, 0.2); //defaults
for y := 0 to 8 do
begin
//s := '';
SS := '';
for x := 0 to 8 do
begin
wait(1);
case CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0) of
0: D := 0; //Nothing
470, 471: D := 1;//Mind
412, 413: D := 2;
474, 475: D := 3;
443, 444: D := 4;
572, 573: D := 5;
558, 559: D := 6;
563, 564: D := 7;
480, 481: D := 8;
485, 486: D := 9;
else
writeln('UNKNOWN COUNT! '+inttostr(CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0)));
end;
if d > 0 then
SS := SS + lolz[d-1] + ' | '
else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
if DisplayDetails then
writeln(ss);
end;{}
end;
function EnterSudoku: boolean;
var
x, y, z, y1, x1, z1, x2, y2, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
begin
try
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
SS := SS + lolz[Solver[x][y].number-1] + ' | ';
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 FindColor(x2, y2, 65536, X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8) then
continue;
if Solver[x][y].number = z then
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;
//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;
except
Status('Sudoku Solving Failed!');
Mouse(13, 13, 13, 13, true);//Closes Sudoku Menu
Result := False;
Exit;
end;
end;
Stops most unknown count errors, and closes the sudoku instead of getting the out of range errors when it can't solve it :D
Narcle
2008-10-09 18:20:49
From: Widget
Here's my edits:
Procedure LoadPlayGround;
var
X,Y,D,i: Integer;
s, ss : string;
begin
SetLength(playground, 9);
for i := 0 to 8 do
SetLength(playground[i], 9);
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.2, 0.2); //defaults
for y := 0 to 8 do
begin
//s := '';
SS := '';
for x := 0 to 8 do
begin
wait(1);
case CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0) of
0: D := 0; //Nothing
470, 471: D := 1;//Mind
412, 413: D := 2;
474, 475: D := 3;
443, 444: D := 4;
572, 573: D := 5;
558, 559: D := 6;
563, 564: D := 7;
480, 481: D := 8;
485, 486: D := 9;
else
writeln('UNKNOWN COUNT! '+inttostr(CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0)));
end;
if d > 0 then
SS := SS + lolz[d-1] + ' | '
else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
if DisplayDetails then
writeln(ss);
end;{}
end;
function EnterSudoku: boolean;
var
x, y, z, y1, x1, z1, x2, y2, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
begin
try
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
SS := SS + lolz[Solver[x][y].number-1] + ' | ';
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 FindColor(x2, y2, 65536, X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8) then
continue;
if Solver[x][y].number = z then
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;
//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;
except
Status('Sudoku Solving Failed!');
Mouse(13, 13, 13, 13, true);//Closes Sudoku Menu
Result := False;
Exit;
end;
end;
Stops most unknown count errors, and closes the sudoku instead of getting the out of range errors when it can't solve it :D
Oh you added try except? I'll wait awhile to release a new one. :P I'll get more data on it with my account once i get it back
HyperSecret
2008-10-13 08:19:49
this seriously is awesome. Markus could you possibly break down the code for the actually solving procedure, like somewhat indepth? My head kinda boggles when I try to figure it out myself.
Markus
2008-10-13 08:25:59
Ask Ray, I didn't make the actual solver, he did :p
pwnaz0r
2008-10-13 11:42:29
i thought alot of people got banned by using this? Is this still safe and are people still using it?
n3ss3s
2008-10-13 11:54:16
i thought alot of people got banned by using this? Is this still safe and are people still using it?
Math fail, 0 < A lot.
pwnaz0r
2008-10-13 13:25:11
does that mean no one has been banned?
n3ss3s
2008-10-13 13:25:39
Yes it does :D
bullzeye95
2008-10-13 16:04:51
I fixed most of the bugs I can find, and added failsafes + improvements. Here it is:
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
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
SmartWorld = 160;//World?
Signed = true;//Signed Java?
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: Boolean;
const
XStart = 116;
YStart = 8;
XOff = 37;
YOff = 37;
//STOOOOOOF
// mind = 1
// fire = 2
// earth= 3
// law = 4
// death= 5
// body = 6
// air = 7
// chaos= 8
// water= 9
//STOOOOOOF
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
end;
Procedure LoadPlayGround;
var
X,Y,D,i: Integer;
s, ss : string;
begin
SetLength(playground, 9);
for i := 0 to 8 do
SetLength(playground[i], 9);
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.2, 0.2); //defaults
for y := 0 to 8 do
begin
//s := '';
SS := '';
for x := 0 to 8 do
begin
wait(1);
case CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0) of
0: D := 0; //Nothing
471: D := 1;//Mind
413: D := 2;
475: D := 3;
444: D := 4;
573: D := 5;
559: D := 6;
564: D := 7;
481: D := 8;
486: D := 9;
else
writeln('UNKNOWN COUNT! '+inttostr(CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0)));
end;
if d > 0 then
SS := SS + lolz[d-1] + ' | '
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 FindColor(x2, y2, 65536, X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8) 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;
procedure LoadArrays;
begin
OwnArr[1] := Point(20, 100);
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/xA4zokFUUIQK8ESVELX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COVCISz9kp9fTVsJp02ciGXk20' +
'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[7] := Point(20, 200); //air
OwnArr[8] := Point(70, 250); //chaos
DTM[8]:= BitmapFromString(30, 29, 'beNqdle1KVGEUhe1XdAHSr8B' +
'L6AYESZIpSSwxsWSwRMzMZBgmM03MtMnUzExzzI9MMx1z8qsxFR0q' +
'qNsQoZvoVw8s2LycM3McgsUwnJn32eusvfc5idN/EyeooOBULp14N' +
'pi5ufRxe2VlZ+3zbiq1v7FxsLV5+HX7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OE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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 ', 'death', ' body', ' air ', 'chaos', 'water'];
end;
function SudokuSolver: boolean;
var
EmptyStone : SuSquare;
EmptyStack : SuStack;
begin
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..');
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, 15855599, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(250+random(150));
if IsUpText('orris') then
begin
GetMousePos(x, y);
case Random(10) of
0: 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;
begin
SmartSetup('world'+inttostr(SmartWorld), true, Signed, false);
while not SmartActive do wait(100);
SetTargetDC(SmartGetDC);
SetupSRL;
ClearDebug;
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;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
Clickcontinue(true, true);//quick chat world check
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
repeat
if not LoggedIn then
LoginPlayer;
if CoinAmount('inv') < 59000 then
TerminateScript;
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
while ClickContinue(True, True) do
wait(50);
if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(300);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end;
if(GetColor(78, 114) = 1253790)then
begin
DoSudoku;
break;
end;
wait(200);
until(not(LoggedIn));
// if(not(LoggedIn))then exit;
// if (TimeFromMark(FailTime) > 600000) then
// TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
I doubt you care that I posted this, Narcle, but if you don't want me to post another version of your (/Markus/Raym0nd`'s) script, I'll remove it…
Narcle
2008-10-13 17:12:40
From: bullzeye95
I fixed most of the bugs I can find, and added failsafes + improvements. Here it is
I doubt you care that I posted this, Narcle, but if you don't want me to post another version of your (/Markus/Raym0nd`'s) script, I'll remove it…
Nah its a group project imo. You just improve the main loop with Widgets fixes?
bullzeye95
2008-10-13 20:48:38
I didn't even see Widget's fixes :p
I added a failsafe to the rune entering. It now checks if all of the squares are full after it thinks it is finished. If not, it adds them.
It now will left click on Ali 9 out of 10 times (with an added failsafe that I didn't really finish.. but it should work fine).
I totally remade the talking. It's much faster now, and has tons of failsafes in it (basically I made it so that it can start in any position, which makes it almost infailable).
I took out the "FailTime" thingy. I forgot what the variable was called, but it would always terminate the script after 10 minutes.
I made it rotate the screen a bit if it can't find Ali (if there's a player in the way of something).
I may have added other stuff, but I forgot.
Widget
2008-10-13 23:58:00
Ooh, looks nice :)
The only thing I had to change was line 953 where it checks if the sudoku screen was up, to
if(GetColor(54, 61) = 1319729)then
Maybe it depends on the world or something.
Does this one still get the out of range error occasionally?
Narcle
2008-10-14 00:31:27
From: bullzeye95
I didn't even see Widget's fixes :p
I added a failsafe to the rune entering. It now checks if all of the squares are full after it thinks it is finished. If not, it adds them.
It now will left click on Ali 9 out of 10 times (with an added failsafe that I didn't really finish.. but it should work fine).
I totally remade the talking. It's much faster now, and has tons of failsafes in it (basically I made it so that it can start in any position, which makes it almost infailable).
I took out the "FailTime" thingy. I forgot what the variable was called, but it would always terminate the script after 10 minutes.
I made it rotate the screen a bit if it can't find Ali (if there's a player in the way of something).
I may have added other stuff, but I forgot.
Ahh kk, maybe I'll get around to putting all these together so its overall faster with all the fixes from all of us.
From: Widget
Ooh, looks nice :)
The only thing I had to change was line 953 where it checks if the sudoku screen was up, to
if(GetColor(54, 61) = 1319729)then
Maybe it depends on the world or something.
Does this one still get the out of range error occasionally?
Does SudokuMenu work? Or is that what you changed?
Widget
2008-10-14 00:34:36
SudokuMenu uses TPAs, that's just a thing in the main loop
Narcle
2008-10-14 00:58:59
From: Widget
SudokuMenu uses TPAs, that's just a thing in the main loop
Yeah I know, I made it :P. Was just curious why to have a GetColor for a menu check when I already made a TPA one.
Markus
2008-10-14 05:19:15
One other cheater, ok. Two other cheaters, zomg, quickchat world is popular pl0x? :p
Boreas
2008-10-19 16:24:34
Yea that red color isn't constant, but the brown background is, so if SudokuMenu then works great.
pwnaz0r
2008-10-19 18:22:45
Has anyone fixed this yet?
Boreas
2008-10-19 23:48:55
Yea just take out smart and bitmap stuff.
n3ss3s
2008-10-20 14:28:05
From: Boreas
Yea just take out smart and bitmap stuff.
Basically, don't use SMART?
Boreas
2008-10-20 14:36:50
Exactly.
Narcle
2008-10-21 03:40:01
Okay new version everyone, and some awesome info.- Added Bullzeyes & Wigets fixes
- Did tons of adjustments myself.
- Added new SMART into it. (will explain below)
Sudoku Solver 0h:11m:14s
Solved: 11 | SpH: 59
This is how you can use SMART: (tested myself and running it now)
- Get Account at Ali
- Close all current SCARs.
- Open a fresh one with this script.
- Enter your info.
- Push play.
- When SMART pops up, immediately minimize it
That's it! Just keep SMART minimized and it'll continue. [Creds to Hyper for mentioning it]
Wizzup?
2008-10-21 03:59:34
From: Narcle
Okay new version everyone, and some awesome info.
- Added Bullzeyes & Wigets fixes
- Did tons of adjustments myself.
- Added new SMART into it. (will explain below)
This is how you can use SMART: (tested myself and running it now)
- Get Account at Ali
- Close all current SCARs.
- Open a fresh one with this script.
- Enter your info.
- Push play.
- When SMART pops up, immediately minimize it
That's it! Just keep SMART minimized and it'll continue. [Creds to Hyper for mentioning it]
You could alternatively use CopyClientToBitmap, and debug it on the DebugImage of SCAR, just draw it every 5 seconds or so? ;) (So you can actually keep track of what is happening)
HyperSecret
2008-10-21 11:02:25
From: Wizzup?
You could alternatively use CopyClientToBitmap, and debug it on the DebugImage of SCAR, just draw it every 5 seconds or so? ;) (So you can actually keep track of what is happening)
It already does that. If I am understanding you correctly. It solves the soduko at the beginning and displays the solved soduko in the DebugImage.
n3ss3s
2008-10-21 11:18:21
Alternatively, you could buy a Windows© Vista, supervise SMART using the thumbnail preview and enjoy the many other features of Windows© Aero!
Boreas
2008-10-21 11:59:24
From: HyperSecret
It already does that. If I am understanding you correctly. It solves the soduko at the beginning and displays the solved soduko in the DebugImage.
He might mean the whole client, not just the sudoku menu.
Widget
2008-10-21 15:51:52
From: n3ss3s
Alternatively, you could buy a Windows© Vista, supervise SMART using the thumbnail preview and enjoy the many other features of Windows© Aero!
Or you could use Wine. Compiz has that feature too :)
Edit: Looks like they don't render just like with Vista =\
pwnaz0r
2008-10-21 17:50:43
Vista's thumnail thing doesnt work. Doesn't update, only can see the screen that I minimized it on.
n3ss3s
2008-10-22 07:35:47
Thumbnail works excellent for me :)
HyperSecret
2008-10-22 12:39:39
From: Boreas
He might mean the whole client, not just the sudoku menu.
Oh yea I read it a little to fast the first time through. So then you could see the client up-to-date every 5 seconds.
Wizzup?
2008-10-22 13:19:08
From: HyperSecret
Oh yea I read it a little to fast the first time through. So then you could see the client up-to-date every 5 seconds.
That was the idea. :)
n3ss3s
2008-10-22 14:20:15
Mills +5 pls
Boreas
2008-10-23 13:00:31
Just finished a 9h 45m run:D
Narcle
2008-10-23 14:19:47
From: Boreas
Just finished a 9h 45m run:D
Holy crap what u start with?
pwnaz0r
2008-10-23 15:26:31
WOW. No one use this anymore, till it gets fixed.
I died, lost over 10 mill. GF jagex.. thats it for me boys…
Narcle
2008-10-23 15:32:54
From: pwnaz0r
WOW. No one use this anymore, till it gets fixed.
I died, lost over 10 mill. GF jagex.. thats it for me boys…
I always wear a ring of life.
Boreas
2008-10-23 15:59:57
Started with 13-15 mil, about 85 secs each. Thanks for ROL tip.
The 9 hour run was fine. However the other day I was stuck at the graphics settings screen (in game) to the north, next to a camel, for 2 hours. Maybe a TimeSinceLastWin>3min would be in order?
Markus
2008-10-23 16:00:48
I often go there with 30m, and no problems for me =/
pwnaz0r
2008-10-23 19:32:53
Well, yeah I mean, I'm not lying to you. You guys will loose it all too if you don't watch it :\. They put randoms in there so yeah I would watch out for that.
Widget
2008-10-23 20:29:42
Ok, now I'm jealous again. One of you guys should sell me a PIN or something ;) (I don't really care if you need my pass for paypal or anything :)) I could give like 3m though I doubt it's that much since all of you have 20m now from this :D
Bobarkinator
2008-10-23 20:54:59
From: Widget
Ok, now I'm jealous again. One of you guys should sell me a PIN or something ;) (I don't really care if you need my pass for paypal or anything :)) I could give like 3m though I doubt it's that much since all of you have 20m now from this :D
I'm getting slightly jealous also ^^
Narcle
2008-10-24 00:17:12
Well I'd do it more right now but I can't fucking sell my Blood runes. :( I'm stuck with 9k atm, bloody GE market.
Boreas
2008-10-24 00:26:22
Me too, just wait it out.
Whatever you guys do, never ever sell below market price!
Markus
2008-10-24 06:38:57
I ALWAYS sell at lowest, prices are exploding anyways, and they are determined by the buyers..
n3ss3s
2008-10-25 03:56:18
Yes, we are a quite small factor anyways, we merely balance it… As long as there aren't long downward lines in the graphs or like -10gp price drops, we'll done just fine :)
bullzeye95
2008-10-25 10:28:39
Boreas
2008-10-25 11:06:00
Considering the amount of people that craft bloods, we are a fairly big factor. Selling below market price will force others to sell even lower. So at minimum, sell at market price and let the legits do the rest.
HyperSecret
2008-10-25 14:21:57
I have noticed since the PvP 'spike' ALL rune prices have dropped around 20-40 gp.
Boreas : Just wondering, that account you ran the 9 hr on has it by chance got banned. I ran a 8 hr with 13M and 2 day later, I got banned. I don't think it was from this script since I used it for only 2 days before getting banned. Only a 10 day.
Boreas
2008-10-25 18:53:33
Nope, running right now actually. I agree with the 2 day thing. I've never had a ban, but from what I've heard its usually a while after doing the deed.
Although the lack of randoms is a relief, I am somewhat worried about this script. Simply because if one of us gets banned for it (or for something else and jagex goes and looks at past activities and notices the sudokuing) it would be very easy to get to the rest of us. How many people play rougue trader? How many out of those make this much money? How many of of those enter the answers by rune type, and not in the order that the answers were figured out? Just us.
Markus
2008-10-26 03:24:12
Well, a few people play it, but if they do, they usually do small sudoku. Big one takes a loooong time :) Used to do it with an IRL friend that's why.
Oh well, 0 care. We are small. Only 20 people. There are like 10k macroers maybe, so chances that Jagex (and not the computer) notices us is small.
And if they do, don't think they gonna autoflag us for solving a sudoku, if they do, just abuse it one hour a day, then play tons legit so you get unflagged :D
The Claw
2008-10-26 04:54:51
Maybe
this should be integrated?
Markus
2008-10-26 06:04:15
Yes, we should add random logging in/out, but my last attempt at it (AlchMagician) failed somehow -.-
Narcle, do it :D The script is your baby now:)
YoHoJo
2008-10-26 16:29:26
I highly agree with boreas that we should make it solve more human like, something as in not number by number and maybe do a 3X3 box at a time, or just fill in answers in random boxes, because i dont think anyone solves sudokus by number.
And yea hello its me, yohojo what a suprise.
Great script and solver, neat stuff :]
Wizzup?
2008-10-26 16:32:21
From: YoHoJo
I highly agree with boreas that we should make it solve more human like, something as in not number by number and maybe do a 3X3 box at a time, or just fill in answers in random boxes, because i dont think anyone solves sudokus by number.
And yea hello its me, yohojo what a suprise.
Great script and solver, neat stuff :]
Why not just adept Ray's solver to return an array of indices? That should not be too hard… :)
YoHoJo
2008-10-26 17:01:12
I know theres ways to do it, i was just agreeing with Boreas that it should be done is all.
Narcle
2008-10-26 17:06:48
From: Markus
Yes, we should add random logging in/out, but my last attempt at it (AlchMagician) failed somehow -.-
Narcle, do it :D The script is your baby now:)
Yeah was going to add anti randoms, mainly a good new FindFight. The sleeping/breaking just needs to be thrown in if people want to have it.
I'll leave the sudoku solving to the rest atm. Want to get other projects finshed.
Markus
2008-10-26 17:27:24
There's a reason it doesn't solve it humanlike, and that is because it would be 5 times as slow.
AND, there areonly around five pre-defined sudoku patterns, you might just learn them by heart ;)
Boreas
2008-10-26 18:47:07
From: Markus
There's a reason it doesn't solve it humanlike, and that is because it would be 5 times as slow.
AND, there areonly around five pre-defined sudoku patterns, you might just learn them by heart ;)
Hehe sounds like you got your appeal already written :p
HyperSecret
2008-10-26 19:56:54
Tomorrow I am going to work on a break/sleep handler for this script. Anyone got any intervals they think should be include?
Ex. take a 'sleep' 4+ hours every 5 hours or 200 +random( -20, 20) sodukos. or take a 'break' 4-15 minutes every 1-2 hours, or every 90 sodukos +- 10.
or something along those lines?
Narcle
2008-10-26 19:58:25
From: HyperSecret
Tomorrow I am going to work on a break/sleep handler for this script. Anyone got any intervals they think should be include?
Ex. take a 'sleep' 4+ hours every 5 hours or 200 +random( -20, 20) sodukos. or take a 'break' 4-15 minutes every 1-2 hours, or every 90 sodukos +- 10.
or something along those lines?
I like my handlers ^.^ but idk what should be set for this script.
Boreas
2008-10-26 20:16:07
Yesterday I had another stuck at graphics screen. I did a long quest after that. Today I came home to a 10 ban (first ban on any account ever!). I don't know whether because its not solving the puzzle humanly, or because of general script detectability, or maybe someone reported me, or maybe just the gp/hr.
pwnaz0r
2008-10-26 21:38:32
EDIT: Ha, the first time I posted the attach, it had my user and pass, but I don't think anyone dl-ed and I don't think anyone would steal that anyway.
Here you go:
Added:
- Sleep Handling
- Antirandoms - FindDeath and FindFight only
- Antiban
- Tells you if you have items to pickup in GE.
mastaraymond
2008-10-27 11:25:55
Well, once Jagex noticed it it's really easy to pick out the cheaters.. But really, soduku solving like this is easy, even for a "normal" human..
HyperSecret
2008-10-27 11:32:14
I think we need to just have it choose different runes accordingly. Not fill in every law, then every blood, etc… have it do 2 laws, then 3 minds, then 1 blood, etc…
I believe that is what people are trying to say right?
n3ss3s
2008-10-27 12:54:37
10 Day ban :( Although I don't know whether it's about this or not, I've done some shitty auto alching too :)
Moi account has 1x Offensive language and 2x Macroing, but still the blackmarks aren't told, it's in green zone :p
Boreas
2008-10-27 13:29:43
Other than testing GE FindClerk, this was the only autoing I did, so I'm pretty sure 3 10days aren't a coincidence.
mastaraymond
2008-10-27 16:29:46
Nah I'm pretty sure this script is banning people, have heard several bans so far, all related to this script.
I'm not sure, but you can choose to randomly fill in the sudoku, or do it by square.. But if I would do it myself, I would mostly do all the runes separate.. 1,2,3,4,5,6,7,8,9 then go back and check for unfinished tiles\boxes
Narcle
2008-10-27 16:51:47
I've been fighting and not running this. We should probably make this more human the way Hyper mentioned before we continue. >.>
Markus
2008-10-27 17:17:03
Or just auto a tiny bit :) One or two hours a day should be fine, when you play legit too.
Smartzkid
2008-10-27 18:48:53
I'd do what Ray said..
Start at 0 and fill in through 9 randomly skipping, then fill in the blanks; can't be hard to do, and definitely worth it…
Narcle
2008-10-27 18:55:05
From: Smartzkid
I'd do what Ray said..
Start at 0 and fill in through 9 randomly skipping, then fill in the blanks; can't be hard to do, and definitely worth it…
Except Ray made it, and reverse Engineering to figure it out sucks. Especially in this case.
edit:
Wait Ray, do u have it read from the debug box?
pwnaz0r
2008-10-27 19:49:20
From: Narcle
I've been fighting and not running this. We should probably make this more human the way Hyper mentioned before we continue. >.>
I did everything except changed the pattern that it puts the runes in
Narcle
2008-10-27 20:46:11
From: pwnaz0r
I did everything except changed the pattern that it puts the runes in
Kk, I haven't looked yet. Been updating other scripts and work stuff. I'll get to it at some point though. ^,^
HyperSecret
2008-10-28 01:23:21
Ray, Can you breakdown/comment out how the entering sudoku function actually works and enters in the sudoku. I thought I had it figured out how to randomize the shit in their but it didn't work.
Else if it is some other function that would have to be edited to enter in the sudoku randomly. Instead of rune type by rune type.
Thanks a lot if you do this!
n3ss3s
2008-10-28 02:12:05
Maybe you could make a new type, TBlock or something, that has everything needed to click the rune from the menu and then put it to it's place in the sudoku. Then make all the sudoku answers be an array of TBlock and do something like what DropAll does :)
Jesus christ,

And the thread is even closed >.>
Boreas
2008-10-28 10:45:07
Why randomly? If you want to make it make it human, do it as each one is figured out.
Here's a basic one that does it in that style, lines 70-75
program New;
const
Bx1y1Cx1=21;
Bx1y1Cy1=25;
Bx2y2Cx1=75;
Bx2y2Cy1=79;
type XYZ= record
X,Y,Z:integer;
end;
var answers: array of array of array of integer;
Solved :array of XYZ;
SolvedAL:integer;
started:integer;
function GetNumber(x,y:integer):integer;
var color:integer;
begin
color:=Getcolor(
Bx1y1Cx1+((x)*(Bx2y2Cx1-Bx1y1Cx1)+((Bx2y2Cx1-Bx1y1Cx1)/2)),
Bx1y1Cy1+((y)*(Bx2y2Cy1-Bx1y1Cy1)+((Bx2y2Cy1-Bx1y1Cy1)/2)));
case color of
16777215,12632256: result:=9;
255: result:=0;
65535: result:=1;
65280: result:=2;
16776960: result:=3;
16711680: result:=4;
16711935: result:=5;
8454143: result:=6;
8453888: result:=7;
16777088: result:=8;
end;
end;
procedure EnterSquare(X,Y,Num:integer);
begin
clickmouse(-43,65,true);
wait(200);
clickmouse(600,Bx1y1Cy1+((Num)*(Bx2y2Cy1-Bx1y1Cy1)+((Bx2y2Cy1-Bx1y1Cy1)/2)),true);
wait(200);
clickmouse(
Bx1y1Cx1+((x)*(Bx2y2Cx1-Bx1y1Cx1)+((Bx2y2Cx1-Bx1y1Cx1)/2)),
Bx1y1Cy1+((y)*(Bx2y2Cy1-Bx1y1Cy1)+((Bx2y2Cy1-Bx1y1Cy1)/2)),
true);
wait(200)
writeln(inttostr(SolvedAL)+' solved '+inttostr(x)+','+inttostr(y)+' '+inttostr(num));
end;
procedure RemoveNumber(X,Y,Number:integer);
var tmpint,counter,iter:integer;
begin
for iter:=0 to SolvedAL-1 do
if (Solved[iter].x=X)and (Solved[iter].y=Y) then
exit;
for iter:=0 to 8 do
begin
if iter=Number then
answers[X][Y][iter]:=9;
if answers[X][Y][iter]<>9 then
begin
counter:=counter+1;
tmpint:=answers[X][Y][iter];
end;
end;
if counter= 1 then
begin
Inc(SolvedAL)
SetArrayLength(Solved,SolvedAL);
Solved[SolvedAL-1].X:=X;
Solved[SolvedAL-1].Y:=Y;
Solved[SolvedAL-1].Z:=tmpint;
if SolvedAL>started then
EnterSquare(X,Y,tmpint);
end;
end;
procedure InitArray;
var iter,iter2,iter3,num:integer;
begin
SetArrayLength(answers, 9);
for iter:=0 to 8 do
begin
SetArrayLength(answers[iter],9);
for iter2:= 0 to 8 do
begin
num:=GetNumber(iter,iter2);
SetArrayLength(answers[iter][iter2],9);
for iter3:= 0 to 8 do
answers[iter][iter2][iter3]:=iter3;
if num<9 then
begin
started:=started+1;
for iter3:= 0 to 8 do
if iter3<>num then
RemoveNumber(iter,iter2,iter3);
end;
end;
end;
end;
procedure Solve(Square:integer);
var num,x,y,tmpx,tmpy,tmpnum,iter,iter2,tmpx2,tmpy2,counter:integer;
begin
x:=Solved[Square].x
y:=Solved[Square].y
num:=Solved[Square].z
for iter:= 0 to 8 do
begin
if iter<>X then
RemoveNumber(iter,Y,num);
end;
for iter:= 0 to 8 do
begin
if iter<>Y then
RemoveNumber(X,iter,num);
end;
for iter:=0 to 2 do
begin
for iter2:=0 to 2 do
begin
tmpx:=trunc(x/3.0)*3+iter;
tmpy:=trunc(y/3.0)*3+iter2;
if (tmpx<>x) and (tmpx<>y) then
RemoveNumber(tmpx,tmpy,num);
end;
end;
for tmpnum:=0 to 8 do
begin
counter:=0;
for iter:= 0 to 8 do
begin
if InIntArray(answers[X][iter],tmpnum)then
begin
counter:=counter+1;
iter2:=iter;
end;
end;
if counter= 1 then
begin
for iter:= 0 to 8 do
if tmpnum<>iter then
RemoveNumber(X,iter2,iter);
end;
counter:=0;
for iter:= 0 to 8 do
begin
if InIntArray(answers[iter][Y],tmpnum)then
begin
counter:=counter+1;
iter2:=iter;
end;
end;
if counter= 1 then
begin
for iter:= 0 to 8 do
if tmpnum<>iter then
RemoveNumber(iter2,Y,iter);
end;
counter:=0;
for iter:=0 to 2 do
begin
for iter2:=0 to 2 do
begin
tmpx:=trunc(x/3.0)*3+iter;
tmpy:=trunc(y/3.0)*3+iter2;
if InIntArray(answers[tmpx][tmpy],tmpnum)then
begin
counter:=counter+1;
tmpx2:=tmpx;
tmpy2:=tmpy;
end;
end;
end;
if counter=1 then
begin
for iter:= 0 to 8 do
if tmpnum<>iter then
RemoveNumber(tmpx2,tmpy2,iter);
end;
end;
end;
var t,count,count2:integer;
begin
t:=getsystemtime;
InitArray;
repeat
count:=0;
repeat
Solve(count);
count:=count+1;
until (isfkeydown(12)) or (SolvedAL=81) or (count=SolvedAL);
count2:=count2+1;
writeln(inttostr(count2));
until (isfkeydown(12)) or (SolvedAL=81);
writeln(inttostr(getsystemtime-t));
end.
HyperSecret
2008-10-31 14:56:13
Anyone by chance have an account I could use to test this on? I believe I got it to enter the runes in the sudoku in the order it solves the answers…I need to test though. Thanks in advance! MSN or pm will be fine.
HyperSecret
2008-11-03 15:19:15
Sorry bout double post.
So does the amount that we purchase the runes from Ali correspond with the prices on the GE, or do we always pay around the same price to Ali no matter the price of the runes on the GE.
Ex: A rune was 300gp/ea and we would buy them for 200gp/ea. Now the rune is only worth 260gp/ea does the price you buy from Ali still 200gp/ea or did that low to 180gp or even 160gp each?
BTW for anyone who cares, I got the solver to enter in the runes when the script knows where to put the rune. Definitely more human like now. I've also added a random 1.5 - 8 second wait between moving the mouse to the rune and putting the rune in the spot. So on average the puzzle takes about 4 Min to solve now. At a rate of about 12-14/hr. (working on it a little more so a user can input the time it will take to solve a puzzle).
Markus
2008-11-03 16:19:58
We always pay the same price to Ali :)
And 12-14 an hour, that's like 120k cash, not worth it :(
YoHoJo
2008-11-16 18:35:19
When talking to ali and i get to the
"Select Option" where it should click "Try opening a large casket of runes" it freezes for me, so i click the option for the script. And iv treida bout 7 times, but i keep getting
Unsolvable sudoku..
Failed to Solve :(
Also if it helps at all, the "UNKNOWN COUNTs!" i keep getting are:
UNKNOWN COUNT! 518
UNKNOWN COUNT! 477
HyperSecret
2008-11-16 18:51:21
I've been getting a few more "Failed To Solve"s also in the past couple hours…
The Claw
2008-11-16 18:59:51
So would you say this is safe to run for a few hours a day?
Markus
2008-11-17 06:55:29
I got a maze while sudokuing because the script glitched a bit =/. Use with caution is my advice.
The unknown counts may be caused by uptext blocking the runes, be sure that there isn't any chat in the bottom few lines.
Narcle
2008-11-17 06:56:40
From: YoHoJo
When talking to ali and i get to the
"Select Option" where it should click "Try opening a large casket of runes" it freezes for me, so i click the option for the script. And iv treida bout 7 times, but i keep getting
Unsolvable sudoku..
Failed to Solve :(
Also if it helps at all, the "UNKNOWN COUNTs!" i keep getting are:
UNKNOWN COUNT! 518
UNKNOWN COUNT! 477
I'm guessing a Bitmap may of been changed slightly (just a guess).
Since the Solver is Brute force I think the only reason it fails is it reads the Sudoku wrong. Also I noticed Ray reads the Debug image to solve it, I think.
In any case I want to get back on fixing this up, hopefully I'll have time later this month.
mastaraymond
2008-11-17 09:14:26
From: Narcle
I'm guessing a Bitmap may of been changed slightly (just a guess).
Since the Solver is Brute force I think the only reason it fails is it reads the Sudoku wrong. Also I noticed Ray reads the Debug image to solve it, I think.
In any case I want to get back on fixing this up, hopefully I'll have time later this month.
It doesn't bruteforce!!!
Bruteforcing a sudoku in scar would take minutes, if not hours.. The solver just reads from the "playground" variable.. Nothing more.
Narcle
2008-11-17 09:21:46
From: mastaraymond
It doesn't bruteforce!!!
Bruteforcing a sudoku in scar would take minutes, if not hours.. The solver just reads from the "playground" variable.. Nothing more.
oops my bad :p
HyperSecret
2008-11-17 10:28:09
From: Narcle
Also I noticed Ray reads the Debug image to solve it, I think.
My version does all the solving and entering then displays the Debug image. So it doesn't read off of that (ray already stated it reads off the 'playground').
YoHoJo
2008-11-17 18:15:11
Yes fianlly after being so inactive and noobish ive helped!
I ran a test, and its have trouble with BODY and CHAOS runes.
I added some code here to it would tell me which coordinates its having trouble at:
begin
writeln('UNKNOWN COUNT! '+inttostr(CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0)));
Writeln(IntToStr(x*xoff+xstart+4))
Writeln(IntToStr(y*yoff+ystart+4))
Writeln(IntToStr(x*xoff+xstart+xoff-5) )
Writeln(IntToStr(y*yoff+yoff+ystart-5) )
end;
Then i just look at those coordinates and they were all of the BODY and CHAOS runes in the sudoku game, so i think those bitmaps (or whatever is used) need to be fixed.
Hoorah!
HyperSecret
2008-11-17 18:20:42
It then doesn't show the debug image of the solved sudoku then, right?
YoHoJo
2008-11-17 18:23:31
Ive ran a second test, and im just about 100% sure its screwing up (for me at least) for CHAOS and BODY runes only based on my tests. And Hypersecret, on the scripts i use from this thread, i get no debug image, but from the one you PMed me it does make a debug image, but its an incorrect solution.
So just replace these bitmaps:
dtm[6]:= BitmapFromString(30, 29, 'beNqdlVtLVGEYhe2qXyBddCP' +
DTM[8]:= BitmapFromString(30, 29, 'beNqdle1KVGEUhe1XdAHSr8B' +
and it should work again :]!
Edit:
Ok Widget is telling me the bitmaps are for something else, and i just need to add the "Unknown Count" Numbers in at the LoadPlayGround procedure, im trying it.
(Kinda just talking to myself here…)
OMGFor reasons im too ashamed to say, i got it working, it works without edits, everythigs's fine. I just have to say that i havent autoed in a REALLY LONG TIME leave me alone! :( .
Everything's working great.
Great script. It works!
Edit:
Suggestion: Lets have both the humanlike solving procedure and the fast solving procedure in the script, and have an option so that ever 1/4 sudokus it will solve fast. I would like that. :]
n3ss3s
2008-11-18 14:10:48
From: YoHoJo
Ive ran a second test, and im just about 100% sure its screwing up (for me at least) for CHAOS and BODY runes only based on my tests. And Hypersecret, on the scripts i use from this thread, i get no debug image, but from the one you PMed me it does make a debug image, but its an incorrect solution.
So just replace these bitmaps:
dtm[6]:= BitmapFromString(30, 29, 'beNqdlVtLVGEYhe2qXyBddCP' +
DTM[8]:= BitmapFromString(30, 29, 'beNqdle1KVGEUhe1XdAHSr8B' +
and it should work again :]!
Edit:
Ok Widget is telling me the bitmaps are for something else, and i just need to add the "Unknown Count" Numbers in at the LoadPlayGround procedure, im trying it.
(Kinda just talking to myself here…)
OMG
For reasons im too ashamed to say, i got it working, it works without edits, everythigs's fine. I just have to say that i havent autoed in a REALLY LONG TIME leave me alone! :( .
Everything's working great.
Great script. It works!
Edit:
Suggestion: Lets have both the humanlike solving procedure and the fast solving procedure in the script, and have an option so that ever 1/4 sudokus it will solve fast. I would like that. :]
SRL 3.81 pls? :D
pwnaz0r
2008-12-13 00:11:45
does this still work?
Method
2008-12-13 00:49:42
Yes.
Markus
2008-12-13 04:11:05
Still works fine afaik!
pwnaz0r
2008-12-14 16:27:58
does anyone still use it? And are the profits still as good?
Jason2gs
2008-12-14 16:35:45
I still use it, pwnaz0r. In a couple of hours worth of using it, I've made roughly 570k from it. I think that's good.
If it's worth anything, I'm using Derek's version of the script, which takes quite a bit more time on filling in the board then the version on this thread does, but does it in a more human-like manner.
Edit: Bloods still take forever to sell.
n3ss3s
2008-12-16 14:15:52
Bloods usually sell overnight, although within a few days I managed to stock up to 20k bloods :p Ban lifted today (Gained 8M, banned for 10 days, I call that a good deal :D), but now I'm f2p on that char and training range pure :)
The Claw
2008-12-18 01:28:01
Running now. :)
Jason2gs
2008-12-19 22:46:17
R0b0t1 and I were on the IRC, and I mentioned to him that 6M in rendered about 1.1M profit. That's when he told me that only 3M in turned about 1M profit for him.
Then I asked him if he did the Icthlarin's Little Helper quest, and he said yes.
Does this quest also increase the payout, by any chance?
I'm gonna finish it, and test this theory out.
The Claw
2008-12-19 23:07:54
I havent done Icthlarin's Little Helper, and yesterday I started with 3.3m and ended with 4m, so 700k profit, which is a profit of ~20%. Your profit of 1.1m from 6m is about 18%, so pretty close to 20. Whereas robot's profits are at 33%. So there does seem to be a slight difference, although he could of just had a lucky run…we need more data, lol
HyperSecret
2008-12-20 14:26:02
There is a quest, I don't know which one, maybe that one (ask markus) that cuts down the talking time for ali to making it be able to have a higher sph rate.
The Claw
2008-12-24 02:38:47
I'm guessing its to do with completing the rogue's trader minigame so he stops whinging each time you talk to him rather than completing a quest. Although you do have to do ichthalisrins helper or w/e to complete rogues traders, and a bunch of other stuff too.
This is now my second favourite script <3
Edit - Why does it click on a rune before clicking "open chest" after solving? That could be a clear indicator to jagex who is using this script, as it does it all the time.
HyperSecret
2008-12-24 09:24:17
Talk to me on msn later today. I know where that fix is, Jason asked me the same thing. At work right now and will be until 2. (8 hours from this post)
n3ss3s
2008-12-24 16:44:15
Won't sudoku for a week or so anyway, but a posted fix will be appreciated…
HyperSecret
2008-12-24 17:29:30
I will work on this, and post my version whoever wants to use it.
YoHoJo
2008-12-25 04:31:23
Accidentally ran it with 13M, was just gonna run for a few hours, but i feel asleep and it used all of my13M, no proggie because i got some error and scar closed, but i profited appx 2-3M in one night! :] (I increased mouse speed a bit too :p)
the scar noob
2008-12-25 13:36:16
Is there anyone who can sell me a pin?
I desperatly need one, but I don't want to spend rl money..
-Tsn.
Lee Lok Hin
2008-12-29 07:35:29

Failed To Solve.
Well, I'm adding a function to close the soduku if it doesn't work.
EDIT: I just skimmed over the script, I think this is an one time thing; Well, great script, working great for me.
mastaraymond
2008-12-29 07:45:13
No need to black-out pictures in SSRL section, leelokhin ^^
Lee Lok Hin
2009-01-03 19:27:50
//Took us… 41328 msecs!!!!
Took us… 43516 msecs!!!!
Took us… 40531 msecs!!!!
Took us… 39453 msecs!!!!
Took us… 40156 msecs!!!!
Took us… 39437 msecs!!!!
Sudoku Solver 0h:45m:57s
Solved: 48 | SpH: 63
Took us… 40672 msecs!!!!
Took us… 41218 msecs!!!!
Took us… 36703 msecs!!!!
Took us… 38609 msecs!!!!
Took us… 41062 msecs!!!!
Sudoku Solver 0h:45m:17s
Solved: 44 | SpH: 58
Socket Error # 11004
Took us… 43547 msecs!!!!
Sudoku Solver 0h:28m:31s
Solved: 29 | SpH: 61
Took us… 29000 msecs!!!!
Sudoku Solver 0h:46m:19s
Solved: 49 | SpH: 63
Sudoku Solver 0h:35m:28s
Solved: 39 | SpH: 66
Sudoku Solver 1h:13m:46s
Solved: 80 | SpH: 65
Socket Error # 11004
Took us… 39953 msecs!!!!
Sudoku Solver 1h:21m:34s
Solved: 81 | SpH: 60
Socket Error # 11004
The message you have entered is too short. Please lengthen your message to at least 1 characters.
EDIT: Small thing, but it occasionally unknown count spams the dbug box, then gives a runtime error at line 308. I thought a simple try and except would be able to catch this, but Is it just because of me using SMART?
Method
2009-01-03 19:39:01
Sudoku Solver 1h:15m:38s
Solved: 77 | SpH: 61
Took us… 42641 msecs!!!!
Took us… 46218 msecs!!!!
Took us… 46187 msecs!!!!
Successfully executed
Excellent work! :)
Widget
2009-01-03 19:48:39
The Claw
2009-01-03 22:00:45
From: The Claw
I'm guessing its to do with completing the rogue's trader minigame so he stops whinging each time you talk to him rather than completing a quest. Although you do have to do ichthalisrins helper or w/e to complete rogues traders, and a bunch of other stuff too.
This is now my second favourite script <3
Edit - Why does it click on a rune before clicking "open chest" after solving? That could be a clear indicator to jagex who is using this script, as it does it all the time.
Confirmed - you just have to complete the minigame to get the faster dialogue although to do that you must have completed Ictlarin's Helper and The Fued.
Still waiting for a fix to that bug. :)
And wtf, how do you guy get it solved in like 40 seconds….takes 70-80 for me, and I doubt its a hardware problem as I've just upgraded to an E7300, 4gb ram and a 9800 GT (:D)
Method
2009-01-03 23:51:52
From: The Claw
Confirmed - you just have to complete the minigame to get the faster dialogue although to do that you must have completed Ictlarin's Helper and The Fued.
Still waiting for a fix to that bug. :)
And wtf, how do you guy get it solved in like 40 seconds….takes 70-80 for me, and I doubt its a hardware problem as I've just upgraded to an E7300, 4gb ram and a 9800 GT (:D)
Perhaps your mouse speed is a lot slower than ours? It seems to dart around the screen for me. Other than that, I can't really see why yours might be slower.
Markus
2009-01-04 04:56:04
the scar noob
2009-01-04 09:08:57
I BADLY need member pin:(
-Tsn.
Markus
2009-01-04 10:15:58
From: the scar noob
I BADLY need member pin:(
-Tsn.
If you can get a firecape for me I'll give you one lol.
mastaraymond
2009-01-04 10:17:25
From: the scar noob
I BADLY need member pin:(
-Tsn.
Work for money, lazy bastard :D
the scar noob
2009-01-04 11:49:53
From: mastaraymond
Work for money, lazy bastard :D
mastaraymond mastaraymond is offline
SRL Developer /
Lazy Mod
-Tsn.
Lee Lok Hin
2009-01-05 03:32:35
TSN-
Go on IRC and talk to Zytex. He sold one to me, n3, and Widget.
Bobarkinator
2009-01-05 08:40:59
Lee Lok Hin: How much?
Lee Lok Hin
2009-01-06 03:26:23
2m
Which is roughly 40 dragonstones. He does it the dragonstone method. Pm Zytex if you don't know it.
It requires members though. He probably will go first if you don't have members, but. Well.
n3ss3s
2009-01-06 08:26:06
IMPORTANT NOTE
While DStone xfering, make sure you xfer only the needed amount of dstones, otherwise you lose money and have to xfer back. So e.g, if you need to xfer 40, don't xfer 2x 27.
Lee Lok Hin
2009-01-06 08:27:28
And sell to the shop one by one :p. You get more tokkuls that way.
HyperSecret
2009-01-06 21:22:16
Dragonstone takes FOREVER now. They patched it to where you can only buy one every 15 minutes or whatever…
n3ss3s
2009-01-07 01:18:52
Dragonstone takes FOREVER now. They patched it to where you can only buy one every 15 minutes or whatever…
No they didn't, sugar.
Unless you talk about something that happened within last… 14h? Yesterday I was xfering, I first was able to get like a few stones before the limit, then it few stones before the limit, and then 50 stones :D
Widget
2009-01-07 08:55:27
From what I noticed, you have to always buy them all at once. Use Buy-50 if you're buying 8 instead of trying to Buy-1 at a time to see if you can still get them. I was able to transfer about 30 this way instead of 10 on the first try
the scar noob
2009-01-07 12:54:09
From: Lee Lok Hin
TSN-
Go on IRC and talk to Zytex. He sold one to me, n3, and Widget.
thx for the info but i'm not a member:(
he can could give me pin forst, than i could give him what he needs (that 2 m).
I'd not scam him, though :)
-Tsn.
Lee Lok Hin
2009-01-08 00:57:42
Well, he trusted Widget, so he should probably trust you :p
the scar noob
2009-01-09 15:19:28
From: Lee Lok Hin
Well, he trusted Widget, so he should probably trust you :p
Cool ^^
I'll contact him, if Markus can do that dragon stone transfer rofl I don't know anything of it ;D
-Tsn.
Lee Lok Hin
2009-01-09 23:35:01
Anyone can do it. There's absolutely no risk involved. :p.
Get on IRC Moar, Zytex is usually on.
the scar noob
2009-01-10 10:07:25
From: Lee Lok Hin
Anyone can do it. There's absolutely no risk involved. :p.
Get on IRC Moar, Zytex is usually on.
IRC Moar?? :s
-Tsn.
Widget
2009-01-10 12:46:59
Markus
2009-01-10 15:01:54
Lee Lok Hin
2009-01-11 02:27:57
Anyways, In order to remove most of Widget's and my uptext errors, I just turned public and private chat off. That removed most of the isuptext blocking the runes.
The Claw
2009-01-22 03:49:42
Does this still work for you guys? When I run it, "Unknown count! (numbers) " is spammed into the debug box, then it says it couldnt solve and logs out
Markus
2009-01-22 11:20:49
Worked fine for me monday.
Lee Lok Hin
2009-01-22 11:22:19
Try turning public and private chat off.
Narcle
2009-01-22 20:37:42
Who has newest version? I haven't seen it so I was curious.
The Claw
2009-01-23 00:20:09
Nvm, I think messing with one of the color settings on my new monitor screwed it up, cause it works fine on my laptop
Lee Lok Hin
2009-02-06 23:32:57
After hearing Markus saying that profits seem to have dropped, I dug out my GiveGE function from the cowwebs and mixed up a quick script to find out the Price, Percentage change of each rune.
It also calculates the weighted average of the percentage changes. Personally, I think I did something in the math, so just ignore the scary -30% there.
Fixed the scary -30% now. It's just -0.3% :p
|============================================================|
|Rune Status Grabber by: Lee Lok Hin |
|Date: February 7th, 2009 |
|Price Rune 7Day% 30Day% 7Status 30Status |
|355 Soul rune -6.0% -4.0% Drop Drop |
|144 Cosmic rune -8.2% +0% Drop Stay |
|232 Nature rune -1.6% +1.3% Drop Rise |
|275 Blood rune +0% +0% Stay Stay |
|287 Law rune -3.0% +0% Drop Stay |
|10 Body rune +0% +0% Stay Stay |
|10 Mind rune +0% +11.1% Stay Rise |
|136 Chaos rune +0% +13.3% Stay Rise |
|257 Death rune -1.1% -6.8% Drop Drop |
|Mean %age Change: -0.21% -0.304% |
|============================================================|
Successfully executed
program New;
type
TItem = Record
ItemName, Money, Se, Thir, SeStat, ThirStat:String;
end;
var
Items:array of TItem;
ix: integer;
ItemIDs:array of Integer;
Average, AvePrice: array of extended;
FinPerc: extended;
TotalStr:String;
function GetWebPage(Queryis:string):string;
var
Hm:string;
begin
Hm:= 'http://itemdb-rs.runescape.com/viewitem.ws?obj=' + Queryis;
Result:= GetPage(Hm);
end;
procedure GiveGE(QueryIs:integer);
var
HTSML,TempID,TempMon,TempName,Min,Max:string;
i:integer;
begin
SetArrayLength(Items,GetArrayLength(Items) + 1);
HTSML:= GetWebPage(inttostr(Queryis));
TempID:= HTSML;
Tempname:= HTSML;
Delete(HTSML,1,Pos('Current market price range:',HTSML) + 64); // + Length(TempMon) + 38
i:= pos('</span>',HTSML) - 1;
Min := Left(HTSML,i);
//writeln(Min + 'is min');
Delete(HTSML,1,i);
Delete(HTSML,1,56);
i:= pos('</span>',HTSML) - 1;
TempMon := Left(HTSML,i);
Delete(HTSML,1,i);
Max := Between('</b>','</span>',htsml);
Items[ix].Money := Left(TempMon, Length(TempMon) - 1);
TempMon := Left(Min, Length(Min) - 1) +' - '+ Left(TempMon, Length(TempMon) - 1) +' - '+ Max;
Tempname:=Between('If you wish to search for exact terms','"item_additional"',TempName);
Tempname:= Between('<div class="brown_box main_ge_page vertically_spaced">','</div>', Tempname);
Delete(Tempname, 1,32);
Delete(Tempname, Length(Tempname), Length(Tempname));
Items[ix].SeStat:= Between('7 Days:</b> <span class="', '">', TempID);
Items[ix].ThirStat:= Between('30 Days:</b> <span class="', '">', TempID);
Items[ix].Se:= Between('7 Days:</b> <span class="' + Items[ix].SeStat+ '">','</span>' , TempID);
Items[ix].Thir:= Between('30 Days:</b> <span class="' + Items[ix].ThirStat+ '">','</span>' , TempID);
// Item[ix].ThirStat:=
if Items[ix].SeStat = 'stay' then Items[ix].Se := '+0%';
if Items[ix].ThirStat = 'stay' then Items[ix].Thir := '+0%';
Items[ix].ItemName := Tempname;
end;
function TheDate(DateFormat: Integer): string; //Gotten from core/Timing.scar. Removed SRL_Warn
var
Year, Month, Day: Word;
M, D, Day2: string;
begin
DecodeDate(Date, Year, Month, Day);
case DateFormat of
1:
begin
case Month of
1: M := 'January';
2: M := 'February';
3: M := 'March';
4: M := 'April';
5: M := 'May';
6: M := 'June';
7: M := 'July';
8: M := 'August';
9: M := 'September';
10: M := 'October';
11: M := 'November';
12: M := 'December';
end;
if (Day < 10) or (Day > 21) then
begin
Day2 := IntToStr(Day);
case Day2[Length(Day2)] of
'1': D := 'st';
'2': D := 'nd';
'3': D := 'rd';
else
D := 'th';
end;
end else
D := 'th';
Result := M + ' ' + IntToStr(Day) + D + ', ' + IntToStr(Year);
end;
2: Result := Padz(IntToStr(Month), 2) + '/' + Padz(IntToStr(Day), 2) + '/' + Copy(IntToStr(Year), 3, 4);
3: Result := Padz(IntToStr(Day), 2) + '-' + Padz(IntToStr(Month), 2) + '-' + Copy(IntToStr(Year), 3, 4);
else
writeln('Invalid Date Format');
end;
end;
function RoundToDec(e:extended; deci:integer):extended;
var
et:extended;
i,tener,waf:integer;
begin
tener := 1;
for i:= 0 to deci do
tener := 10 * tener;
et:= e * tener;
waf:= round(et);
Result:= (waf / tener);
end;
function SumArrayE(e:array of extended):extended;
var
i:integer;
begin
for i:= 0 to high(e) do
Result:= Result + e[i];
end;
begin
Cleardebug;
{Soul, Cosmic, Nature, Blood, Law, Body, Mind, Chaos, Death }
ItemIDs:= [566 , 564 , 561 , 565 , 563, 559 , 558 , 562 , 560];
writeln('|============================================================|');
writeln('|Rune Status Grabber by: Lee Lok Hin |');
writeln('|Date: '+ Padr(TheDate(1), 40) + ' |');
writeln('|Price Rune 7Day% 30Day% 7Status 30Status |');
for ix:= 0 to high(ItemIDs) do
begin
GiveGE(ItemIds[ix]);
writeln(Padr('|'+ Padr(Items[ix].money,7) + Padr(Items[ix].ItemName,13) + Padr(Items[ix].Se,7) + Padr(Items[ix].Thir, 8) + Capitalize(Items[ix].SeStat) +' '+Capitalize(Items[ix].ThirStat),61)+'|');
end;
SetArrayLength(Average, Length(Items));
SetArrayLength(Aveprice, Length(Items));
for ix:= 0 to high(Items) do
begin
Items[ix].se:= Replace(Items[ix].se, '%', '');
AvePrice[ix]:= strtofloat(Items[ix].money);
Average[ix]:=( strtofloat(Items[ix].se) / 100) * strtofloat(Items[ix].money);
FinPerc:= Sumarraye(Average);
end;
TotalStr:= 'Mean %age Change: ' + Padr(floattostr(RoundToDec(FinPerc / Sumarraye(AvePrice), 2)) + '%',7);
for ix:= 0 to high(Items) do
begin
Items[ix].thir:= Replace(Items[ix].Thir, '%', '');
AvePrice[ix]:= strtofloat(Items[ix].money);
Average[ix]:= (strtofloat(Items[ix].Thir) / 100) * strtofloat(Items[ix].money);
FinPerc:= Sumarraye(Average);
end;
TotalStr:= Totalstr + floattostr(RoundToDec(FinPerc / Sumarraye(AvePrice), 2))+'%';
writeln(Padr('|'+TotalStr,61)+ '|');
writeln('|============================================================|');
end.
Note: Do not read the script. It hurts my eyes.
Note To Self: Widget thinks weighted average might be wrongly calculated. Revise Math Textbook. ;)
Note To Self: Revisited. Idiotic mistake. Weighted average should work now. And it's a lot less scary. :p
Yest another Note To Self: RoundtoDec seems funny.
bullzeye95
2009-02-07 00:30:12
From: The Claw
Nvm, I think messing with one of the color settings on my new monitor screwed it up, cause it works fine on my laptop
Has nothing to do with the script.
The Claw
2009-02-07 01:51:48
From: bullzeye95
Has nothing to do with the script.
Which is why I said nvm…
Sir R. M8gic1an
2009-02-08 12:38:25
Updated first post to include ver 3.3
was quite annoying to find it, thought i might save someone else the trouble :p
edit: added a line when talkign to ally, wasn't clicking "selection of runes"
~RM
Markus
2009-02-08 13:39:21
Meh, there are around 20 different versions of this floating around, all with different hacks/sleeps/failsafes etc. Version 3.3 for you isn't the same as version 3.3 for others xD
Widget
2009-02-08 14:51:10
I don't see a V3.3 in the first post.. ¬.¬
Anyway, here's my multiplayer version :p
{******************************************************************************)
(* *)
(* 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! *)
(* Multiplayer by Widget blah blah blah *)
(******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
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
SmartWorld = 60;//World?
Signed = true;//Signed Java?
var
Playground : Array of Array of byte;
lolz : TStringArray;
DTM : array [1..9] of integer;
ownarr : array [1..9] of TPoint;
FailTime, Solved, ReportTime: integer;
Solves, Fails: array of integer;
const
XStart = 116;
YStart = 8;
XOff = 37;
YOff = 37;
//STOOOOOOF
// mind = 1
// fire = 2
// earth= 3
// law = 4
// death= 5
// body = 6
// air = 7
// chaos= 8
// water= 9
//STOOOOOOF
procedure DeclarePlayers;
begin
HowManyPlayers := 4;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SetArrayLength(Solves, HowManyPlayers);
SetArrayLength(Fails, HowManyPlayers);
SRLid:= '675';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'aros';
Players[0].Active := false;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := 'idge';
Players[1].Active := true;
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := 'afoo';
Players[2].Active := true;
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := 'uffi';
Players[3].Active := true;
end;
Procedure LoadPlayGround;
var
X,Y,D,i: Integer;
s, ss : string;
begin
SetLength(playground, 9);
for i := 0 to 8 do
SetLength(playground[i], 9);
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.2, 0.2); //defaults
for y := 0 to 8 do
begin
//s := '';
SS := '';
for x := 0 to 8 do
begin
wait(1);
case CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0) of
0: D := 0; //Nothing
471: D := 1;//Mind
413: D := 2;
475: D := 3;
444: D := 4;
573: D := 5;
559: D := 6;
564: D := 7;
481: D := 8;
486: D := 9;
else
writeln('UNKNOWN COUNT! '+inttostr(CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0)));
end;
if d > 0 then
SS := SS + lolz[d-1] + ' | '
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;
begin
MouseSpeed := 45;
try
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
SS := SS + lolz[Solver[x][y].number-1] + ' | ';
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
if (y=8) then
MouseSpeed := 25;
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 FindColor(x2, y2, 65536, X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8) then
continue;
if Solver[x][y].number = z then
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;
MouseSpeed := 25;
//writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
sleep(500);
MouseBox(14, 61, 89, 78, 1);
Result := true;
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(100);
if SudokuMenu then
MouseBox(14, 61, 89, 78, 1);
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! (fail)');
Mouse(13, 13, 13, 13, true);//Closes Sudoku Menu
Result := False;
Inc(Fails);
Exit;
end;
except
Status('Sudoku Solving Failed! (exception)');
Mouse(13, 13, 13, 13, true);//Closes Sudoku Menu
Result := False;
Inc(Fails);
Exit;
end;
Writeln('wtf?');
end;
procedure LoadArrays;
begin
OwnArr[1] := Point(20, 100);
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0cF07U2kGQ6aORGyKRWDRK1MCNH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gnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[5] := Point(70, 200); //dea
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv6USidV38xtLi1upFHBqA6c5fKL' +
'yLvx3Ph8M56+JiYmF6WmR1xYXqC04zYmWKAjn3osVFcWw06OjRk4n' +
'k6pN4P85PVW0Cv0Lwgtix4eeGHl59s3K3Fvg4htW4SkI5THvwv21+' +
'Sbe+2AsHjfy0sxr4ITyoC6Ul4vJha71IJTHDDN14X7y6ODg1MjI3M' +
'tJMv9qirCEAT1kwhQIciiPmXw2C9ytzXW0s/NxLCbyzNjz2fEXhPI' +
's4SG7kS5cUZ7JYoatLriRezo6+qPRZwMDk8NPgRO0sATxAy1yRVgC' +
'OTKD9h+5nOB83m9v7+vpGe5/hGrCKFlCq7goay5duHInApzm0iInf' +
'N5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Hlu4sX85EuEeVUxlF' +
'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[7] := Point(20, 200); //air
OwnArr[8] := Point(70, 250); //chaos
DTM[8]:= BitmapFromString(30, 29, 'beNqdle1KVGEUhe1XdAHSr8B' +
'L6AYESZIpSSwxsWSwRMzMZBgmM03MtMnUzExzzI9MMx1z8qsxFR0q' +
'qNsQoZvoVw8s2LycM3McgsUwnJn32eusvfc5idN/EyeooOBULp14N' +
'pi5ufRxe2VlZ+3zbiq1v7FxsLV5+HX7+7edn/t7/8HXkdX3c6mFD+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GL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8sbyErEFJzmShS+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 ', 'death', ' body', ' air ', 'chaos', 'water'];
end;
function SudokuSolver: boolean;
var
EmptyStone : SuSquare;
EmptyStack : SuStack;
begin
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..');
Break;
end;
end;
end;
result := EnterSudoku
end;
procedure Report;
var
SpH, H,M,S, i: 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));
for i := 0 to High(Players) do
Writeln(PadL(Players[i].name, 12)+': '+PadR(BoolToStr(Players[i].Active), 7)+
'Solved: '+PadR(IntToStr(Solves[i]), 3)+' Failed: '+PadR(IntToStr(Fails[i]), 3));
SendSRLReport;
ReportTime := GetSystemTime + 310000;
end;
procedure ScriptTerminate;
var
i: integer;
begin
for i := 1 to 9 do
FreeBitmap(DTM[i]);
Disguise('End Sudoku');
Report;
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);
Writeln('Trying to enter sudoku..');
if SudokuSolver then
begin
Inc(Solved);
Inc(Solves[CurrentPlayer]);
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 :(');
Inc(Fails[CurrentPlayer]);
end;
end;
function TalkToAli: boolean;
var
i, x, y, L: integer;
M: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 15855599, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(250+random(150));
if IsUpText('orris') then
begin
GetMousePos(x, y)
Mouse(x, y, 0, 0, false);
wait(25+random(25));
result := ChooseOption('orris');
FFlag(0);
Wait(200+random(200));
end;
end;
end;
begin
SmartSetupEx(60, true, Signed, false);
while not SmartActive do wait(100);
SetTargetDC(SmartGetDC);
SetupSRL;
MouseSpeed := 40;
ClearDebug;
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;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
Clickcontinue(true, true);//quick chat world check
SetAngle(true);
repeat
if not LoggedIn then
NextPlayer(True);
if CoinAmount('inv') < 59000 then
NextPlayer(False);
if SudokuMenu then
DoSudoku;
if TalkToAli then
begin
MarkTime(FailTime);
repeat
ClickContinue(true, true);
wait(100);
until FindNPCChatText('runes', ClickLeft) or (Not Loggedin)
while not Clickcontinue(true, true) and LoggedIn do
Wait(100);
while not FindNPCChatText('large', ClickLeft) and LoggedIn do
Wait(100);
while not Clickcontinue(true, true) and LoggedIn do
Wait(100);
repeat
if FindNPCChatText('amine', ClickLeft) then
begin
DoSudoku;
Break;
end;
wait(100);
until (Not LoggedIn)
end;
if (TimeFromMark(FailTime) > 600000) then
NextPlayer(False);
if (GetSystemTime > ReportTime) then
begin
Report;
NextPlayer(True);
end;
if AllPlayersInactive then
TerminateScript;
until false
end.
Markus
2009-02-08 16:05:57
Here's my version, doesnt take breaks but works like a charm. Also supports acc who got blackjacks @ ali. its pretty similar to the version narcle posted couple of pages bacl.
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALIRAPER;
{.include smartp2p.scar}
{.include srl/srl.scar}
const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
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: Boolean;
const
XStart = 116;
YStart = 8;
XOff = 37;
YOff = 37;
//STOOOOOOF
// mind = 1
// fire = 2
// earth= 3
// law = 4
// death= 5
// body = 6
// air = 7
// chaos= 8
// water= 9
//STOOOOOOF
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
end;
Procedure LoadPlayGround;
var
X,Y,D,i: Integer;
s, ss : string;
begin
SetLength(playground, 9);
for i := 0 to 8 do
SetLength(playground[i], 9);
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.2, 0.2); //defaults
for y := 0 to 8 do
begin
//s := '';
SS := '';
for x := 0 to 8 do
begin
wait(1);
case CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0) of
0: D := 0; //Nothing
471: D := 1;//Mind
413: D := 2;
475: D := 3;
444: D := 4;
573: D := 5;
559: D := 6;
564: D := 7;
481: D := 8;
486: D := 9;
else
writeln('UNKNOWN COUNT! '+inttostr(CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0)));
end;
if d > 0 then
SS := SS + lolz[d-1] + ' | '
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 FindColor(x2, y2, 65536, X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8) 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;
procedure LoadArrays;
begin
OwnArr[1] := Point(20, 100);
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0cF07U2kGQ6aORGyKRWDRK1MCNHwi38C0Z4' +
'CLbxicQ2y98iba0EDUS3zXvn2dP7NiGTAdlW1gjyzZbxuDqo8e8G7' +
'tukG3I2jKk7TmXlDaDLbg7JJ62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xy' +
'ke3gU4idF75E29qoGsG/0PiohdiQmaBiC2tkxebIAL8omdiQdTBp2' +
'/VcUtsstuAkVzl+Y7Xa9UBgPbTVzsBGvtrYSCcsieDie47V4Jqmnp' +
'BsCIvt+fznx5am63QC3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3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Ghx0SNaKWtInlkH7URD1kdAY5zxaJM+Hs/' +
'Fhvo7x8dfAQc58SCbKE2ErgLSwkysZA5tsnEyHdvdyb7+mii4Lwsv' +
'gu3LQBHLllTSuYETjcZFSN3dXSoicCR3geO9ExEesC8Jx/lL8+MCm' +
'nTSiPfam1V1PQRvt43/8j8Y94NRyJ5kXXPcDyNfKO5+V7XHaIW3JY' +
'AR/Kvb2gu8sCJnah1SCHTRyM3RSKxaJSogRtf4dhyNxl3eIysUwmZ' +
'QOy88BBtayNqJL5rXp01vttZiWmBTAdlW1gjyzZHxuBa5U/ezLvTA' +
'lk3DGl77iWlzWAb3MwbxDVvsetCYDw01a5hI19tbCQThkTwQPNu8s' +
'SibuqGZEIY7MD7ny9bmq6RCXDjm3PP2CgWuimyzqbfsJEjDQ3MNhN' +
'ILB64Z2aIRd3UqIgf/oMFHOfEwpH3J2Nw48u8fpcDDXt+u8nc5bvy' +
'VzFmCFbS8dEotrdch486b7ZzvVCIrGwvtVgN4YeoRqvV+OGquvYfY' +
'L9Zvw==');
OwnArr[7] := Point(20, 200); //air
OwnArr[8] := Point(70, 250); //chaos
DTM[8]:= BitmapFromString(30, 29, 'beNqdle1KVGEUhe1XdAHSr8B' +
'L6AYESZIpSSwxsWSwRMzMZBgmM03MtMnUzExzzI9MMx1z8qsxFR0q' +
'qNsQoZvoVw8s2LycM3McgsUwnJn32eusvfc5idN/EyeooOBULp14N' +
'pi5ufRxe2VlZ+3zbiq1v7FxsLV5+HX7+7edn/t7/8HXkdX3c6mFD+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3Qjh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+
'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 ', 'death', ' body', ' air ', 'chaos', 'water'];
end;
function SudokuSolver: boolean;
var
EmptyStone : SuSquare;
EmptyStack : SuStack;
begin
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..');
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, 15855599, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(250+random(150));
if IsUpText('orris') then
begin
GetMousePos(x, y);
case Random(10) of
0: 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;
begin
SetupSRL;
ClearDebug;
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;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
Clickcontinue(true, true);//quick chat world check
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
repeat
if not LoggedIn then
LoginPlayer;
if CoinAmount('inv') < 59000 then
TerminateScript;
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
while ClickContinue(True, True) do
wait(50);
if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(300);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end;
if(GetColor(54, 61) = 1319729)then
begin
DoSudoku;
break;
end;
wait(200);
until(not(LoggedIn));
// if(not(LoggedIn))then exit;
// if (TimeFromMark(FailTime) > 600000) then
// TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
The Claw
2009-02-08 22:08:28
Here's mine, takes breaks and works perfect like the others, but it supports talking to ali when you have finished the whole minigame. This was originally HyperSecret's version
{******************************************************************************)
(* *)
(* A L I R A P E R *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s, pwnaz0r 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. *)
(* *)
(******************************************************************************}
{.include srl/srl/misc/Smart.scar}
{.include srl/srl.scar}
const
SmartUse = true;
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
TimePerSudoku = 2; //minutes to solve a sudoku puzzle
SmartWorld = 160; //World? [if unsigned]
Signed = true; //Signed Java?
CoinAmt = 45000; //Amount of coins in inventory to stop under.
SleepEvery = 75; // (Minutes)
SleepRandom = 30; // Random minutes to be added on to SleepEvery;
SleepFor = 30; // (Minutes) random + 5 minutes, if you don't like, change source...
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
end;
var
Playground : Array of Array of byte;
lolz : TStringArray;
DTM : array [1..9] of integer;
ownarr : array [1..9] of TPoint;
Solved, ReportTime, A, sx, sy: integer;
NorthLast: Boolean;
SignStr: string;
Sleeps, SleepTimer: integer;
ItemsUpdated: boolean;
RuneWait: Array of Integer;
const
XStart = 116;
YStart = 8;
XOff = 37;
YOff = 37;
//STOOOOOOF
// mind = 1
// fire = 2
// earth= 3
// law = 4
// death= 5
// body = 6
// air = 7
// chaos= 8
// water= 9
//STOOOOOOF
Procedure LoadPlayGround;
var
X,Y,D,i: Integer;
s, ss : string;
begin
SetLength(playground, 9);
for i := 0 to 8 do
SetLength(playground[i], 9);
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.2, 0.2); //defaults
for y := 0 to 8 do
begin
//s := '';
SS := '';
for x := 0 to 8 do
begin
wait(1);
case CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0) of
0: D := 0; //Nothing
470, 471: D := 1;//Mind
412, 413: D := 2;
474, 475: D := 3;
443, 444: D := 4;
572, 573: D := 5;
558, 559: D := 6;
563, 564: D := 7;
480, 481: D := 8;
485, 486: D := 9;
else
writeln('UNKNOWN COUNT! '+inttostr(CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0)));
end;
if d > 0 then
SS := SS + lolz[d-1] + ' | '
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, RRuneWait, EmptySquares: 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;
function CountEmptySquares: Integer; forward;
procedure SetWaitForAnswerTime;
var
sMin, RT: Integer;
begin
EmptySquares := CountEmptySquares;
SetLength(RuneWait, 0);
sMin := (TimePerSudoku * 60000);
RT := Round(sMin / EmptySquares);
for RRuneWait := 1 to EmptySquares do
begin
SetLength(RuneWait, Length(RuneWait) + 1);
RuneWait[Length(RuneWait) - 1] := Random(RT);
end;
end;
procedure EnterSudokuAnswer(rune, xposition, yposition: Integer);
var
cx, cy: Integer;
begin
try
Wait(RandomRange(67, 477)); //here
if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
end;
//STOOOOOOF
// mind = 1
// fire = 2
// earth= 3
// law = 4
// death= 5
// body = 6
// air = 7
// chaos= 8
// water= 9
//STOOOOOOF
Procedure ChangeNumber(xpos,ypos: integer; number : byte);
var
Num, Add: 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;
for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 CountEmptySquares: Integer;
var
i, cx, cy, bx, by: Integer;
Inside: TBox;
begin
if not SudokuMenu then Exit;
Result := 0;
for bx := 0 to 8 do
for by := 0 to 8 do
begin
Inside := PointToBox(Point(bx*XOff+XStart+4, by*YOff+YStart+4),
Point((bx+1)*XOff+XStart-9,(by+1)*YOff+YStart-8));
if not FindColor(cx, cy, 65536, Inside.x1, Inside.y1, Inside.x2, Inside.y2) then
Inc(Result);
end;
end;
function EnterSudoku: boolean;
var
x, y, z, y1, x1, z1, x2, y2, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
canExit: Boolean;
begin
try
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
EmptySquares := CountEmptySquares;
if EmptySquares <= 0 then Break;
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 FindColor(x2, y2, 65536, X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8) then
continue;
if Solver[x][y].number = z then
begin
writeln('taking place of this');
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
writeln('here this time');
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!!!!');
SaveToChatLog;
MouseBox(14, 61, 89, 78, 1);
Result := true;
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(500);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed! SudokuMenu');
Mouse(13, 13, 13, 13, true);//Closes Sudoku Menu
Result := False;
Exit;
end;
except
Status('Sudoku Solving Failed! Exception');
Mouse(13, 13, 13, 13, true);//Closes Sudoku Menu
Result := False;
Exit;
end;
end;
procedure LoadArrays;
begin
OwnArr[1] := Point(20, 100);
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+PyrK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8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[5] := Point(70, 200); //dea
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv6USidV38xtLi1upFHBqA6c5fKL' +
'yLvx3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XaC6ukvVdOHacOb+' +
'+sfDzc2jnc/lYvFkb+/0YP/s6+H3b0c/T47/g68l2+9Xi2sfdguFg' +
'41Ppe0twY93v8A3+K+z0xr5ei2fza6/W9xaWd7J54FjGzjO4SOZd+' +
'G/K5VwOP/NTk0tZTIibywvYVtwnCOVCISz9kp9fTVsJp02ciGXk20' +
'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[7] := Point(20, 200); //air
OwnArr[8] := Point(70, 250); //chaos
DTM[8]:= BitmapFromString(30, 29, 'beNqdle1KVG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ytNqLn6wcp79Bwmw8AM=');
OwnArr[9] := Point(20, 250); //water
dtm[9]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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 ', 'death', ' body', ' air ', 'chaos', 'water'];
end;
function SudokuSolver: boolean;
var
EmptyStone : SuSquare;
EmptyStack : SuStack;
begin
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);
//SetWaitForAnswerTime;
ChangeNumber( Stack[Stackpos+1].x,stack[stackpos+1].y,stack[stackpos+1].num);
Continue;
end else
begin;
writeln('messed up');
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..');
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;
procedure CheckGE;
begin
if ItemsUpdated then exit;
ItemsUpdated:= FindBlackChatMessage('rand');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
DisguiseStr: string;
begin
CheckGE;
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]);
DisguiseStr:= 'S: '+inttostr(Solved)+'; C:' +inttostr(CoinAmount('inv')) + ';';
if (ItemsUpdated)then
DisguiseStr:= DisguiseStr + ' | Items Updated from G.E.';
Disguise(DisguiseStr);
Writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
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 ConvertTimeToStr(time: integer): string;
var
H, S, M : integer;
HS, MMS, SS: string;
begin
ConvertTime(Time, H, M, S);
if (H > 0)then
HS:= IntToStr(H) else Hs:= '00';
SS:= IntToStr(S);
if (S <= 9)then
SS:= '0'+IntToStr(s);
MMS:= IntToStr(M);
if (M <= 9)then
MMS:= '0'+IntToStr(M);
Result:= HS+':'+MMS+':'+SS;
end;
function DoSleeping: boolean;
var
WaitTime, i: integer;
begin
if ((GetSystemTime - SleepTimer) >= ((SleepEvery + random(SleepRandom)) * 60000))then
begin
WaitTime:= GetSystemTime;
I:= ((SleepFor + random(4)) * 60000) + random(6000);
if LoggedIn then Logout;
Writeln('Waiting for '+ ConvertTimeToStr(I));
while ((GetSystemTime - WaitTime) <= (I))do
Disguise('Waiting - '+ConvertTimeToStr(I - (GetSystemTime - WaitTime))+' left.');
SleepTimer:= GetSystemTime;
Sleeps:= Sleeps + 1;
Writeln('Sleep concluded.');
result:= true;
// SetupLogin;
end;
end;
function HandleAliRandoms: boolean;
begin
if FindFight then
begin
result:= true;
RunAway('N', true, 1, 15000);
end;
FTWait(5);
FindNormalRandoms;
if FindDead then
begin
result:= true;
Writeln('You died or were teleported to lumby.');
TerminateScript;
end;
end;
function AntiBan: boolean;
begin
if HandleAliRandoms then result:= true;
if DoSleeping then result:= true;
if ClickToContinue then result:= true;
case random(150) of
1: PickUpMouse;
2:
begin
RandomMovement;
SetAngle(true);
MakeCompass('N');
end;
4, 5: RandomRClick;
6, 7:
begin
BoredHuman;
SetAngle(True);
MakeCompass('N');
end;
end;
end;
function TalkToAli: boolean;
var
i, x, y, L, T: integer;
M: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Status('Talking to Ali...');
Result:= ChooseOption('orris');
if(Result)then exit;
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 15855599, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(250+random(150));
if IsUpText('orris') then
begin
GetMousePos(x, y);
case Random(10) of
0: 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;
begin
// if Signed then SignStr := 'a1' else SignStr := 'a2';
// SmartSetup('http://world100.runescape.com/','plugin.js?param=o0,'+SignStr+',m1');
SmartSetupEx(110,True,True,False);//('world100','plugin.js?param=o0,'+SignStr+',m1');
//while not IsFKeyDown(12) do wait(100);
// SetTargetDC(SmartGetDC);
SetupSRL;
ItemsUpdated:= False;
SleepTimer:= GetSystemTime;
ClearDebug;
writeln(' ALI RAPER!');
writeln(' by Markus');
writeln(' Modded & Improved by Narcle and pwnaz0r');
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;
if not LoggedIn then
LoginPlayer;
Clickcontinue(true, true);//quick chat world check
NorthLast:= True;
MakeCompass('N');
SetAngle(True);
repeat
if Antiban then
AddToReport('Antiban performed...');
if not LoggedIn then
begin
LoginPlayer;
HandleAliRandoms;
end;
if CoinAmount('inv') < CoinAmt then
begin
Writeln('o');
LogOut;
TerminateScript;
end;
if SudokuMenu then
DoSudoku;
for A:= 1 to 10 do
begin
if not(TalkToAli)then
begin
if FindSymbol(sx, sy, 'quest') then
begin
if ( Distance(sx, sy, MMCX, MMCY) > 5 ) then
begin
Mouse(sx, sy, 2, 2, true);
FFlag(0);
end;
end;
end else
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 not(TalkToAli)then
begin
if FindSymbol(sx, sy, 'quest') then
begin
if ( Distance(sx, sy, MMCX, MMCY) > 10 ) then
begin
Mouse(sx, sy, 2, 2, true);
FFlag(0);
end;
end;
end else
break;
wait(1000);
end;
end;
if A < 11 then
repeat
while ClickContinue(True, True) do
wait(50);
//the claw
if((GetColor(80, 428) = 0) and (GetColor(438, 434) = 0))then
begin
MouseBox(78, 425, 440, 437, 1);
wait(300); //end the claw
end else if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(300);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end else if ((GetColor(379, 410) = 0) and (GetColor(160, 410) = 0)) then
begin
MouseBox(155, 405, 376, 411, 1);
wait(300);
end else if ((GetColor(138, 413) = 0) and (GetColor(378, 417) = 0) and (GetColor(342, 413) = 10666964)) then
//clicking "large casket"
begin
MouseBox(86, 411, 428, 424, 1);
wait(300);
end;
if SudokuMenu then
begin
DoSudoku;
break;
end;
wait(200);
until(not(LoggedIn));
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
Widget
2009-02-12 17:24:11
Just wanted to post this, you can also see the difference between the account that did all the subquests (bafoon) and the one that didn't (widget)
[FONT="Courier New"]Sudoku Solver 15h:2m:17s
Solved: 857 | SpH: 57
Zaros In Me: False Solved: 52 Failed: 0 Location: Out of geepees
I Am Widget: True Solved: 278 Failed: 4 Location: Working fine
Bafoon90: True Solved: 330 Failed: 1 Location: Working fine
Muffin Lord4: False Solved: 197 Failed: 1 Location: Out of geepees[/FONT]
n3ss3s
2009-02-13 04:21:15
I want enough GP to do that long runs :( It would be awesome to wake up 8M richer in the morning…
The Claw
2009-02-13 04:56:06
From: n3ss3s
I want enough GP to do that long runs :( It would be awesome to wake up 8M richer in the morning…
Well you're on the right thread ;) How do you think we all got the cash to be able to do that?
Markus
2009-02-13 05:09:11
Well me and a friend got our first santas way before this was made, and I'm sure many people did. Old-school merching ftw.
n3ss3s
2009-02-13 06:50:17
Anyone wanna build a G.E vers? :p
ZephyrsFury
2009-02-14 04:09:31
From: n3ss3s
Anyone wanna build a G.E vers? :p
We've become too lazy to even sell our autoed goods legitly have we?…
n3ss3s
2009-02-21 03:14:14
We've become too lazy to even sell our autoed goods legitly have we?…
We've become too lazy to even legitly cut our autoed yews into longbows?
Ejjman
2009-02-22 14:17:00
Is this script still profitable?
Or are there better methods?
…Just waiting for the right time to make my account member to get rich.
n3ss3s
2009-02-22 14:45:20
Yes, profitable. Although it's more around 400k per hour with only the necassary quest done.
Markus
2009-02-22 16:51:02
Getting around 500k to 650k an hour with it myself, still works fine :)
Nava2
2009-03-27 09:45:28
Just wondering, what needs to be fixed up in this. I have an account which needs money, so I was just wondering :)
The Claw
2009-03-27 21:09:11
Probably a single FindNormalRandoms in the talking loop to check we haven't been teled, and thats it. This script is the most stable script possible :) More so than Hy's fightcaver even
Nava2
2009-03-28 03:29:21
Its THAT stable? Someone said it was broken, or at least the toilet did…
Sir R. M8gic1an
2009-03-28 06:10:29
here is the problem:

color change.
the background changed to that purpleish color
~RM
Boreas
2009-03-28 14:47:32
Does anyone else see the bigger problem with this? Why would they make a random update like that to something so old? I think the jig is up. Either they know it's being autoed, or at the very least they noticed it's being used more.
Markus
2009-03-29 14:12:56
Gf Jagex, updating it as we speak.
Nava2
2009-03-29 22:19:42
<3 much love Markus
Markus
2009-03-31 15:43:42
NOT WORKING VERSIONEnterSudoku seems to be malfunctioning in the original, this version is a fix-in-progress. Rune detection works 100% now.
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALIRAPER;
{.include srl/srl.scar}
const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = true;
procedure debug(s : string); begin if debugmode then writeln(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: Boolean;
//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:= '193';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
CurPoint : TPoint;
begin
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
swap(randompoints[random(9)][random(9)], randompoints[random(9)][random(9)]);
for y := 0 to 8 do
for x := 0 to 8 do
SafeDrawBitmap(dtm[Solver[x][y].number], getdebugcanvas, x*30+(x/3*4), y*29+(y/3*4)); //Draw sudoku at debug (with roster).
terminatescript;
for z := 0 to 8 do
begin
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];
writeln(inttostr(curpoint.x));
writeln(inttostr(length(playground)));
writeln('-');
if Solver[CurPoint.y][CurPoint.x].number = CurrentRune then
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+3, CurPoint.y*yoff+ystart+3, 32, 32, true);
end;
end;
end;
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;
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+dBZZpJRF9zI8a6ugUTi2e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802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv6USidV38xtLi1upFHBqA6c5fKL' +
'yLvx3Ph8M56+JiYmF6WmR1xYXqC04zYmWKAjn3osVFc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+/0YP/s6+H3b0c/T47/g68l2+9Xi2sfdguFg' +
'41Ppe0twY93v8A3+K+z0xr5ei2fza6/W9xaWd7J54FjGzjO4SOZd+' +
'G/K5VwOP/NTk0tZTIibywvYVtwnCOVCISz9kp9fTVsJp02ciGXk20' +
'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' +
'L6AYESZIpSSwxsWSwRMz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250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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
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..');
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, 15855599, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(250+random(150));
if IsUpText('orris') then
begin
GetMousePos(x, y);
case Random(10) of
0: 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;
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;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
repeat
if not LoggedIn then
LoginPlayer;
//if CoinAmount('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
while ClickContinue(True, True) do
wait(50);
if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(300);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end;
if(GetColor(54, 61) = 1319729)then
begin
DoSudoku;
break;
end;
wait(200);
until(not(LoggedIn));
if(not(LoggedIn))then exit;
if (TimeFromMark(FailTime) > 600000) then
TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
writeln('en dat duurde '+inttostr(gettimerunning)+'ms stelletje joodjes');
end.
Markus
2009-04-01 09:37:35
Have fun.
Changed things: LoadArrays, EnterSudoku, LoadPlayGround. LoadArrays and LoadPlayGround
must be changed, no matter which version you got. EnterSudoku should work on some modified versions (havent tested).
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALIRAPER;
{.include smartp2p.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); 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: Boolean;
//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 := '';
Players[0].Pass := '';
Players[0].Nick := '';
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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
CurPoint : TPoint;
canexit : boolean;
begin
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
swap(randompoints[random(9)][random(9)], randompoints[random(9)][random(9)]);
for y := 0 to 8 do
for x := 0 to 8 do
SafeDrawBitmap(dtm[Solver[x][y].number], getdebugcanvas, x*30+(x/3*4), y*29+(y/3*4)); //Draw sudoku at debug (with roster).
for z := 0 to 8 do
begin
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);
end;
end;
end;
end;
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;
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5pot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Phzfo4ogTBP8i7cb5tv' +
'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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0r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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
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..');
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, 15855599, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(250+random(150));
if IsUpText('orris') then
begin
GetMousePos(x, y);
case Random(10) of
0: 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;
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;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
repeat
if not LoggedIn then
LoginPlayer;
//if CoinAmount('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
while ClickContinue(True, True) do
wait(50);
if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(300);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end;
if(GetColor(54, 61) = 1319729)then
begin
DoSudoku;
break;
end;
wait(200);
until(not(LoggedIn));
if(not(LoggedIn))then exit;
if (TimeFromMark(FailTime) > 600000) then
TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
writeln('en dat duurde '+inttostr(gettimerunning)+'ms stelletje joodjes');
end.
Markus
2009-04-01 13:06:05
This versions works flawless, running for over an hour now at 2 accounts:
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALIRAPER;
{.include smartp2p.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); 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;
//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 := '';
Players[0].Pass := '';
Players[0].Nick := '';
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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
CurPoint : TPoint;
canexit : boolean;
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
swap(randompoints[random(9)][random(9)], randompoints[random(9)][random(9)]);
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
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);
end;
end;
end;
end;
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!');
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0cF07U2kGQ6aORGyKRWDRK1MCNHwi38C0Z4' +
'CLbxicQ2y98iba0EDUS3zXvn2dP7NiGTAdlW1gjyzZbxuDqo8e8G7' +
'tukG3I2jKk7TmXlDaDL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kauPFDlkxy' +
'ke3gU4idF75E29qoGsG/0PiohdiQmaBiC2tkxebIAL8omdiQdTBp2' +
'/VcUtsstuAkVzl+Y7Xa9UBgPbTVzsBGvtrYSCcsieDie47V4Jqmnp' +
'BsCIvt+fznx5am63QC3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj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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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUP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6mUoZe' +
'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, 15855599, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(250+random(150));
if IsUpText('orris') then
begin
GetMousePos(x, y);
case Random(10) of
0: 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;
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;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
repeat
if not LoggedIn then
LoginPlayer;
//if CoinAmount('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
while ClickContinue(True, True) do
wait(50);
if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(300);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end;
if(GetColor(54, 61) = 1319729)then
begin
DoSudoku;
break;
end;
wait(200);
until(not(LoggedIn));
if(not(LoggedIn))then exit;
if (TimeFromMark(FailTime) > 600000) then
TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
Nava2
2009-04-02 07:13:20
Is it worth it to run though..
Markus
2009-04-02 08:23:59
From: Nava2
Is it worth it to run though..
Yup, made 1.5m yesterday in around 3 hours :p
(it was a lame april fool's day joke xD)
Nava2
2009-04-02 15:38:49
No kidding.
You did get almost all of us though.
Markus
2009-04-02 16:39:23
^-^
Nava2
2009-04-05 11:07:16
That is a big cube…
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
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); 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;
//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 := '';
Players[0].Pass := '';
Players[0].Nick := '';
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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
CurPoint : TPoint;
canexit : boolean;
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
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);
end;
end;
end;
end;
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!');
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0cF07U2kGQ6aORGyKRWDRK1MCNHwi38C0Z4' +
'CLbxicQ2y98iba0EDUS3zXvn2dP7NiGTAdlW1gjyzZbxuDqo8e8G7' +
'tukG3I2jKk7TmXlDaDLbg7JJ62urG7J4Cm2jVs5Cv19WTCkLhwf1t' +
'duD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iC2tkxebIAL8omdiQdTBp2' +
'/VcUtsstuAkVzl+Y7Xa9UBgPbTVzsBGvtrYSCcsieDie47V4Jqmnp' +
'BsCIvt+fznx5am63QC3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPH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' +
'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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc236MtLY9jMZHHBp6PD75AmFc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mZnZhYeDuDFt/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, 15855599, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
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
0: 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 t: TPoint;
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('');
SmartSetupEx(115, True, True, False);
SetTargetDC(SmartGetDC);
DeclarePlayers;
ScriptID := '1037';
LoadArrays;
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
repeat
if not LoggedIn then
LoginPlayer;
// 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
while ClickContinue(True, True) do
wait(50);
if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(300);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end;
if(GetColor(54, 61) = 1319729)then
begin
DoSudoku;
break;
end;
wait(200);
until(not(LoggedIn));
if(not(LoggedIn))then exit;
if (TimeFromMark(FailTime) > 600000) then
TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
This version stops when you run out of money.
Yakman
2009-04-06 11:51:10
perhaps you guys would be intrested in using patch/diff.
Bam Bam
2009-04-06 20:46:11
We need an SVN for SSRL+ Scripts
Markus
2009-04-06 20:50:29
Well there is only one active script lol
Bam Bam
2009-04-06 21:04:01
From: Markus
Well there is only one active script lol
Well thats not the point :P
Besides we can make more xD
Yakman
2009-04-07 12:37:06
svn is overkill for a script made up of a single source file.
posting patches better with this forum-based release system you have now.
i suspect you only mentioned svn because you know it already, and you havent used diff/patch yet
Wizzup?
2009-04-07 12:59:07
From: Yakman
svn is overkill for a script made up of a single source file.
posting patches better with this forum-based release system you have now.
i suspect you only mentioned svn because you know it already, and you havent used diff/patch yet
SvN isn't overkill for one script. It's best to keep as many projects in separate SvN's as possible
Bobarkinator
2009-04-07 16:58:57
From: Wizzup?
SvN isn't overkill for one script. It's best to keep as many projects in separate SvN's as possible
But one file?
Yakman
2009-04-07 20:06:56
I'm going to take the initiative and teach you guys how to use diff/patch.
first download and extract
DiffUtils for windows and
Patch for windowsyou may need the dependencies too (put the dlls in the same place as the exes)
I'm going to use the example of the script Nava2 just posted, and the script Markus posted before that.
first put them in the same directory
C:\Documents and Settings\jakov\My Documents>dir
Volume in drive C has no label.
Volume Serial Number is B483-6542
Directory of C:\Documents and Settings\jakov\My Documents
08/04/2009 00:10 <DIR> .
08/04/2009 00:10 <DIR> ..
[b]08/04/2009 00:09 38,309 markus.scar[/b]
11/02/2009 21:27 <DIR> My Music
11/02/2009 21:27 <DIR> My Pictures
[b]07/04/2009 23:48 38,686 nava2.scar[/b]
run diff on the two files
diff -u markus.scar nava2.scar > nava2.patch
you get a file called
nava2.patchnow you're going to use
nava2.patch to patch
markus.scar
patch < nava2.patch
now
markus.scar is identical to
nava2.scarpatch is pretty smart, if it thinks you're applying the same patch again, it will offer to reverse the patch, so you can very easily switch between the old and new versions of the script.
patching file markus.scar
Reversed (or previously applied) patch detected! Assume -R? [n] y
Now pretend I was Nava2 and was posting an update, all i need to post the file
nava2.patchpatch files are pretty easy to figure out, you can see whats been done without actually running patch
--- markus.scar 2009-04-07 23:53:33.421875000 +0100
+++ nava2.scar 2009-04-07 23:48:11.593750000 +0100
@@ -17,7 +17,7 @@
(* *)
(******************************************************************************}
program ALIRAPER;
-{.include smartp2p.scar}
+{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
const
@@ -409,14 +409,18 @@
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 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;
+ end; }
for z := 0 to 8 do
begin
@@ -947,6 +951,12 @@
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
0: begin
@@ -971,6 +981,7 @@
end;
end;
+var t: TPoint;
begin
SetupSRL;
@@ -987,6 +998,9 @@
writeln(' Wizzup? for mental support and reminding me of that game ;)');
Writeln('');
+ SmartSetupEx(115, True, True, False);
+ SetTargetDC(SmartGetDC);
+
DeclarePlayers;
ScriptID := '1037';
LoadArrays;
@@ -1005,8 +1019,8 @@
if not LoggedIn then
LoginPlayer;
- //if CoinAmount('inv') < 59000 then
- // TerminateScript;
+ // if xCoinAmount('inv') < 59000 then
+ // TerminateScript;
debug('hoi?');
if SudokuMenu then
DoSudoku;
make sure you tell people which file they should apply the patch to.
And thats all there is to it!
diff and patch have some command line flags you might be intrested in, for example you can tell them to ignore a change if only the case has changed, or ignore changes in whitespace.
references
http://www.linuxtutorialblog.com/post/introduction-using-diff-and-patch-tutorial and
http://www.linuxjournal.com/article/1237
Nava2
2009-04-16 07:01:46
That seems like more work IMO than a SVN.
Thanks for the info though, yakman
n3ss3s
2009-04-18 12:36:42
Time to go from 100k to 10M like I once did with this :)
EDIT: Nava2, maybe it would stop when it's out of money if you didn't comment the if xCoinAmount('inv')… :D
Nava2
2009-04-18 20:51:25
From: n3ss3s
Time to go from 100k to 10M like I once did with this :)
EDIT: Nava2, maybe it would stop when it's out of money if you didn't comment the if xCoinAmount('inv')… :D
Coin amount doesn't like to work.
Markus
2009-04-19 00:04:43
From: Nava2
Coin amount doesn't like to work.
Then fix it. You're the dev here :D
lordsaturn
2009-04-19 01:36:08
From: Markus
Then fix it. You're the dev here :D
How ironic, coming from a developer. :p
ZephyrsFury
2009-04-19 05:22:38
From: Nava2
Coin amount doesn't like to work.
FindCoins worked when I made the function but you borked it with your edits. :p I fixed it before we commited #32.
Nava2
2009-04-19 06:41:52
I DIDNT EDIT IT!
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
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;
//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 := '';
Players[0].Pass := '';
Players[0].Nick := '';
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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
CurPoint : TPoint;
canexit : boolean;
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
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);
end;
end;
end;
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+dBZZpJRF9zI8a6ugUTi2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j802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv6USidV38xtLi1upFHBqA6c5fKL' +
'yLvx3Ph8M56+JiYmF6WmR1xYXqC04zYmWKAjn3osVF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b+/0YP/s6+H3b0c/T47/g68l2+9Xi2sfdguFg' +
'41Ppe0twY93v8A3+K+z0xr5ei2fza6/W9xaWd7J54FjGzjO4SOZd+' +
'G/K5VwOP/NTk0tZTIibywvYVtwnCOVCISz9kp9fTVsJp02ciGXk20' +
'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' +
'L6AYESZIpSSwxsWSwRM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 250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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, 15855599, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
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
0: 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;
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('');
SmartSetupEx(115, True, True, False);
SetTargetDC(SmartGetDC);
ActivateClient;
DeclarePlayers;
ScriptID := '1037';
LoadArrays;
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
repeat
if not LoggedIn then
LoginPlayer;
// 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
while ClickContinue(True, True) do
wait(50);
if ((GetColor(401, 432) = 0) and (GetColor(435, 434) = 0)) then
begin
MouseBox(74, 423, 447, 437, 1);
Wait(300);
end else
if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(300);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end;
if(GetColor(54, 61) = 1319729)then
begin
DoSudoku;
break;
end;
wait(RandomRange(200, 400));
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.
Made it work when the user has completed all of Ali's tasks.
Markus
2009-04-19 22:20:28
From: lordsaturn
How ironic, coming from a developer. :p
Well, I'm a Super Moderator. You guys are SRL Developer, just take a look at the title :p
The Claw
2009-04-20 12:06:23
From: Bobarkinator
Dev posts combo breaker.
Negative :p
Nava2
2009-04-20 16:44:32
From: The Claw
Negative :p
Good Fight!
Would Wizzup please give us an SVN :(
n3ss3s
2009-04-20 19:33:56
Autoing from 100k was too tedious, as you can only do 2 sudokus before G.E ([WHORE] Add G.E [/WHORE], and nowdays bloods don't instantly sell - you can't imagine the growth of the cash pile when bloods used to sell instantly aswelll… So, now I'm autoing pure ess, atleast to 2M, and then I'll sudoku a few mills…
Bobarkinator
2009-04-21 02:39:50
From: Nava2
Good Fight!
Would Wizzup please give us an SVN :(
Why don't you use what Yakman suggested?
Nava2
2009-04-21 03:25:36
Complex and I am lazy.
Yakman
2009-04-21 04:01:04
if its simple enough for linux developers its simple enough for nava2
Nava2
2009-04-21 05:52:15
From: Yakman
if its simple enough for linux developers its simple enough for nava2
Nava2 is very simple…
n3ss3s
2009-05-02 13:12:27
I have a small efficiency idea which can make a difference tbh, if it already doesn't do some, make it store the points to be clicked in a TPAA, e.g
TPAA[0][1] would be the fire rune (or w/e), and the second point to be clicked. So, when the points have been put into a TPAA, you can shuffle the TPAA once (only the "parent array", not the points), and then, as you go through the TPAA to click the points, in beginning of each TPA you would SortTPAFrom from a random position, maybe your mouse pos or something, so it wouldn't have to go back and forth wasting time :)
Narcle
2009-05-05 21:45:17
I love how much this script evolves. I should try it again sometime, lol
Markus
2009-05-05 21:47:01
From: n3ss3s
I have a small efficiency idea which can make a difference tbh, if it already doesn't do some, make it store the points to be clicked in a TPAA, e.g
TPAA[0][1] would be the fire rune (or w/e), and the second point to be clicked. So, when the points have been put into a TPAA, you can shuffle the TPAA once (only the "parent array", not the points), and then, as you go through the TPAA to click the points, in beginning of each TPA you would SortTPAFrom from a random position, maybe your mouse pos or something, so it wouldn't have to go back and forth wasting time :)
There's a reason it's completely random, and that's to avoid detection. This would completely kill that thus making it more detectable.
The Claw
2009-05-06 10:36:41
I think he means to calculate (randomly) all the points it will click, before it clicks anywhere, then store those in a TPA and just cycle through that TPA
Markus
2009-05-06 12:40:53
It already does that? :p
Hobbit
2009-05-06 18:18:35
I think n3ss was meaning by "shuffling it" that it wouldn't do all the same rune at one, like do some fire then some death then some chaos and so on an keep switching it up a bit. this would provide more humanness to the script. Because really, who CAN do all of one type before moving on?
n3ss3s
2009-05-06 18:38:11
No damnit Markus got it at first try dummies :p I meant clicking em in distance order from mouse pos so you save time… Each rune type at a time like atm though…
Boreas
2009-05-07 07:25:59
If you're looking to use the click order for anti ban, the only way to do it is in the order that squares were solved.
Nava2
2009-05-07 07:29:47
solve in lines or in squares. Either way probably not necessary.
HyperSecret
2009-05-07 20:31:14
From: Boreas
If you're looking to use the click order for anti ban, the only way to do it is in the order that squares were solved.
Did I not release the version that I had solving that way? If you guys would like it to solve as it figures out each location let me know, the 'old' script (now outdated from update) I have does it that way.
But I guess that I was told that it slows down the time for solving too much…and wasn't worth it.
Boreas
2009-05-08 06:57:10
Well if it's a speed vs detectability issue, I think all methods besides HyperSecret's are equally detectable, so either go with the fastest one of those, or with HyperSecret's.
Hobbit
2009-05-08 07:50:19
^^ Least detectable would be best….
Its pretty fast as it is
The Claw
2009-05-08 09:59:20
Was using Hypersecret's version which does this for ages, was getting ~70 seconds a solve. Then I used Markus', and was getting ~30 seconds a solve
Markus
2009-05-08 11:15:31
Which is a difference of 40 secs and around 300k/hour less money you make. I'd like to agree with Wizzup on antiban this time: "Don't waste time antiban just do it as fast as you can, less time to get banned."
But if you want a speed increase: mousespeed := 40; does the job, brings it to around 25 secs per solve ;)
HyperSecret
2009-05-08 17:50:14
From: The Claw
Was using Hypersecret's version which does this for ages, was getting ~70 seconds a solve. Then I used Markus', and was getting ~30 seconds a solve
Make the waits shorter and you can cut it down to an easy ~45 seconds. I had like randomRange(945, 1696) [Some random numbers like that under 2 sec] between putting a rune in its spot then 'having a human think period' then clicking the next rune and placing it. So making that wait time shorter would dramatically drop the times.
But still I do say faster is better for the most part on this script.
Boreas
2009-05-09 06:53:21
Especially with recent events, I think it is in everyones best interests to switch to HyperSecret's method with think time reduced at individuals discretion. The only reason why this is working is it never occurred to jagex that sudoku could be autoed, so there are no detection algorithms for this. Luckily, so far the limited number of temp bans have been handled by automated response, however once a human reviews the activity or a leak occurs (not necessarily a leak of the script, but even just the fact that it exists), it will only be a matter of time. They could simply write something that checks if a rune is entered at a time where it would be impossible to know it without other runes being entered first. Then everyone would be banned at once. However, with HyperSecret's method with reduced think times, it would appear normal. And if they added a timer, it would appear as an extremely quick thinking person with fast hands. It would be tough for them to make a cut-off point for what speed is humanly possible and what speed is not.
Nava2
2009-05-09 15:42:29
I think if we make it do lines or squares at once, then add that thinging time between, it would create a more human response. I'm sure we can get it to work just as fast dping it this way.
n3ss3s
2009-05-09 20:14:07
"Don't waste time antiban just do it as fast as you can, less time to get banned."
Holy shit, that's like from a Samuel L. Jackson movie about autoing or something, as badass as Fawki's "Come and rape me" :p
Markus
2009-05-09 23:46:24
Boreas: still impossible to detect. I could've used an online sudoku solver.
Boreas
2009-05-10 09:16:01
Which is still 3rd party app. Same shit, different piles.
lordsaturn
2009-05-10 09:26:59
From: Boreas
Which is still 3rd party app. Same shit, different piles.
Haha, siggied. Are 3rd party apps not allowed at SRL forums?
The Claw
2009-05-10 09:34:04
3rd party app meaning it's still agaisnt Jagex's rules so they'd ban you anyway. And better remove the part of your sig linking to this thread…
Smartzkid
2009-05-10 10:31:31
I thought the same thing :p
Doesn't really matter though; he's dev so it 'could' just be a link to a dev thread..
Yakman
2009-05-10 15:46:24
if you use an online sudoku solver but move the mouse and click the right runes yourself, thats not against the rules is it?
Markus
2009-05-10 15:48:56
It isn't ;) I asked at the RS Forums, and I studied the rules:
Only stuff that interacts with RS applet, modifies it, or bypasses it is forbidden. An online sudoku solver doesn't. It also doesn't give you an unfair advantage, as anyone could've used an online solver, and you got those wizzkids who solve these noob sudokus in 5 secs.
n3ss3s
2009-05-10 18:31:48
Hmm, that's nice, because the speed of the clicking the runes in is pretty much same as if you looked it from a webpage with epic concentration…
Boreas
2009-05-11 07:44:39
From: Markus
It isn't ;) I asked at the RS Forums, and I studied the rules:
Only stuff that interacts with RS applet, modifies it, or bypasses it is forbidden. An online sudoku solver doesn't. It also doesn't give you an unfair advantage, as anyone could've used an online solver, and you got those wizzkids who solve these noob sudokus in 5 secs.
Widely available doesn't mean its fair, because it isn't built into the client that jagex provides every player (which would be truly available). But if a mod said an online sudoku solver is allowed, then disregard what I said.
Markus
2009-05-13 12:53:25
Fyi, another SRL Member (I'm sure someone here knows who I mean) made also a script which does this. He won't release it, but yea, fact is someone else cloned this (he didn't came up with the idea himself).
The Claw
2009-05-13 13:03:02
Who gave him the idea?
Nava2
2009-05-13 23:51:27
He knows about this script, he states he wrote a clone. Won't show me it though… o.O
I don't have any proof…
He knows it exists because I use it on the account we share.
The Claw
2009-05-14 11:22:03
So he's a mate of yours? IRL I'm assuming? That's good, means you can threaten to beat him up if he leaks the idea :p
Markus
2009-05-14 11:45:45
Not really, he lives in Australia just like you (unlike Nava2 who lives in Canada).
Nava2
2009-05-14 15:29:43
No, he says he won't leak it. I never told him but undid leave the annount there loaded with runes haha. He put two and two together. On all honesty, I'm not sure why he uses his when I have the real copy.
Wizzup?
2009-05-14 16:44:40
Why is his name not mentioned? I only read 'he' and 'his', without knowing who it is. Rather annoying.
Markus
2009-05-14 18:17:15
Because we like him to stay anonymous. There's no reason to tell his name.
HyperSecret
2009-05-14 20:14:57
Maybe we should know though so we can all keep any eye out for him hinting/leaking anything about this place/script.
Richard
2009-05-19 21:21:32
Well they must know people use it, because they've changed the look of Ali…
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
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;
//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 := '';
Players[0].Pass := '';
Players[0].Nick := '';
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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
CurPoint : TPoint;
canexit : boolean;
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
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);
end;
end;
end;
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' +
'VSCVXRQvQv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BSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50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7BeDGDMBKW' +
'h/FTjjwEfmrCnzrQj5WA/gBytNqLn6wcp79Bwmw8AM=');
OwnArr[5] := Point(20, 250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
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
0: 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;
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('');
SmartSetupEx(115, True, True, False);
SetTargetDC(SmartGetDC);
ActivateClient;
DeclarePlayers;
ScriptID := '1037';
LoadArrays;
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
repeat
if not LoggedIn then
LoginPlayer;
// 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
while ClickContinue(True, True) do
wait(50);
if ((GetColor(401, 432) = 0) and (GetColor(435, 434) = 0)) then
begin
MouseBox(74, 423, 447, 437, 1);
Wait(300);
end else
if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(300);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end;
if(GetColor(54, 61) = 1319729)then
begin
DoSudoku;
break;
end;
wait(RandomRange(200, 400));
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.
Nava2
2009-05-20 02:45:54
The reason why Ali's look was changed is because of the new quest that was released today. It's a newer quest so I'm assuming they had to change a few things. Like they re-vamped a few things for the quest, such as Ali's looks.
Markus
2009-05-20 13:03:36
Well I can't really call making Ali a fat bastard with a multi-coloured turban an improvement =/
Tbh we should rant @ forums, he's ugly now :(
Nava2
2009-05-20 16:25:04
Just realized. Assuming the iSpy leak is fixed. Ali might be safer now.
Wizzup?
2009-05-20 16:35:29
From: Nava2
Just realized. Assuming the iSpy leak is fixed. Ali might be safer now.
If you can point out the iSpy leak…?
n3ss3s
2009-05-20 16:55:06
By iSpy leak he refers to q_Q etc…
Wizzup?
2009-05-20 19:33:17
From: n3ss3s
By iSpy leak he refers to q_Q etc…
And my question was, can you show me the leak?
If you can't show me one, there isn't one.
n3ss3s
2009-05-22 18:43:55
From: Wizzup?
And my question was, can you show me the leak?
If you can't show me one, there isn't one.
I think Nava2 referred to whatever was the reason of us being screwed upon.
Markus
2009-05-24 14:02:43
Soul rune line:
http://itemdb-rs.runescape.com/viewitem.ws?obj=566&scale=1Profit reduced a LOT.
So what's the cause of this mysterious price drop? Will the soul runes recover back to 330ea? Find out, in the next episode of Sudokuwars!
Lee Lok Hin
2009-05-24 14:59:38

Laws and Cosmics also dropped.
Markus
2009-05-24 15:04:50
280 ea is normal for laws, and 147 is quite acceptable for cosmics. But 270 for souls isn't =/
Nava2
2009-05-24 18:15:08
Do we think it's being abused elsewhere?
lordsaturn
2009-05-24 18:34:59
RSBot VIP maybe?
Nava2
2009-05-24 20:54:27
Nope, I have access to an account there, its not in there.
Markus
2009-05-24 21:48:46
Probably a merching clan + declined interest in BH worlds, I think/hope they'll recover soon. (maybe now its a good time to stack up on soul runes? ;))
The Claw
2009-05-25 08:04:05
From: Markus
Probably a merching clan + declined interest in BH worlds, I think/hope they'll recover soon. (maybe now its a good time to stack up on soul runes? ;))
Exactly what I was gonna say:p
n3ss3s
2009-05-25 15:15:39
Well T was babbling about it in Rizon #rsbot some day, he'll propably give it to any of RSBot staff who asks for it… But I doubt they have armies or anything, even 10 more sudokuers beside us wouldn't affect the prices so bad…
Man, 273 ea - if someone is rich and can easily afford invensting 10M or something, you'd propably make a nice profit buying some souls and waiting for them to recover… I doubt they will ever go below 270, or at max 250, so no much chance for a big loss…
Markus
2009-05-25 15:25:48
Looks like they started recovering :)
Edit: already back @ 294ea, and I bought 15m worth of them <3 Already made 2m or 3m profit, best investment for me ever? :p
Nava2
2009-05-26 15:17:04
Markus beat me to the post :(
I was going to say, things are starting to get back to normal, I still am wondering what caused this crash, maybe a merchanting clan of some sort had soul runes for a couple weeks?
Edit: Markus again, already talked about merchanting clans… *sigh*
n3ss3s
2009-05-26 20:25:10
From: Markus
Looks like they started recovering :)
Edit: already back @ 294ea, and I bought 15m worth of them <3 Already made 2m or 3m profit, best investment for me ever? :p
You owe me.
Hobbit
2009-05-31 09:15:00
200mil worth of runes right here…..
No I did not abuse… I spent like 160m over 3 weeks
So like 8m spent a day… that only like 3 hours
The Claw
2009-05-31 11:52:29
From: Hobbit
200mil worth of runes right here…..
No I did not abuse… I spent like 160m over 3 weeks
So like 8m spent a day… that only like 3 hours
I jizz in my pants
Nava2
2009-05-31 20:24:47
From: Hobbit
200mil worth of runes right here…..
No I did not abuse… I spent like 160m over 3 weeks
So like 8m spent a day… that only like 3 hours
Holy shit, I didn't realise you were keeping them…
Hobbit
2009-06-01 05:05:52
I keep them until i have no more money… then i sell…
Why do you thin soul runes jumped from 275 to 281 over night ;)
126k soul runes is quite influential ;)
(Your Welcome everyone stock piling them)
HyperSecret
2009-06-02 18:25:11
Have fun selling those mind runes…
Hobbit
2009-06-02 18:53:17
Meh its only 4m worth… not a huge biggy
The Claw
2009-06-03 06:10:59
Sell for tokkul :)
Hobbit
2009-06-03 07:47:06
From: The Claw
Sell for tokkul :)
^ genius!
From: Hobbit
^ genius!
Onyx stuff has dropped as well, people actually buy minds in GE for slayer dart…
Hobbit
2009-06-05 23:53:26
From: c0de
Onyx stuff has dropped as well, people actually buy minds in GE for slayer dart…
Hardly :(
n3ss3s
2009-06-14 21:26:44
From: Hobbit
200mil worth of runes right here…..
No I did not abuse… I spent like 160m over 3 weeks
So like 8m spent a day… that only like 3 hours
I want your babies, shit dude… Oh btw,
We have reviewed all the macro programs available, and there are none we cannot detect.
You tried Andrew, you really did.
The Claw
2009-06-15 06:26:58
So has anyone been using this lately? Any bans?
HyperSecret
2009-06-15 22:04:28
I've been using it about ever other day got up to 4.5M right now started at 1M. So far so good. It hasn't ran for more than 1hr and 15 minutes at a single time…
HyperSecret
2009-06-30 21:32:27
Since when did Chaos runes jump up to 130+ each? Rune prices are really good right now overall. 1 run, 4.3M (1hr, 40min) and sold runes and now have 5.5M.
That is a pretty good profit compared to what we have been getting lately.
n3ss3s
2009-07-06 15:27:17
I know a n3ss3s who is going to do The Feud on his pure today, bloods 333… (And say thank you to a Markus who got n3ss3s' pure's thieving to 30 sometime :p )
Gonna check the MageMeFast thread about have people been using it, gotta train some mage aswell…
The Claw
2009-07-06 15:59:01
Heh, I could do with some bandos armour :p Might need to run this soon again too
Markus
2009-07-06 17:20:36
From: n3ss3s
Gonna check the MageMeFast thread about have people been using it, gotta train some mage aswell…
I'll revamp it later this week, it can use some tweaks for sure.
Atm sudoku profit is around 600k/hour, not too bad :p
n3ss3s
2009-07-06 22:11:00
Great, gonna get str level (79 - 80) at ape atoll guards first though, planted char there earlier apparently…
You guys may have noticed the link in my signature to a guide that can make you tons of money like this can. Boreas just pm'd me asking if my guide was this sudoku thing (i don't even know what it is. I thought sudoku was a puzzle of numbers?), and it's 100% my idea. Just didn't want anyone thinking I was taking credit for this/leaking it :p
~JAD
Method
2009-07-10 08:29:20
From: JAD
You guys may have noticed the link in my signature to a guide that can make you tons of money like this can. Boreas just pm'd me asking if my guide was this sudoku thing (i don't even know what it is. I thought sudoku was a puzzle of numbers?), and it's 100% my idea. Just didn't want anyone thinking I was taking credit for this/leaking it :p
~JAD
So does your guide contain or not contain information relating to this sudoku game? Your post didn't really make that clear.
From: Method
So does your guide contain or not contain information relating to this sudoku game? Your post didn't really make that clear.
Not in any way related to sudoku.
I wouldn't have said "just didn't want you guys thinking I was leaking this/taking credit for it, even though I completely am" lol :p
Method
2009-07-10 08:41:11
All righty. Would you be willing to post the guide on the SSRL forums or are you solely planning on selling it?
From: Method
All righty. Would you be willing to post the guide on the SSRL forums or are you solely planning on selling it?
I was considering posting for SSRL. Today I was making 3.6M a hour, but that is abnormal for my guide (a new record actually). It usually makes around 1M a hour. Eh I guess I will. Didn't even know that any people here even played Runescape :p I'll probably post it tomorrow.
Method
2009-07-10 08:51:24
From: JAD
I was considering posting for SSRL. Today I was making 3.6M a hour, but that is abnormal for my guide (a new record actually). It usually makes around 1M a hour. Eh I guess I will. Didn't even know that any people here even played Runescape :p I'll probably post it tomorrow.
That sounds pretty cool. Thanks!
n3ss3s
2009-07-11 00:28:31
From: JAD
I was considering posting for SSRL. Today I was making 3.6M a hour, but that is abnormal for my guide (a new record actually). It usually makes around 1M a hour. Eh I guess I will. Didn't even know that any people here even played Runescape :p I'll probably post it tomorrow.
If you post that guide here, I will fucking worship you. And your toes, I don't know if you're into that kind of stuff but anything goes for 3.6m/h ;)
From: n3ss3s
If you post that guide here, I will fucking worship you. And your toes, I don't know if you're into that kind of stuff but anything goes for 3.6m/h ;)
Lol, it is VERY rarely 3M plus. It already stopped being that profitable. I'm only making 1.85M per hour now, which is still really good for my strategy. It's usually only about 1M, give or take 100k. I'll still post it though if you guys want. I just need someone to make a script in here for it that's faster than mine :p
Method
2009-07-11 01:07:53
From: JAD
Lol, it is VERY rarely 3M plus. It already stopped being that profitable. I'm only making 1.85M per hour now, which is still really good for my strategy. It's usually only about 1M, give or take 100k. I'll still post it though if you guys want. I just need someone to make a script in here for it that's faster than mine :p
I'm still interested. :)
n3ss3s
2009-07-12 20:15:39
This is freaking dynamite with the current rune prices, souls 400gp bloods 350, wat?
The Claw
2009-07-13 10:42:37
Chaos, Deaths, Nats and Souls selling instantly at max and Laws and Bloods instantly at mid. Went from 2.7m -> 4.1m -> 5.6m in just a couple of hours today. :p
Markus
2009-07-13 14:15:21
I think it makes around 650k to 750k/h now instead of the usual 500 :p
n3ss3s
2009-07-13 14:40:58
I think Jagex changed the chat or something, can't remember anymore what the original one did wrong in the chats, then I made my own which sometimes click small casket, so here is my current mainloop which works perfectly :)
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, True);
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;
wait(RandomRange(200, 400));
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.
EDIT: Alright boys, 2.325m turned into 3.2M, over 35% profit :)
JESUSI had 4,5M. Script was ran for 2 hours and 4 minutes. Remaining 20k counted in, wealth increased to 6,1M. We have a 800k/h gentlemen.
The Claw
2009-07-19 20:35:27
Bump for n1ke to see the secret script which is making us all rich
Also, went from 10m to 14m.
Naike
2009-07-19 21:32:02
Cheers mate :)
Already seen, and tried it.
Seems to work like a charm, and the cash/h seems to be more then said ^^
Markus
2009-07-19 22:46:48
ARound 650k/hour with the current rune prices is my rough estimate :)
n3ss3s
2009-07-29 19:13:10
Replace your main loop (not the set up and shit before Repeat though) with the one below for fast talk handlage (only necassary things done, no itchlarin done etc, don't know if it works with them done)
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;
The Claw
2009-08-09 10:11:49
Currently 852k/hour profit which returns 136% of your initial cash per run. :)
n3ss3s
2009-08-09 11:51:30
I went with this to 14M and now I'm bursting to 82 :D
The Claw
2009-08-11 06:03:30
Nice lol. As requested by Widget heres my version - doesnt take breaks and works for if you've done all the quests.
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
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;
//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 := '';
Players[0].Pass := '';
Players[0].Nick := '';
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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
CurPoint : TPoint;
canexit : boolean;
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
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);
end;
end;
end;
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0cF07U2kGQ6aORGyKRWDRK1MCNHwi38C0Z4' +
'CLbxicQ2y98iba0EDUS3zXvn2dP7NiGTAdlW1gjyzZbxuDqo8e8G7' +
'tukG3I2jKk7TmXlDaDLbg7JJ62urG7J4Cm2jVs5Cv19WTCkLhwf1t' +
'duDLRCcmEsGsCz38uNjVcJRPgxrfY3bYaHNsia0j8ho0cqatjtplA' +
'YvHAlbwL98w5/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csieDie47V4Jqmnp' +
'BsCIvt+fznx5am63QC3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wL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3LQBHLllTSuYETjcZFSN3dXSoicCR3geO9ExEesC8Jx/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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc236MtLY9jMZHHBp6PD75AmFc' +
'VP1ayG8E8nSUZRl1wI0eamzuj0WddXcN9T4EjYqEEEuTP8bErg5OV' +
'4iIc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NBQsE2XsjWBC' +
'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, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
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
0: begin
Mouse(x, y, 0, 0, false);
wait(25+random(25));
result := ChooseOption('alk-to Ali Morrisane');
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;
begin
Smart_Members:= True;
Smart_Server := 111;
Smart_Signed := True;
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('');
//SmartSetupEx(115, True, True, False);
//SetTargetDC(SmartGetDC);
ActivateClient;
DeclarePlayers;
ScriptID := '1037';
LoadArrays;
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
repeat
if not LoggedIn then
LoginPlayer;
if CoinAmount('inv') < 59000 then
Writeln('wat');//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
while ClickContinue(True, True) do
wait(50);
//the claw
if((GetColor(80, 428) = 0) and (GetColor(438, 434) = 0))then
begin
MouseBox(78, 425, 440, 437, 1);
wait(300); //end the claw
end else if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(300);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end else if ((GetColor(379, 410) = 0) and (GetColor(160, 410) = 0)) then
begin
MouseBox(155, 405, 376, 411, 1);
wait(300);
end else if ((GetColor(138, 413) = 0) and (GetColor(378, 417) = 0) and (GetColor(342, 413) = 10666964)) then
//clicking "large casket"
begin
MouseBox(86, 411, 428, 424, 1);
wait(300);
end;
if(GetColor(54, 61) = 1319729)then
begin
DoSudoku;
break;
end;
wait(200);
{ if you want breaks, probably dont just uncomment this, i think its buggy - the claw
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; }
until(not(LoggedIn));
if(not(LoggedIn))then exit;
if (TimeFromMark(FailTime) > 600000) then
TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
The Claw
2009-08-11 06:03:44
Nice lol. As requested by Widget heres my version - doesnt take breaks and works for if you've done all the quests.
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
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;
//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 := '';
Players[0].Pass := '';
Players[0].Nick := '';
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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
CurPoint : TPoint;
canexit : boolean;
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
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);
end;
end;
end;
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/A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
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv6USidV38xtLi1upFHBqA6c5fKL' +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p7lLv/NXaC6ukvVdOHacOb+' +
'+sfDzc2jnc/lYvFkb+/0YP/s6+H3b0c/T47/g68l2+9Xi2sfdguFg' +
'41Ppe0twY93v8A3+K+z0xr5ei2fza6/W9xaWd7J54FjGzjO4SOZd+' +
'G/K5VwOP/NTk0tZTIibywvYVtwnCOVCISz9kp9fTVsJp02ciGXk20' +
'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, 'beN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j5WA/gBytNqLn6wcp79Bwmw8AM=');
OwnArr[5] := Point(20, 250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
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
0: begin
Mouse(x, y, 0, 0, false);
wait(25+random(25));
result := ChooseOption('alk-to Ali Morrisane');
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;
begin
Smart_Members:= True;
Smart_Server := 111;
Smart_Signed := True;
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('');
//SmartSetupEx(115, True, True, False);
//SetTargetDC(SmartGetDC);
ActivateClient;
DeclarePlayers;
ScriptID := '1037';
LoadArrays;
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
repeat
if not LoggedIn then
LoginPlayer;
if CoinAmount('inv') < 59000 then
Writeln('wat');//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
while ClickContinue(True, True) do
wait(50);
//the claw
if((GetColor(80, 428) = 0) and (GetColor(438, 434) = 0))then
begin
MouseBox(78, 425, 440, 437, 1);
wait(300); //end the claw
end else if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(300);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end else if ((GetColor(379, 410) = 0) and (GetColor(160, 410) = 0)) then
begin
MouseBox(155, 405, 376, 411, 1);
wait(300);
end else if ((GetColor(138, 413) = 0) and (GetColor(378, 417) = 0) and (GetColor(342, 413) = 10666964)) then
//clicking "large casket"
begin
MouseBox(86, 411, 428, 424, 1);
wait(300);
end;
if(GetColor(54, 61) = 1319729)then
begin
DoSudoku;
break;
end;
wait(200);
{ if you want breaks, probably dont just uncomment this, i think its buggy - the claw
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; }
until(not(LoggedIn));
if(not(LoggedIn))then exit;
if (TimeFromMark(FailTime) > 600000) then
TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
n3ss3s
2009-08-11 11:26:17
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU-
Last night before I went to sleep mom left the backyard door open so some fresh air would come in, and one of those huge ass bugs that resemble mosquitos came in, and ofcourse I had to go smack it while I was on mummies bursting with 5k bursts in inv (equal to 5m GP), naturally I died and didn't make it back :(
EvilChicken!
2009-08-11 12:05:54
Is 5M really that much? Sure, I empathize with you and I'm sorry for your loss, but 5M appears to be regain-able within approximately 6 hours of autoing with this script.
The Claw
2009-08-11 13:14:24
From: n3ss3s
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU-
Last night before I went to sleep mom left the backyard door open so some fresh air would come in, and one of those huge ass bugs that resemble mosquitos came in, and ofcourse I had to go smack it while I was on mummies bursting with 5k bursts in inv (equal to 5m GP), naturally I died and didn't make it back :(
Those bugs are fucking scary, I'd prefer to lose the cash than have one of them flying around tbh. Unlucky though, but like EC said its not that hard to make it back lol..
n3ss3s
2009-08-11 13:34:19
Is 5M really that much? Sure, I empathize with you and I'm sorry for your loss, but 5M appears to be regain-able within approximately 6 hours of autoing with this script.
Yea, from 100k, it's closer to legit playing than autoing :p
Btw no need to talk like you were in the General Help section…
Those bugs are fucking scary, I'd prefer to lose the cash than have one of them flying around tbh. Unlucky though, but like EC said its not that hard to make it back lol..
Yeah and they always have some shitty problem with their wings so that they crashland around your keyboard and face making you shit bricks… One day I spent like 2 hours trying to smack one from the ceiling of my room because the idiot was trying to fly through it making this "ptptptptptptptptptptptptptptptptpt" -sound…
EvilChicken!
2009-08-11 21:46:01

These?
If so, then I'm glad I'm not the only one reacting that way ..
n3ss3s
2009-08-11 23:12:28
Yea those fuckers… I had to hit it against the floor with a Donald Duck around 12 times before it stopped trying to fly…
Nava2
2009-08-11 23:55:58
lol.
I don't mind them. At least they eat the mosquitoes.
The Claw
2009-08-12 01:30:03
From: Nava2
lol.
I don't mind them. At least they eat the mosquitoes.
But what if they try and eat you too :eek:
n3ss3s
2009-08-12 15:19:08
I've come to the conclusion that those guys are capable of telepathy or shit, they fuck you up from the inside… Seriously it's like, you know they won't hurt you or shit but you still go like "MOM OMFG HALP"…
The Claw
2009-08-13 08:04:52
LOL. a
HyperSecret
2009-08-13 21:51:54
Ever heard of a screen on your window/door? Does a good job of keeping them out…
On-Topic - What are 'all' the quests for your version Claw? What others besides 'The Feud' ?
The Claw
2009-08-14 04:11:14
Dunno off the top of my head, its just for when youve completed the whole Rogue Traders minigame. Worth doing, as theres less dialogue which means better profit
n3ss3s
2009-08-15 18:40:35
Now I'm back at 11M noobs :p
HyperSecret
2009-08-15 19:52:26
Lose it all or spend it?
The Claw
2009-08-16 03:38:08
From: n3ss3s
Now I'm back at 11M noobs :p
45m here (after selling bgs and whip)
n3ss3s
2009-08-16 12:52:19
Meh, I'm having hard time deciding between continuing until 30M for Claws, and using 5M of my precious moneys to finish the bursting to 82… Maybe I'll get to 15M or so first, then use the 5M, so I still have a base for efficient sudokuing…
Markus
2009-09-07 13:37:51
Is it me or is the rune detection broken?
Edit: it is! And I can't remember the hack I used for death/airrunes (or at least, not how it worked)
Boreas
2009-09-07 16:25:40
Screenie pl0x
Markus
2009-09-07 16:29:54
Nothing visible, they just moved around 2 pixels and changed colour relations.
Uploading a .diff file as we speak.
Markus
2009-09-07 16:35:53
Tested and it solved a sudoku, so I think it works fine :)
--- C:/Program Files/SCAR 3.15/Scripts/dukun3s.txt ma sep 7 14:36:52 2009
+++ C:/Program Files/SCAR 3.15/Scripts/marduku.scar ma sep 7 14:40:43 2009
@@ -1,4 +1,4 @@
-******************************************************************************)
+{******************************************************************************)
(* *)
(* A L I R A P E R *)
(* *)
@@ -52,7 +52,7 @@
ColourArray: array [1..9] of integer;
const
- XStart = 116;
+ XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
@@ -79,14 +79,15 @@
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;
+ ColourArray[1] := getcolor(22, 103); //2396406
+ ColourArray[2] := ColourArray[1] - 682565; //1713841 -682566
+ ColourArray[3] := ColourArray[1] - 1329806; //1001067 -1001067
+ ColourArray[4] := ColourArray[1] + 13867564;
+ ColourArray[5] := ColourArray[1] + 9211426;
+ ColourArray[6] := ColourArray[1] + 12293673;
+ ColourArray[7] := ColourArray[1] + 9472;
+ ColourArray[8] := ColourArray[1] - 1540840; //Death eyes
+ ColourArray[9] := ColourArray[1] + 13525767;
SetLength(playground, 9);
for i := 0 to 8 do
SetLength(playground[i], 9);
@@ -98,17 +99,15 @@
for x := 0 to 8 do
begin
d := 0;
- for i := 1 to 8 do
+ for i := 1 to 9 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;
+ //writeln('gevonde op '+inttostr(x)+','+inttostr(y)+' - '+inttostr(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] + ' | '
n3ss3s
2009-10-05 21:37:15
Sudoku broken@@@ EDIT: Air rune to be exact.
Markus
2009-10-05 23:23:50
Give me a minute to fix it please :) (still loyally paying my members lol)
Edit: ColourArray[9] := ColourArray[1] + 13591559;
n3ss3s
2009-10-06 22:38:27
[BANANA]SUDOKU FOR YOUR LIVES[/BANANA]
It's 50-60% loloololoolololol
Started this run from less than 11M, ~4,5M left and already worth over 15m :)
Widget
2009-10-07 02:48:47
71.6% profit here :D
Edit: 17m to 32m after a couple times in around 6 hours, so that's 2.5m/hr, which is much better than even the herblore thing. :D:D:D
n3ss3s
2009-10-07 08:53:55
From: Widget
71.6% profit here :D
Edit: 17m to 32m after a couple times in around 6 hours, so that's 2.5m/hr, which is much better than even the herblore thing. :D:D:D
lolololololol
Gonna leave a 15M running while I'm at school, will be 10M richer when I come home :p
The Claw
2009-10-07 11:12:54
Rofl. Anyone wanna get my theiving up from 22 to 30 something and do that shit quest for me? :D (on a shit pure account)
Widget
2009-10-07 11:40:03
From: The Claw
Rofl. Anyone wanna get my theiving up from 22 to 30 something and do that shit quest for me? :D (on a shit pure account)
Just go cake some in Ardougne
Naike
2009-10-07 11:59:31
I just made a 100 line tea theiver, and had it running for two hours ;)
n3ss3s
2009-10-07 15:15:43
From: N1ke!
I just made a 100 line tea theiver, and had it running for two hours ;)
I once made a 100 line tea thiever and had it running for half an hour, perm banned :D
ZephyrsFury
2009-10-07 15:56:08
From: n3ss3s
I once made a 100 line tea thiever and had it running for half an hour, perm banned :D
I made an autoclicker + uptext checker, got me 5 to 30 theiving. :)
Markus
2009-10-07 18:20:44
I did it legit! Ardy cakes and such trapping the guards (had to practice my fightcave trapping skills lolz)
(Did auto 37-53 in one day though, <3 MFT (got me few M worth of seeds lol).
n3ss3s
2009-10-07 18:35:03
15M turned into 26M
_ChArMz
2009-10-07 20:06:40
someone should hook me up or direct me to the newest/working verison of this script :D
Widget
2009-10-07 20:33:31
Here you go :p
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
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;
//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 = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '675';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'idge';
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; }
ColourArray[1] := getcolor(22, 103); //2396406
ColourArray[2] := ColourArray[1] - 682565; //1713841 -682566
ColourArray[3] := ColourArray[1] - 1329806; //1001067 -1001067
ColourArray[4] := ColourArray[1] + 13867564;
ColourArray[5] := ColourArray[1] + 9211426;
ColourArray[6] := ColourArray[1] + 12293673;
ColourArray[7] := ColourArray[1] + 9472;
ColourArray[8] := ColourArray[1] - 1540840; //Death eyes
ColourArray[9] := ColourArray[1] + 13591559;
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 9 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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
CurPoint : TPoint;
canexit : boolean;
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
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);
end;
end;
end;
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0cF07U2kGQ6aORGyKRWDRK1MCNHwi38C0Z4' +
'CLbxicQ2y98iba0EDUS3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H1nOF4Gvl' +
'mc/P9rrtULbjxgTvLF9zCqwrBqVonCDJzNHJTJBKLRqkauPFDlkxy' +
'ke3gU4idF75E29qoGsG/0PiohdiQmaBiC2tkxebIAL8omdiQdTBp2' +
'/VcUtsstuAkVzl+Y7Xa9UBgPbTVzsBGvtrYSCcsieDie47V4Jqmnp' +
'BsCIvt+fznx5am63QC3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv6USidV38xtLi1upFHBqA6c5fKL' +
'yLvx3Ph8M56+JiYmF6WmR1xYXqC04zYmWKAjn3osVFcWw06OjRk4n' +
'k6pN4P85PVW0Cv0Lwgtix4eeGHl59s3K3Fvg4htW4SkI5THvwv21+' +
'Sbe+2AsHjfy0sxr4ITyoC6Ul4vJha71IJTHDDN14X7y6ODg1MjI3M' +
'tJMv9qirCEAT1kwhQIciiPmXw2C9ytzXW0s/NxLCbyzNjz2fEXhPI' +
's4SG7kS5cUZ7JYoatLriRezo6+qPRZwMDk8NPgRO0sATxAy1yRVgC' +
'OTKD9h+5nOB83m9v7+vpGe5/hGrCKFlCq7goay5duHInApzm0iInf' +
'N5ra+vt7oZMaI4W4l9CZImSK/EFRwvOqY0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dQFN3K8p2cokXg+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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqM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nGIj+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, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
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
0: begin
Mouse(x, y, 0, 0, false);
wait(25+random(25));
result := ChooseOption('alk-to Ali Morrisane');
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;
begin
Smart_Members:= True;
Smart_Server := 60;
Smart_Signed := True;
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('');
//SmartSetupEx(115, True, True, False);
SetTargetDC(SmartGetDC);
//ActivateClient;
DeclarePlayers;
ScriptID := '1037';
LoadArrays;
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
//mousespeed := 40;
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
repeat
if not LoggedIn then
LoginPlayer;
if CoinAmount('inv') < 59000 then
Writeln('wat');//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
while ClickContinue(True, True) do
wait(1);
//the claw
if((GetColor(80, 428) = 0) and (GetColor(438, 434) = 0))then
begin
MouseBox(78, 425, 440, 437, 1);
wait(10); //end the claw
end else if((GetColor(136, 411) = 0) and (GetColor(333, 409) = 0)) or ((GetColor(136, 411) = 16777215) and (GetColor(333, 409) = 16777215))then
begin //widget
MouseBox(80, 403, 438, 416, 1);
wait(10);
end else if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(10);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(10);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(10);
end else if ((GetColor(379, 410) = 0) and (GetColor(160, 410) = 0)) then
begin
MouseBox(155, 405, 376, 411, 1);
wait(10);
end else if ((GetColor(138, 413) = 0) and (GetColor(378, 417) = 0) and (GetColor(342, 413) = 10666964)) then
//clicking "large casket"
begin
MouseBox(86, 411, 428, 424, 1);
wait(10);
end;
if(GetColor(54, 61) = 1319729)then
begin
mousespeed := 12;
DoSudoku;
break;
mousespeed := 40;
end;
wait(10);
{ if you want breaks, probably dont just uncomment this, i think its buggy - the claw
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; }
until(not(LoggedIn));
if(not(LoggedIn))then exit;
if (TimeFromMark(FailTime) > 600000) then
TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
Narcle
2009-10-07 20:38:29
Ahh good old Ali raper, need to get members again.
_ChArMz
2009-10-07 20:59:08
thank you widget :D
besides doing the feud + starting rogue trader is there anything else that can be done to increase speed/decrease rune cost?..or cut down on the convo time?
From: Widget
71.6% profit here :D
Edit: 17m to 32m after a couple times in around 6 hours, so that's 2.5m/hr, which is much better than even the herblore thing. :D:D:D
Wow.. It maybe time for me to test out this 'sudoku' hype :)
What is that Rule7Proof though? You set that to true I'm assuming?
n3ss3s
2009-10-07 22:41:34
From: JAD
Wow.. It maybe time for me to test out this 'sudoku' hype :)
What is that Rule7Proof though? You set that to true I'm assuming?
Rule7Proof makes it so that it wont click in the runes, it will just show them in debug window and you gotta click them in by yourself, but that is for vagfaces, me, and afaik nobody has gotten a random event from sudoku, and only bans are from going 100k -> 100m in a week :D
Narcle
2009-10-07 22:50:10
From: _ChArMz
thank you widget :D
besides doing the feud + starting rogue trader is there anything else that can be done to increase speed/decrease rune cost?..or cut down on the convo time?
I'm pretty sure there's 1 or 2 quest to cut down the convo… I forgot which they were, could someone enlighten us again? (I think its just 1 iirc)
n3ss3s
2009-10-07 23:04:59
From: Narcle
I'm pretty sure there's 1 or 2 quest to cut down the convo… I forgot which they were, could someone enlighten us again? (I think its just 1 iirc)
Itchlarin's Little Helper is one for sure…
_ChArMz
2009-10-08 06:47:57
From: n3ss3s
Itchlarin's Little Helper is one for sure…
this quest cuts down the convo time?
Method
2009-10-08 07:13:47
From: _ChArMz
this quest cuts down the convo time?
Yeah, I think there's only three or so parts of dialogue you have to get through when first talking to him if you do the quest.
Markus
2009-10-09 15:24:06
Ictlarin's Little Helper cuts down, and afaik so does Contact!
I'm not sure if you need to do them both though, but iirc they make the script like 10% to 20% faster!
Highly recommend you do them, as it are pretty nice quests too :) At least Ictlarin was fun when I did it (and still cared about RS).
Smartzkid
2009-10-09 22:17:40
Wow, why the sudden increase in profits?
_ChArMz
2009-10-09 23:30:52
I changed the script a bit:
Edited Ali finder, made it use CTS 2 and some other minor things
Added Click2Continue, PLeaseWait, ClickOption - all make the convo 10x faster
Edited main loop a bit, should work for everyone, even if you didint do quests?
Widget
2009-10-10 00:39:55
From: _ChArMz
I changed the script a bit:
Edited Ali finder, made it use CTS 2 and some other minor things
Added Click2Continue, PLeaseWait, ClickOption - all make the convo 10x faster
Edited main loop a bit, SO CHECK THE MAIN LOOP, so u can make it towards your convo, mine does the convo after u have completed the 2 quests stated above
Perhaps you should post the changes? :p (Edit: Wasn't attached until I posted this :p)
Also, changing your Mouse can help too
procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
a, b, c: Integer;
begin
MMouse(mousex, mousey, ranx, rany);
Wait(20 + Random(30));
GetMousePos(b, c);
HoldMouse(b, c, left);
repeat
Wait(5 + Random(5));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, left);
Wait(20 + Random(20));
end;
(hey Wizzup, make
tags monospace >:[)
_ChArMz
2009-10-10 00:43:10
From: Widget
Perhaps you should post the changes? :p (Edit: Wasn't attached until I posted this :p)
Also, changing your Mouse can help too
I have it uploaded as an attachment, u prob just missed it cuz i had it removed for changes for a few minutes :p
what are u talking about changing my mouse?
Widget
2009-10-10 01:29:01
Mouse has a rather long Wait() after it clicks, so it makes the sudoku solving itself a ton faster without having the MouseSpeed really high
ZephyrsFury
2009-10-10 04:10:25
I decreased waits, increased mouse speed and made the talking faster on my copy of the script, getting around 70 - 80 sph now. Is that good?
n3ss3s
2009-10-10 04:53:50
I decreased waits, increased mouse speed and made the talking faster on my copy of the script, getting around 70 - 80 sph now. Is that good?
Post that shit.
_ChArMz
2009-10-10 17:59:54
Sudoku Solver 3h:2m:17s
Solved: 237 | SpH: 78
+------------------------------------+
| Name | Price | Amount | Total GB |
| Blood | 410 | 6131 | 2513710 |
| Death | 411 | 6154 | 2529294 |
| Mind | 8 | 6977 | 55816 |
| Law | 423 | 7090 | 2999070 |
| Nature | 301 | 6391 | 1923691 |
| Body | 9 | 6860 | 61740 |
| Chaos | 111 | 6699 | 743589 |
| Soul | 469 | 6934 | 3252046 |
| Cosmic | 211 | 7156 | 1509916 |
+------------------------------------+
Complete Total = 15588872
Thats from the new Ali posted below, remember to change ur Mouse in SRL like widget said from Wait(100 + Random(100)) to Wait(20 + Random(20)).
I made 2,104,498 GP per hour :D, @ mid price, what do u guys sell @?
I'll add the nice proggy to the script later..
Hobbit
2009-10-10 18:08:17
very sexy :p
Narcle
2009-10-10 19:17:17
That's ridiculous… now imma have to get members.
Hobbit
2009-10-10 19:52:32
It hates me :(
It keeps choosing the wrong menus, I tried to modify it a bit but nothing helped.
Narcle
2009-10-11 10:52:26
@ Charmz_ script
It messes up when he does "..Sigh" because its also blue. This is if you haven't done the other quests to shorten his talking. So I did this to fix it, works really good.
function Click2Continue : Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches : TPointArray;
b : TBox;
Height, t : Integer;
ATPA : Array of TPointarray;
begin
Result := False;
FindColors(bTxt, 16711680, MCX1, MCY1, MCX2, MCY2);
FindColors(wTxt, 16777215, MCX1, MCY1, MCX2, MCY2);
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
ATPA := TPAtoATPAEx(SearchTPA, 153, 21);
SortATPASize(ATPA, true);
if Length(ATPA[0]) < 1 then
Exit;
TextTPA := LoadTextTPA('here to conti', NPCChars, Height);
Result := FindTextTPAinTPA(Height, TextTPA, ATPA[0], Matches);
if Result then
begin
b := GetTPABounds(ATPA[0]);
with b do
Mouse(RandomRange(x1, x2), RandomRange(y1 + 3, y2 - 3), 2, 1, True);
t := GetSystemTime;
while ( PleaseWait(b) ) and ( GetSystemTime - t < 5000 ) do
Wait(10 + Random(10));
end;
end;
Just had it search for the bigger TPA. Its still just as fast.
_ChArMz
2009-10-11 11:34:32
thats my bad, just use this one, it will choose click to continue even if it isnt the biggest, not trying to up you narcle, but this is just basicly the ClickOption I added :D…i should have made it this way to begin with
function Click2Continue : Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches : TPointArray;
Search2D : T2DPointArray;
b : TBox;
Height, t : Integer;
begin
Result := False;
FindColors(bTxt, 16711680, MCX1, MCY1, MCX2, MCY2);
FindColors(wTxt, 16777215, MCX1, MCY1, MCX2, MCY2);
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
Search2D := SplitTPAEx(SearchTPA, 20, 2);
TextTPA := LoadTextTPA('here to conti', NPCChars, Height);
for i := 0 to High(Search2D) do
begin
Result := FindTextTPAinTPA(Height, TextTPA, Search2D[i], Matches);
if Result then
begin
b := GetTPABounds(Search2D[i]);
with b do
Mouse(RandomRange(x1, x2), RandomRange(y1 + 3, y2 - 3), 2, 1, True);
t := GetSystemTime;
while ( PleaseWait(b) ) and ( GetSystemTime - t < 5000 ) do
Wait(10 + Random(10));
Break;
end;
end;
end;
n3ss3s
2009-10-11 14:52:31
You infidels! Use my chat shit!
Narcle
2009-10-11 15:48:59
From: n3ss3s
You infidels! Use my chat shit!
The hypno-toad isn't working.
Sudoku Solver 2h:59m:0s
Solved: 169 | SpH: 57
Hobbit
2009-10-11 17:01:43
It's still missclicking for me :(
I rarely chooses "Large Casket" it will almost always go with "Small Casket" or the one to view elemental runes. I tried decreasing the random x and y but no effect.
Method
2009-10-11 20:41:51
Is it taking multiple seconds to get the solution and start clicking the runes for anyone? I remember it being very fast, but I tried it yesterday and it seemed somewhat slower.
n3ss3s
2009-10-12 07:48:17
From: Hobbit
It's still missclicking for me :(
I rarely chooses "Large Casket" it will almost always go with "Small Casket" or the one to view elemental runes. I tried decreasing the random x and y but no effect.
From: n3ss3s
You infidels! Use my chat shit!
Nuff sade.
marpis
2009-10-13 04:57:44
Just finished The Feud and talked to aubury, can't wait to test this! :)
So, the version in the 1st post is working?
(@ my gf's place atm)
E: Looks like charmz's version works…
Markus
2009-10-13 10:34:36
Na, version in the first post doesn't work. Basically everyone got his own unique version over here with modifications over here and there (will be easy to find the leaker IF the script ever gets leaked, too many watermarks xD).
Just use one of the versions, patch them with n3s' talking/uptext patch and my colour patch (one or two pages back + the one at this page) and it works fine I think.
Gotta admit this is my most used script, and the most forked script on entire SRL :p
marpis
2009-10-13 13:26:37
Oh my God… It really works! :eek:
I can bet my head that this is the most amazing script ever written for RS! :)
I'm just so paranoid now, I hope the sudoku doesn't get nerfed!
If there's anything I can do to tell how grateful I am for this script, you name it :)
E: Getting 71% profit :) Started with 300k :D
E2: Omg 1,8m/hour profit? Is this even real?
n3ss3s
2009-10-13 14:54:20
From: marpis
Oh my God… It really works! :eek:
I can bet my head that this is the most amazing script ever written for RS! :)
I'm just so paranoid now, I hope the sudoku doesn't get nerfed!
If there's anything I can do to tell how grateful I am for this script, you name it :)
E: Getting 71% profit :) Started with 300k :D
Don't worry, it's been here for a while, and in some not so sensitive use :p
For Hobbit :
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
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;
DoSleep = False;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 60;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
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] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
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 DebugMode 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, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
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;
if (debugmode) then
begin
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;
end;
for z := 0 to 8 do
begin
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('Clicking: '+inttostr(curpoint.x)+', '+inttostr(curpoint.y)+' with a '+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);
end;
end;
end;
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/xA4zok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boRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv6USidV38xtLi1upFHBqA6c5fKL' +
'yLvx3Ph8M56+JiYmF6WmR1xYXqC04zYmWKAjn3osVFcWw06OjRk4n' +
'k6pN4P85PVW0Cv0Lwgtix4eeGHl59s3K3Fvg4htW4SkI5THvwv21+' +
'Sbe+2AsHjfy0sxr4ITyoC6Ul4vJha71IJTHDD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tZTIibywvYVtwnCOVCISz9kp9fTVsJp02ciGXk20' +
'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+3zbiq1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7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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;
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;
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;
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);
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]);
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
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, 11305057, 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'];
IncEx(MouseSpeed, 2);
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.
Sleeping is commented out etc, this is as I run it
The Claw
2009-10-13 21:16:42
From: marpis
E2: Omg 1,8m/hour profit? Is this even real?
Nope, its all in your head. Everything is.
YoHoJo
2009-10-13 21:22:02
Pascal Tags, sweeeet!
Hobbit
2009-10-14 00:46:57
From: n3ss3s
Don't worry, it's been here for a while, and in some not so sensitive use :p
For Hobbit :
<3 Thanks :)
I based this off of the most recent script posted by Widget:
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
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;
//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 = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '675';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'idge';
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; }
ColourArray[1] := getcolor(22, 103); //2396406
ColourArray[2] := ColourArray[1] - 682565; //1713841 -682566
ColourArray[3] := ColourArray[1] - 1329806; //1001067 -1001067
ColourArray[4] := ColourArray[1] + 13867564;
ColourArray[5] := ColourArray[1] + 9211426;
ColourArray[6] := ColourArray[1] + 12293673;
ColourArray[7] := ColourArray[1] + 9472;
ColourArray[8] := ColourArray[1] - 1540840; //Death eyes
ColourArray[9] := ColourArray[1] + 13591559;
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 9 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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
CurPoint : TPoint;
canexit : boolean;
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
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);
end;
end;
end;
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' +
'VSCVXRQvQvVQgH8y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aBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv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MBKW' +
'h/FTjjwEfmrCnzrQj5WA/gBytNqLn6wcp79Bwmw8AM=');
OwnArr[5] := Point(20, 250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
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
0: begin
Mouse(x, y, 0, 0, false);
wait(25+random(25));
result := ChooseOption('alk-to Ali Morrisane');
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;
FirstC: Boolean;
begin
Smart_Members:= True;
Smart_Server := 60;
Smart_Signed := True;
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('');
//SmartSetupEx(115, True, True, False);
SetTargetDC(SmartGetDC);
//ActivateClient;
DeclarePlayers;
ScriptID := '1037';
LoadArrays;
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
//mousespeed := 40;
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
repeat
if not LoggedIn then
LoginPlayer;
if CoinAmount('inv') < 59000 then
Writeln('wat');//TerminateScript;
debug('hoi?');
if SudokuMenu then
DoSudoku;
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(1000+random(1000));
if(ClickContinue(false, false))then break;
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(800+random(500));
end;
end;
if A < 11 then
repeat
FirstC := true;
while ClickContinue(False, False) do
begin
if(FirstC)then
begin
MouseBox(255,452,352,458,1);
GetMousePos(x,y);
end else
Mouse(x,y,0,0,true);
ChatWait;
wait(1);
FirstC := false;
end;
//the claw
if((GetColor(80, 428) = 0) and (GetColor(438, 434) = 0))then
begin
MouseBox(78, 425, 440, 437, 1);
wait(10); //end the claw
end else if((GetColor(136, 411) = 0) and (GetColor(333, 409) = 0)) or ((GetColor(136, 411) = 16777215) and (GetColor(333, 409) = 16777215))then
begin //widget
MouseBox(80, 403, 438, 416, 1);
wait(10);
end else if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(10);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(10);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(10);
end else if ((GetColor(379, 410) = 0) and (GetColor(160, 410) = 0)) then
begin
MouseBox(155, 405, 376, 411, 1);
wait(10);
end else if ((GetColor(138, 413) = 0) and (GetColor(378, 417) = 0) and (GetColor(342, 413) = 10666964)) then
//clicking "large casket"
begin
MouseBox(86, 411, 428, 424, 1);
wait(10);
end;
if(GetColor(54, 61) = 1319729)then
begin
mousespeed := 18+random(3);
DoSudoku;
break;
mousespeed := 40;
end;
wait(10);
{ if you want breaks, probably dont just uncomment this, i think its buggy - the claw
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; }
until(not(LoggedIn));
if(not(LoggedIn))then exit;
if (TimeFromMark(FailTime) > 600000) then
TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
I changed the main loop around a little bit so now when the Script clicks to continue, it stays in the same spot. It clicks the first time in a random location there, waits for next ctc, then clicks the same point. Faster/more human like IMO. Also added an extra fail safe for after talking to Ali in the main loop, because it was sometimes successfully talking to him, then talking to him again, not noticing the ClickToContinue..
Also increased mouse speed a little bit. All I changed was the main loop, so you can just copy + paste that.
BTW, when putting in the runes, why does the script only seem to click the right half side of the square? Never seems to be the left side.. I couldn't find where to change that though.
I just want to say WOWOWOOWOWOWOWO, that solver is blindingly fast..maybe to fast ? It's been awhile, so I'm kinda Rusty…I used the copy that N3ss3s posted..I experienced quite a bit of lag, so I added a bunch of waits, this helped it along, but I xperienced the same problem as Jad, with it keep clicking on Ali and not the click to continue… I did a little more fudging, but to no avail, sorry, I didn't have any luck with the one you posted Jad…. When this is working like it's supposed to, it is simply AMAZING !!!!
Keep up the Great work guys !!!
~RAM
n3ss3s
2009-10-16 12:00:17
From: RAM
I just want to say WOWOWOOWOWOWOWO, that solver is blindingly fast..maybe to fast ? It's been awhile, so I'm kinda Rusty…I used the copy that N3ss3s posted..I experienced quite a bit of lag, so I added a bunch of waits, this helped it along, but I xperienced the same problem as Jad, with it keep clicking on Ali and not the click to continue… I did a little more fudging, but to no avail, sorry, I didn't have any luck with the one you posted Jad…. When this is working like it's supposed to, it is simply AMAZING !!!!
Keep up the Great work guys !!!
~RAM
It's working just fine for me :( Why does it go this way with every script I touch lol…
From: n3ss3s
It's working just fine for me :( Why does it go this way with every script I touch lol…
Probably because you have some leet computer and connection ? and I'm only running XP 3.5 processer, 1 gigittygig of ram and satellite connection…..you ?
~RAM
YoHoJo
2009-10-16 15:15:15
From: RAM
Probably because you have some leet computer and connection ? and I'm only running XP 3.5 processer, 1 gigittygig of ram and satellite connection…..you ?
~RAM
XP 1"gigittygig" or ram 2.8Ghz, and when i used it (long ago) it was perfectly fine, no lag , hmmm.
Method
2009-10-16 17:02:34
From: Method
Is it taking multiple seconds to get the solution and start clicking the runes for anyone? I remember it being very fast, but I tried it yesterday and it seemed somewhat slower.
Anyone?? :(
Hobbit
2009-10-16 20:50:07
From: n3ss3s
It's working just fine for me :( Why does it go this way with every script I touch lol…
It runs perfect for me n3ss3s :)
n3ss3s
2009-10-17 05:29:53
It runs perfect for me n3ss3s
Yay :p
RAM: I'm AMD Athlon X2 2,6 ghz, and 3 giggetygigs of ram…
Markus
2009-10-17 13:36:25
From: Method
Is it taking multiple seconds to get the solution and start clicking the runes for anyone? I remember it being very fast, but I tried it yesterday and it seemed somewhat slower.
Probably you or your version. Rune detection+solving shouldn't take more than 500ms, so within one second it should start clicking.
marpis
2009-10-17 15:24:49
From: Markus
Probably you or your version. Rune detection+solving shouldn't take more than 500ms, so within one second it should start clicking.
100% Him or his version… Mine is working perfectly :)
Method
2009-10-17 15:37:13
I was using the one posted by charmz or Widget, but I'll try one of the other ones later.
lordsaturn
2009-10-17 18:18:24
thats why there should be a private script database accessible through the forums divided into sections by member rank :o
Cut some fat, added some debugs and waits, renamed as my girlfreind was offended ;)…
Working FLAWLESSLY now,
E. used Jad's ALI Proc, sorry, forgot to credit.
~RAM{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.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;
DoSleep = True;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 60;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= 'Ramington';
SRLpassword:= '';
Players[0].Name := 'gertjaars';
Players[0].Pass := 'srlrules';
Players[0].Nick :=' jaa';
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] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
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 DebugMode 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;
debug('LoadPossibilities');
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;
debug('AddToStack');
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
debug('SudokuMenu');
FindColorsTolerance(TPA, 797794, 0, 0, 95, 85, 0);
Result := High(TPA) > 50;
end;
function EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
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;
if (debugmode) then
begin
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;
end;
for z := 0 to 8 do
begin
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('Clicking: '+inttostr(curpoint.x)+', '+inttostr(curpoint.y)+' with a '+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);
end;
end;
end;
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
debug('LoadArrays');
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0cF07U2kGQ6aORGyKRWDRK1MCNHwi38C0Z4' +
'CLbxicQ2y98iba0EDUS3zXvn2dP7NiGTAdlW1gjyzZbxuDqo8e8G7' +
'tukG3I2jKk7TmXlDaDLbg7JJ62urG7J4Cm2jVs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idF75E29qoGsG/0PiohdiQmaBiC2tkxebIAL8omdiQdTBp2' +
'/VcUtsstuAkVzl+Y7Xa9UBgPbTVzsBGvtrYSCcsieDie47V4Jqmnp' +
'BsCIvt+fznx5am63QC3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uy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kH7URD1kdAY5zxaJM+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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc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zkcu16US5mQXiaYaZOuJecHhmZnZhYeDuDFt/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
debug('Solving Sudoku');
UnSolvable := false;
ClearReport;
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;
Wait(100);
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;
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);
end;
if DisplayDetails then
Writeln(inttostr(TotalEmpty));
LoadPossibilities;
Wait(100);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
debug('Compiling Report');
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
debug('function DoSudoku');
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]);
Wait(100);
Disguise('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
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
debug('TalkToAli');
Result:= ChooseOption('orris');
if(Result)then exit;
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
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
0: begin
Mouse(x, y, 0, 0, false);
wait(25+random(25));
result := ChooseOption('alk-to Ali Morrisane');
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
Smart_Members:= True;
Smart_Server := xxx;
Smart_Signed := True;
SetupSRL;
ClearDebug;
displaydebugimgwindow(300, 300);
DeclarePlayers;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
IncEx(MouseSpeed, 2);
repeat
//if CoinAmount('inv') < 40000 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
Wait(1001);
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);
Wait(1001);
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;
Wait(1001);
if(GetColor(54, 61) = 1319729)then
begin
DoSudoku;
debug('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;
debug('FailTime');
if (GetSystemTime > ReportTime) then
Report;
debug('ReportTime');
until false;
end.
The Claw
2009-10-17 23:06:14
Could we somehow reverse merchant with the massive amounts of runes we're putting on the market? We have alot of people running this atm, and most runes usually sell immediately, which means that there's not enough supply for the price that we're putting up. If we all put our runes on offer at a specified time at max/2 below max, depending on how many we have we might be able to fill all the current orders. If we filled all orders between 2 below mid and max, and put a large surplus of runes on offer at max, as most legits would sell their runes at mid and most people buying need them immediately, the buyers would have no option except to buy at max, which would push the prices up and lead to higher profits. Only possible because as a group we have quite a large turnover of runes.
Hobbit
2009-10-17 23:21:18
I am never in a rush so i push all my runes at max and just let them sit. Usually takes a few days for them all to go through. Oh and I do 50m in Ali before I dump.
_ChArMz
2009-10-18 00:51:07
From: Hobbit
I am never in a rush so i push all my runes at max and just let them sit. Usually takes a few days for them all to go through. Oh and I do 50m in Ali before I dump.
I will do this from now on also :D
n3ss3s
2009-10-18 13:33:00
Jesus, I started at the most likely lower half of 12M, now I'm down to 8.5m and 8.5 + Runes is 15,9M, so it's like 4m gave not much from 4m? 100% please?
From: The Claw
Could we somehow reverse merchant with the massive amounts of runes we're putting on the market? We have alot of people running this atm, and most runes usually sell immediately, which means that there's not enough supply for the price that we're putting up. If we all put our runes on offer at a specified time at max/2 below max, depending on how many we have we might be able to fill all the current orders. If we filled all orders between 2 below mid and max, and put a large surplus of runes on offer at max, as most legits would sell their runes at mid and most people buying need them immediately, the buyers would have no option except to buy at max, which would push the prices up and lead to higher profits. Only possible because as a group we have quite a large turnover of runes.
Wouldn't that have an adverse affect?
A rise in supply forces a decrease in price for the supply and demand lines to reach equilibrium.
_ChArMz
2009-10-18 19:22:16
Who here knows some ways to transfer cash?
YoHoJo
2009-10-19 00:10:28
Junk Trade is all I know to transfer.
But you can GOOGLE up other methods maybe :D!
E: Sythe.org would also be good for looking up how to transfer.
(Sorry my post just told you to search, that annoys me sometimes but i guess it helps?)
The Claw
2009-10-19 00:48:11
From: YoHoJo
Junk Trade is all I know to transfer.
But you can GOOGLE up other methods maybe :D!
E: Sythe.org would also be good for looking up how to transfer.
(Sorry my post just told you to search, that annoys me sometimes but i guess it helps?)
The methods you find on sythe and google are usually either crap or nerfed nearly immediately, as by the time sythe and google knows, everyone knows. Generally anyway. Just saying, it was a fair question :p
From: JAD
Wouldn't that have an adverse affect?
A rise in supply forces a decrease in price for the supply and demand lines to reach equilibrium.
It would except we'd put all the supply on at max. So if they want it immediately, they either pay the price forcing it up, or wait with an offer on mid/low. It would reach a price they'd refuse to pay though, but that would likely be a fair bit higher.
The Claw
2009-10-19 07:19:10
Is anyone else getting weird behaviour with it? It was working fine yesterday (ran for hours, used up 6m or so cash), now it just randomly logs me out when its halfway through solving a sudoku. First time it solved 5 before it happened, then it solved 2 or 3, now it just logs me out through my first one. The script doesnt log me out, I just get disconnected. Has happened the last 5 times, have restarted scar and shit to no avail. Could be a memory issue, but I doubt it, I have 4gb ram…
Hobbit
2009-10-19 09:29:03
Nope mine is fine :)
Hobbit
2009-10-19 22:15:55
For The Claw
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALIRAPER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
const
Rule7proof = True; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
DoSleep = False;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 60;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
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] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
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 DebugMode 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, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
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;
if (debugmode) then
begin
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;
end;
for z := 0 to 8 do
begin
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('Clicking: '+inttostr(curpoint.x)+', '+inttostr(curpoint.y)+' with a '+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);
end;
end;
end;
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' +
'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FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifr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hvDYYkWWCG7BeDGDMBKW' +
'h/FTjjwEfmrCnzrQj5WA/gBytNqLn6wcp79Bwmw8AM=');
OwnArr[5] := Point(20, 250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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;
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;
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;
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);
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]);
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
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, 11305057, 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
Smart_Members:= True;
Smart_Server := 0;
Smart_Signed := True;
SetupSRL;
ClearDebug;
displaydebugimgwindow(300, 300);
//SmartSetupEx(115, True, True, False);
SetTargetDC(SmartGetDC);
//ActivateClient;
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;
if not LoggedIn then
LoginPlayer;
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'];
IncEx(MouseSpeed, 2);
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.
When closing any browser..Mozilla and IE …script ends…searched in SMART answers, but thought I'd post here in case it was something I did when I edited the script (using the one I posted above *started at 5mil, now 40mil+ :) )
~RAM
Nava2
2009-10-21 12:28:02
I wish I had an account.. and a wish to play runescape.. :p
You better believe my daughter was ecstaticed to log on and find her new armor :). Thanks Again, This script rocks so much ! :norris:
~RAM
YoHoJo
2009-10-23 18:07:42
ROFL RAM! Your daughter plays rs, awesome! :D!
A family who rs's together stays together!
The Claw
2009-10-23 23:08:04
RAM, that earns you at least 10 "Worlds Best Dad" mugs next fathers day I'd say. (Just make sure she doesnt leak details of sudoku to her friends ;))
13m to 73m in 6 days, going for a party hat.
n3ss3s
2009-10-24 06:04:09
From: The Claw
RAM, that earns you at least 10 "Worlds Best Dad" mugs next fathers day I'd say. (Just make sure she doesnt leak details of sudoku to her friends ;))
13m to 73m in 6 days, going for a party hat.
It's funny how our community is commonly knewn as the shittiest one when it comes to making tons of cash or xp easily, but still we are likely to daily make 10x the cash with 10 of us as 100 active rsbot users do :p
RAM: lol nice man
marpis
2009-10-24 06:34:00
From: RAM
You better believe my daughter was ecstaticed to log on and find her new armor :). Thanks Again, This script rocks so much ! :norris:
~RAM
[offtopic]
How old are you, and how old is your daughter? ^^
[/offtopic]
From: _ChArMz
Who here knows some ways to transfer cash?
http://www.sythe.org/showthread.php?p=4988695You have any luck with buying guide ? I was thinking of doing the same, but I saw you were looking there as well….
From: The Claw
(Just make sure she doesnt leak details of sudoku to her friends ;))
no worries mate, not the first private script I have been entrusted to use ;) …besides, she lives with her mother 1000+ miles south..my main was banned 2+ years ago(recently failed appeal) and I have no interest in playing…she gives a shit about RS these days about as much as I do, glorified
Barbie Doll is all this account is to her, but she still gets a kick when she logs on once in awhile and sees how rich her little noob account is… was def pure 40 Def/ lvl 20 ish combat with full gilded when it first came out…Even though I have showed her SCAR/SRL before, she has never used it on her own, and you can be sure none of her friends know her Dad is a computer nerd :p….
From: marpis
[offtopic]
How old are you, and how old is your daughter? ^^
[/offtopic]
http://www.villavu.com/forum/member.php?u=253815 :), and my son is 19 this year ;).. young Dad….. he got us into playing the game as a way for us to do something together, before he came to live with me full time.. I showed him SCAR/SRL a couple of years ago, but he was to busy having a drug problem to be productive here :redface: ….he did have a full scholarship to medical school, but he got his first D.U.I. a couple of weeks ago..totaled his car, lost his scholarship and was evicted from student housing….sigh, I miss the days where we would just have fun playing this game together as a family….
as for the script…been working on a better report to keep track of the price paid for each caskets and the runes inside….
~RAM
_ChArMz
2009-10-24 16:45:42
From: RAM
You have any luck with buying guide ? I was thinking of doing the same, but I saw you were looking there as well….
No, sythe is a horrible place for the most part :D…but im still looking..if i did buy one i would post it in the dev section atleast…(i dunno if that is good or bad of me :P)
Hobbit
2009-10-25 04:22:17
Modified to work after "Missing my mummy" quest
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALIRAPER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
const
Rule7proof = True; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
DoSleep = False;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 60;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
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] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
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 DebugMode 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, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
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;
if (debugmode) then
begin
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;
end;
for z := 0 to 8 do
begin
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('Clicking: '+inttostr(curpoint.x)+', '+inttostr(curpoint.y)+' with a '+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);
end;
end;
end;
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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C3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvg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EesC8Jx/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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc236MtLY9jMZHHBp6PD75AmFc' +
'VP1ayG8E8nSUZRl1wI0eamzuj0WddXcN9T4EjYqEEEuTP8bErg5OV' +
'4iIcJUPsP3Z3BefzflNTRyTS1/mIqBGtpATyYy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vh4Znxl8ARtWAhFywQWOS9EblQjpqh9otK' +
'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;
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;
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;
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);
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]);
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
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, 11305057, 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
Smart_Members:= True;
Smart_Server := 0;
Smart_Signed := True;
SetupSRL;
ClearDebug;
displaydebugimgwindow(300, 300);
//SmartSetupEx(115, True, True, False);
SetTargetDC(SmartGetDC);
//ActivateClient;
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;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
//SetAngle(False);
Chats := ['Hi, Ali. Not bad. How are you',
'I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
IncEx(MouseSpeed, 2);
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 3 Do
If Not FindNPCChatText(Chats[Countage], ClickLeft) Then
If Countage = 3 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.
The Claw
2009-10-25 06:27:28
Whats the difference after doing that quest?
Naike
2009-10-25 07:32:46
I think the chat convo changes..
The Claw
2009-10-25 07:47:47
Yeah, but how.
_ChArMz
2009-10-25 12:22:54
hmm after doing the quest it shortens the convo?
['Hi, Ali. Not bad. How are you',
'I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
'Hi, Ali. Not bad. How are you' - option has been added, but does that mean the Click to continue are cut down?
n3ss3s
2009-10-25 13:21:51
From: _ChArMz
hmm after doing the quest it shortens the convo?
['Hi, Ali. Not bad. How are you',
'I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
'Hi, Ali. Not bad. How are you' - option has been added, but does that mean the Click to continue are cut down?
Dis is the exact reason to use my chat shit.
Hobbit
2009-10-25 14:29:40
n3ss3s, that script if you're version with the chat shit ;)
_Charmz
I think it may actually slow it down :( I used to get 80 SPH now last night i was getting 70 (After i did the quest)
Naike
2009-10-25 16:08:08
Conclusion: Don't do quests, whatsoever.
I've stopped using this now, so the rune prices will sky rocket (lol)
Going for 94 mage now, already bought all the items at once \o/
YoHoJo
2009-10-25 16:13:48
Hobbit
2009-10-25 16:33:06
I've been hording my runes ;)
In a few days ill be dumping 120m worth (Sudoku value) into the market at max :p
The Claw
2009-10-26 08:08:01
From: Hobbit
I've been hording my runes ;)
In a few days ill be dumping 120m worth (Sudoku value) into the market at max :p
Let us know when you start and when you finish, I've got ~20m of runes and have 100m to burn through. I'm thinking I'll sell them at max after you've pushed the price up a bit :p
Hobbit
2009-10-26 09:51:53
I'm just finishing off the rest of my cash and ill be ready to dump.
Oh and it was back upto 77SPH last night so i dunno why it dropped to 65 for the other night :confused:
Method
2009-10-26 09:58:41
I don't know how you guys get that many per hour. Yesterday it was hovering at around 56 per hour for me. Do you guys change the MouseSpeed or do something to speed up the chatting that I should be doing (I was using the script posted by Hobbit on the previous page).
Hobbit
2009-10-26 10:04:04
I've done all the quests so it cuts down on the chat time a bit.
Method
2009-10-26 10:27:22
I've done Icthlarin's Little Helper - are there other ones I need to do also?
Hobbit
2009-10-26 10:34:58
I think there is 1 more that makes it less chat time. I don't remember which though.
ZephyrsFury
2009-10-26 10:49:43
From: Method
I don't know how you guys get that many per hour. Yesterday it was hovering at around 56 per hour for me. Do you guys change the MouseSpeed or do something to speed up the chatting that I should be doing (I was using the script posted by Hobbit on the previous page).
You can speed up the solver a lot by just shortening a few waits. If you go to around line 468 you can shorten the waits within the Try Except statement to make it solve the sudoku faster.
I've also taken Charmz's suggestion and removed a the last wait from Mouse. I also got my own chatting function but idk how much faster that is. Anyway I'm getting around 100 SpH on my acc with no extra quests done + 20-40min waits every 3 hours or so.
n3ss3s
2009-10-26 12:17:29
I've also taken Charmz's suggestion and removed a the last wait from Mouse. I also got my own chatting function but idk how much faster that is. Anyway I'm getting around 100 SpH on my acc with no extra quests done + 20-40min waits every 3 hours or so.
Will you hand the script over without the presence of a buttplug?
YoHoJo
2009-10-26 15:57:40
From: ZephyrsFury
Anyway I'm getting around 100 SpH on my acc with no extra quests done + 20-40min waits every 3 hours or so.
WHAT the hell!? Post that on please :p (even though im not member and haven't used this is many months, :D)
Method
2009-10-26 17:07:16
Yes, please post the script. :p
ZephyrsFury
2009-10-27 00:41:51
Ok…
Press F2 to manually wake up from sleeping. I removed the last wait in Mouse().
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
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;
DoSleep = True;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 60;
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;
ST, SF: 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 = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
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); //2396406
ColourArray[2] := ColourArray[1] - 682565; //1713841 -682566
ColourArray[3] := ColourArray[1] - 1329806; //1001067 -1001067
ColourArray[4] := ColourArray[1] + 13867564;
ColourArray[5] := ColourArray[1] + 9211426;
ColourArray[6] := ColourArray[1] + 12293673;
ColourArray[7] := ColourArray[1] + 9472;
ColourArray[8] := ColourArray[1] - 1540840; //Death eyes
ColourArray[9] := ColourArray[1] + 13525767;
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 9 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 > 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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
ss : string;
CurPoint : TPoint;
canexit : boolean;
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;
if (debugmode) then
begin
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;
end;
for z := 0 to 8 do
begin
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);
end;
end;
end;
end;
repeat
CanExit:= True;
wait(500 + Random(100));
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(100 + Random(100));
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
wait(100 + Random(100));
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' +
'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ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv6USidV38xtLi1upFHBqA6c5fKL' +
'yLvx3Ph8M56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vVdOHacOb+' +
'+sfDzc2jnc/lYvFkb+/0YP/s6+H3b0c/T47/g68l2+9Xi2sfdguFg' +
'41Ppe0twY93v8A3+K+z0xr5ei2fza6/W9xaWd7J54FjGzjO4SOZd+' +
'G/K5VwOP/NTk0tZTIibywvYVtwnCOVCISz9kp9fTVsJp02ciGXk20' +
'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, 'beNqdle1KVGEUhe1X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wcp79Bwmw8AM=');
OwnArr[5] := Point(20, 250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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('o Ali');
if(Result)then exit;
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
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
0: begin
Mouse(x, y, 0, 0, false);
wait(25+random(25));
result := ChooseOption('o Ali');
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;
iTime: Integer;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
begin
{$IFDEF SRL_SMART}
Smart_Server := 1;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ENDIF}
SetupSRL;
ClearDebug;
displaydebugimgwindow(300, 300);
iTime := 1000*60*60*8;
Writeln(MSToTIme(iTime, 2));
iTime := iTime + GetSystemTime;
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('');
ActivateClient;
DeclarePlayers;
MouseSpeed := 30;
ScriptID := '1037';
LoadArrays;
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle(False);
ST := GetSystemTime + SleepEvery * RandomRange(800, 1200);
repeat
if not LoggedIn then
LoginPlayer;
debug('hoi?');
if SudokuMenu then
DoSudoku;
{If GetSystemTime > iTime then
begin
Logout;
TerminateScript;
end;}
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
{while ClickContinue(True, True) do
wait(50);
if ((GetColor(362, 397) = 0) and (GetColor(362, 407) = 0)) then
begin
MouseBox(152, 393, 367, 411, 1);
Wait(300);
end else
if ((GetColor(401, 432) = 0) and (GetColor(435, 434) = 0)) then
begin
MouseBox(74, 423, 447, 437, 1);
Wait(300);
end else
if((GetColor(121, 397) = 0) and (GetColor(435, 399) = 0)) or ((GetColor(121, 397) = 16777215) and (GetColor(435, 399) = 16777215))then
begin
MouseBox(76, 389, 441, 402, 1);
wait(300);
end else if((GetColor(216, 406) = 0) and (GetColor(380, 404) = 0)) or ((GetColor(216, 406) = 16777215) and (GetColor(380, 404) = 16777215))then
begin
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end;
if(GetColor(54, 61) = 1319729)then
begin
DoSudoku;
break;
end;
wait(RandomRange(200, 400)); }
if (InConvo) then
begin
//if not ClickContinue(True, False) then
begin
FindColors(bTPA, clBlack, MCX1, MCY1, MCX2, MCY2);
FindColors(wTPA, clWhite, MCX1, MCY1, MCX2, MCY2);
FindColors(uTPA, clBlue, MCX1, MCY1, MCX2, MCY2);
TPA := CombineTPA(CombineTPA(bTPA, wTPA), uTPA);
Texts := ['to cont', 'selection', 'a large', 'xamine'];
for I := 0 to High(Texts) do
begin
TextTPA := LoadTextTPA(Texts[I], NPCChars, H);
if (FindTextTPAinTPA(H, TextTPA, TPA, MTPA)) then
begin
SortTPAFrom(MTPA, Point(MCX1, MCY1));
Mouse(MTPA[0].X + RandomRange(-50, 50), MTPA[0].Y + RandomRange(-3, 5), 0, 0, True);
Break;
end;
end;
end;
{if ((GetColor(78, 391) = 0) and (GetColor(387, 403) = 0)) or ((GetColor(78, 391) = clwhite) and (GetColor(387, 403) = clwhite))then
MouseBox(78, 391, 387, 403, 1)
else
if ((GetColor(136, 404) = 0) and (GetColor(260, 418) = 0)) or ((GetColor(136, 404) = clwhite) and (GetColor(260, 418) = clwhite))then
MouseBox(136, 404, 260, 418, 1)
else
if ((GetColor(136, 401) = 0) and (GetColor(260, 415) = 0)) or ((GetColor(136, 401) = clwhite) and (GetColor(260, 415) = clwhite))then
MouseBox(136, 401, 260, 415, 1)
else
if ((GetColor(213, 438) = 0) and (GetColor(302, 444) = 0)) or ((GetColor(213, 438) = clwhite) and (GetColor(302, 444) = clwhite))then
MouseBox(213, 438, 302, 444, 1)
else
if ((GetColor(221, 461) = 0) and (GetColor(311, 468) = 0)) or ((GetColor(221, 461) = clwhite) and (GetColor(311, 468) = clwhite)) then
MouseBox(221, 461, 311, 468, 1);}
Wait(100 + Random(150));
end;
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;
if (DoSleep) then
if (GetSystemTime > ST) then
begin
WriteLn('Sleeping...');
Logout;
SF := GetSystemTime + SleepFor * RandomRange(800, 1200);
while (GetSystemTime < SF) do
begin
Wait(1000 + Random(1000));
Status('Time Left: ' + MsToTime(SF - GetSystemTime, time_bare));
if (IsFKeyDown(2)) then
begin
WriteLn('aborted');
Break;
end;
end;
WriteLn('Done!');
LoginPlayer;
ST := GetSystemTime + SleepEvery * RandomRange(800, 1200);
Marktime(failtime);
end;
until false;
end.
The Claw
2009-10-27 01:54:50
Ok I took your chat stuff and it increased SPH to 86, up from around 75 usually. Changing the wait on line 468 increased it by 2 per hour, removing the last wait from mouse completely (I had it at 40 + Random(40)) put it up to 96 100-102 an hour. Pretty sweet.
lordsaturn
2009-10-27 07:56:33
From: The Claw
Ok I took your chat stuff and it increased SPH to 86, up from around 75 usually. Changing the wait on line 468 increased it by 2 per hour, removing the last wait from mouse completely (I had it at 40 + Random(40)) put it up to 96 100-102 an hour. Pretty sweet.
So you should post your changes :o
The Claw
2009-10-27 09:36:47
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.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;
DoSleep = false;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 60;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
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] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
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 DebugMode 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;
debug('LoadPossibilities');
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;
debug('AddToStack');
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
debug('SudokuMenu');
FindColorsTolerance(TPA, 797794, 0, 0, 95, 85, 0);
Result := High(TPA) > 50;
end;
function EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
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;
if (debugmode) then
begin
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;
end;
for z := 0 to 8 do
begin
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('Clicking: '+inttostr(curpoint.x)+', '+inttostr(curpoint.y)+' with a '+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);
end;
end;
end;
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
debug('LoadArrays');
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/sxMRCJiPy2uICtgXHO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KtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6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Rd3UqIgf/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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc236MtLY9jMZHHBp6PD75AmFc' +
'VP1ayG8E8nSUZRl1wI0eamzuj0WddXcN9T4EjYqEEEuTP8bErg5OV' +
'4iIcJUPsP3Z3BefzflNTRyTS1/mIqBGtpATyYy9fOoNcuHUEOM4Vi' +
'zLh815jY3tbG2SEc2JBdlbAXGRrN7GQObbJxMh3btXHWltpYm/HQy' +
'R+nmT1GjKZEzjdZFSMXH+jVlHTR/gq4ZL9sl9ptMiaFtKmlUa+WV1' +
'NIESNjO8nny0sRB4yU8T8EIjmnA1iPY1cVXFFgZC2y3fJLtaFMz/Y' +
'hmzrSR+NXBEKEQhTjYwPPFcgdt3mH7I9GwnE9oUvtVXXsE3aJ8Lti' +
'oaTyReZqRZcWCNjO1xTQ9ouXPysC8hYMvnaLGzbQwy457mktBvq6t' +
'gawV3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ic' +
'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
debug('Solving Sudoku');
UnSolvable := false;
ClearReport;
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;
Wait(100);
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;
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);
end;
if DisplayDetails then
Writeln(inttostr(TotalEmpty));
LoadPossibilities;
Wait(100);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
debug('Compiling Report');
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 + 120000;
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
debug('function DoSudoku');
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]);
Wait(100);
Disguise('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
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
debug('TalkToAli');
Result:= ChooseOption('orris');
if(Result)then exit;
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
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
0: begin
Mouse(x, y, 0, 0, false);
wait(25+random(25));
result := ChooseOption('alk-to Ali Morrisane');
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(400+random(200));
if(Result)then exit;
end;
end;
end;
var
SleepTime: Integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
begin
Smart_Members:= True;
Smart_Server := 112;
Smart_Signed := false;
SetupSRL;
ClearDebug;
displaydebugimgwindow(300, 300);
DeclarePlayers;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
IncEx(MouseSpeed, 2);
repeat
//if CoinAmount('inv') < 40000 then
// TerminateScript;
// debug('hoi?');
if SudokuMenu then
DoSudoku;
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(1000+random(1000));
if(ClickContinue(false, false))then break;
end;
if(A = 11)then
begin
Wait(1001);
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
if (InConvo) then
begin
//if not ClickContinue(True, False) then
begin
FindColors(bTPA, clBlack, MCX1, MCY1, MCX2, MCY2);
FindColors(wTPA, clWhite, MCX1, MCY1, MCX2, MCY2);
FindColors(uTPA, clBlue, MCX1, MCY1, MCX2, MCY2);
TPA := CombineTPA(CombineTPA(bTPA, wTPA), uTPA);
Texts := ['to cont', 'selection of runes', 'a large', 'xamine'];
for I := 0 to High(Texts) do
begin
TextTPA := LoadTextTPA(Texts[I], NPCChars, H);
if (FindTextTPAinTPA(H, TextTPA, TPA, MTPA)) then
begin
SortTPAFrom(MTPA, Point(MCX1, MCY1));
Mouse(MTPA[0].X + RandomRange(-50, 50), MTPA[0].Y + RandomRange(-3, 5), 0, 0, True);
Break;
end;
end;
end;
Wait(100 + Random(150));
end;
if(GetColor(54, 61) = 1319729)then
begin
A := 0;
DoSudoku;
debug('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;
debug('FailTime');
if (GetSystemTime > ReportTime) then
Report;
debug('ReportTime');
until false;
end.
The amount solved per hour seems to vary a bit, earlier tonight I was getting 93 SPH after an hour, then 86, now I'm getting 100 again. At those rates 1 second of each sudoku solve equates to about 2 sudokus solved overall (as in if you reduce the time for each sudoku to be solved by 1 second, by removing waits or something, that equates to an extra 2 sudokus that will be solved in that spare time), so lag and unluckiness with the sudokus you get really effect it.
Edit - short proggy from right now:
Took us… 16567 msecs!!!!
Took us… 24461 msecs!!!!
Took us… 23276 msecs!!!!
Sudoku Solver 0h:33m:30s
Solved: 54 | SpH: 97
same run:
Not enough coins in inventory.
Sudoku Solver 3h:23m:21s
Solved: 339 | SpH: 100
Successfully executed
n3ss3s
2009-10-27 11:06:46
Claw, have you only done the necessary things to run this, or some additional questing?
lordsaturn
2009-10-27 15:40:42
Claw, did you improve that version ^ from Zeph's version posted near the bottom of page 20?
The Claw
2009-10-27 17:17:00
Well Zeph's didnt solve for me so I took a modified verson of RAM's and did what I said above. Have only done itchliarins and finished rogue traders. Updated with a 3 hour, 100p/h report :)
lordsaturn
2009-10-27 23:16:30
So someone who has Zeph's copy working should compare Zeph's and Claw's and see which one works better :o
HyperSecret
2009-10-28 01:56:53
How often, how long and when do you guys run this?
Also we should make something that has the most up to date version with which quests done so we don't have to scavenger around…
YoHoJo
2009-10-28 02:03:54
From: HyperSecret
How often, how long and when do you guys run this?
Also we should make something that has the most up to date version with which quests done so we don't have to scavenger around…
1)
I belive some have ran this 14+ hours (Crazy)
I ran it overnight a few times (8ish hours)
And then just for 3-4 hours at a time.
2) Go to last page, last post.
Search from bottom up for attachments/code tags.
That's the latest one. :D
The Claw
2009-10-28 05:36:59
From: HyperSecret
How often, how long and when do you guys run this?
Also we should make something that has the most up to date version with which quests done so we don't have to scavenger around…
4-5 hours each run (15m with old script, not sure with new version), 2 runs a day. Sometimes while I'm sleeping, other times while I'm at uni, but generally always 1 run around around this time (when I get home from uni for the day). I agree, we should move towards getting a standard with this script again. From what I can tell, I'd be suprised if it can be optimized significantly anymore, so no reason not to
lordsaturn
2009-10-28 08:00:08
From: The Claw
4-5 hours each run (15m with old script, not sure with new version), 2 runs a day. Sometimes while I'm sleeping, other times while I'm at uni, but generally always 1 run around around this time (when I get home from uni for the day). I agree, we should move towards getting a standard with this script again. From what I can tell, I'd be suprised if it can be optimized significantly anymore, so no reason not to
All we need is another official release. :p I suppose I might.. just need an account
The Claw
2009-10-28 09:27:40
Sick. Hmm, rune prices starting to drop….Hobbit have you dumped your runes yet? I'll have 120m worth of runes (sudoku value) to dump tomorrow night.
Hobbit
2009-10-28 13:33:18
I dumped them last night…
Mid price + Max price / 2
^ I sold at
They were all sold when i logged in this morning
Markus
2009-10-28 17:59:33
Looks like sudoku is making 1.5m to 1.7m/h right now, pretty good :)
n3ss3s
2009-10-29 11:37:23
Souls got anal probed, rune average 350 -> 325, still great though…
_ChArMz
2009-10-30 15:27:39
Lets never hold on to more than like 10k of each rune before we sell??
marpis
2009-10-30 17:20:43
From: _ChArMz
Lets never hold on to more than like 10k of each rune before we sell??
I'd say let's always sell them >Mid, even if it took a while to sell all.
I don't think releasing lots of runes at the same time really affects the economy that much.. But I can't say for sure.
Hobbit
2009-10-30 21:46:00
From: marpis
I'd say let's always sell them >Mid, even if it took a while to sell all.
I don't think releasing lots of runes at the same time really affects the economy that much.. But I can't say for sure.
OOOOH it does indeed :p
If you invest enough it will.
The Claw
2009-10-31 05:15:02
http://services.runescape.com/m=itemdb_rs/Soul_rune/viewitem.ws?obj=566&scale=2What the hell would cause that. Looks like the other runes are stablising somewhat, I sold ~100k of each rune at above mid 2 days ago. I reckon unless you really really need the cash, always sell above mid, even if only by a few gp…now we're all raping this like crazy we have enough supply to affect the market (even individually), and when investing so much cash into it, even a small drop cuts into profit substantially.
Looks like soul runes are on the way up, sold 15k at 7 above mid instantly.
Btw, how many mind and body runes do you guys have? 183k here from the last 2 weeks (13m > 177m) :p
n3ss3s
2009-10-31 11:56:17
Soul rune 391 -17
:(
183k here from the last 2 weeks (13m > 177m)
I wish I could do so much botting, but my patience isnt enough :p
Widget
2009-10-31 16:58:20
Just remember to set it up before you go to bed or school :p
Hobbit
2009-10-31 19:51:34
That spike from 468-516 from oct11-13 was all me :p
The key is… not to get greedy… greedy=ban…. I think the latency with my satellite connection slows me down… I have to add small waits here and there just to get it to run smooth, but my best sph is only 50, not complaining, but I don't see how ya'll are getting 100…. anyways, I try to adhere to what we preach here at the forums.."Simulate Legitimate Playing" !!!! ….alot of you have been using this alot longer than me, but…come on, who really sits there for hours on end..days at a time..solving these in under 40 seconds ?…. I smell a nerf coming on :( .(I had my main since RS1 banned due to greed, and considering I use my daughter's account now…)…. anywho, to each his/her own… I have realistic waits/mouse speed for conversation clicking, periodic rests, etc…I usually bring about 10 mil with me, this works out to about 10k of each runes and 5-8 hours… When I go to sell, if I need money right then, I start selling at the highest, then knock off a few gps at a time until they start selling quicker….but, usually, I just put them on there for2-3 below max and they are ALL sold by the time the next 10 mil is run through…
~RAM
n3ss3s
2009-11-01 05:36:07
From: RAM
The key is… not to get greedy… greedy=ban…. I think the latency with my satellite connection slows me down… I have to add small waits here and there just to get it to run smooth, but my best sph is only 50, not complaining, but I don't see how ya'll are getting 100…. anyways, I try to adhere to what we preach here at the forums.."Simulate Legitimate Playing" !!!! ….alot of you have been using this alot longer than me, but…come on, who really sits there for hours on end..days at a time..solving these in under 40 seconds ?…. I smell a nerf coming on :( .(I had my main since RS1 banned due to greed, and considering I use my daughter's account now…)…. anywho, to each his/her own… I have realistic waits/mouse speed for conversation clicking, periodic rests, etc…I usually bring about 10 mil with me, this works out to about 10k of each runes and 5-8 hours… When I go to sell, if I need money right then, I start selling at the highest, then knock off a few gps at a time until they start selling quicker….but, usually, I just put them on there for2-3 below max and they are ALL sold by the time the next 10 mil is run through…
~RAM
We been doing this for a year now :)
The Claw
2009-11-01 10:32:35
I agree, but I doubt theres gonna be a nerf as its been going on for ages. Lets just see what happens in the next couple of weeks - if anyones gonna cop a ban it'll be me and within that time period (3-4 weeks after autoing), especially since this account has been banned for macroing twice already a few years back. No ones selling phats at ge price though :(
marpis
2009-11-01 11:16:33
From: The Claw
I agree, but I doubt theres gonna be a nerf as its been going on for ages. Lets just see what happens in the next couple of weeks - if anyones gonna cop a ban it'll be me and within that time period (3-4 weeks after autoing), especially since this account has been banned for macroing twice already a few years back. No ones selling phats at ge price though :(
knock the wood :rolleyes:
Hobbit
2009-11-01 12:12:00
From: The Claw
No ones selling phats at ge price though :(
Nope, no one sells in GE. There is a seperate market of Phat and Rares
You need about 50-70m more than the GE price to buy a phat.
They use junk trading for that which i found odd cause i sold all the junk in the GE and got all my money back :p
marpis
2009-11-01 12:53:50
Btw, bloods and deaths sell at max instantly atm…
E: souls too.
I decreased many waits, including the one in Mouse() and am now getting 85 sph, ~2,2mil per hour
Method
2009-11-01 15:03:58
ChooseOption never seems to work for me. Is anyone else having that problem?
I ran it for about 3 hours earlier today with great results for the most part. Is anyone's username Flame####? I thought someone else might've been autoing on the same world I was.
Naike
2009-11-01 16:15:43
I'm going back using this for a while..
No one seems to have been banned using this script entirely on it's own.
I've abused this to the fullest (<3) and I still didn't get banned.
Exactly the same was going on with my Strange fruit picker, no randoms, abused
to the fullest but still no ban. Even when I tried to get banned using these scripts I
didn't get banned.
I just found this very, very interesting :p
_ChArMz
2009-11-01 16:16:15
yeah rune prices are back on the rise :D
but yeah my version is currently doing 90 SPH, i think i should lower it a bit, thats crazy to do that many legit
@nike i never do more than 5 hours, and i do other things inbetween runs sometimes
marpis
2009-11-01 16:43:29
From: N1ke!
I'm going back using this for a while..
No one seems to have been banned using this script entirely on it's own.
I've abused this to the fullest (<3) and I still didn't get banned.
Exactly the same was going on with my Strange fruit picker, no randoms, abused
to the fullest but still no ban. Even when I tried to get banned using these scripts I
didn't get banned.
I just found this very, very interesting :p
Lets not push it too far though, I'm sure if fagex caught even one player with sudoku solver they'd nerf the minigame.
From: marpis
Lets not push it too far though, I'm sure if fagex caught even one player with sudoku solver they'd nerf the minigame.
I don't know if it has been mentioned before, but there is a solver for this…
Runescape Rouge Trader (Sudoku) Solver by Oblivion590 ….I've already thought about how *easy it would be to make a script that utilizes this solver…kind of a semi-legit way of playing…not getting into the linguistics of how, etc….but I realize that by even releasing something like this, that it would eventualy lead to the demise of what we have going here…AFAIK there are no other scripts/bots that exploit this ?
~RAM
E. or that matter… http://www.sudoku-solutions.com/sudokusolver.php
The Claw
2009-11-01 19:15:17
From: marpis
Lets not push it too far though, I'm sure if fagex caught even one player with sudoku solver they'd nerf the minigame.
We had a few 10 day bans with it very early on, and since then jagex have updated it twice (changed ali's appearance for the new quest, and put purple behind runes that are already there). So they either dont know that we're autoing exactly there (maybe the script was detectable with a mouseclick or something), or they dont see us as enough of a threat to bother doing anything. Either way works fine ;)
If anything that gives us a bit of plausible deniability RAM, we could say we memorised the patterns using those solvers and now are super 1337 or something :p
:
BTW cheers Hobbit. Any idea on the street price on rares/edibles atm?
Hobbit
2009-11-01 22:02:22
From: The Claw
BTW cheers Hobbit. Any idea on the street price on rares/edibles atm?
You gotta be more specific :p
If you're wanting a Phat, a bit of advice, wait until late spring early summer when prices plumit ;)
The Claw
2009-11-01 22:24:22
Well summer started yesterday for me, so..you're also going to have to be more specific, lol. Everyone seems to want pumpkins, eggs or disks for some reason, even though theyre completely useless and less functional compared to masks and santas. So yeh, price check on pumpkins, eggs and disks :p I've seen people offer to sell purple for 4 eggs, 2 eggs and a disk, and someone else wanted just a disk for yellow. No idea whats going on. If you could give me a rough estimate on how much each phat is worth street price I'd also appreciate it. I've looked on forums, spent hours on world 2, but havent been able to find a standard.
_ChArMz
2009-11-02 02:12:41
I say we start a SSRL/dev merch clan type thing, i alone have like 400m, and with just a couple of u guys i know we can do work, I just need someone with exp to run things..
add my msn: [email]mcancelliere@gmail.com[/email]
The Claw
2009-11-02 03:03:07
From: _ChArMz
I say we start a SSRL/dev merch clan type thing, i alone have like 400m, and with just a couple of u guys i know we can do work, I just need someone with exp to run things..
add my msn: [email]mcancelliere@gmail.com[/email]
http://www.villavu.com/forum/forumdisplay.php?f=216Although we might have enough cash to do well now
Nava2
2009-11-02 10:14:36
@RAM: This Calculator was entered into the database on Mon, Dec 25, 2006, at 03:55:58 PM by Oblivion590, and it was last updated on Fri, Aug 22, 2008, at 09:25:46 AM by Taavi.
Can someone get some money on my account? I will give you the user and pass.. I can't auto :(
n3ss3s
2009-11-02 11:04:13
We had a few 10 day bans with it very early on, and since then jagex have updated it twice (changed ali's appearance for the new quest, and put purple behind runes that are already there). So they either dont know that we're autoing exactly there (maybe the script was detectable with a mouseclick or something), or they dont see us as enough of a threat to bother doing anything. Either way works fine
Well, I sleep my nights well because I know that c0de still was a developer during the time we had this ;)
EDIT:
http://www.villavu.com/forum/showthread.php?p=651377 - if anyone posts about ali shit, close down the thread and silence the associated people
EDIT EDIT: OH MY JESUS, gotta love ge prices at times, enchanting dragon bolts is like 2k profit per cast, = 4-5m per hour :D
The Claw
2009-11-02 20:00:06
From: n3ss3s
Well, I sleep my nights well because I know that c0de still was a developer during the time we had this ;)
EDIT: http://www.villavu.com/forum/showthread.php?p=651377 - if anyone posts about ali shit, close down the thread and silence the associated people
EDIT EDIT: OH MY JESUS, gotta love ge prices at times, enchanting dragon bolts is like 2k profit per cast, = 4-5m per hour :D
If we shut it down, what would we say?
Also, lol 5m/hour? What do you need to cast these spells?
Hobbit
2009-11-02 20:37:22
And that thread is a Sudoku GAME, not a solver. I dont think anyone would ever make a public solver.
mastaraymond
2009-11-03 04:53:10
From: Hobbit
And that thread is a Sudoku GAME, not a solver. I dont think anyone would ever make a public solver.
I made the solver purely out of interest, didn't even know there was a sudoku game.. Wizzup also made one for his school, although in Java (fail).
Narcle
2009-11-03 07:21:45
So I was curious on the costs and how many runes u get etc.
Here's what I recorded… unfortunately I didn't get the sudoku solved count:
9974110gp -
6699 bloods
6291 deaths
7522 mind
7436 laws
6785 nature
7559 body
7538 chaos
7303 soul
7672 cosmic
marpis
2009-11-03 08:20:07
From: Narcle
So I was curious on the costs and how many runes u get etc.
Here's what I recorded… unfortunately I didn't get the sudoku solved count:
9974110gp -
6699 bloods
6291 deaths
7522 mind
7436 laws
6785 nature
7559 body
7538 chaos
7303 soul
7672 cosmic
Avereage profit is 50-70%, depending on GE prices. 10mil -> ~16 mil?
From: Narcle
So I was curious on the costs and how many runes u get etc.
Here's what I recorded… unfortunately I didn't get the sudoku solved count:
9974110gp -
6699 bloods
6291 deaths
7522 mind
7436 laws
6785 nature
7559 body
7538 chaos
7303 soul
7672 cosmic
That seems low, I seem to average about 10k +/- of each for each 10 mil… I also wear a ring of wealth ;)
Method
2009-11-03 09:23:47
From: RAM
That seems low, I seem to average about 10k +/- of each for each 10 mil… I also wear a ring of wealth ;)
Getting 10k of each rune seems impossible if you only spend 10m gp. Are you sure that's right?
n3ss3s
2009-11-03 09:43:38
From: Method
Getting 10k of each rune seems impossible if you only spend 10m gp. Are you sure that's right?
Its pretty much right…
Method
2009-11-03 09:52:07
From: n3ss3s
Its pretty much right…
It just seems odd if Narcle posted results with only 7k runes and I've gotten close to the same results also but RAM was able to get 10k runes.
ring of wealth ftw !!!!!!!!!!!
Markus
2009-11-03 10:35:45
We should do some serious scientific tests on Ring of Wealth.
Narcle
2009-11-03 10:49:46
I should test that w/ Ring of Wealth.
Edit:
Btw who made this Click2Continue? The one in SRL seems broken to me, we need a more reliable one.
function Click2Continue : Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches : TPointArray;
b : TBox;
Height, t : Integer;
begin
Result := False;
FindColors(bTxt, 16711680, MCX1, MCY1, MCX2, MCY2);
FindColors(wTxt, 16777215, MCX1, MCY1, MCX2, MCY2);
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
TextTPA := LoadTextTPA('here to conti', NPCChars, Height);
Result := FindTextTPAinTPA(Height, TextTPA, SearchTPA, Matches);
if Result then
begin
b := GetTPABounds(SearchTPA);
with b do
Mouse(RandomRange(x1, x2), RandomRange(y1 + 3, y2 - 3), 2, 1, True);
end;
end;
Widget
2009-11-03 12:26:11
I'm using two accounts on this with my multiplayer version, so I'll test tomorrow by running one with and one without the ring :)
_ChArMz
2009-11-03 12:51:34
From: Narcle
Btw who made this Click2Continue? The one in SRL seems broken to me, we need a more reliable one.
I did :D
Yeah you should add these 3 functions to SRL/Ali script, they take 0ms to find an option/clicktocontinue
also I added a small thing into Click2continue which will not move your mouse if the "Click to Continue" has not moved out of the last known box, when clicking
function PleaseWait(b : TBox) : Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches : TPointArray;
Height : Integer;
begin
Result := False;
with b do
begin
FindColors(bTxt, 16711680, x1, y1, x2, y2);
FindColors(wTxt, 16777215, x1, y1, x2, y2);
end;
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
TextTPA := LoadTextTPA('ease wai', NPCChars, Height);
Result := FindTextTPAinTPA(Height, TextTPA, SearchTPA, Matches);
end;
function Click2Continue : Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches : TPointArray;
Search2D : T2DPointArray;
b : TBox;
Height, i, t : Integer;
begin
Result := False;
FindColors(bTxt, 16711680, MCX1, MCY1, MCX2, MCY2);
FindColors(wTxt, 16777215, MCX1, MCY1, MCX2, MCY2);
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
Search2D := SplitTPAEx(SearchTPA, 20, 2);
TextTPA := LoadTextTPA('here to conti', NPCChars, Height);
for i := 0 to High(Search2D) do
begin
Result := FindTextTPAinTPA(Height, TextTPA, Search2D[i], Matches);
if Result then
begin
b := GetTPABounds(Search2D[i]);
GetMousePos(x, y);
if PointInBox(Point(x, y), b) then
Mouse(x, y, 2, 1, True)
else
with b do
Mouse(RandomRange(x1, x2), RandomRange(y1 + 2, y2 - 2), 2, 1, True);
t := GetSystemTime;
while ( PleaseWait(b) ) and ( GetSystemTime - t < 5000 ) do
Wait(10 + Random(10));
Break;
end;
end;
end;
function ClickOption(Text : string) : Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches : TPointArray;
Search2D : T2DPointArray;
b : TBox;
Height, i, t : Integer;
begin
Result := False;
FindColors(bTxt, 0, MCX1, MCY1, MCX2, MCY2);
FindColors(wTxt, 16777215, MCX1, MCY1, MCX2, MCY2);
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
Search2D := SplitTPAEx(SearchTPA, 20, 2);
TextTPA := LoadTextTPA(Text, NPCChars, Height);
for i := 0 to High(Search2D) do
begin
Result := FindTextTPAinTPA(Height, TextTPA, Search2D[i], Matches);
if Result then
begin
b := GetTPABounds(Search2D[i]);
with b do
Mouse(RandomRange(x1, x2), RandomRange(y1 + 2, y2 - 2), 2, 1, True);
t := GetSystemTime;
while ( PleaseWait(b) ) and ( GetSystemTime - t < 5000 ) do
Wait(10 + Random(10));
Break;
end;
end;
end;
YoHoJo
2009-11-03 13:12:17
So wtf nao, ring of wealth supposedly helps with this? LEts confirm it, seems weird, but semi-probable.
Hobbit
2009-11-03 15:04:09
Its true, ROW does boost it. I always use ROW :)
From: Hobbit
Its true, ROW does boost it. I always use ROW :)
Not only that, it makes you lucky with the ladies too :wub:
_ChArMz
2009-11-03 22:48:45
whos account is Rune Kitty? :P
From: _ChArMz
whos account is Rune Kitty? :P
http://www.villavu.com/forum/showpost.php?p=648100&postcount=473I'm guessing I should update my auto-responder ? :redface: …your account lvl 130+ ?
_ChArMz
2009-11-03 23:33:02
From: RAM
http://www.villavu.com/forum/showpost.php?p=648100&postcount=473
I'm guessing I should update my auto-responder ? :redface: …your account lvl 130+ ?
no i am lvl 97, but yeah iv seen u around there more than once :D, just making sure its someone from our community..
Hobbit
2009-11-04 00:35:30
Lol I've seen a few different guys around.
If you see zxcvghjkqwer thats me :p
Narcle
2009-11-04 09:06:49
This is what I got with and without ring of wealth:
With RoW (250 sudokus)
9982490gp -
6536 bloods
6535 deaths
7306 minds
7590 laws
6999 natures
7329 body
7604 chaos
7669 soul
7461 cosmic
W/O RoW
9974110gp -
6699 bloods
6291 deaths
7522 mind
7436 laws
6785 nature
7559 body
7538 chaos
7303 soul
7672 cosmic
The Claw
2009-11-04 09:31:24
From: Narcle
This is what I got with and without ring of wealth:
With RoW (250 sudokus)
9982490gp -
6536 bloods
6535 deaths
7306 minds
7590 laws
6999 natures
7329 body
7604 chaos
7669 soul
7461 cosmic
W/O RoW
9974110gp -
6699 bloods
6291 deaths
7522 mind
7436 laws
6785 nature
7559 body
7538 chaos
7303 soul
7672 cosmic
I didn't count the runes but off a 30m run without ROW, I've been getting ~20m profit, today I did it with a ring and still got ~20m profit. 7k runes per 10m is roughly what I get also. Are you guys sure that it increases it? Could be your quests or something. I've done itclarins, but not Contact or the new one.
Also, edited the first post just to get a centralised place rather than having to trawl through 20 pages if you forget something :p
n3ss3s
2009-11-04 09:33:48
Well maybe it's 7k then, I don't know, but quests shouldn't boost the amount of runes you get for an amount of cash, but the speed you spend the cash in…
Narcle
2009-11-04 09:41:08
I haven't done ANY quests to shorten the talk time. So idk how they are getting ~10k runes for 10m when I'm consistently getting ~7k for 10m.
Btw I uploaded new ClickContinue and changed ChatWait in SRL dev svn. Works really good. Credits to _Charmz ;) I haven't uploaded the ClickOption or tested it yet.
Widget
2009-11-04 12:21:47
After starting with 15m:
With ring of wealth:

Without ring:

Edit: Just because:
Sudoku Solver 9h:48m:52s
Solved: 748 | SpH: 76
*: False Solved: 376 Failed: 15
*: False Solved: 372 Failed: 0
Hmm, I believe the real powers of the ROW reside in the "placebo effect" .. You have to want it to work :p…
marpis
2009-11-05 01:43:19
From: Widget
Sudoku Solver 9h:48m:52s
Solved: 748 | SpH: 76
*: False Solved: 376 Failed: 15
*: False Solved: 372 Failed: 0
:eek:
How come you aren't already banned? ^^
Widget
2009-11-05 01:45:57
From: marpis
:eek:
How come you aren't already banned? ^^
I'm running two people and it switches between them each progress report (which I think is around 8 minutes) ;)
YoHoJo
2009-11-05 01:50:31
Just remember everyone, don't abuse this thing, 3-4 hours a day is enough! Most of us don't give a damn about the GP anyways. Once Jagex finds out were doing this were screwed. So just be careful! And even though lots of you guys have abused it before, we might not be so lucky in the future! :D <3
The Claw
2009-11-05 06:16:03
From: YoHoJo
Just remember everyone, don't abuse this thing, 3-4 hours a day is enough! Most of us don't give a damn about the GP anyways. Once Jagex finds out were doing this were screwed. So just be careful! And even though lots of you guys have abused it before, we might not be so lucky in the future! :D <3
Narcle
2009-11-05 06:27:56
/facepalm
n3ss3s
2009-11-05 13:49:20
Claw you're the fucken man :p By the way, you don't mind if I use that pic to prove some power of botting to pplz? I don't think it reveals anything about your account or the botting method?
* Sorry, Drag Claws were on loan for this pic ;) …not all her stuff, but some junk my daughter has been buying :p
YoHoJo
2009-11-05 17:06:44
Ram 1uped The Claw.
Might want to bleep your name RAM, who knows.
The Claw
2009-11-05 18:42:11
From: YoHoJo
Ram 1uped The Claw.
Might want to bleep your name RAM, who knows.
Considering he's ~100m poorer than me, I doubt it. :p
And yeh go for it n3ss3s
Hobbit
2009-11-05 20:37:09
I think Hobbit Wins :p
Also After i gave it a break im starting again… will post more pics with more wealth :p
(Pic kinda crapy but thats a Phat on my head :p)
@ YoHoJo, Thanks…I was in a hurry to get to church…I host the Soup Kitchen on thursday nights ;)
@Claw…You'd better look up the price on the rest of that "junk", plus as I mentioned, my claws were on loan, so we're at a draw :p (and that's not all my wealth, just what I have made from this script ;)
@Hobbit… I'll buy your hat in a couple of weeks after you buy your cracker :p …BTW, how did you get logs from the chest ?!?!?!
Hobbit
2009-11-05 22:24:30
Well I'm selling in january when phats hit their high :p
Right now im sitting on 130m profit :p
Then in the summer ill buy one again when they are uber cheap :p
The Claw
2009-11-05 22:45:27
No no, I'll buy the phat! RAM, you've already got a disk which lets you buy a phat extremely easily (unless you wanna sell me it) by just adding cash or other junk, stop being greedy :p I've been lurking RS forums and w2 for literally days and still can't get a phat.
But fair enough, looks like I may have to sudoku some more lol
Hobbit
2009-11-05 22:50:48
Well its hard to buy a phat cause most people want other rares for it not cash… Ill take cash :p
From: Hobbit
Well its hard to buy a phat cause most people want other rares for it not cash… Ill take cash :p
How much Cash ? :P
Sorry Claw :ninja:
Hobbit
2009-11-05 23:00:16
I dont know how nor have any junk to do a junk trade SOOOOO Ill be nice and do at GE price rather than Phat market price
The Claw
2009-11-05 23:07:46
From: RAM
How much Cash ? :P
Sorry Claw :ninja:
Dude, seriously, you've got a disk, just get a phat off a random with that…the whole reason I got members and have been autoing lately is to get a phat, at this stage I have no chance, whereas you could literally get one within 5 minutes of posting on forums. Unless you want 2, in which case, it looks like we have a bidding war on our hands. I offer 200m above GE price for Hobbit's red.
Edit: Unless…you sell me the disk for market, and buy Hobbit's phat for market (reds go for a
lot above market price already, so you wouldnt be losing out) and let me deal with the junk trades etc. I understand I have no claim over the disk or the phat, just as you dont have a claim over the phat either, but I just want one bad, lol. No offence to you youre still a cool guy etc, lets not let pixels get in the way of our calm and friendly attitudes etc :p
Hobbit
2009-11-05 23:12:33
From: The Claw
I offer 200m above GE price for Hobbit's red.
Done. :p
Now how are we gonna do this :p
The Claw
2009-11-05 23:17:09
Lol I was kinda joking, I've got no idea how to unless you've got 200m junk
Hobbit
2009-11-05 23:26:27
From: The Claw
Lol I was kinda joking, I've got no idea how to unless you've got 200m junk
How am I supposed to do that :p How do people get junk>?
_ChArMz
2009-11-05 23:55:43
ill buy the disk and the phat @ trade price :D…send me a PM…if anyone falls through
The Claw
2009-11-06 00:16:45
From: Hobbit
How am I supposed to do that :p How do people get junk>?
Not sure really, funny thing is most junk can be sold to stores, or on the ge, etc. So it's not really worthless at all.
From: _ChArMz
ill buy the disk and the phat @ trade price :D…send me a PM…if anyone falls through
Its just like trading pokemon cards in the schoolyard again :p I want the charizard! No me! etc
Hobbit
2009-11-06 00:23:13
From: The Claw
Not sure really, funny thing is most junk can be sold to stores, or on the ge, etc. So it's not really worthless at all.
I know… thats what I did :p
I lost like maybe 1 mil out of the 50m of junk
but w/e :p
Markus
2009-11-06 10:44:19
[admin]
Too much abuse of sudoku will cause Jagex to notice. Be cautious
[/admin]
Hobbit
2009-11-06 11:57:49
We dont :)
I only run for like 3 hours and only 3-5/7 days a week
Markus
2009-11-06 16:01:48
Compare that to my 2 hour run twice a month :rolleyes:
Funny to see that I only got like 20m with it as creator, and here I see like rares all the way :p
yeah, Easy come Easy go I say…. I'm up for a Billion dollar drop party…$200 mil from me :)…just need 4 other people….hmm
Hobbit
2009-11-06 22:22:15
RAM if you wanna hold off awhile till i rack up my cash a bit more, im in for it :p
n3ss3s
2009-11-07 04:38:33
From: RAM
yeah, Easy come Easy go I say…. I'm up for a Billion dollar drop party…$200 mil from me :)…just need 4 other people….hmm
You better hold that drop party 9 am GMT +2 on monday or tuesday :p Least people in all worlds most likely, and I can make it :p
n3ss3s
2009-11-07 05:40:11
Claw's version is dynamite <3 What do you guys think about increasing the speed of inserting the runes? Now it's about two clicks per second, would four be just stupid?
Woot, 67 sph, used to be 50 with my version :)
Narcle
2009-11-07 06:12:15
From: n3ss3s
Claw's version is dynamite <3 What do you guys think about increasing the speed of inserting the runes? Now it's about two clicks per second, would four be just stupid?
Woot, 67 sph, used to be 50 with my version :)
Ya that's about what I'm at with no quests done.
Sure Hobbit, we can hold off a bit…I'm thinking of making a member's account just for this…and whatever is made, donate to say, a SRL Christmas party ?
Imagine dropping 10-20 Santa Hats :thumbsup:
What kind of internet connection you using…. I've been tweaking the waits in as tight as i can, but can still never get past 50 SPH, I'm pretty sure it's the latency of my satelite, as some times the click to continue screens hang a bit…still happy with the results, just trying to optimize it like everyone else :)
n3ss3s
2009-11-07 13:13:19
used 15M, gonna do another 15 sometime… Then hold it till Friday…
The Claw
2009-11-07 20:43:19
From: RAM
Sure Hobbit, we can hold off a bit…I'm thinking of making a member's account just for this…and whatever is made, donate to say, a SRL Christmas party ?
Imagine dropping 10-20 Santa Hats :thumbsup:
What kind of internet connection you using…. I've been tweaking the waits in as tight as i can, but can still never get past 50 SPH, I'm pretty sure it's the latency of my satelite, as some times the click to continue screens hang a bit…still happy with the results, just trying to optimize it like everyone else :)
I'm using cable internet, 20mbits/s or so. The first post has info on how to optimise it, doing that with my version I consistently get 100 per hour
The Claw
2009-11-08 03:36:29
Anyone here bonesaw pk? :p
n3ss3s
2009-11-08 03:48:57
From: The Claw
Anyone here bonesaw pk? :p
What?
The Claw
2009-11-08 04:16:03
That person has been sudokuing at ali for the last few hours, same world as me. Just wondering if its someone from here as every other account spotted there thats been mentioned has been
Widget
2009-11-08 04:35:51
From: The Claw
That person has been sudokuing at ali for the last few hours, same world as me. Just wondering if its someone from here as every other account spotted there thats been mentioned has been
Sounded like you asked if we did a certain type of PKing. That almost made me cry a little inside but I never actually PKed so I don't care :p
n3ss3s
2009-11-08 05:18:42
FUCK! Bonesaw Pk is a dude (leader or shit) in a clan named FOE, and I don't fucking wanna know the rest unless he is one of us… If he is not, we should report him, getting him banned would mean all of his friends that might be using it would stop doing it too.
Claw if you see him, please take pics..
The Claw
2009-11-08 06:11:35
He's still there, been there since about 4pm. I took a break for a bit, came back, and he was still there. Need someone to help me test what happens when you trade someone who's 1. In sudoku and 2. just in normal chat with Ali, I've traded him periodically throughout the day and it always says "player is busy at the moment".

What do you mean his friends might be using it? Btw, yep he's co-founder.
http://www.runehead.com/clans/ml.php?clan=clanfoe
http://www.foe-rs.com/forums/
(links coded and unparsed so the admins of foe doesnt see the refferral from this page via cpanel, which would let them know we're onto them from the topic title)
Pretty sure c0de was/is in FOE. Everyone, check the runehead for names you might recognise. Surely if someone in here was leader, they would of told us, since we all have pures. That means we have a leak on our hands, my friends. Time to make some quick fucking decisions - report him, get him possibly banned, but risk drawing attention to us, and me specifically (since I was on the same world for hours)? Or leave it? Ban c0de, at least temporarily so he has no way of seeing this?
marpis
2009-11-08 06:33:26
From: The Claw
He's still there, been there since about 4pm. I took a break for a bit, came back, and he was still there. Need someone to help me test what happens when you trade someone who's 1. In sudoku and 2. just in normal chat with Ali, I've traded him periodically throughout the day and it always says "player is busy at the moment".

What do you mean his friends might be using it? Btw, yep he's co-founder.
http://www.runehead.com/clans/ml.php?clan=clanfoe
http://www.foe-rs.com/forums/
(links coded and unparsed so the admins of foe doesnt see the refferral from this page via cpanel, which would let them know we're onto them from the topic title)
Pretty sure c0de was/is in FOE. Everyone, check the runehead for names you might recognise. Surely if someone in here was leader, they would of told us, since we all have pures. That means we have a leak on our hands, my friends. Time to make some quick fucking decisions - report him, get him possibly banned, but risk drawing attention to us, and me specifically (since I was on the same world for hours)? Or leave it? Ban c0de, at least temporarily so he has no way of seeing this?
Is it possible that some of them has written a solver of their own?
n3ss3s
2009-11-08 06:41:55
Is it possible that some of them has written a solver of their own?
Not a slightest chance, considering that
a) Long time ago this got leaked
b) The RSBot admins weren't smart enough to convert it to Java.
So it's likely that someone is using our version.
The Claw
2009-11-08 06:45:55
Well yeah its possible, but highly unlikely imo. Havent seen anyone else autoing sudoku that wasnt from here (as stated above) so its nearly 100% that it's not another cheating community, private or not. My guess would be someone in FOE (code maybe? 90% sure he had a pure in there but could be wrong) gave the script and knowledge of SCAR to him for some e-blowjobs or something.
By clicking Ali to make him turn, the average time for Bonesaw Pk to solve sudoku is around 55 seconds. Matches pretty closely to the older versions here, and no one could really do that by hand, RSBot's attitude lead me to believe if they had it they'd optimise to rape it like I did…I reckon he's using an older version before the latest changes we made.
Edit - When was it leaked, when you and some other people got done over by the java thing on RSBot? Or another time? If it was leaked to RSBot, then theres a better chance it wasnt leaked directly to him by someone in here
I have been seeing quite a bit more people there lately…I weas starting to wonder if someone was training other accounts, but i guess a leak is possible :(… quite a few low levels-pures? and 1 high level "motor cross something" yesterday
E, i guess we need a place to post who we been seeing or post here ?
n3ss3s
2009-11-08 13:50:23
I'm X 0 R I A X, CB 73.
Hobbit
2009-11-08 13:53:48
YoHoJo
2009-11-08 14:00:26
Hmm, who leaked it ealier?
And dont you think although rsbot was lazy to convert it, they would convert it over time since its so amazing? And if it is leaked, then fuck fuck. This is a type of script that HAS to be kept secret/used in small numbers, or soon itll be nerfed :[.
Im raging so hard right now this BLOWS!
Narcle
2009-11-08 14:02:00
From: YoHoJo
Hmm, who leaked it ealier?
And dont you think although rsbot was lazy to convert it, they would convert it over time since its so amazing? And if it is leaked, then fuck fuck. This is a type of script that HAS to be kept secret/used in small numbers, or soon itll be nerfed :[.
Im raging so hard right now this BLOWS!
Nah I don't think its leaked. That's why I think Hobbit started that thread so we know who is there?
n3ss3s
2009-11-08 14:03:31
Hobbit, is the plan to keep track of all sudokuers we see, or to list us, or to list ones that are not us?
Hmm, who leaked it ealier?
Our database or something was stolen…
And dont you think although rsbot was lazy to convert it, they would convert it over time since its so amazing?
They weren't too lazy to convert it, they were incompetent against Ray's shit…
Hobbit
2009-11-08 15:15:00
I dont think we should post who we are, just incase.
BUT post who we see that we dont know if it is someone in SSRL. If its posted and we find out it is someone then we remove name. If it isnt anyones, add to first post.
I've been having a few problems with it clicking on the camel and following him around :s…experimented with a few colors, but ended up going back to the original and just changed compass setting to "280", seems to be working fine now.
Widget
2009-11-08 20:30:27
I find that [9858900, 8150085, 11173727, 7690049, 15266803] is a good batch of colors, most of which are the blue on his hat.
The Claw
2009-11-08 20:39:30
If youre talking about that java thing and that guy who knew the title of this thread, but would never send us the script, then I doubt it was leaked, I don't think RSBot users would be opposed to using SCAR in order to get a 2m/hour script with next to no requirements. Afaik, we never received any proof at all that it was leaked that time.
Wizzup?
2009-11-11 09:36:37
Can we perhaps establish that whatever gold you make with this script, is not to be sold on SRL? (@ Everyone)
n3ss3s
2009-11-11 09:39:02
From: Wizzup?
Can we perhaps establish that whatever gold you make with this script, is not to be sold on SRL? (@ Everyone)
Yepp
Yakman
2009-11-11 09:46:53
we had proof because the guy knew the name of a thread in the mod section.
they didnt take the database, they probably only found out someones password and logged in.
should we all get pgp/gpg and encrypt this script before we post it?
Bobarkinator
2009-11-11 11:33:34
From: Yakman
we had proof because the guy knew the name of a thread in the mod section.
they didnt take the database, they probably only found out someones password and logged in.
should we all get pgp/gpg and encrypt this script before we post it?
That's not a bad idea. And it's also not to tough, so I say let's go for it.
Yakman
2009-11-11 16:47:03
this is how I think it should be done.
pgp/gpg has a feature where called symetrical encryption, this is basically where you write a passphrase and pgp uses it to encrypt it, at the other end, somebody types the same passphrase and pgp will decrypt it.
This passphrase must never be posted on the forums, we would only tell people over msn or irc.
An obvious problem is that a really commited leaker could decrypt the script and just leak that.
Its very important to remember that encrypting only protects against somebodies account being 'hacked' and the 'hacker' just copy/pasting the script from the forum post, one kind of accidental leaking in other words. It doesnt protect against a leaker who really wants to leak.
ZephyrsFury
2009-11-11 21:31:34
Well wouldn't some mysterious encrypted file be very tempting to some hacker as opposed to an open script. It might be something more of an achievement to release a decrypted script than just a normal script.
YoHoJo
2009-11-11 23:33:29
No one (almost) knows about the script or anything, so how would encrypting it make it any worse? I don't get what your saying. No one who shouldn't be able to see it can, so encrypting it wouldn't be bad at all.
The Claw
2009-11-11 23:36:46
He's saying on the off chance someone gains access here, instead of being "just another rs script", by having it encrypted its obviously something we care about, and that would be incentive to try and crack it. Just for the sake of doing it - "hey look I decrypted srl's most secret and best script", whereas if its not encrypted it blends in. Of course, the simple fact that we've even discussed this now means that they'll release it anyway if they get in…..lol. So we may as well encrypt it, its just added protection
YoHoJo
2009-11-11 23:38:42
Well, if hes saying encrypting it will make people think its more valuable that's true, but cmon we all posted pics of our wealth we got from it, ppl will know its awesome anyways. (Sorry for bad typing im in a rush!)
The Claw
2009-11-11 23:44:10
Yup :p This 26 page thread kind of gives it away already lol
The Claw
2009-11-12 08:12:54

380m total value :D Just though I'd share since we've all been giving regular updates…now to calm down a bit, and see if I get banned or not :p
Idea for promoting SRL: We all take pics of what we've made, someone make a post on RSBot asking whats the most amount theyve ever autoed to without getting banned, then the rest of us come in, post these pics, and say we got it using SRL
_ChArMz
2009-11-12 08:46:14
party hats are being sold in GE again?
lets just keep our bragging wealth posts to here, when you have something as nice as this, you keep it to yourself :p
The Claw
2009-11-12 09:07:03
Nope, I paid ~340m for it. Bought an easter for 210m today, the guy gave me all those pots as junk as well as some other crap. Then traded the easter, a santa, blue mask, red mask, 74m cash and 40m of pots as junk for the yellow. Apparantly theyre going to crash soon though, so maybe they'll sell again
YoHoJo
2009-11-12 14:53:24
Bought an easter for 210m today What the shit?!
Man economy for rares is so freaking wierd now, everyone buys/sells based on expected future prices and stuff? :/ Blaaargh
Not all of it was from Sudoku, and I had the disk, but I earned enough to say
THANK YOU to everyone involved here !!!!


I think it's time to retire while I'm ahead ;)
Hey Claw, would you be interested in trading me your yellow for my purple? I always wanted a yellow..
I can buy a ton of that junk off you :D
Thanks
~JAD
The Claw
2009-11-13 18:45:33
Hmm possibly…got an edible to throw my way by any chance? :p Purple < Egg now
YoHoJo
2009-11-13 19:45:08
From: The Claw
Hmm possibly…got an edible to throw my way by any chance? :p Purple < Egg now
Eggs are worth more that purples?! What the ! Mannn Runescape 'rares' economy is just wayyy over my head now!
Smartzkid
2009-11-13 19:45:39
What's the deal with the disk??
Wizzup?
2009-11-13 19:56:35
From: ZephyrsFury
Well wouldn't some mysterious encrypted file be very tempting to some hacker as opposed to an open script. It might be something more of an achievement to release a decrypted script than just a normal script.
The idea is that it is practically unbreakable. :)
Smartzkid
2009-11-13 19:59:08
AES 256 is US Govt approved for top secret information.
No basement RS nerd is gonna get past that!
_ChArMz
2009-11-15 12:46:55
here are the numbers 0-9, they are missing from CharsNPC
I would like to use them to find how much we are paying per sudoku, but actually making them work with freddys OCR is a pain in the ass, so if someone has added fonts before, can u fix them so that they work :S
right now they are all X by 18, with one pixel of black to the left, right and top
marpis
2009-11-15 13:25:47
From: _ChArMz
here are the numbers 0-9, they are missing from CharsNPC
I would like to use them to find how much we are paying per sudoku, but actually making them work with freddys OCR is a pain in the ass, so if someone has added fonts before, can u fix them so that they work :S
right now they are all X by 18, with one pixel of black to the left, right and top
Examine your coin stack and the exact amount is displayed on your main chat, and I think SmallFont (whatever) works fine.
Price per Sudoku = (StartMoney - EndMoney) / SudokuCount
_ChArMz
2009-11-15 15:06:19
From: marpis
Examine your coin stack and the exact amount is displayed on your main chat, and I think SmallFont (whatever) works fine.
Price per Sudoku = (StartMoney - EndMoney) / SudokuCount
I don't want to do it that way, examining my money is an extra step i do not need to do
marpis
2009-11-16 01:57:37
This broke in #39, if someone is lazy here's fixed one
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALIRAPER;
{.include SRL/srl/misc/smart.scar}
{.include SRL/srl.scar}
const
Rule7proof = true; //TRUE TO BE LEGAL!
DisplayDetails = false; //shows all the crap in Debug/Report windows :P
debugmode = false;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SMART_Server := 138;
SMART_Signed := True;
SMART_Members := True;
MouseSpeed := 19;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
end;
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;
//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 = 118;
YStart = 8;
XOff = 37;
YOff = 37;
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; }
ColourArray[1] := getcolor(22, 103); //2396406
ColourArray[2] := ColourArray[1] - 682565; //1713841 -682566
ColourArray[3] := ColourArray[1] - 1329806; //1001067 -1001067
ColourArray[4] := ColourArray[1] + 13867564;
ColourArray[5] := ColourArray[1] + 9211426;
ColourArray[6] := ColourArray[1] + 12293673;
ColourArray[7] := ColourArray[1] + 9472;
ColourArray[8] := ColourArray[1] - 1540840; //Death eyes
ColourArray[9] := ColourArray[1] + 13591559;
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 9 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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
//ss : string;
CurPoint : TPoint;
canexit : boolean;
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;
if DisplayDetails then
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
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);
end;
end;
end;
end;
repeat
CanExit:= True;
wait(100 + Random(50));
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(200 + Random(200));
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
wait(100 + Random(200));
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0cF07U2kGQ6aORGyKRWDRK1MCNHwi38C0Z4' +
'CLbxicQ2y98iba0EDUS3zXvn2dP7NiGTAdlW1gjyzZbxuDqo8e8G7' +
'tukG3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CDJzNHJTJBKLRqkauPFDlkxy' +
'ke3gU4idF75E29qoGsG/0PiohdiQmaBiC2tkxebIAL8omdiQdTBp2' +
'/VcUtsstuAkVzl+Y7Xa9UBgPbTVzsBGvtrYSCcsieDie47V4Jqmnp' +
'BsCIvt+fznx5am63QC3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu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+
'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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2'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IFIjzNO+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 TalkingToAli : Boolean;
var
bmpText : Integer;
begin
bmpText := CreateBitmapMaskFromText('Ali', NPCChars);
Result := FindBitmapMaskTolerance(bmpText, x, y, MCX1, MCY1, MCX2, 380, 50, 10);
FreeBitmap(bmpText);
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;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.09);
FindColorsTolerance(TPA, 7229756, MSX1, MSY1, MSX2, MSY2, 20);
ColorToleranceSpeed(1);
ATPA := SplitTPA(TPA, 40);
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
if WAitUpText('orris', 250) 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
0: begin
Mouse(x, y, 0, 0, false);
result := ChooseOption('alk-to');
end;
else begin
Mouse(x, y, 0, 0, True);
Result:= FindColor(x, y, 255, x - 5, y - 5, x + 5, y + 5);
end;
end;
//FFlag(0);
//Wait(200+random(200));
if(Result)then break;
end;
end;
if result then
begin
t := GetSystemTime;
while ( GetSystemTime - t < 8000 ) and
( not TalkingToAli ) do
Wait(75 + Random(50));
Result := TalkingToAli;
end;
end;
{function PleaseWait(b : TBox) : Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches : TPointArray;
Height : Integer;
begin
Result := False;
with b do
begin
FindColors(bTxt, 16711680, x1, y1, x2, y2);
FindColors(wTxt, 16777215, x1, y1, x2, y2);
end;
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
TextTPA := LoadTextTPA('Please', NPCChars, Height);
Result := FindTextTPAinTPA(Height, TextTPA, SearchTPA, Matches);
end; }
function Click2Continue : Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches : TPointArray;
b : TBox;
Height, t : Integer;
ATPA : Array of TPointarray;
begin
Result := False;
FindColors(bTxt, 16711680, MCX1, MCY1, MCX2, MCY2);
FindColors(wTxt, 16777215, MCX1, MCY1, MCX2, MCY2);
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
ATPA := TPAtoATPAEx(SearchTPA, 153, 21);
SortATPASize(ATPA, true);
if Length(ATPA[0]) < 1 then
Exit;
TextTPA := LoadTextTPA('here to conti', NPCChars, Height);
Result := FindTextTPAinTPA(Height, TextTPA, ATPA[0], Matches);
if Result then
begin
b := GetTPABounds(ATPA[0]);
with b do
Mouse(RandomRange(x1, x2), RandomRange(y1 + 3, y2 - 3), 2, 1, True);
t := GetSystemTime;
while PleaseWait and ( GetSystemTime - t < 5000 ) do
Wait(10 + Random(10));
end;
end;
function ClickOption(Text : string) : Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches : TPointArray;
Search2D : T2DPointArray;
b : TBox;
Height, i, t : Integer;
begin
Result := False;
FindColors(bTxt, 0, MCX1, MCY1, MCX2, MCY2);
FindColors(wTxt, 16777215, MCX1, MCY1, MCX2, MCY2);
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
Search2D := SplitTPAEx(SearchTPA, 20, 2);
TextTPA := LoadTextTPA(Text, NPCChars, Height);
for i := 0 to High(Search2D) do
begin
Result := FindTextTPAinTPA(Height, TextTPA, Search2D[i], Matches);
if Result then
begin
b := GetTPABounds(Search2D[i]);
with b do
Mouse(RandomRange(x1, x2), RandomRange(y1 + 3, y2 - 3), 2, 1, True);
t := GetSystemTime;
while PleaseWait and ( GetSystemTime - t < 5000 ) do
Wait(10 + Random(10));
Break;
end;
end;
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 ClickOption('all the runes') then
begin
Writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs! '+TimeRunning);
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;
var
SleepTime, t: Integer;
begin
DeclarePlayers;
SetupSRL;
ClearDebug;
SetTimeOut(60*60, 'terminatescript');
LoadArrays;
ReportTime := GetSystemTime + 60000;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
//mousespeed := 40;
NorthLast:= True;
MakeCompass('N');
SetAngle(True);
repeat
if not LoggedIn then
LoginPlayer;
{if CoinAmount('inv') < 59000 then
Writeln('wat');//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
t := getsystemtime;
while ( not ClickOption('selection') ) do
begin
if GetSystemTime - t > 30000 then
begin
Logout;
Break;
end;
Click2Continue;
Wait(50 + Random(50));
end;
t := GetSystemTime;
while ( not ClickOption('large') ) do
begin
if GetSystemTime - t > 30000 then
begin
Logout;
Break;
end;
Click2Continue;
Wait(50 + Random(50));
end;
t := getsystemtime;
while ( not ClickOption('Examine') ) do
begin
if GetSystemTime - t > 30000 then
begin
Logout;
Break;
end;
Click2Continue;
Wait(50 + Random(50));
end;
if SudokuMenu then
begin
DoSudoku;
break;
end;
wait(10);
until(not(LoggedIn));
if(not(LoggedIn))then exit;
if (TimeFromMark(FailTime) > 600000) then
TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
n3ss3s
2009-11-16 02:45:09
From: marpis
This broke in #39, if someone is lazy here's fixed one
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALIRAPER;
{.include SRL/srl/misc/smart.scar}
{.include SRL/srl.scar}
const
Rule7proof = true; //TRUE TO BE LEGAL!
DisplayDetails = false; //shows all the crap in Debug/Report windows :P
debugmode = false;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SMART_Server := 138;
SMART_Signed := True;
SMART_Members := True;
MouseSpeed := 19;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
end;
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;
//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 = 118;
YStart = 8;
XOff = 37;
YOff = 37;
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; }
ColourArray[1] := getcolor(22, 103); //2396406
ColourArray[2] := ColourArray[1] - 682565; //1713841 -682566
ColourArray[3] := ColourArray[1] - 1329806; //1001067 -1001067
ColourArray[4] := ColourArray[1] + 13867564;
ColourArray[5] := ColourArray[1] + 9211426;
ColourArray[6] := ColourArray[1] + 12293673;
ColourArray[7] := ColourArray[1] + 9472;
ColourArray[8] := ColourArray[1] - 1540840; //Death eyes
ColourArray[9] := ColourArray[1] + 13591559;
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 9 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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
//ss : string;
CurPoint : TPoint;
canexit : boolean;
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;
if DisplayDetails then
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
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);
end;
end;
end;
end;
repeat
CanExit:= True;
wait(100 + Random(50));
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(200 + Random(200));
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
wait(100 + Random(200));
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+Py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AX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv6USidV38xtLi1upFHBqA6c5fKL' +
'yLv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/NXaC6ukvVdOHacOb+' +
'+sfDzc2jnc/lYvFkb+/0YP/s6+H3b0c/T47/g68l2+9Xi2sfdguFg' +
'41Ppe0twY93v8A3+K+z0xr5ei2fza6/W9xaWd7J54FjGzjO4SOZd+' +
'G/K5VwOP/NTk0tZTIibywvYVtwnCOVCISz9kp9fTVsJp02ciGXk20' +
'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, 'beNqdle1K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gBytNqLn6wcp79Bwmw8AM=');
OwnArr[5] := Point(20, 250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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 TalkingToAli : Boolean;
var
bmpText : Integer;
begin
bmpText := CreateBitmapMaskFromText('Ali', NPCChars);
Result := FindBitmapMaskTolerance(bmpText, x, y, MCX1, MCY1, MCX2, 380, 50, 10);
FreeBitmap(bmpText);
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;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.09);
FindColorsTolerance(TPA, 7229756, MSX1, MSY1, MSX2, MSY2, 20);
ColorToleranceSpeed(1);
ATPA := SplitTPA(TPA, 40);
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
if WAitUpText('orris', 250) 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
0: begin
Mouse(x, y, 0, 0, false);
result := ChooseOption('alk-to');
end;
else begin
Mouse(x, y, 0, 0, True);
Result:= FindColor(x, y, 255, x - 5, y - 5, x + 5, y + 5);
end;
end;
//FFlag(0);
//Wait(200+random(200));
if(Result)then break;
end;
end;
if result then
begin
t := GetSystemTime;
while ( GetSystemTime - t < 8000 ) and
( not TalkingToAli ) do
Wait(75 + Random(50));
Result := TalkingToAli;
end;
end;
{function PleaseWait(b : TBox) : Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches : TPointArray;
Height : Integer;
begin
Result := False;
with b do
begin
FindColors(bTxt, 16711680, x1, y1, x2, y2);
FindColors(wTxt, 16777215, x1, y1, x2, y2);
end;
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
TextTPA := LoadTextTPA('Please', NPCChars, Height);
Result := FindTextTPAinTPA(Height, TextTPA, SearchTPA, Matches);
end; }
function Click2Continue : Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches : TPointArray;
b : TBox;
Height, t : Integer;
ATPA : Array of TPointarray;
begin
Result := False;
FindColors(bTxt, 16711680, MCX1, MCY1, MCX2, MCY2);
FindColors(wTxt, 16777215, MCX1, MCY1, MCX2, MCY2);
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
ATPA := TPAtoATPAEx(SearchTPA, 153, 21);
SortATPASize(ATPA, true);
if Length(ATPA[0]) < 1 then
Exit;
TextTPA := LoadTextTPA('here to conti', NPCChars, Height);
Result := FindTextTPAinTPA(Height, TextTPA, ATPA[0], Matches);
if Result then
begin
b := GetTPABounds(ATPA[0]);
with b do
Mouse(RandomRange(x1, x2), RandomRange(y1 + 3, y2 - 3), 2, 1, True);
t := GetSystemTime;
while PleaseWait and ( GetSystemTime - t < 5000 ) do
Wait(10 + Random(10));
end;
end;
function ClickOption(Text : string) : Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches : TPointArray;
Search2D : T2DPointArray;
b : TBox;
Height, i, t : Integer;
begin
Result := False;
FindColors(bTxt, 0, MCX1, MCY1, MCX2, MCY2);
FindColors(wTxt, 16777215, MCX1, MCY1, MCX2, MCY2);
SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;
Search2D := SplitTPAEx(SearchTPA, 20, 2);
TextTPA := LoadTextTPA(Text, NPCChars, Height);
for i := 0 to High(Search2D) do
begin
Result := FindTextTPAinTPA(Height, TextTPA, Search2D[i], Matches);
if Result then
begin
b := GetTPABounds(Search2D[i]);
with b do
Mouse(RandomRange(x1, x2), RandomRange(y1 + 3, y2 - 3), 2, 1, True);
t := GetSystemTime;
while PleaseWait and ( GetSystemTime - t < 5000 ) do
Wait(10 + Random(10));
Break;
end;
end;
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 ClickOption('all the runes') then
begin
Writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs! '+TimeRunning);
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;
var
SleepTime, t: Integer;
begin
DeclarePlayers;
SetupSRL;
ClearDebug;
SetTimeOut(60*60, 'terminatescript');
LoadArrays;
ReportTime := GetSystemTime + 60000;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
//mousespeed := 40;
NorthLast:= True;
MakeCompass('N');
SetAngle(True);
repeat
if not LoggedIn then
LoginPlayer;
{if CoinAmount('inv') < 59000 then
Writeln('wat');//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
t := getsystemtime;
while ( not ClickOption('selection') ) do
begin
if GetSystemTime - t > 30000 then
begin
Logout;
Break;
end;
Click2Continue;
Wait(50 + Random(50));
end;
t := GetSystemTime;
while ( not ClickOption('large') ) do
begin
if GetSystemTime - t > 30000 then
begin
Logout;
Break;
end;
Click2Continue;
Wait(50 + Random(50));
end;
t := getsystemtime;
while ( not ClickOption('Examine') ) do
begin
if GetSystemTime - t > 30000 then
begin
Logout;
Break;
end;
Click2Continue;
Wait(50 + Random(50));
end;
if SudokuMenu then
begin
DoSudoku;
break;
end;
wait(10);
until(not(LoggedIn));
if(not(LoggedIn))then exit;
if (TimeFromMark(FailTime) > 600000) then
TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
mine is running just fine? Remember that its always the one closest to the end of the thread thats the "right" one…I forgot that my SRL version is propably 3.x :p
Widget
2009-11-17 12:18:38
marpis
2009-11-24 06:56:44
If anyone's having lag with the conversation, here is the ultimate version ;)
I get 80 SPH with mousespeed 20.
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALIRAPER;
{.include SRL/srl/misc/smart.scar}
{.include SRL/srl.scar}
const
Rule7proof = true; //TRUE TO BE LEGAL!
DisplayDetails = false; //shows all the crap in Debug/Report windows :P
debugmode = false;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SMART_Server := 138;
SMART_Signed := True;
SMART_Members := True;
MouseSpeed := 20;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
end;
procedure debug(s : string); begin if debugmode then writeln(s) else Status(s); end;
Type
TNPCText = Record
Mask: Integer;
Txt: String;
End;
var
Playground : Array of Array of byte;
lolz : TStringArray;
DTM : array [1..9] of integer;
ownarr : array [1..9] of TPoint;
FailTime, Solved, A: integer;
NorthLast, UnSolvable: Boolean;
NPCChats: Array Of TNPCText;
//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 = 118;
YStart = 8;
XOff = 37;
YOff = 37;
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; }
ColourArray[1] := getcolor(22, 103); //2396406
ColourArray[2] := ColourArray[1] - 682565; //1713841 -682566
ColourArray[3] := ColourArray[1] - 1329806; //1001067 -1001067
ColourArray[4] := ColourArray[1] + 13867564;
ColourArray[5] := ColourArray[1] + 9211426;
ColourArray[6] := ColourArray[1] + 12293673;
ColourArray[7] := ColourArray[1] + 9472;
ColourArray[8] := ColourArray[1] - 1540840; //Death eyes
ColourArray[9] := ColourArray[1] + 13591559;
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 9 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 EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
//ss : string;
CurPoint : TPoint;
canexit : boolean;
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;
if DisplayDetails then
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
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);
end;
end;
end;
end;
repeat
CanExit:= True;
wait(100 + Random(50));
for x:= 0 to 8 do
for y:= 0 to 8 do
Begin
// 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(200 + Random(200));
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
wait(100 + Random(200));
CanExit:= False;
except
end;
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0cF07U2kGQ6aORGyKRWDRK1MCNHwi38C0Z4' +
'CLbxicQ2y98iba0EDUS3zXvn2dP7NiGTAdlW1gjyzZbxuDqo8e8G7' +
'tukG3I2jKk7TmXlDaDLbg7JJ62urG7J4Cm2jVs5Cv19WTCkLhwf1t' +
'duDLRCcmEsGsCz38uNjVcJRPgxrfY3bYaHNsia0j8ho0cqatjtplA' +
'Y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VzsBGvtrYSCcsieDie47V4Jqmnp' +
'BsCIvt+fznx5am63QC3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwE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Lwsv' +
'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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc236MtLY9jMZHHBp6PD75AmFc' +
'VP1ayG8E8nSUZRl1wI0eamzuj0WddXcN9T4EjYqEEEuTP8bErg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LkucnX81NvEOHNBQsE2XsjWBC' +
'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;
end;
procedure ScriptTerminate;
var
i: integer;
begin
for i := 1 to 9 do
FreeBitmap(DTM[i]);
Disguise('End Sudoku');
end;
function TalkingToAli : Boolean;
var
bmpText : Integer;
begin
bmpText := CreateBitmapMaskFromText('Ali', NPCChars);
Result := FindBitmapMaskTolerance(bmpText, x, y, MCX1, MCY1, MCX2, 380, 50, 10);
FreeBitmap(bmpText);
end;
// White, Black or Blue
Function WBB(X, Y: Integer): Boolean;
Begin
Result := InIntArray([clWhite, clBlack, clBlue], GetColor(X, Y));
End;
Function C2CReady: Boolean;
Begin
Result := WBB(233, 455) And WBB(373, 457) And WBB(259, 455) And WBB(327, 458);
End;
function TalkToAli: boolean;
var
i, x, y, L, t: integer;
M: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if FindTextTPA(clBlack, 0, MCX1, MCY1, MCX2, MCY2,'nough coins', NPCChars, Nothing) then
begin
Writeln('Not enough coins in inventory.');
Report;
TerminateScript;
end;
//Result:= ChooseOption('orris');
//if(Result)then exit;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.09);
FindColorsTolerance(TPA, 7229756, MSX1, MSY1, MSX2, MSY2, 20);
ColorToleranceSpeed(1);
ATPA := SplitTPA(TPA, 40);
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
if WAitUpText('orris', 250) then
begin
GetMousePos(x, y);
case Random(10) of
0: begin
Mouse(x, y, 0, 0, false);
result := ChooseOption('alk-to');
end;
else begin
Mouse(x, y, 0, 0, True);
Result:= FindColor(x, y, 255, x - 5, y - 5, x + 5, y + 5);
end;
end;
WaitFunc(@C2CReady, 10 + Random(15), 4000 + Random(1000));
if(Result)then break;
end;
end;
if result then
begin
t := GetSystemTime;
while ( GetSystemTime - t < 8000 ) and
( not TalkingToAli ) do
Wait(75 + Random(50));
Result := TalkingToAli;
end;
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
Result := true;
Report;
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;
var
SleepTime, t: Integer;
Function ClickNPCChatText(Which: TNPCText): Boolean;
Var
X, Y: Integer;
Begin
if FindBitmapMaskTolerance(Which.Mask, X, Y, MCX1, MCY1, MCX2, MCY2, 50, 10) then
begin
Result := True;
Mouse(X, Y + 2, Random(Length(Which.Txt) * 5), 4, True);
end;
End;
Procedure PlxWait;
Var
D: Integer;
Begin
Wait(70 + Random(30));
D := DTMFromString('78DA632C65606030634001FFFFFF07D38C503' +
'E6321116A2A89509343849A4C22D4A411560300477315D9');
While FindDTM(D, X, Y, 200, MCY1, 400, MCY2) Do
Wait(50 + Random(50));
FreeDTM(D);
Wait(70 + Random(30));
End;
Function C2C(X, Y: Integer): Boolean;
Var
XX, YY: Integer;
Begin
PlxWait;
If FindColor(XX, YY, ClBlue, 230, 450, 378, 460) Or
FindColor(XX, YY, ClWhite, 230, 450, 378, 460) Then
Begin
Result := True;
Mouse(X, Y, 0, 0, True);
End;
Wait(150 + Random(30));
PlxWait;
End;
Function AlisBack: Boolean;
Begin
Result := WBB(370, 409) And WBB(289, 409) And WBB(137, 408);
End;
Function Conversation: Boolean;
Var
T, TT, X, Y: Integer;
Begin
T := GetSystemTime;
TT := GetSystemTime + 20000 + Random(2000);
X := RandomRange(240, 370); // C2C
Y := RandomRange(454, 458); // C2C
Repeat
Repeat
// large casket
If WBB(140, 402) And WBB(380, 411) Then
Begin
Mouse(270, 410, 35, 4, True);
PlxWait;
Break;
End;
// Click to continue
If Not C2C(X, Y) Then
Begin
X := RandomRange(240, 370); // C2C
Y := RandomRange(454, 458); // C2C
End Else
Break;
// selection of runes
If WBB(80, 396) And WBB(439, 398) Then
Begin
Mouse(285, 398, 30, 5, True);
PlxWait;
Break;
End;
// Examine
If WBB(215, 442) And WBB(303, 444) Then
Begin
Mouse(255, 444, 30, 4, True);
If WaitFunc(@SudokuMenu, 100, 10000 + Random(100)) Then
Begin
Result := True;
Break;
End;
Break;
End;
// Ali checks his runes...
WaitFunc(@AlisBack, 15 + Random(10), 5000 + Random(1000));
Until((GetSystemTime > TT) Or Result);
Until((GetSystemTime > TT) Or Result);
If Result Then
WriteLn('Conversation over in: '+IntToStr(GetSystemTime - T)+' ms (SUDOKU OPEN)')
Else
WriteLn('Conversation over in: '+IntToStr(GetSystemTime - T)+' ms (FAILED!)');
End;
Procedure LoadNPCChats;
Var
I: Integer;
Begin
SetLength(NPCChats, 4);
NPCChats[0].Txt := 're to co';
NPCChats[1].Txt := 'election';
NPCChats[2].Txt := 'rge c';
NPCChats[3].Txt := 'xa';
For I := 0 To High(NPCChats) Do
NPCChats[I].Mask := CreateBitmapMaskFromText(NPCChats[I].Txt, NPCChars);
End;
var
fails: Integer;
begin
DeclarePlayers;
LoadNPCChats;
SetupSRL;
ClearDebug;
LoadArrays;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
//mousespeed := 40;
NorthLast:= True;
MakeCompass('N');
SetAngle(True);
repeat
if not LoggedIn then
LoginPlayer;
if SudokuMenu then
DoSudoku;
if not TalkToAli then
Inc(Fails)
else
If Conversation then
Begin
If DoSudoku Then
Fails := 0
Else
Inc(Fails);
End Else
Inc(Fails);
if (TimeFromMark(FailTime) > 600000) then
TerminateScript;
until(Fails > 4);
end.
Boreas
2009-11-26 01:04:19
I think that everyone should stop using this script, move your account away from Ali, and sell most of your runes, today.
It appears that ian has the script and is selling it or is about to. The many accounts that have been spotted in the other thread are probably not a coincidence. Either ian will go public with it, or will sell to tons of people without background checks (basically going public), or we will go public with it to prevent him from making money off it. Either way, it wouldn't take much for jagex to screw it up once they get wind of it, as the only reason this works is that they don't know how it is being abused. So when we do go public with it, we should warn users that at any time jagex could start banning, or at least nullifying profits. Obviously jagex has the ability to see accounts currently at Ali, with large amounts of runes/money very easily. They also may have the ability to look back and see which accounts were previously in this situation, with some limitation to how far back they can look. This is why you need to get out before things go bad. In the event that the ian problem goes away, and they outsider activity stops increasing, you can then go back.
The Claw
2009-11-26 05:11:29
Agreed
ZephyrsFury
2009-11-26 05:46:55
From: Boreas
I think that everyone should stop using this script, move your account away from Ali, and sell most of your runes, today.
It appears that ian has the script and is selling it or is about to. The many accounts that have been spotted in the other thread are probably not a coincidence. Either ian will go public with it, or will sell to tons of people without background checks (basically going public), or we will go public with it to prevent him from making money off it. Either way, it wouldn't take much for jagex to screw it up once they get wind of it, as the only reason this works is that they don't know how it is being abused. So when we do go public with it, we should warn users that at any time jagex could start banning, or at least nullifying profits. Obviously jagex has the ability to see accounts currently at Ali, with large amounts of runes/money very easily. They also may have the ability to look back and see which accounts were previously in this situation, with some limitation to how far back they can look. This is why you need to get out before things go bad. In the event that the ian problem goes away, and they outsider activity stops increasing, you can then go back.
Wait.. how are we so sure that ian has the script and is giving it away? Where's he giving it away and to who? Idk it just seems more likely that some other community has created a version of the script as is autoing like we do. Whatever is happening, going public with our version doesn't benefit us at all so idk why we should do that..
The Claw
2009-11-26 05:47:34
Read last page of the thread below this on main page
marpis
2009-11-26 11:33:22
We are NOT going fucking public with this. Sorry my harsh language.
If ian. goes public, then we go more and draw all attention from ian.
Before that happens, we just keep on going normally.
I believe Jagex has multiple levels of logging account behaviour. Mouse coordinates and tiles clicked will probably stay in their records from forthnight to a couple of months, but info like [Enter Minigame: Sudoku: 8:36] and [Quit Minigame: Sudoku: 8:37] are likely to be there for at least a year. Even if there are millions of active accounts, they have the capacity to log these actions how far to the past they want.
If they notice the abuse and check accounts that have been in sudoku, you will get banned wheter you stop now or not.
Just my speculation, use your own judiciousness
n3ss3s
2009-11-26 13:03:27
I believe Jagex has multiple levels of logging account behaviour. Mouse coordinates and tiles clicked will probably stay in their records from forthnight to a couple of months, but info like [Enter Minigame: Sudoku: 8:36] and [Quit Minigame: Sudoku: 8:37] are likely to be there for at least a year. Even if there are millions of active accounts, they have the capacity to log these actions how far to the past they want.
As I have said too many times, JAGEX KNOWS WE DO THIS.
* c0de was here during the time Ali Raper was made
* Jagex changed the backgrounds of the sudoku squares, to make it more comfortable? Didn't think so.
* Jagex has done small changes to the runes, a slight colour change, surely nothing to do with fucking around with SRL, right?
btw: there is some bug, at some point (sometimes an hour, sometimes a few hours, not a certain amount really), it ends up to the cactuses north of ali?
Markus
2009-11-26 15:35:54
* c0de was here during the time Ali Raper was made
Gotta admit that that was one epic troll xD
And they did change sudoku together with tons of other interfaces. Colour changes were a side effect of runetek 5.
Surprises me they didn't ban us right away if they knew.
Wizzup?
2009-11-26 15:51:52
From: marpis
We are NOT going fucking public with this. Sorry my harsh language.
If ian. goes public, then we go more and draw all attention from ian.
Before that happens, we just keep on going normally.
I believe Jagex has multiple levels of logging account behaviour. Mouse coordinates and tiles clicked will probably stay in their records from forthnight to a couple of months, but info like [Enter Minigame: Sudoku: 8:36] and [Quit Minigame: Sudoku: 8:37] are likely to be there for at least a year. Even if there are millions of active accounts, they have the capacity to log these actions how far to the past they want.
If they notice the abuse and check accounts that have been in sudoku, you will get banned wheter you stop now or not.
Just my speculation, use your own judiciousness
I believe the decision is purely Markus'.
marpis
2009-11-26 18:22:51
From: Wizzup?
I believe the decision is purely Markus'.
Yea but if your city's leaders first build you a free hospital and then intend to demolish it, would you just say that it's the builder's call and not object?
Exaggerated example but you get the idea..
From: n3ss3s
As I have said too many times, JAGEX KNOWS WE DO THIS.
If they knew they'd have nerfed it, not just changed a few colors…
Boreas
2009-11-26 18:26:50
Jagex doesn't know that we do this, at least so far with this many abusers. If I was jagex, it would be very easy for me to make it give runes out at or above market price for sudokus solved too quickly, and flag for banning in extreme cases. Your account is your account, but I just figured most people are using mains that they care about.
ZephyrsFury
2009-11-26 22:34:45
From: Boreas
Jagex doesn't know that we do this, at least so far with this many abusers. If I was jagex, it would be very easy for me to make it give runes out at or above market price for sudokus solved too quickly, and flag for banning in extreme cases. Your account is your account, but I just figured most people are using mains that they care about.
There are people who solve the sudoku legitly through using online solvers and then manually entering in the runes. Someone with practice could enter in a sudoku in a minute or so.
Boreas
2009-11-27 00:10:17
I'm pretty sure jagex doesn't want them either. Look at it this way, they have purposely designed the game, for the most part, so that higher level activities get more gp/hr. They obviously don't want people getting the kind of profits that come from 1min sudokus, whether it's online solvers or bots. Once they hear about the insanely high gp/hr available with no skills and a couple quests, they will stop it, one way or another.
I believe the decision is purely Markus'.
No offense to Markus, but I don't think it should be his decision completely. After all, Ray did a large part of this by making the sudoku solver, and this wouldn't exist at all if N3ss3s hadn't given Markus the idea.
Although it is not my decision at all, I really think we shouldn't do anything until we make a strong effort to get Ian to stop selling it. Getting him banned from that forum (
where is he even selling it at? How did this all come about? I've yet to see any proof of this at all..), talking to him…etc.
@Seeing other people sudokuing and blaming it on Ian. Is it possible that out of the millions of people who play Runescape, N3ss3s wasn't the only one to come up with the idea to make a sudoku solver? Is it possible some of the people we see talking to Ali are actually doing it legit? An intelligent person could easily do at least sudoku per 6 minutes, 10 per hour, which comes to about what, 300k profit per hour? That's still great profit..
ZephyrsFury
2009-11-27 00:37:37
From: Boreas
I'm pretty sure jagex doesn't want them either. Look at it this way, they have purposely designed the game, for the most part, so that higher level activities get more gp/hr. They obviously don't want people getting the kind of profits that come from 1min sudokus, whether it's online solvers or bots. Once they hear about the insanely high gp/hr available with no skills and a couple quests, they will stop it, one way or another.
I'm sure Jagex would have known that people would start using online solvers to solve the sudokus from the very start. I mean wouldn't that be one of the first things you do when you realise how much profit you could get? Jagex would have known that people were going to exploit it. Maybe it wasn't exactly what they planned for the game but if they really weren't ok with it they would have patched it a while ago.
EDIT: Now its on RuneHQ:
http://www.runehq.com/guide.php?type=calculator&id=0850How long's that been there for?
Method
2009-11-27 01:37:46
From: ZephyrsFury
EDIT: Now its on RuneHQ: http://www.runehq.com/guide.php?type=calculator&id=0850
How long's that been there for?
This Calculator was entered into the database on Mon, Dec 25, 2006, at 03:55:58 PM by Oblivion590, and it was last updated on Fri, Aug 22, 2008, at 09:25:46 AM by Taavi.
n3ss3s
2009-11-27 01:44:33
@Seeing other people sudokuing and blaming it on Ian. Is it possible that out of the millions of people who play Runescape, N3ss3s wasn't the only one to come up with the idea to make a sudoku solver?
In fact, when I used to legit play in 2006 or something, I did the small sudoku just for entertainment, would have done the big one but I was shit at sudokus etc.
At the calculator: Shet. You can propably get 500k to 1M per hour by legitly putting the runes to the calc etc.
@JAD, There are quite a few different solvers, I've posted a bout a few of them in the last 10 pages or so ?…..
@Boreas or anyone else, where has it been confirmed that he is selling it ? …he has contacted me quite a few times via email regarding his ban, but i have yet to reply…as Zeph suggested, maybe we just try and talk to him ?
@Claw, it enrages me also…but "You get more flies with sugar than shit", I in no way agree with rewarding him in anyway for theses actions, but if Zeph thinks he will be receptive to his diplomacy, than I say we lket him try that first ?
From: RAM
where has it been confirmed that he is selling it ? …he has contacted me quite a few times via email regarding his ban, but i have yet to reply…as Zeph suggested, maybe we just try and talk to him ?
I am very curious to see any evidence at all. It might even be possible that this is all just a misunderstanding too.. I tried to find a thread for it on sythe, and there isn't one there.
@Other people making solvers, I know Alex/Haxor had made one too. He was going to trade me his method for my herblore method, but I figured out his method was sudoku.
mastaraymond
2009-11-27 14:45:59
It was posted on rscheata.net.. The post is now removed by Ruler. And yes we know for sure this is our script, he said he got it from 'Senior SRL member'..
This is part of the original post:
From: Ian.
Ok yall, recently we have decided that it is time that we sell. We personally do it by hand because we are able to make more money than the script because scripts can only think at their conpatability and the human brain in capable of much more.
We have made a bot for the people who buy to use for ONLY their own accounts.
Because of the possibility of a leak we will first sell it to twenty people and then we will give all the buyers the script. If it is not working out we will figure out some other way to make this possible.
for the first ten people we will charge $250. THE next five people will be charged $300. Finally the last five will be charged $310.
Order now.
Sorry the prices are so high but trust me its worth is! $250=150m which we are capable of farming in a day on multiple accounts.
_ChArMz
2009-11-27 15:00:55
give me his IP…ill threaten his life, no but forreal, ill speak with his parents and tell them he is doing horrible things on the internet
mastaraymond
2009-11-27 15:02:34
From: _ChArMz
give me his IP…ill threaten his life, no but forreal, ill speak with his parents and tell them he is doing horrible things on the internet
IP = Telephone number?
lordsaturn
2009-11-27 15:06:11
Let's not expedite this nerfing process any more than it already has been in terms of publicity
Markus
2009-11-27 15:36:51
From: JAD
I am very curious to see any evidence at all. It might even be possible that this is all just a misunderstanding too.. I tried to find a thread for it on sythe, and there isn't one there.
@Other people making solvers, I know Alex/Haxor had made one too. He was going to trade me his method for my herblore method, but I figured out his method was sudoku.
I talked to four people who bought it (got two skype calls logged + some msn convos). Plus the RSCA thread.
Misunderstanding my ass, he just made $200 (maybe x2?) of this script, which got reselled a few times for another $80 so I'm pretty sure there is money being made of this, and I didn't get a penny.
YoHoJo
2009-11-27 15:56:50
From: Markus
I talked to four people who bought it (got two skype calls logged + some msn convos). Plus the RSCA thread.
Misunderstanding my ass, he just made $200 (maybe x2?) of this script, which got reselled a few times for another $80 so I'm pretty sure there is money being made of this, and I didn't get a penny.
How'd he get it? And so now FOR SURE YES its confirmed .ian HAS IT and IS SELLING IT. Wtf, I bet its not even obfuscated or authed or anything, so slowly but surely its going to seep into the hands of everyone!
Widget
2009-11-27 16:00:18
From: YoHoJo
How'd he get it? And so now FOR SURE YES its confirmed .ian HAS IT and IS SELLING IT. Wtf, I bet its not even obfuscated or authed or anything, so slowly but surely its going to seep into the hands of everyone!
It still has the header with our names as the people who wrote it and everything
YoHoJo
2009-11-27 16:02:02
Yeah I think .ian's to retarded to auth+obfuscate+anything. So its gonna be out in the public. But lets look at the semi-bright side, we had it first, we made it, and many of you guys got a shtload of cash our of it, so yay, just sucks its gone now :[
Markus
2009-11-27 16:25:59
Oh well, I think Jagex will update this soon, and as only a few people actually understand the fucked up logic I used at some parts of the script I guess this won't work too long.
marpis
2009-11-27 16:53:27
Only people that go to work could even be able to buy the script from ian, lol.
No 14-year-old's parents will buy a 250$ script to cheat on a game…
From: Markus
I talked to four people who bought it (got two skype calls logged + some msn convos). Plus the RSCA thread.
Misunderstanding my ass, he just made $200 (maybe x2?) of this script, which got reselled a few times for another $80 so I'm pretty sure there is money being made of this, and I didn't get a penny.
Wow..
I'm surprised he can sell it for that much though.. You can get verified guides on sythe making the same amount for like $10.
Well, I'm sorry you of all people got screwed over Markus :(…an update is eminent, but…is there something we can update a small procedure or function in SRL that this script is dependent on ?….means we may have to update other scripts as well, but I think it's worth considering ?
E. even like make a bad login procedure and update SRL and rename the good one to loginplayer2;…. then it would be as simple as adding a number 2 in each script
The Claw
2009-11-27 19:36:00
Try and convince the buyers to do a chargeback on paypal :) We should also try and get ian to tell us how he got the script
n3ss3s
2009-11-28 06:00:57
From: RAM
Well, I'm sorry you of all people got screwed over Markus :(…an update is eminent, but…is there something we can update a small procedure or function in SRL that this script is dependent on ?….means we may have to update other scripts as well, but I think it's worth considering ?
E. even like make a bad login procedure and update SRL and rename the good one to loginplayer2;…. then it would be as simple as adding a number 2 in each script
Does SRL know which script is running it? Because then we could add to any procedure, like MakeCompass or LoginPlayer (with padding to right), something that does ReadFileString to the current script's file, if its sudoku it will terminate?
marpis
2009-11-28 06:22:10
From: n3ss3s
Does SRL know which script is running it? Because then we could add to any procedure, like MakeCompass or LoginPlayer (with padding to right), something that does ReadFileString to the current script's file, if its sudoku it will terminate?
Wow that's a great idea! :)
I think that's definately worth going for. It will at least slow the other sudokuers down.
We should have our own keyword that only us SSRL members know, then we write it commented in the script. If that word is found, don't terminate.
S := LowerCase(GetFileString(GetScriptPath{?}))
If (Pos('sudoku', S) > 0) Then
If (Pos('secret word', S) = 0) Then
TerminateScript;
The Claw
2009-11-28 06:22:48
From: _ChArMz
give me his IP…ill threaten his life, no but forreal, ill speak with his parents and tell them he is doing horrible things on the internet
IP Address Search for User: "ian."
Registration IP Address 71.111.155.188
Post IP Addresses
* 10.65.201.115 [Find More Users with this IP Address]
* 10.65.201.72 [Find More Users with this IP Address]
* 66.154.183.15 [Find More Users with this IP Address]
* 66.154.184.34 [Find More Users with this IP Address]
* 67.170.177.163 [Find More Users with this IP Address]
* 67.171.164.133 [Find More Users with this IP Address]
* 67.171.168.4 [Find More Users with this IP Address]
* 67.171.175.222 [Find More Users with this IP Address]
* 67.189.64.45 [Find More Users with this IP Address]
* 71.111.112.20 [Find More Users with this IP Address]
* 71.111.112.28 [Find More Users with this IP Address]
* 71.111.113.11 [Find More Users with this IP Address]
* 71.111.113.141 [Find More Users with this IP Address]
* 71.111.113.59 [Find More Users with this IP Address]
* 71.111.114.101 [Find More Users with this IP Address]
* 71.111.115.245 [Find More Users with this IP Address]
* 71.111.115.246 [Find More Users with this IP Address]
* 71.111.115.253 [Find More Users with this IP Address]
* 71.111.116.129 [Find More Users with this IP Address]
* 71.111.116.204 [Find More Users with this IP Address]
* 71.111.118.236 [Find More Users with this IP Address]
* 71.111.120.112 [Find More Users with this IP Address]
* 71.111.120.169 [Find More Users with this IP Address]
* 71.111.120.214 [Find More Users with this IP Address]
* 71.111.121.199 [Find More Users with this IP Address]
* 71.111.121.230 [Find More Users with this IP Address]
* 71.111.123.186 [Find More Users with this IP Address]
* 71.111.123.80 [Find More Users with this IP Address]
* 71.111.124.147 [Find More Users with this IP Address]
* 71.111.124.68 [Find More Users with this IP Address]
* 71.111.124.69 [Find More Users with this IP Address]
* 71.111.125.87 [Find More Users with this IP Address]
* 71.111.126.40 [Find More Users with this IP Address]
* 71.111.127.119 [Find More Users with this IP Address]
* 71.111.127.180 [Find More Users with this IP Address]
* 71.111.128.199 [Find More Users with this IP Address]
* 71.111.129.157 [Find More Users with this IP Address]
* 71.111.129.204 [Find More Users with this IP Address]
* 71.111.129.64 [Find More Users with this IP Address]
* 71.111.131.129 [Find More Users with this IP Address]
* 71.111.131.218 [Find More Users with this IP Address]
* 71.111.131.34 [Find More Users with this IP Address]
* 71.111.133.159 [Find More Users with this IP Address]
* 71.111.134.205 [Find More Users with this IP Address]
* 71.111.135.25 [Find More Users with this IP Address]
* 71.111.135.35 [Find More Users with this IP Address]
* 71.111.136.47 [Find More Users with this IP Address]
* 71.111.136.9 [Find More Users with this IP Address]
* 71.111.137.155 [Find More Users with this IP Address]
* 71.111.138.147 [Find More Users with this IP Address]
* 71.111.138.168 [Find More Users with this IP Address]
* 71.111.138.89 [Find More Users with this IP Address]
* 71.111.139.99 [Find More Users with this IP Address]
* 71.111.141.206 [Find More Users with this IP Address]
* 71.111.141.216 [Find More Users with this IP Address]
* 71.111.141.93 [Find More Users with this IP Address]
* 71.111.142.105 [Find More Users with this IP Address]
* 71.111.142.20 [Find More Users with this IP Address]
* 71.111.142.93 [Find More Users with this IP Address]
* 71.111.143.35 [Find More Users with this IP Address]
* 71.111.144.114 [Find More Users with this IP Address]
* 71.111.144.243 [Find More Users with this IP Address]
* 71.111.144.79 [Find More Users with this IP Address]
* 71.111.144.80 [Find More Users with this IP Address]
* 71.111.145.111 [Find More Users with this IP Address]
* 71.111.145.239 [Find More Users with this IP Address]
* 71.111.145.84 [Find More Users with this IP Address]
* 71.111.146.89 [Find More Users with this IP Address]
* 71.111.147.184 [Find More Users with this IP Address]
* 71.111.147.58 [Find More Users with this IP Address]
* 71.111.148.83 [Find More Users with this IP Address]
* 71.111.148.91 [Find More Users with this IP Address]
* 71.111.149.154 [Find More Users with this IP Address]
* 71.111.149.81 [Find More Users with this IP Address]
* 71.111.151.136 [Find More Users with this IP Address]
* 71.111.152.109 [Find More Users with this IP Address]
* 71.111.152.155 [Find More Users with this IP Address]
* 71.111.152.85 [Find More Users with this IP Address]
* 71.111.153.100 [Find More Users with this IP Address]
* 71.111.154.49 [Find More Users with this IP Address]
* 71.111.155.51 [Find More Users with this IP Address]
* 71.111.156.146 [Find More Users with this IP Address]
* 71.111.156.209 [Find More Users with this IP Address]
* 71.111.156.36 [Find More Users with this IP Address]
* 71.111.161.112 [Find More Users with this IP Address]
* 71.111.76.118 [Find More Users with this IP Address]
* 71.237.238.180 [Find More Users with this IP Address]
* 71.245.105.41 [Find More Users with this IP Address]
* 71.59.138.60 [Find More Users with this IP Address]
* 98.108.137.133 [Find More Users with this IP Address]
From: Markus
I talked to four people who bought it (got two skype calls logged + some msn convos). Plus the RSCA thread.
Misunderstanding my ass, he just made $200 (maybe x2?) of this script, which got reselled a few times for another $80 so I'm pretty sure there is money being made of this, and I didn't get a penny.
His post also mentions gold farming, bullshit he did it by hand. So he could of made alot off that also. That would be why we're seeing lots of different people and not many regulars lately, they hire him to farm for a few days and that would be enough for a while. Since its been sold now, more regulars will show up probably.
Could you upload the rsca thread please?
Edit: We could update SRL to include code to somehow verify the user is at ali and sudokuing and if they are, do bannable actions, for example run normally but click without randomness or waits, or click on the same spot on the screen 10000x without waits, and so on. It could be put into a TPA function which isnt used much but is used in Sudoku so the effect on normal scripts wouldnt be much, and if we "forget" to release the source no one will know. But have it do this only if a define or something in SRL isnt changed to false, if set to true it would do these bannable actions, so it would knock out all people running a sudoku script with SCAR except us (as we would all change the define manually). Or we could have a whitelist for usernames allowed to run at sudoku, we would know how to change this and they wouldnt. If the user isnt on the whitelist, get them banned. This is assuming they know how to update SRL though, and that they would. If you can get past the moral side of things this might be the best way to stop the whole thing - theyre not going to sudoku much anymore if they all get banned and if we're lucky the abuse won't become big enough for Jagex to nerf it. As a bonus, everyone would be angry at ian and want their money back etc
marpis
2009-11-28 07:24:56
From: The Claw
His post also mentions gold farming, bullshit he did it by hand. So he could of made alot off that also. That would be why we're seeing lots of different people and not many regulars lately, they hire him to farm for a few days and that would be enough for a while. Since its been sold now, more regulars will show up probably.
Could you upload the rsca thread please?
Edit: We could update SRL to include code to somehow verify the user is at ali and sudokuing and if they are, do bannable actions, for example run normally but click without randomness or waits, or click on the same spot on the screen 10000x without waits, and so on. It could be put into a TPA function which isnt used much but is used in Sudoku so the effect on normal scripts wouldnt be much, and if we "forget" to release the source no one will know. But have it do this only if a define or something in SRL isnt changed to false, if set to true it would do these bannable actions, so it would knock out all people running a sudoku script with SCAR except us (as we would all change the define manually). Or we could have a whitelist for usernames allowed to run at sudoku, we would know how to change this and they wouldnt. If the user isnt on the whitelist, get them banned. This is assuming they know how to update SRL though, and that they would. If you can get past the moral side of things this might be the best way to stop the whole thing - theyre not going to sudoku much anymore if they all get banned and if we're lucky the abuse won't become big enough for Jagex to nerf it. As a bonus, everyone would be angry at ian and want their money back etc
I think my "keyword" idea is simplier and easier :rolleyes:
But yea, we could edit MMouse() like this
If (Pos('sudoku', GetFileStringAndShit) > 0) Then
If (Pos('keyword for us ssrl', GetFileStringAndShit) = 0) Then
Repeat
MoveMouse(RandomRange(100, 103), RandomRange(100, 103))
Inc(N);
Until(N > 9999);
I don't know if that gets you banned if you run it just for a few minutes though?
Widget
2009-11-28 08:01:55
Wtf mates, why are we trying to edit the whole SRL include so that we can keep our little script?
The Claw
2009-11-28 08:11:52
The things that get you banned are repetitive inhuman actions, for example always moving your mouse -1,-1 after a right click or something, thousands of times in a row. We could make it place the rune in the exact center of the square every time, click with no random waits between mouse hold and release, click on the same place on the text menus etc every time. And random, small botlike mouse movements at a certain point in the script every solve - like my first example.
It would have to be invisible code though, so we would have to put it in a plugin, and call this function in Mouse? And name it "BoundaryChecks" or something arbitrary, pass it off as being needed for compatibility or something.
Widget: Because its the best way to get revenge without bringing the law into it, and it will make a good story some day
mastaraymond
2009-11-28 08:12:09
We're not going to edit the SRL include for this. Be happy we've abused the script for over a year now.
marpis
2009-11-28 08:22:59
From: The Claw
We could make it place the rune in the exact center of the square every time, click with no random waits between mouse hold and release, click on the same place on the text menus etc every time. And random, small botlike mouse movements at a certain point in the script every solve - like my first example.
No, we actually couldn't, unless you can somehow get to ian's computer and edit the script he has.
The Claw
2009-11-28 08:31:01
From: marpis
No, we actually couldn't, unless you can somehow get to ian's computer and edit the script he has.
if uptext('place rune') then DoTheMouseStuff(x, y, 0, 0, True);
Inside the code you call in Mouse, but dunno if you can call the needed functions from inside a plugin
HyperSecret
2009-11-28 10:37:35
Someone had access to my account, I believe guys. Bobarkinator sent me a pm that my account had sent him saying that one of the accounts spotted at sudoku was mine. It was not my account though.
I have a feeling that whoever it was has possibly been giving out the script/selling it. I would have no clue how anyone got my password though.
If it is my fault, sorry guys :( :'(
Wizzup?
2009-11-28 10:45:23
From: HyperSecret
Someone had access to my account, I believe guys. Bobarkinator sent me a pm that my account had sent him saying that one of the accounts spotted at sudoku was mine. It was not my account though.
I have a feeling that whoever it was has possibly been giving out the script/selling it. I would have no clue how anyone got my password though.
If it is my fault, sorry guys :( :'(
Did you change your password now?
HyperSecret
2009-11-28 11:02:23
From: Wizzup?
Did you change your password now?
Yes, ofc.
Nava2
2009-11-28 11:14:47
Can IP's be gotten off PMs?
From: Widget
Wtf mates, why are we trying to edit the whole SRL include so that we can keep our little script?
Why not? If it won't affect any scripts other than people using sudoku without the key or whatever, then why does it matter?
From: mastaraymond
We're not going to edit the SRL include for this. Be happy we've abused the script for over a year now.
All we would be modifying the include to do is get people without proper access to sudoku banned. It really shouldn't hurt anything else…
From: Nava2
Can IP's be gotten off PMs?
I'm pretty sure they can.
Why can't we edit the include? Not even just to save the script, but to just screw over that little thief. Everybody who uses it would get their accounts banned…
marpis
2009-11-28 12:48:23
Just for the lol
[quote=
http://www.gold4rs.com/CheapGold.RSGoldOver100.066.RSGoldOver100Server.066,001.html"]
RS 40 Million gold+5%bonus
Time Needed (hour): 170 $64.93
[/quote]
Time needed: 170 hours? And they are professional! :p
With sudoku can make 340 million gold in those 170 hours, hah.
Also what the heck, they're only making 235k an hour? What lousy method are they using…
Markus
2009-11-28 17:11:25
From: JAD
Why can't we edit the include? Not even just to save the script, but to just screw over that little thief. Everybody who uses it would get their accounts banned…
I won't do it myself due to moral issues. Besides I doubt that those people will update SRL, unless they need to (and as atm I'm still running a 3-month old rev fine with sudoku, I doubt they do).
The Claw
2009-11-28 22:02:24
From: Markus
I won't do it myself due to moral issues. Besides I doubt that those people will update SRL, unless they need to (and as atm I'm still running a 3-month old rev fine with sudoku, I doubt they do).
Ian's the kind of guy to update though, so theres a high chance we'd at least get him
From: Markus
I won't do it myself due to moral issues. Besides I doubt that those people will update SRL, unless they need to (and as atm I'm still running a 3-month old rev fine with sudoku, I doubt they do).
I don't understand the moral issue. I consider myself to have strong ethical standards, but I don't see anything wrong with punishing a thief; that's justice.
Widget
2009-11-29 00:26:32
<rulerrrr> have you all found the SSRL leak yet?
<R0b0t1> rulerrrr: Honestly I don't think anyone up top cares
<R0b0t1> and wtf did they leak?
* R0b0t1 heard of nothing
<@Boreas> rulerrrr, possible account compromise
<@Boreas> ram is looking into it i believe
<noidea`> They be haxin
<rulerrrr> robo1, someone got a ssrl script
<Blumblebee> theres scripts in ssrl[?]
<rulerrrr> that solved these sudoku puzzles they sold mills for a month using it
<R0b0t1> rulerrrr: Hm
<R0b0t1> Well
<R0b0t1> the best solution to that problem would be to release the script.
<rulerrrr> well before thanksgiging
<rulerrrr> he was selling its for $300
<rulerrrr> on ym site we shut him down
<Blumblebee> i was to be in ssrl to know whats going on lol
It was going on at the same time Blumblebee was asking Ruler about his heatcluster thing so I'm not really sure who took notice, but so much for keeping that a secret :p
how many other people were in the chat channel atm ? Ruler for SSRL ! :)
Boreas
2009-11-29 00:50:42
Midnight GMT-5, and nobody said anything, probably ok. Or if not 'ok' then at least not as bad as ian. Edit: RAM about 44, less than 10 actively replying.
Only way to remotely stop the script with SRL update is to put a Inc(Counter); into every SRL function the script uses, and in a common function such as Mouse have a check with a TimeFromMark that will reset after a given amount of time or do bannable actions depending on how big Counter is in that time, and maybe have an inventory check for shitload of runes too. Seems like a lot of work, given that damage has already been done. Cat is out of the bag folks.
lordsaturn
2009-11-29 01:06:54
From: Boreas
Midnight GMT-5, and nobody said anything, probably ok. Or if not 'ok' then at least not as bad as ian. Edit: RAM about 44, less than 10 actively replying.
Only way to remotely stop the script with SRL update is to put a Inc(Counter); into every SRL function the script uses, and in a common function such as Mouse have a check with a TimeFromMark that will reset after a given amount of time or do bannable actions depending on how big Counter is in that time, and maybe have an inventory check for shitload of runes too. Seems like a lot of work, given that damage has already been done. Cat is out of the bag folks.
yes please
Hobbit
2009-11-29 14:43:55
I'm game for haxing SRL until his version of the script dies out.
Naike
2009-11-29 15:20:49
We should soooo get a script database to prevent leaking like this…
with logins and stuff.
Hobbit
2009-11-29 15:24:02
Like an auth system? I think that would be good
Bobarkinator
2009-11-29 17:54:56
From: N1ke!
We should soooo get a script database to prevent leaking like this…
with logins and stuff.
We need another idea that would be worth doing it for ;)
lordsaturn
2009-11-29 20:50:06
wat abt the herblore thing
YoHoJo
2009-11-29 23:31:07
From: lordsaturn
wat abt the herblore thing
Yup that's next best. But since we already have supposed leakers in here, if they aren't lazy, they'll just script one themselves :p, but unlike sudoku, lots of people can do this and it shouldn't harm us much. But yes auth system please!
n3ss3s
2009-11-30 09:47:25
Yup that's next best. But since we already have supposed leakers in here, if they aren't lazy, they'll just script one themselves , but unlike sudoku, lots of people can do this and it shouldn't harm us much. But yes auth system please!
The herblore idea isn't a secret either, some time ago someone posted it on TLP forums… Can't seem to find the thread anymore though…
YoHoJo
2009-11-30 15:56:03
Yea this idea doesnt really need to be secret, but less people doing it = better for us. So if we do decide to make a script lets auth/obfuscate it.
Widget
2009-11-30 17:23:54
[PHP]import java.io.ByteArrayOutputStream;
import java.util.zip.Deflater;
import java.util.zip.Inflater;
/**
*
* @author benland100
*/
public class ScarEncrypter {
public static void main(String[] args) {
String test = "program New;\nfunction aaaaaa(aaa: integer):integer;\nbegin\n Result := ConnectToWebsiteOrWhateverTheFunctionNameIs('www.', aaaaaaaa, aaa);\nend;\n\nfunction aaaaaaaaaa(aaaaa: integer):integer;\nbegin\n Result := ConnectToWebsiteOrWhateverTheFunctionNameIs('www.', aaaaaaaa, aaaaa);\nend;\n\nfunction aaaaaaaaaaa(aaaaaaaaaaaaaaa: integer):integer;\nbegin\n Result := ConnectToWebsiteOrWhateverTheFunctionNameIs('www.', aaaaaaaa, aaaaaaaaaaaaaaa);\nend;\n\nfunction aaaaaa(aaa: integer):integer;\nbegin\n Result := ConnectToWebsiteOrWhateverTheFunctionNameIs('www.', aaaaaaaa, aaa);\nend;\nbegin\nend.";
String encrypted = encrypt(test);
String decrypted = decrypt(encrypted);
System.out.println(decrypted);
System.out.println(encrypted);
}
public static String encrypt(String program) {
byte[] bytes = compress(program.getBytes());
for (int i = 0; i < bytes.length; i++) {
bytes ^= 0x2C;
}
String raw = hexFromBytes(bytes);
System.out.println(raw);
long crc = crc16(raw);
StringBuilder res = new StringBuilder();
res.append("$CRC=").append(crc).append("\r\n");
res.append("$ENCRYPTED\r\n");
for (int i = 0; i < raw.length(); i += 81) {
if (i + 81 < raw.length()) {
res.append(raw.substring(i,i+81)).append("\r\n");
} else {
res.append(raw.substring(i,raw.length())).append("\r\n");
}
}
return res.toString();
}
public static String decrypt(String encrypted) {
encrypted = encrypted.replaceAll("\\r|\\r|\\s","");
int pos = encrypted.indexOf("$CRC=");
if (pos == -1) return null;
int end = encrypted.indexOf("$ENCRYPTED");
if (end == -1) return null;
long crc = Long.parseLong(encrypted.substring(pos+5,end));
int raw = encrypted.indexOf("54F6");
String hex = encrypted.substring(raw);
if (crc16(hex) != crc) return null;
byte[] bytes = bytesFromHex(hex);
for (int i = 0; i < bytes.length; i++) {
bytes ^= 0x2C;
}
return new String(decompress(bytes));
}
static long[] crc16 = new long[256];
static {
for (int i = 0; i < 256; i++) {
int accum = i << 8;
for (int c = 0; c < 8; c++) {
if ((accum & 0x8000) != 0) {
accum = (accum + accum) ^ 0x1023;
} else {
accum = accum + accum;
}
}
crc16 = accum & 0xFFFF;
}
}
private static long crc16(String str) {
byte[] bytesstr = str.getBytes();
long crc = 0;
for (int i = 0; i < bytesstr.length; i++) {
crc = ((crc << 8) ^ crc16[(int)(((crc >> 8) & 0xFFL) ^ (bytesstr & 0xFFL))]);
}
return crc & 0x7FFFFFFF;
}
private static byte[] bytesFromHex(String hex) {
byte[] res = new byte[hex.length()/2];
for (int i = 0; i < res.length; i++) {
res = (byte)(Integer.parseInt(hex.substring(i*2,i*2+2),16)&0xFF);
}
return res;
}
private static final String[] hex = new String[] {"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"};
private static String hexFromBytes(byte[] data) {
StringBuilder res = new StringBuilder();
for (int i = 0; i < data.length; i++) {
res.append(hex[(data >> 4) & 0xF]);
res.append(hex[data & 0xF]);
}
return res.toString();
}
private static byte[] decompress(byte[] data) {
Inflater inf = new Inflater();
inf.setInput(data);
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buffer = new byte[10000];
try {
while (!inf.finished()) {
int len = inf.inflate(buffer);
out.write(buffer, 0, len);
}
} catch (Exception e) {
e.printStackTrace();
return new byte[0];
}
inf.end();
return out.toByteArray();
}
private static byte[] compress(byte[] data) {
Deflater def = new Deflater(Deflater.BEST_COMPRESSION);
def.setInput(data);
def.finish();
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buffer = new byte[10000];
while (!def.finished()) {
int len = def.deflate(buffer);
out.write(buffer, 0, len);
}
return out.toByteArray();
}
}
[/PHP]
Requires 3.15b or earlier
n3ss3s
2009-12-01 02:42:21
From: Widget
[PHP]import java.io.ByteArrayOutputStream;
import java.util.zip.Deflater;
import java.util.zip.Inflater;
/**
*
* @author benland100
*/
public class ScarEncrypter {
public static void main(String[] args) {
String test = "program New;\nfunction aaaaaa(aaa: integer):integer;\nbegin\n Result := ConnectToWebsiteOrWhateverTheFunctionNameIs('www.', aaaaaaaa, aaa);\nend;\n\nfunction aaaaaaaaaa(aaaaa: integer):integer;\nbegin\n Result := ConnectToWebsiteOrWhateverTheFunctionNameIs('www.', aaaaaaaa, aaaaa);\nend;\n\nfunction aaaaaaaaaaa(aaaaaaaaaaaaaaa: integer):integer;\nbegin\n Result := ConnectToWebsiteOrWhateverTheFunctionNameIs('www.', aaaaaaaa, aaaaaaaaaaaaaaa);\nend;\n\nfunction aaaaaa(aaa: integer):integer;\nbegin\n Result := ConnectToWebsiteOrWhateverTheFunctionNameIs('www.', aaaaaaaa, aaa);\nend;\nbegin\nend.";
String encrypted = encrypt(test);
String decrypted = decrypt(encrypted);
System.out.println(decrypted);
System.out.println(encrypted);
}
public static String encrypt(String program) {
byte[] bytes = compress(program.getBytes());
for (int i = 0; i < bytes.length; i++) {
bytes ^= 0x2C;
}
String raw = hexFromBytes(bytes);
System.out.println(raw);
long crc = crc16(raw);
StringBuilder res = new StringBuilder();
res.append("$CRC=").append(crc).append("\r\n");
res.append("$ENCRYPTED\r\n");
for (int i = 0; i < raw.length(); i += 81) {
if (i + 81 < raw.length()) {
res.append(raw.substring(i,i+81)).append("\r\n");
} else {
res.append(raw.substring(i,raw.length())).append("\r\n");
}
}
return res.toString();
}
public static String decrypt(String encrypted) {
encrypted = encrypted.replaceAll("\\r|\\r|\\s","");
int pos = encrypted.indexOf("$CRC=");
if (pos == -1) return null;
int end = encrypted.indexOf("$ENCRYPTED");
if (end == -1) return null;
long crc = Long.parseLong(encrypted.substring(pos+5,end));
int raw = encrypted.indexOf("54F6");
String hex = encrypted.substring(raw);
if (crc16(hex) != crc) return null;
byte[] bytes = bytesFromHex(hex);
for (int i = 0; i < bytes.length; i++) {
bytes ^= 0x2C;
}
return new String(decompress(bytes));
}
static long[] crc16 = new long[256];
static {
for (int i = 0; i < 256; i++) {
int accum = i << 8;
for (int c = 0; c < 8; c++) {
if ((accum & 0x8000) != 0) {
accum = (accum + accum) ^ 0x1023;
} else {
accum = accum + accum;
}
}
crc16 = accum & 0xFFFF;
}
}
private static long crc16(String str) {
byte[] bytesstr = str.getBytes();
long crc = 0;
for (int i = 0; i < bytesstr.length; i++) {
crc = ((crc << 8) ^ crc16[(int)(((crc >> 8) & 0xFFL) ^ (bytesstr & 0xFFL))]);
}
return crc & 0x7FFFFFFF;
}
private static byte[] bytesFromHex(String hex) {
byte[] res = new byte[hex.length()/2];
for (int i = 0; i < res.length; i++) {
res = (byte)(Integer.parseInt(hex.substring(i*2,i*2+2),16)&0xFF);
}
return res;
}
private static final String[] hex = new String[] {"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"};
private static String hexFromBytes(byte[] data) {
StringBuilder res = new StringBuilder();
for (int i = 0; i < data.length; i++) {
res.append(hex[(data >> 4) & 0xF]);
res.append(hex[data & 0xF]);
}
return res.toString();
}
private static byte[] decompress(byte[] data) {
Inflater inf = new Inflater();
inf.setInput(data);
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buffer = new byte[10000];
try {
while (!inf.finished()) {
int len = inf.inflate(buffer);
out.write(buffer, 0, len);
}
} catch (Exception e) {
e.printStackTrace();
return new byte[0];
}
inf.end();
return out.toByteArray();
}
private static byte[] compress(byte[] data) {
Deflater def = new Deflater(Deflater.BEST_COMPRESSION);
def.setInput(data);
def.finish();
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buffer = new byte[10000];
while (!def.finished()) {
int len = def.deflate(buffer);
out.write(buffer, 0, len);
}
return out.toByteArray();
}
}
[/PHP]
Requires 3.15b or earlier
3.20 doesn't work?
Widget
2009-12-01 04:17:17
From: n3ss3s
3.20 doesn't work?
It might, but everyone either uses 3.23α or 3.15b
Wizzup?
2009-12-01 07:06:40
What about everyone who wants to use the script creates a GPG account?
Then you can just encrypt it without worrying of ever it breaking.
Hobbit
2009-12-02 02:46:35
From: Wizzup?
What about everyone who wants to use the script creates a GPG account?
Then you can just encrypt it without worrying of ever it breaking.
I like that idea
The Claw
2009-12-10 04:29:17
RAM, I read somewhere you were stocking up on souls and nats so I did too, and just sold 25k souls at max. Might be a chance to push the price back up a bit
Yeah, natures I'm just going to alc (yew longs probably) and I keep about 100 souls at max to see what's selling and noticed souls sold for max of 325 ea, but, I'm holding out for 450 ea, I don't think that's unreasonable speculation for the next couple of weeks ? (I have 200k+ of each :))
Markus
2009-12-12 16:04:37
Zeph's version (page 20) seems to got leaken too.
Hobbit
2009-12-12 21:31:25
I say we password proctect the SSRL forums.
Then that way if someone who shouldn't does get access to an SSRL account they still won't know the password (Hopefully).
YoHoJo
2009-12-12 21:39:16
Mah, what if someone inside is the leak? We need to encrypt our secret scripts (when we get more :p). I think we have a leak in here, and we need to take other precautions too.
lordsaturn
2009-12-13 03:23:24
From: Hobbit
I say we password proctect the SSRL forums.
Then that way if someone who shouldn't does get access to an SSRL account they still won't know the password (Hopefully).
Good idea, with a key only given to SSRL members by word of mouth, and kept by a thread in the SSRL forums. So no worry about accounts being hacked into, if any leaking happens we will know it was done personally. And no lying leakers can use that as an excuse either.
Hobbit
2009-12-13 13:13:02
@ Yoho
That is true, but passwording the forums is a quick and easy way to take a first step.
@ Lord
Exactly
n3ss3s
2009-12-15 15:22:05

It didn't raise any further discussion in the main channel, I asked him how'd he know, he said someone in Mayhem Makers is spreading it, and doesn't know whether its a SCAR or an iBot script, but I can guess…
He doesn't seem to know anything else that'd be interesting, so I'll stop bugging him for now…
Markus
2009-12-21 15:49:58
Seeing as the script is already floating around everywhere, I'll probably release this as a Chrismas present, k?
Naike
2009-12-21 15:55:25
It's not our version, so I don't see the point in doing that tbh.
Markus
2009-12-21 16:31:31
It is our version.
Besides our version, lots of free clones seem to be at RSCA (and RSBot most likely as well).
Thus, time to free the method. Maybe it'll stay alive, would be nice. Maybe not, I wouldn't care.
We all made our share of money by now, didn't we? ;)
YoHoJo
2009-12-21 16:38:56
F**king leaks and shit! If this never happened we'd still be rolling in GP! Grrr
Whatever, haven't used the script in a year, but its such a bummer that it got leaked, makes me angry! :p
Boreas
2009-12-21 17:06:49
Easy come, easy go.
The Claw
2009-12-21 21:49:10
Sounds good, was good while it lasted
_ChArMz
2009-12-21 22:42:30
rune prices are back on the rise…dont see that many people autoing…i think we should keep it private :(
The Claw
2009-12-22 01:26:58
Might be a good idea to release a slower version of it though, I don't really want the one with mine, RAM and zeph's optimisations released…just to be safe.
ZephyrsFury
2009-12-22 02:02:30
From: _ChArMz
rune prices are back on the rise…dont see that many people autoing…i think we should keep it private :(
I noticed this too…
YoHoJo
2009-12-22 02:23:18
From: The Claw
Might be a good idea to release a slower version of it though, I don't really want the one with mine, RAM and zeph's optimisations released…just to be safe.
Any version will have same effects, and ruin it IMO, people will mod and fix it.
People are saying its seeming to die down a bit? Why not wait some more, see if its really true, prices up, people down, looking good to me :D.
n3ss3s
2009-12-22 02:45:42
Now I'm not sure either anymore, as the rune prices were brought up. They are on the rise, and this is how inexperienced users of the script think -
I frequent many cheating/botting sites that have some of the smartest and most crafty people I've met in RS, and the ONLY way I've heard of to make 2m an hr is through a botting script that'll most likely get you banned because it's a lot faster than any human can do it.
Obviously he's talking about sudoku, but we know better don't we? The chance of getting a ban while sudokuing on the detectability side is propably lower than staying still and doing antibans… So, people who don't know think that it's very detectable…
But if it ends up being released I don't really mind, agreeing with Boreas and Claw…
I had a chance to give a little misdirection ;) …ran into Team Moto K at world 2 and had a short conversation..he asked me to fix his script….and I replied with, maybe you should register at SRL forums and learn to fix it yourself…he told me he was already registered here, but wouldn't give me name and said he has only been here a few times….then I told him it was just a matter of time before his account gets banned, and that Jaghex knows all about it, but is waiting to do a group ban, lol, I doubt he will ever use the script again :p… I'm definitely up for keeping it private….
E., just saw this…
From: Markus
It is our version.
Besides our version, lots of free clones seem to be at RSCA (and RSBot most likely as well).
Thus, time to free the method. Maybe it'll stay alive, would be nice. Maybe not, I wouldn't care.
We all made our share of money by now, didn't we? ;)
I really haven't seen hardly any people, rune prices are on the rise, and I'm worried that Jaghex will be able to go back and see who was using this and ban accounts… I really don't think it's a good idea to release public…. everyone will get to use it a max of 2 days, and then I fore see a mass ban of everyone using it..
"Everyone is in awe of the power of the script, then everyone will remember the mass ban resulting from using it"…I don't think the possible negative effects, can measure up to the short lived fame…IMHO
I make 10 mil+ an hour merchanting, I run this script slow, like a human would do it…probably make more money mining ess, but I use this because the lack of randoms, make it extremely stable.
n3ss3s
2009-12-22 04:48:11
I make 10 mil+ an hour merchanting, I run this script slow, like a human would do it…probably make more money mining ess, but I use this because the lack of randoms, make it extremely stable.
lol pussy
The Claw
2009-12-22 05:33:25
^ lol. I ran this turbo mode for basically a month and a half straight and not banned yet. Navas mate alex mentioned the other day a few people got banned using it, but I didnt really pay attention. Maybe the people who knew did cop a few bans, likely because of detectable scripts, and now theyre all too paranoid to use
From: n3ss3s
lol pussy
I am What I Eat !!! :f:
Slow and Steady wins the race ;)
Naike
2009-12-22 08:07:57
If the prices are going up, then don't release it.
We got a very good script here, which haven't banned a single one of us?
Why release it because some fail community did a clone, which gets them banned..?
And also, with SCARs UpText broken, they'll be crying as the script won't work.
n3ss3s
2009-12-22 12:33:00
If the prices are going up, then don't release it.
We got a very good script here, which haven't banned a single one of us?
Why release it because some fail community did a clone, which gets them banned..?
And also, with SCARs UpText broken, they'll be crying as the script won't work.
And they got no balls to remove the uptext check l0l
lordsaturn
2009-12-22 17:30:35
Epic hijack :p
So what quests do I have to complete to get the least amount of convo with ali?
HyperSecret
2009-12-22 20:33:28
I honestly don't see any point at all in releasing it. You guys are worried about a couple people having it? It isn't like 10k people have this method or anything.
At any given time there is usually ~50k people on RS and during busy times it can get up to ~150k+ on. Do you honestly think that ~20 or so people doing this really ruins it? I honestly don't think so. Think of how many people auto pest control, soul wars, etc all the mini-games and what not.
I think everyone is blowing this way out of proportion when thinking that it being leaked a little and seeing a couple people (in the realm of all rs players) doing this.
_ChArMz
2009-12-24 13:25:27
Markus..please please rethink releasing this…
Coh3n
2009-12-25 00:51:42
I agree with both HyperSecret and Charmz. Until we hear of people being banned for using this, I think it shouldn't be released.
HyperSecret
2010-11-27 17:13:27
Anyone still have a working version of this?
marpis
2010-11-28 08:35:25
Oh I read the whole thread :') Nostalgy!
Markus
2010-11-28 08:47:02
From: HyperSecret
Anyone still have a working version of this?
Share an account and I'll update it :)
HyperSecret
2010-11-29 10:00:33
From: Markus
Share an account and I'll update it :)
Actually, one of my old versions worked perfectly for it. I had to do a little bit of looking on my pc to find it but it works fine. A couple of small modifications to make it faster.
Thanks though.
The Claw
2010-11-29 10:24:39
Whats the profit like?
Wiki has a chart on it
here. The Profits are looking pretty bad on all but Blood Runes.
~BraK
HyperSecret
2010-11-29 11:03:07
From: The Claw
Whats the profit like?
Nothing like it use to be but imo, still pretty decent.
I haven't really ran it that much to see yet. I will run for an hour and get you a figure sometime today. Maybe during my break between classes.
With that said. The runes that use to be worthless are now the highest and vice versa. Bloods and deaths now sell for over 400 each and natures are down to an all-time low. Souls hover around the 250-275 range. Chaos, cosmics and laws are still around their usual prices, 100, 150(?), 300ish, respectively.
Markus
2010-11-29 11:58:45
Hm, it should still be few hundred k/hour, like 200k or so. Is it still being raped by RSBot/iBot as it used to be?
Last time I was there I was alone not a soul around.I was there for a few hours too. I just don't think Prices ever recovered.
Smartzkid
2010-11-29 13:47:40
AFAIK the RSBot script for this still works; I have no clue how much people are using it, though.
HyperSecret
2010-11-29 17:41:54
I walk by there all the time and rarely ever see anyone there that isn't doing a quest (I ask if they are questing).
HyperSecret
2010-11-29 19:10:58
I just ran it for 30 minutes and I made a profit of 230k. So you can still profit close to 450-500k/hr.
Naike
2010-11-30 08:43:02
From: HyperSecret
I just ran it for 30 minutes and I made a profit of 230k. So you can still profit close to 450-500k/hr.
You would need some decent starting cash for running longer periods, how much did you lose in 20 mins?
The Claw
2010-11-30 09:41:24
Could you post your script please? :p
HyperSecret
2010-12-01 12:55:27
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
//{.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;
DoSleep = false;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 30;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
debug('Getting rune colours');
Disguise('Getting rune colours');
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
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 DebugMode 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;
debug('LoadPossibilities');
Disguise('LoadPossibilities');
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;
debug('AddToStack');
Disguise('AddToStack');
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
var
cx, cy: Integer;
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
end;
Procedure ChangeNumber(xpos,ypos: integer; number : byte);
var
Num, Add : 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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
Break;
end;
end;}
end;
Function SudokuMenu: Boolean;
var
TPA: TPointArray;
begin
debug('SudokuMenu');
Disguise('SudokuMenu');
FindColorsTolerance(TPA, 797794, 0, 0, 95, 85, 0);
Result := High(TPA) > 50;
end;
function EnterSudoku: boolean;
var
x, y, z, CurrentRune, sudotime, T : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
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;
if (debugmode) then
begin
for y := 0 to 8 do
for x := 0 to 8 do
try
//DrawBitmap(dtm[Solver[x][y].number], getdebugcanvas, x*30+(x/3*4), y*29+(y/3*4)); //Draw sudoku at debug (with roster).
except
end;
end;
for z := 0 to 8 do
begin
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('-');
Disguise('-');
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
Debug('Clicking: '+inttostr(curpoint.x)+', '+inttostr(curpoint.y)+' with a '+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);
end;
end;
end;
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
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);
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
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(50);
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;
LogOut;
Exit;
end;
end;
procedure LoadArrays;
begin
debug('LoadArrays');
Disguise('LoadArrays');
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0cF07U2kGQ6aORGyKRWDRK1MCNHwi38C0Z4' +
'CLb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WVlXNHAP4zv5dcJH1nOF4Gvl' +
'mc/P9rrtULbjxgTvLF9zCqwrBqVonCDJzNHJTJBKLRqkauPFDlkxy' +
'ke3gU4idF75E29qoGsG/0PiohdiQmaBiC2tkxebIAL8omdiQdTBp2' +
'/VcUtsstuAkVzl+Y7Xa9UBgPbTVzsBGvtrYSCcsieDie47V4Jqmnp' +
'BsCIvt+fznx5am63QC3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv6USidV38xtLi1upFHBqA6c5fKL' +
'yLvx3Ph8M56+JiYmF6WmR1xYXqC04zYmWKAjn3osVFcWw06OjRk4n' +
'k6pN4P85PVW0Cv0Lwgtix4eeGHl59s3K3Fvg4htW4SkI5THvwv21+' +
'Sbe+2AsHjfy0sxr4ITyoC6Ul4vJha71IJTHDDN14X7y6ODg1MjI3M' +
'tJMv9qirCEAT1kwhQIciiPmXw2C9ytzXW0s/NxLCbyzNjz2fEXhPI' +
's4SG7kS5cUZ7JYoatLriRezo6+qPRZwMDk8NPgRO0sATxAy1yRVgC' +
'OTKD9h+5nOB83m9v7+vpGe5/hGrCKFlCq7goay5duHInApzm0iInf' +
'N5ra+vt7oZMaI4W4l9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F' +
'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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxv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2/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
debug('Solving Sudoku');
Disguise('Solving Sudoku');
UnSolvable := false;
//ClearReport;
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;
Wait(50);
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;
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);
end;
if DisplayDetails then
Writeln(inttostr(TotalEmpty));
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
debug('Compiling Report');
Disguise('Compiling Report');
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('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
debug('function DoSudoku');
Disguise('function DoSudoku');
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
Disguise('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
i, x, y, L, T: integer;
M: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
debug('TalkToAli');
Disguise('TalkToAli');
Result:= ChooseOption('orris');
if(Result)then exit;
//FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10582106, MSX1, MSY1, MSX2, MSY2, 20);//light blue color of turban and pants
//FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6399450, MSX1, MSY1, MSX2, MSY2, 20); //light tan stripe on shirt
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(150+random(150));
//Writeln(inttostr(CountColorTolerance(1105118, 41, 5, 86, 24, 36)));
if WaitUpText('orris', 500) 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);
begin
Mouse(x, y, 0, 0, True);
T:= GetSystemTime;
while (GetSystemTime - T) < 500 do
begin
Result:= true;//FindColor(x, y, 255, x - 20, y - 20, x + 20, y + 20);
if(Result)then break;
end;
end;
FFlag(0);
Wait(200+random(200));
if(Result)then exit;
end;
end;
Respond;
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
begin
{Smart_Members:= True;
Smart_Server := 56;
Smart_Signed := False;}
SetupSRL;
ActivateClient;
DeclarePlayers;
MouseSpeed := 30;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
repeat
if SudokuMenu then
DoSudoku;
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(100+random(100));
end;
if(A = 11)then
begin
wait(10);
{if(NorthLast)then
MakeCompass('280')
else
MakeCompass('N');}
NorthLast:= not NorthLast;
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(10);
end;
end;
if A < 11 then
repeat
if (InConvo) then
debug('InConvo');
Disguise('InConvo');
wait(10);//R
begin
//if not ClickContinue(True, False) then
begin
wait(10);//R
FindColors(bTPA, clBlack, MCX1, MCY1, MCX2, MCY2);
wait(10);//R
FindColors(wTPA, clWhite, MCX1, MCY1, MCX2, MCY2);
wait(10);//R
FindColors(uTPA, clBlue, MCX1, MCY1, MCX2, MCY2);
wait(10);//R
TPA := CombineTPA(CombineTPA(bTPA, wTPA), uTPA);
Texts := ['to cont', 'selection of runes', 'a large', 'xamine'];
for I := 0 to High(Texts) do
//wait(100);//R
begin
TextTPA := LoadTextTPA(Texts[I], NPCChars, H);
if (FindTextTPAinTPA(H, TextTPA, TPA, MTPA)) then
begin
debug('SortTPA');
Disguise('SortTPA');
wait(10);//R
SortTPAFrom(MTPA, Point(MCX1, MCY1));
wait(10);//R
Mouse(MTPA[0].X + RandomRange(-50, 50), MTPA[0].Y + RandomRange(-3, 5), 0, 0, True);
wait(10);//R
Break;
wait(10);//R
end;
wait(10);//R
end;
wait(10);//R
end;
Wait(100 + Random(150));
end;
if(GetColor(54, 61) = 1319729)then
begin
A := 0;
DoSudoku;
debug('DoSudoku');
Disguise('DoSudoku');
break;
wait(10);//R
end;
until(not(LoggedIn));
if(not(LoggedIn))then exit;
{if TimeFromMark(SleepTime) > 30 * 60000 then
begin
SleepTime := RandomRange(3*60000, 30*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;
debug('FailTime');
Disguise('FailTime'); }
if (GetSystemTime > ReportTime) then
Report;
debug('ReportTime');
Disguise('ReportTime');
until false;
end.
There ya go. I edited out the SMART stuff because there is no point in me running it with SMART. I have to fun SIMBA in a VM anyways.
Sir R. M8gic1an
2010-12-03 11:15:17
Hahahaha, you're still making money off of this? :p
~RM
n3ss3s
2010-12-04 16:43:09
HyperSecret can claim oral sex at a suitable time.
Also the rewards chart on RS Wiki is for if you choose to select the runes you buy, not when you buy them blindly. What you want to do is go to the GE website, search for "blood death chaos soul nature cosmic law", add the price of those and divide by 7. I think the average was 248 today, and that should be somewhere near 600k/h :)
EDIT: Anyone somehow have a copy of the version I had for entering the runes where it always did the closest one to current mouse pos?
EDIT: HyperSecret are those ur info in DeclarePlayers? I accidentally ran the script before being at ali and it typed ur rsn in the chat, hopefully an isolated case? Hoping SRL won't spit out my info :S Changing info and pming seeing ur last visit was like 3 days ago dont know how soon u'll see this post
HyperSecret
2010-12-04 17:49:04
Thanks, n3ss3s, disregard my PM that i responded with.
n3ss3s
2010-12-04 18:50:10
Jesus, I read this after responding to the pm l0l
EDIT: Gentlemen, we have a 25% profit :) 500k+ /h (With my version atleast, drastically faster than the one HS posted)
Sounds like nice profit n3ss3s. I might get in on it but I doubt it. I haven't really played RS in months. Just loaning my account out and using it for Script making and Testing. I believe lord Saturn is currently using it for the brimhaven agility script.
~BraK
HyperSecret
2010-12-04 20:19:11
n3ss3s, whats yours? I know the one I posted sucks major balls atm. I ran it for like 1 1/2 hours and it only profitted like 400k, not that great. It should be optimized again.
n3ss3s
2010-12-04 23:01:37
Mine is below, SMART is back in there, the difference is that it always clicks the rune closest to current mouse position, so the path will be more of a circle than a zigzag around the screen, which should make a pretty big difference. Also the chat solver is a bit faster.
Now what you also want to do to optimize further, is to go to your Mouse.scar and make your ClickMouse2 and Mouse look like this -
{*******************************************************************************
procedure ClickMouse2(left : boolean);
By: Anyone that can code
Description: Clicks the mouse in a human way on the current mouse spot.
*******************************************************************************}
procedure ClickMouse2(left : boolean);
var
a,b,c : integer;
begin
GetMousePos(b, c);
HoldMouse(b, c, mouseaction(left));
repeat
//Wait(20 + Random(30));
Wait(5 + Random(10));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, mouseaction(left));
//Wait(50+Random(50));
Wait(1+Random(2));
end;
{*******************************************************************************
procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
By: Mutant Squirrle, with a small fix by hy71194
Description: Moves then clicks mouse.
*******************************************************************************}
procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
begin
MMouse(mousex, mousey, ranx, rany);
//Wait(60 + Random(30));
Wait(1 + Random(2));
ClickMouse2(left);
//Wait(50 + Random(50));
Wait(1 + Random(2));
end;
Minimal wait after, below and during the click. Didn't want to make it instant though…
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.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;
DoSleep = false;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 30;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := 'buttrapier';
Players[0].Pass := 'salis';
Players[0].Nick := '';
Players[0].Active := true;
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
debug('Getting rune colours');
Disguise('Getting rune colours');
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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;
debug('LoadPossibilities');
Disguise('LoadPossibilities');
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
var
cx, cy: Integer;
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
end;
Procedure ChangeNumber(xpos,ypos: integer; number : byte);
var
Num, Add : 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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 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
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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
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);
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
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(50);
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;
LogOut;
Exit;
end;
end;
procedure LoadArrays;
begin
debug('LoadArrays');
Disguise('LoadArrays');
OwnArr[1] := Point(20, 100); //Mind
dtm[1]:= BitmapFromString(30, 29, 'beNqdletOE1EUhfGnD2HCI/g' +
'OJKRqJESCBCUNShpERNI0FREkFcGKgFiRCsjFSkUuUrlZLASKmuhr' +
'+Ne38EtWsnMyMx0ak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bQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ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Oy88BBtayNqJL5rXp01vttZiWmBTAdlW1gjyzZHxuBa5U/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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc236MtLY9jMZHHBp6PD75AmFc' +
'VP1ayG8E8nSUZRl1wI0eamzuj0WddXcN9T4EjYqEEEuTP8bErg5OV' +
'4iIcJUPsP3Z3BefzflNTRyTS1/mIqBGtpATyYy9fOoNcuHUEOM4Vi' +
'zLh815jY3tbG2SEc2JBdlbAXGRrN7GQObbJxMh3btXHWltpYm/HQy' +
'R+nmT1GjKZEzjdZFSMXH+jVlHTR/gq4ZL9sl9ptMiaFtKmlUa+WV1' +
'NI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K1lLBo' +
'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
debug('Solving Sudoku');
Disguise('Solving Sudoku');
UnSolvable := false;
//ClearReport;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
debug('Compiling Report');
Disguise('Compiling Report');
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('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
debug('function DoSudoku');
Disguise('function DoSudoku');
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
Disguise('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
i, x, y, L, T: integer;
M: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
debug('TalkToAli');
Disguise('TalkToAli');
Result:= ChooseOption('orris');
if(Result)then exit;
//FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10582106, MSX1, MSY1, MSX2, MSY2, 20);//light blue color of turban and pants
//FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6399450, MSX1, MSY1, MSX2, MSY2, 20); //light tan stripe on shirt
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(150+random(150));
//Writeln(inttostr(CountColorTolerance(1105118, 41, 5, 86, 24, 36)));
if WaitUpText('orris', 500) 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);
begin
Mouse(x, y, 0, 0, True);
T:= GetSystemTime;
while (GetSystemTime - T) < 500 do
begin
Result:= true;//FindColor(x, y, 255, x - 20, y - 20, x + 20, y + 20);
if(Result)then break;
end;
end;
FFlag(0);
Wait(200+random(200));
if(Result)then exit;
end;
end;
Respond;
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
begin
Smart_Members:= True;
Smart_Server := 56;
Smart_Signed := True;
SetupSRL;
ActivateClient;
DeclarePlayers;
MouseSpeed := 40;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
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 SudokuMenu then
DoSudoku;
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(100+random(100));
end;
if(A = 11)then
begin
wait(10);
{if(NorthLast)then
MakeCompass('280')
else
MakeCompass('N');}
NorthLast:= not NorthLast;
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(10);
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, 30*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;
debug('FailTime');
Disguise('FailTime'); }
if (GetSystemTime > ReportTime) then
Report;
debug('ReportTime');
Disguise('ReportTime');
until false;
end.
Removed everything that writelns shit except for proggie, the debug was compromising my sanity… A bit over 100 SpH. If we take the liberty to say we profit 8k (could be even 10 - 12k as some runes sell close to max), we have an 800k/h :) Don't know how I came up with 500k/h earlier…
AlsoI'm proposing that we sort of keep this activity of ours in SSRL, we don't have to delete the old version etc from the public forum but you know how it goes, if we tell everyone it's good again and someone can't fill in the declareplayers and soon we have a massive uprise in this at RSBot (powerbot)…
Btw how's reflection doing, might work on a G.E feature…
Indeniably Asian - Took us… 8172 msecs!!!!
Solved: 55 | SpH: 122
Hmm, calculations are saying it's 1m+, GO GO GO.
The Claw
2010-12-05 00:42:48
Sudoku Solver 0h:3m:37s
Solved: 9 | SpH: 149
Lol :) Money-time again. Agreed on not telling the public its profitable again. n3ss3s reflection has been quite stable lately, apparantly.
Thanks for posting the updated versions.
n3ss3s
2010-12-05 01:06:11
Claw did you manage to pull 149 with my version thanks to an amazing internet connection for chat or did you manage to tweak something more? My ISP is from Botswana republic or shit so I suck
The Claw
2010-12-05 01:23:02
Must be internet connection, even though I'm on wireless with 4/5 bar reception. I just used your version and did the mouse file changes you posted - in the past I changed some waits from sudoku.scar itself but maybe that change was "passed down the line", because I can't find any waits too big in it anymore. :p
Sudoku Solver 0h:42m:8s
Solved: 106 | SpH: 151
One thing I noticed was when it got an unsolvable sudoku, it logged out, then logged back in again. Which makes little to no difference lol, perhaps 1 less solved per hour than what it would of been.
On this run its got 1.6/6m left, so it looks like it eats ~6m per hour. :) Or 2m/50 solves.
n3ss3s
2010-12-05 01:24:00
150/120 = 1.25* faster :( Butthurt
The Claw
2010-12-05 01:27:13
Unlucky lol. Im getting 7-8 seconds per solve like you, so it's probably the chat thats slowing you down.
The Claw
2010-12-05 01:45:53
Hmm looks to be about 1.5-1.8m profit per hour. Everything sold instantly for above mid apart from nats and cosmics.
Btw you might want to put
if FindTextTPA(clBlack, 0, MCX1, MCY1, MCX2, MCY2,'nough coins', NPCChars, Nothing) then
begin
Report;
Writeln('Not enough coins in inventory.');
TerminateScript;
end;
Under line 980, otherwise it doesn't seem to stop the script when out of coins. Apart from that..seems perfect :D
HyperSecret
2010-12-05 02:01:07
N3ss3s, when I used your version I was getting horrible lag during the chatting. I added a two wait(10) where in the mainloop it has a for loop inside A < 11.
n3ss3s
2010-12-05 02:22:28
From: HyperSecret
N3ss3s, when I used your version I was getting horrible lag during the chatting. I added a two wait(10) where in the mainloop it has a for loop inside A < 11.
Odd, I don't have that :/
Claw, o yea ty, only does one out of cash round though
HyperSecret
2010-12-05 02:42:16
I started with 4m and ran it for just shy of an hour (55 min).
After selling @ mid offer (some sold for over mid), I ended up with 5.08m. Easily a 1m/hr profit. My SpH was 100 even. It went through all 4m in that time.
I got AT&T internet, which sucks balls.
The Claw
2010-12-05 03:39:22
So atm: every 50 solved, its 500k profit, and 2m cash gone. Profits 1-1.5m an hour.
And it still doesn't seem to stop the sudoku when its run out of coins, even with that extra code in. It just clicks the "Click to continue" then tries to resolve…that could be because theres no message in the chat box when you run out of coins anymore?
Edit: It worked then…hmmmmm didnt the other time though.
PS. Maybe its hardware causing the differences in SP/H? You guys could try setting the priority to "high", for the Simba and Smart processes. Hmm. I guess it comes down to if the chat is sent from the server each click, or if its client-side.
n3ss3s
2010-12-05 05:46:33
Okay, It's 6 am, you cunts better be happy as fuck - GE extension, made it slow as fuck so didn't have to be troubled with failsafes. HAVE ALL 6 SLOTS FREE, AND USE ONLY WHEN EVERYTHING SELLS ON MIN :D Works till ur duel ring is done, so use an 8. Dunno what happens wen duel ring is gone.
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include reflection/reflection.simba}
const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
DoSleep = false;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 30;
var
PathToGE: TTileArray;
PathToS: TTileArray;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
geslots: TIntegerArray;
thaslots: TPointArray;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
GeSlots := [0, 1, 2, 3, 4, 5];
ThaSlots := [Point(133, 154), Point(289, 154), Point(466, 154),
Point(132, 272), Point(289, 272), Point(444, 272)];
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
debug('Getting rune colours');
Disguise('Getting rune colours');
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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;
function toGe : TTileArray;
begin
SetLength(Result, 6);
Result := [
Tile(3208, 3427), Tile(3197, 3438), Tile (3186, 3450), Tile(3176, 3461), Tile(3164, 3463), Tile(3164, 3477),
Tile(3164, 3487)
];
end;
function tOStall : TTileArray;
begin
SetLength(Result, 2);
Result := [
Tile(3306, 3233), Tile(3308, 3219), tILE(3305, 3211)
];
end;
Procedure LoadPossibilities;
var
Tmp : Array of byte;
begin;
debug('LoadPossibilities');
Disguise('LoadPossibilities');
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
var
cx, cy: Integer;
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
end;
Procedure ChangeNumber(xpos,ypos: integer; number : byte);
var
Num, Add : 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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 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
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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
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);
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
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(50);
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;
LogOut;
Exit;
end;
end;
procedure LoadArrays;
begin
debug('LoadArrays');
Disguise('LoadArrays');
OwnArr[1] := Point(20, 100); //Mind
dtm[1]:= BitmapFromString(30, 29, 'beNqdletOE1EUhfGnD2HCI/g' +
'OJKRqJESCBCUNShpERNI0FREkFcGKgFiRCsjFSkUuUrlZLASKmuhr' +
'+Ne38EtWsnMyMx0ak5Wmnc58e5219zlzeu7v6RmqqamoM58NZ+6uf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ZHxuBa5U/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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc236MtLY9jMZHHBp6PD75AmFc' +
'VP1ayG8E8nSUZRl1wI0eamzuj0WddXcN9T4EjYqEEEuTP8bErg5OV' +
'4iIcJUPsP3Z3BefzflNTRyTS1/mIqBGtpATyYy9fOoNcuHUEOM4Vi' +
'zLh815jY3tbG2SEc2JBdlbAXGRrN7GQObbJxMh3btXHWltpYm/HQy' +
'R+nmT1GjKZEzjdZFSMXH+jVlHTR/gq4ZL9sl9ptMiaFtKmlUa+WV1' +
'NIESNjO8nny0sRB4yU8T8EIjmnA1iPY1cVXFF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gusheuzKwKbTNKI99rbVXVzNGX7yW' +
'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
debug('Solving Sudoku');
Disguise('Solving Sudoku');
UnSolvable := false;
//ClearReport;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
debug('Compiling Report');
Disguise('Compiling Report');
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('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
debug('function DoSudoku');
Disguise('function DoSudoku');
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
Disguise('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
i, x, y, L, T: integer;
M: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
debug('TalkToAli');
Disguise('TalkToAli');
Result:= ChooseOption('orris');
if(Result)then exit;
//FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10582106, MSX1, MSY1, MSX2, MSY2, 20);//light blue color of turban and pants
//FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6399450, MSX1, MSY1, MSX2, MSY2, 20); //light tan stripe on shirt
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(150+random(150));
//Writeln(inttostr(CountColorTolerance(1105118, 41, 5, 86, 24, 36)));
if WaitUpText('orris', 500) 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);
begin
Mouse(x, y, 0, 0, True);
T:= GetSystemTime;
while (GetSystemTime - T) < 500 do
begin
Result:= true;//FindColor(x, y, 255, x - 20, y - 20, x + 20, y + 20);
if(Result)then break;
end;
end;
FFlag(0);
Wait(200+random(200));
if(Result)then exit;
end;
end;
Respond;
end;
procedure SellShit;
var
Clerk: TNPC;
I: Integer;
runes: TStringArray;
gx, gy: Integer;
Items: TInvItemArray;
p: TPoint;
item: TInvItem;
Begin
runes := ['blood rune', 'death rune', 'chaos rune', 'soul rune', 'cosmic rune', 'nature rune', 'law rune'];
if not FindNPC('Grand Exchange clerk', Clerk) then
begin
writeln('couldnt find clerk');
terminatescript;
end;
p := TileToMS(Clerk.Tile, 20);
Mouse(p.x, p.y, 2, 2, false);
ChooseOption('Exchange G');
Wait(5000 + Random(3000));
for i := 0 to 5 do
begin
if not R_ItemNameExists(item, runes[i]) then
continue;
Mouse(thaslots[i].x, thaslots[i].y, 3, 3, true);
Wait(3000 + Random(2000));
If not R_ClickItemName(runes[i], true, 'Offer') then
continue;
writeln('hai');
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
while findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) do
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(2000 + Random(1000));
end;
Mouse(thaslots[0].x, thaslots[0].y, 3, 3, true);
Wait(3000 + Random(2000));
If R_ClickItemName(runes[6], true, 'Offer') then
begin
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
while findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) do
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(3000 + Random(2000));
end;
R_ClickItemName('Ring of duelling', False, 'Rub');
Wait(4000 + Random(3000));
FindNPCChatText('Duel', ClickLeft);
Wait(4000 + Random(3000));
WalkPath(PathToS);
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
dummy: integer;
begin
Smart_Members:= True;
Smart_Server := 56;
Smart_Signed := True;
SetupSRL;
ActivateClient;
DeclarePlayers;
MouseSpeed := 40;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
PathToGE := toge;
PathToS := ToStall;
repeat
if SudokuMenu then
DoSudoku;
if FindTextTPA(clBlack, 0, MCX1, MCY1, MCX2, MCY2,'nough coins', NPCChars, Nothing) then
begin
Report;
Writeln('GE');
R_ClickItemName('Varrock teleport', True, 'Break');
Wait(5000 + Random(3000));
WalkPath(PathToGe);
SellShit;
end;
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(100+random(100));
end;
if(A = 11)then
begin
wait(10);
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(10);
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(FailTime) > 600000) then
TerminateScript;
debug('FailTime');
Disguise('FailTime');
if (GetSystemTime > ReportTime) then
Report;
debug('ReportTime');
Disguise('ReportTime');
until false;
end.
Narcle
2010-12-05 09:04:34
"SellShit" looks like a nub function, LOL all those Mouse procs with coords
Just had to say. xD
and… Is it REALLY back?! zomgageddon
HyperSecret
2010-12-05 10:27:18
Thanks n3ss3s, but I will only run this when I am by my computer studying. I won't be using the GE features :(
n3ss3s
2010-12-05 14:10:37
From: Narcle
"SellShit" looks like a nub function, LOL all those Mouse procs with coords
Just had to say. xD
and… Is it REALLY back?! zomgageddon
I just wanted to sleep lol, and that random script stopping we suffered of back then came back to rape me, as the script had stopped before it had used up all its cash :duh:
Works though lol
Markus
2010-12-05 14:23:47
It's never been away Narcle, we just had to wait until everyone forgot about this script ;)
n3ss3s
2010-12-05 14:39:20
Just wondering, do you guys think Jagex would actually mind if we slapped all the runes in at pretty much once? As in a clickmouse loop without waits? We'd get like 200sph lol, cuz I think their click buffer would enable us to do that
Markus
2010-12-05 14:45:04
Give it a try and tell us if you get banned :p
n3ss3s
2010-12-05 15:03:15
No lol im maxed 30 def
n3ss3s
2010-12-05 15:06:40
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include reflection/reflection.simba}
const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
DoSleep = false;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 30;
var
PathToGE: TTileArray;
PathToS: TTileArray;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
geslots: TIntegerArray;
thaslots: TPointArray;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
GeSlots := [0, 1, 2, 3, 4, 5];
ThaSlots := [Point(133, 154), Point(289, 154), Point(466, 154),
Point(132, 272), Point(289, 272), Point(444, 272)];
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
debug('Getting rune colours');
Disguise('Getting rune colours');
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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;
function toGe : TTileArray;
begin
SetLength(Result, 6);
Result := [
Tile(3208, 3427), Tile(3197, 3438), Tile (3186, 3450), Tile(3176, 3461), Tile(3164, 3463), Tile(3164, 3477),
Tile(3164, 3487)
];
end;
function tOStall : TTileArray;
begin
SetLength(Result, 2);
Result := [
Tile(3306, 3233), Tile(3308, 3219), tILE(3305, 3211)
];
end;
Procedure LoadPossibilities;
var
Tmp : Array of byte;
begin;
debug('LoadPossibilities');
Disguise('LoadPossibilities');
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
var
cx, cy: Integer;
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
end;
Procedure ChangeNumber(xpos,ypos: integer; number : byte);
var
Num, Add : 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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 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
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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
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);
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
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(50);
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;
LogOut;
Exit;
end;
end;
procedure LoadArrays;
begin
debug('LoadArrays');
Disguise('LoadArrays');
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' +
'tJWZIfYfpZLgfN7v7OyP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IxX' +
'UjlEN4mqmUSsCdsfme7O19mkqJPDv+cm7iFSK8uWARcCOEZ7I0w6o' +
'LbuRET89gMvliaGhq9DlwRC1YyAULuXjeSPzaZUQ5aobaf5bLgvP5' +
'sLt7IJEYHXxC1YhRYiEXXVhTuAAnuWpRJ3w+iMX64/GRgcfASU4tK' +
'CQTKT+10Dmx6cTI9+50pvr6GKLgKDwWaUvpnMKZJqti5K6ODg0RuP' +
'EJr/zOijQCTcGmTPnKzKrQNqM08u3WVlXNHAP4zv5dcJH1nOF4Gvl' +
'mc/P9rrtULbjxgTvLF9zCqwrBqVonCDJzNHJTJBKLRqkauPFDlkxy' +
'ke3gU4idF75E29qoGsG/0PiohdiQmaBiC2tkxebIAL8omdiQdTBp2' +
'/VcUtsstuAkVzl+Y7Xa9UBgPbTVzsBGvtrYSCcsieDie47V4Jqmnp' +
'BsCIvt+fznx5am63QC3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+m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93v8A3+K+z0xr5ei2fza6/W9xaWd7J54FjGzjO4SOZd+' +
'G/K5VwOP/NTk0tZTIibywvYVtwnCOVCISz9kp9fTVsJp02ciGXk20' +
'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' +
'qNsQoZvoVw8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XvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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
debug('Solving Sudoku');
Disguise('Solving Sudoku');
UnSolvable := false;
//ClearReport;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
debug('Compiling Report');
Disguise('Compiling Report');
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('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
debug('function DoSudoku');
Disguise('function DoSudoku');
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
Disguise('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
i, x, y, L, T: integer;
M: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
debug('TalkToAli');
Disguise('TalkToAli');
Result:= ChooseOption('orris');
if(Result)then exit;
//FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10582106, MSX1, MSY1, MSX2, MSY2, 20);//light blue color of turban and pants
//FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6399450, MSX1, MSY1, MSX2, MSY2, 20); //light tan stripe on shirt
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(150+random(150));
//Writeln(inttostr(CountColorTolerance(1105118, 41, 5, 86, 24, 36)));
if WaitUpText('orris', 500) 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);
begin
Mouse(x, y, 0, 0, True);
T:= GetSystemTime;
while (GetSystemTime - T) < 500 do
begin
Result:= true;//FindColor(x, y, 255, x - 20, y - 20, x + 20, y + 20);
if(Result)then break;
end;
end;
FFlag(0);
Wait(200+random(200));
if(Result)then exit;
end;
end;
Respond;
end;
procedure SellShit;
var
Clerk: TNPC;
I, time: Integer;
runes: TStringArray;
gx, gy, mx, my: Integer;
Items: TInvItemArray;
p: TPoint;
item: TInvItem;
Begin
runes := ['blood rune', 'death rune', 'chaos rune', 'soul rune', 'cosmic rune', 'nature rune', 'law rune'];
if not FindNPC('Grand Exchange clerk', Clerk) then
begin
writeln('couldnt find clerk');
terminatescript;
end;
p := TileToMS(Clerk.Tile, 20);
Mouse(p.x, p.y, 2, 2, false);
ChooseOption('Exchange G');
Wait(5000 + Random(3000));
for i := 0 to 5 do
begin
if not R_ItemNameExists(item, runes[i]) then
continue;
Mouse(thaslots[i].x, thaslots[i].y, 3, 3, true);
Wait(3000 + Random(2000));
If not R_ClickItemName(runes[i], true, 'Offer') then
continue;
writeln('hai');
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
while findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) do
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(2000 + Random(1000));
end;
Mouse(thaslots[0].x, thaslots[0].y, 3, 3, true);
Wait(3000 + Random(2000));
If R_ClickItemName(runes[6], true, 'Offer') then
begin
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
time := getsystemtime;
repeat
if findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(3000 + Random(2000));
time := getsystemtime;
end;
wait(random(100));
if getsystemtime - time > 60000 then
begin
mouse(mx + 2, my + 2, 2, 2, true);
Wait(3000 + Random(2000));
Mouse(362, 285, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(466, 298, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(415, 296, 6, 6, true);
Wait(3000 + Random(2000));
end;
until ((not findcolor(mx, my, 2502201, msx1, msy1, msx2, msy2)) and (
not findcolor(mx, my, 101318, msx1, msy1, msx2, msy2)));
R_ClickItemName('Ring of duelling', False, 'Rub');
Wait(4000 + Random(3000));
FindNPCChatText('Duel', ClickLeft);
Wait(4000 + Random(3000));
WalkPath(PathToS);
end;
function caput: boolean;
var
Item: TInvItem;
begin
if not R_ItemIDExists(item, 995) then
result := false
else
result := GetItemStackSizeAt(item.slot) < 50000 ;
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
dummy: integer;
begin
Smart_Members:= True;
Smart_Server := 56;
Smart_Signed := True;
SetupSRL;
ActivateClient;
DeclarePlayers;
MouseSpeed := 40;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
PathToGE := toge;
PathToS := ToStall;
repeat
if SudokuMenu then
DoSudoku;
if caput then
begin
Report;
Writeln('GE');
R_ClickItemName('Varrock teleport', True, 'Break');
Wait(5000 + Random(3000));
WalkPath(PathToGe);
SellShit;
end;
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(100+random(100));
end;
if(A = 11)then
begin
wait(10);
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(10);
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(FailTime) > 600000) then
TerminateScript;
debug('FailTime');
Disguise('FailTime');
if (GetSystemTime > ReportTime) then
Report;
debug('ReportTime');
Disguise('ReportTime');
until false;
end.
Working detector if out of GP (reflection), attempts one extra puzzle though. Changed the GE part so that it wont fuck up iff something doesn't sell but after 1 minute it withdraws whats left and puzzles moar
Think my Account is sitting around 86m or so. When Lordsaturn get done with it I might run it for a few hours. Hopefully that Brimhaven Dungeon Runner is coming along. Pirate hooks sell pretty well if I remember right. Wonder what they are sitting at now.
~BraK
n3ss3s
2010-12-05 17:08:02
From: BraK
Think my Account is sitting around 86m or so. When Lordsaturn get done with it I might run it for a few hours. Hopefully that Brimhaven Dungeon Runner is coming along. Pirate hooks sell pretty well if I remember right. Wonder what they are sitting at now.
~BraK
Were you supposed to post in the brimhaven script thread? :D
EDIT: Blood runes went up 20 gp today, woops
EDIT: Doubled the Failtime, somewhy frequently stopped my script even it is sudokuing, made it change compass to west when doing the GE so that it will have the old option menu for sure.
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include reflection/reflection.simba}
const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
DoSleep = false;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 30;
var
PathToGE: TTileArray;
PathToS: TTileArray;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
geslots: TIntegerArray;
thaslots: TPointArray;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
GeSlots := [0, 1, 2, 3, 4, 5];
ThaSlots := [Point(133, 154), Point(289, 154), Point(466, 154),
Point(132, 272), Point(289, 272), Point(444, 272)];
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
debug('Getting rune colours');
Disguise('Getting rune colours');
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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;
function toGe : TTileArray;
begin
SetLength(Result, 6);
Result := [
Tile(3208, 3427), Tile(3197, 3438), Tile (3186, 3450), Tile(3176, 3461), Tile(3164, 3463), Tile(3164, 3477),
Tile(3164, 3487)
];
end;
function tOStall : TTileArray;
begin
SetLength(Result, 2);
Result := [
Tile(3306, 3233), Tile(3308, 3219), tILE(3305, 3211)
];
end;
Procedure LoadPossibilities;
var
Tmp : Array of byte;
begin;
debug('LoadPossibilities');
Disguise('LoadPossibilities');
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
var
cx, cy: Integer;
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
end;
Procedure ChangeNumber(xpos,ypos: integer; number : byte);
var
Num, Add : 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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 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
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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
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);
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
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(50);
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;
LogOut;
Exit;
end;
end;
procedure LoadArrays;
begin
debug('LoadArrays');
Disguise('LoadArrays');
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34z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+
'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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
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g+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
debug('Solving Sudoku');
Disguise('Solving Sudoku');
UnSolvable := false;
//ClearReport;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
debug('Compiling Report');
Disguise('Compiling Report');
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('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
debug('function DoSudoku');
Disguise('function DoSudoku');
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
Disguise('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
i, x, y, L, T: integer;
M: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
debug('TalkToAli');
Disguise('TalkToAli');
Result:= ChooseOption('orris');
if(Result)then exit;
//FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10582106, MSX1, MSY1, MSX2, MSY2, 20);//light blue color of turban and pants
//FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6399450, MSX1, MSY1, MSX2, MSY2, 20); //light tan stripe on shirt
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(150+random(150));
//Writeln(inttostr(CountColorTolerance(1105118, 41, 5, 86, 24, 36)));
if WaitUpText('orris', 500) 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);
begin
Mouse(x, y, 0, 0, True);
T:= GetSystemTime;
while (GetSystemTime - T) < 500 do
begin
Result:= true;//FindColor(x, y, 255, x - 20, y - 20, x + 20, y + 20);
if(Result)then break;
end;
end;
FFlag(0);
Wait(200+random(200));
if(Result)then exit;
end;
end;
Respond;
end;
procedure SellShit;
var
Clerk: TNPC;
I, time: Integer;
runes: TStringArray;
gx, gy, mx, my: Integer;
Items: TInvItemArray;
p: TPoint;
item: TInvItem;
Begin
runes := ['blood rune', 'death rune', 'chaos rune', 'soul rune', 'cosmic rune', 'nature rune', 'law rune'];
if not FindNPC('Grand Exchange clerk', Clerk) then
begin
writeln('couldnt find clerk');
terminatescript;
end;
p := TileToMS(Clerk.Tile, 20);
Mouse(p.x, p.y, 2, 2, false);
R_ChooseOption('Exchange G');
Wait(5000 + Random(3000));
for i := 0 to 5 do
begin
if not R_ItemNameExists(item, runes[i]) then
continue;
Mouse(thaslots[i].x, thaslots[i].y, 3, 3, true);
Wait(3000 + Random(2000));
If not R_ClickItemName(runes[i], true, 'Offer') then
continue;
writeln('hai');
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
while findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) do
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(2000 + Random(1000));
end;
Mouse(thaslots[0].x, thaslots[0].y, 3, 3, true);
Wait(3000 + Random(2000));
If R_ClickItemName(runes[6], true, 'Offer') then
begin
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
time := getsystemtime;
repeat
if findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(3000 + Random(2000));
time := getsystemtime;
end;
wait(random(100));
if getsystemtime - time > 60000 then
begin
mouse(mx + 2, my + 2, 2, 2, true);
Wait(3000 + Random(2000));
Mouse(362, 285, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(466, 298, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(415, 296, 6, 6, true);
Wait(3000 + Random(2000));
end;
until ((not findcolor(mx, my, 2502201, msx1, msy1, msx2, msy2)) and (
not findcolor(mx, my, 101318, msx1, msy1, msx2, msy2)));
R_ClickItemName('Ring of duelling', False, 'Rub');
Wait(4000 + Random(3000));
FindNPCChatText('Duel', ClickLeft);
Wait(4000 + Random(3000));
WalkPath(PathToS);
end;
function caput: boolean;
var
Item: TInvItem;
begin
if not R_ItemIDExists(item, 995) then
result := false
else
result := GetItemStackSizeAt(item.slot) < 50000 ;
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
dummy: integer;
begin
Smart_Members:= True;
Smart_Server := 56;
Smart_Signed := True;
SetupSRL;
ActivateClient;
DeclarePlayers;
MouseSpeed := 40;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
PathToGE := toge;
PathToS := ToStall;
repeat
MakeCompass('N');
if caput then
begin
Report;
Writeln('GE');
R_ClickItemName('Varrock teleport', True, 'Break');
Wait(5000 + Random(3000));
MakeCompass('W');
WalkPath(PathToGe);
SellShit;
end;
if SudokuMenu then
DoSudoku;
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(100+random(100));
end;
if(A = 11)then
begin
wait(10);
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(10);
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(FailTime) > 1200000) then
TerminateScript;
debug('FailTime');
Disguise('FailTime');
if (GetSystemTime > ReportTime) then
Report;
debug('ReportTime');
Disguise('ReportTime');
until false;
end.
n3ss3s
2010-12-05 18:29:01
OMGREVELATION
The first criteria is quite a bit similar to that of most first person shooter (FPS) games who take steps
to detect "aimbots." This would be simple movement. Inhumanly fast cursor movements are highly
suspicious, and consistent patterns of such movements (to discern from some player who gets bored
and plays with the mouse .)
The mouse patterns we do while sudokuing are highly inconsistent, could be one of the top reasons this doesn't give you a single random event. We do have inhumanly fast cursor movements, but their criteria system propably doesn't give it more weight when in a minigame like this, so that's where they fucked up in my opinion.
EDIT: Clickmouse didn't work, not really sure what to think of that lol.. i dont even know what it clicked etc.. pls no perm ban lol
Naike
2010-12-06 06:23:30
Trying it out tonight :)
n3ss3s @ clean up the mess, script looks like shit :p
Narcle
2010-12-06 08:22:21
Worked on it a little bit and made some global vars into locals and cleaned it up a bit. I also added "SudoMouse" with the option to use fast clicking. I haven't tested it yet to see if the changes to the vars still allow it to work tho. Note I took all the "Disguises" out and put that in Debug with a declaration if your not using Simba.
After WoW slows down I want to come back to this and add everything together in one script with options. Such as FastClicking and the more Human like solver, which would be nice if someone posted that if they know where it is the thread.
If someone wants to test it:
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.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;
DoSleep = false;
SleepEvery = 3 * 60 * 60; //Minutes +-10m
SleepFor = 20 * 30; //Minutes +-10m
UseFastMouse = true; //Fast clicking
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Active := true;
end;
procedure Debug(S: String);
begin
if DebugMode then
Writeln(s)
{$ifdef Simba}
if not DebugMode then
DebugLn(s);
{$else}
Disguise(s);
if not DebugMode then
Status(s);
{$endif}
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;
ColourArray: array [1..9] of integer;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure SudoMouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
a,b,c : integer;
begin
if UseFastMouse then
begin
MMouse(mousex, mousey, ranx, rany);
Wait(2 + Random(4));
GetMousePos(b, c);
HoldMouse(b, c, mouseaction(left));
repeat
Wait(5 + Random(10));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, mouseaction(left));
Wait(2+Random(4));
end else
Mouse(mousex, mousey, ranx, rany, left);
end;
procedure SudoMouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
begin
case ClickType of
1 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, True);
2 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, False);
3 : MMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0);
else
srl_Warn('SudoMouseBox', 'ClickType is NOT a valid number!', warn_AllVersions);
end;
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] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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 LoadPossibilities;
var
Tmp : Array of byte;
x, y, i, c, minX, minY, maxX, maxY, xx, yy: integer;
begin;
Debug('LoadPossibilities');
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
SudoMouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
SudoMouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
end;
Procedure ChangeNumber(xpos,ypos: integer; number : byte);
var
Num, xx, yy, I: 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];
with Solver[xpos][ypos].inbox do
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
Break;
end;
end;}
end;
Function SudokuMenu: Boolean;
begin
Result := CountColor(797794, 0, 0, 95, 85) > 50;
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, i : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
end;
for z := 0 to 8 do
begin
SetArrayLength(n3sWasHere, 0);
CurrentRune := RandomArr[z];
SudoMouse(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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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
//SudoMouse(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
SudoMouse(Lol.x, Lol.y, 0, 0, True);
Lol := getNext(n3sWasHere, Lol);
Until(Lol.x = 0);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
if(GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 498170) or (GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 114921)then
try
SudoMouseBox(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);
SudoMousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
CanExit:= False;
except
end;
until(CanExit) or (not(LoggedIn))
writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
SudoMouseBox(14, 61, 89, 78, 1);
Result := true;
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
SudoMouse(13, 13, 13, 13, true);//Closes Sudoku Menu
//Result := False;
LogOut;
Exit;
end;
end;
procedure LoadArrays;
begin
Debug('LoadArrays');
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0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lIGyEczJNMpVQC7trmOdHb+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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6E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vBP+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;
i, ii, x, y, c: integer;
begin
Debug('Solving Sudoku');
UnSolvable := false;
//ClearReport;
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 := '';
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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;
begin
Debug('Compiling Report');
Writeln('Sudoku Solver ' + MsToTime(GetTimeRunning, 1));
Writeln('Solved: '+ inttostr(Solved)+' | SpH: ' + IntToStr(Round((Solved * 3600.0) / (GetTimeRunning / 1000.0))));
//SendSRLReport;
ReportTime := GetSystemTime + 310000;
end;
procedure ScriptTerminate;
var
i: integer;
begin
for i := 1 to 9 do
FreeBitmap(DTM[i]);
Debug('Show Me The Money!!!! - RunTime: '+MsToTime(GetTimeRunning, 1));
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
Debug('function DoSudoku');
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
Debug('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else
begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//SudoMouse(13, 13, 13, 13, true);
wait(50);
end;
Result := LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
i, x, y, L, T: integer;
M: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Debug('Talk To Ali');
Result:= ChooseOption('orris');
if(Result)then exit;
//FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6596310, MSX1, MSY1, MSX2, MSY2, 20);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10582106, MSX1, MSY1, MSX2, MSY2, 20);//light blue color of turban and pants
//FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6399450, MSX1, MSY1, MSX2, MSY2, 20); //light tan stripe on shirt
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
//Writeln(inttostr(CountColorTolerance(1105118, 41, 5, 86, 24, 36)));
if WaitUpText('orris', 1000) 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);
begin
SudoMouse(x, y, 0, 0, True);
T:= GetSystemTime;
while (GetSystemTime - T) < 500 do
begin
Result:= true;//FindColor(x, y, 255, x - 20, y - 20, x + 20, y + 20);
if(Result)then break;
end;
end;
FFlag(0);
Wait(200+random(200));
if(Result)then exit;
end;
end;
Respond;
end;
var
SleepTime: Integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
begin
Smart_Members:= True;
Smart_Server := 1;
Smart_Signed := True;
SetupSRL;
{$ifdef SIMBA}AddOnTerminate('ScriptTerminate');{$endif}
ActivateClient;
Debug('Declaring Players');
DeclarePlayers;
MouseSpeed := 40;
//ScriptID := '1037';
LoadArrays;
LoginPlayer;
Debug('Logging in Player');
Wait(1001);
MarkTime(FailTime);
SleepTime := GetSystemTime + RandomRange(-10*60000, 10*60000);
ReportTime := GetSystemTime + 310000;
Clickcontinue(true, true);//quick chat world check
LoadArrays;
NorthLast:= True;
MakeCompass('N');
SetAngle(true);
//MakeCompass('280');
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 SudokuMenu then
DoSudoku;
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(100+random(100));
end;
if(A = 11)then
begin
wait(10);
{if(NorthLast)then
MakeCompass('280')
else
MakeCompass('N');}
NorthLast:= not NorthLast;
for A:= 1 to 10 do
begin
if(TalkToAli)then break;
wait(10);
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 DoSleep then
if TimeFromMark(SleepTime) > SleepEvery * 60000 then
begin
SleepTime := RandomRange((SleepFor-10)*60000, (SleepFor+10)*60000);
Debug('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;
Debug('FailTime'); }
if (GetSystemTime > ReportTime) then
Report;
Debug('ReportTime');
until false;
end.
Markus
2010-12-06 11:35:29
Uhm you don't get randoms because 99% of the time you're in an interface.
n3ss3s
2010-12-06 15:21:08
From: Markus
Uhm you don't get randoms because 99% of the time you're in an interface.
If that was at my monstrous discovery… WAT ABOUT THAT 1%? 1 HOUR OUT OF 100 HOURS IN A RANDOM M8 :p
Anyone have any ideas why the script randomly stops? Set it up before school, came back, Solved 6.
Markus
2010-12-06 15:45:46
Does it still writeln that shitload of stuff it used to do? Could be anything but usually it's not finding Ali or it thinks it's out of money.
n3ss3s
2010-12-06 15:50:03
it still writelns the ali shit, and yea I think it usually stops when it "can't" find ali, occasionally in when figuring out the solution to a sudoku too… I'll make a reflection finder for ali.
function TalkToAli: boolean;
var
p: TPoint;
ali: TNPC;
begin
debug('TalkToAli');
Disguise('TalkToAli');
Result := FindNPC('Ali Morrisane', ali);
if Result then
begin
p := TileToMS(ali.tile, 12);
Mouse(p.x, p.y, 4, 4, true);
end;
Respond;
end;
I'm not trying to make anything pretty right now btw, so if anything disgusts you u can make ur own
Markus
2010-12-06 15:55:57
Sudoku solution finding should be flawless? The solving itself is just impossible to fail and rune detection should be pretty much flawless (wow, it holds a record, havent updated it in like a year and still works O.o Used to break like every 2 months),
n3ss3s
2010-12-06 15:59:18
Could have been just something idk, because it does seem weird for it to stop there, I remember it said LoadPossiblities in the debug, followed by succesfully executed without putting any runes in…
Using 90m if my calculations are right it'll be done with that in 15 hours. Averaging 1 mil every 10 minutes on Mouse Speed 30. 134 SpH. That's Bloddy Fast.
~BraK
n3ss3s
2010-12-06 19:10:27
After you've sold your runes please give us a X/90 for the percentage…
6.2m/23m hope thats how you wanted it n3ss3s Profit/Base. That was in 4-5 hours at a 140 SpH. Mouse Speed 30 on Narcle's Version. Happy gaming peeps I'm gonna be flying out in a few hours.
~BraK
n3ss3s
2010-12-06 22:12:22
Yes, that's excellent, where u going btw?
EDIT: OSHI Solved: 78 | SpH: 145, I need to keep this up
From: n3ss3s
Yes, that's excellent, where u going btw?
EDIT: OSHI Solved: 78 | SpH: 145, I need to keep this up
Flying from Germany to St. Louis, Missouri in the US. My wife will pick my up there. And that script is running great as long as you can keep from checking on it( On SMART I mean) it will keep going.
~BraK
n3ss3s
2010-12-06 22:22:50
FUCK! jesus ffs, note: dont allow srl to update, will put ur mouse back to slow
The Claw
2010-12-06 22:51:31
~25% profits in my experience. :)
Smartzkid
2010-12-06 23:29:44
Get it in while you can!
Powerbot Sudoku: "Update Coming 12/7" Fair warning - IT IS 2X AS FAST! OH SHIT! Okay, I'm done. We still win.
If anyone wants an account with ~1m and is willing to memberize and run the necessary quests, I have an account I can lend for a month. I don't mind if it gets banned, so you could try any optimization you want!
Their script:
http://www.powerbot.org/vb/showthread.php?t=523754
n3ss3s
2010-12-07 15:07:16
From: Smartzkid
Get it in while you can! Powerbot Sudoku: "Update Coming 12/7" Fair warning - IT IS 2X AS FAST! OH SHIT! Okay, I'm done. We still win.
If anyone wants an account with ~1m and is willing to memberize and run the necessary quests, I have an account I can lend for a month. I don't mind if it gets banned, so you could try any optimization you want!
Their script:
http://www.powerbot.org/vb/showthread.php?t=523754
FUCK SHIT ASS BITCH CUNT! RAGE!

I can't understand why the hell does this guy keep a script up, he doesn't understand that nobody gives a crap, it's all leechers and all of the java sudokus are based on eachother, so it's not like he's special either…
Btw: Removing the last wait from either ClickMouse2 or Mouse completely makes it a bit faster, as it used to create a total wait of max 4 ms which creates a "significant" stop in movement…
EDIT: Lolz, about that RSBot guy -
◄ Solves Sudoku In Under 20 Seconds
And its supposed to be 2x faster than before? lulz
EDIT EDIT: Nice fucking job jagex, their w26 has been dcing for like a month
marpis
2010-12-09 15:18:46
~125 sph, ~1M/hr, 4.5M spent in 1 hour :)
n3ss3s
2010-12-09 15:27:38
From: marpis
~125 sph, ~1M/hr, 4.5M spent in 1 hour :)
How are runes selling? Everything seems to be going down again… RSBot script wasn't released though, so the small drop could be due to people whacking out cyclops for dragon defenders…
HyperSecret
2010-12-09 15:53:12
From: n3ss3s
How are runes selling? Everything seems to be going down again… RSBot script wasn't released though, so the small drop could be due to people whacking out cyclops for dragon defenders…
Selling at mid goes slowly atm, since the release of the dragon def. Still sell at mid, at least, they will sell just not instantly.
marpis
2010-12-09 15:57:44
From: n3ss3s
How are runes selling? Everything seems to be going down again… RSBot script wasn't released though, so the small drop could be due to people whacking out cyclops for dragon defenders…
Haven't yet sold any. Spending 2,7M more now and we'll se after that.
Naike
2010-12-09 16:22:00
Lol, I got reset.
Pretty much everything useful turned to 10.
I did use more than this script though!!
HyperSecret
2010-12-09 16:35:55
From: Naike
Lol, I got reset.
Pretty much everything useful turned to 10.
I did use more than this script though!!
Gah! that sucks man. What got reset and from what levels?
marpis
2010-12-09 16:38:01
From: Naike
Lol, I got reset.
Pretty much everything useful turned to 10.
I did use more than this script though!!
Omg? They reset your levels?
Omg I hope that isn't because of sudoku. If I get reset I'll probably quit for good.
And Bloods, Natures, and Chaos sold for mid+1 in 2 minutes.
Umm, I don't know if I really should use this script again…
On the other hand, my account has been very inactive for a couple of months.
E: What the fuck, I'll rape this bitch HC. If I get reset or banned then let it be so.
n3ss3s
2010-12-09 16:43:45
It's definitely not from sudoku N1ke, u know from ur old experiments :D
EDIT: if this shit stops ill just make a second script to hit the play button whenever its not grayed out lol
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include reflection/reflection.simba}
const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
DoSleep = false;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 30;
var
PathToGE: TTileArray;
PathToS: TTileArray;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
geslots: TIntegerArray;
thaslots: TPointArray;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
GeSlots := [0, 1, 2, 3, 4, 5];
ThaSlots := [Point(133, 154), Point(289, 154), Point(466, 154),
Point(132, 272), Point(289, 272), Point(444, 272)];
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
debug('Getting rune colours');
Disguise('Getting rune colours');
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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;
function toGe : TTileArray;
begin
SetLength(Result, 6);
Result := [
Tile(3208, 3427), Tile(3197, 3438), Tile (3186, 3450), Tile(3176, 3461), Tile(3164, 3463), Tile(3164, 3477),
Tile(3164, 3487)
];
end;
function tOStall : TTileArray;
begin
SetLength(Result, 2);
Result := [
Tile(3306, 3233), Tile(3308, 3219), tILE(3305, 3211)
];
end;
Procedure LoadPossibilities;
var
Tmp : Array of byte;
begin;
debug('LoadPossibilities');
Disguise('LoadPossibilities');
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 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;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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);
//ClickMouse(lol.x, lol.y, 1);
Lol := getNext(n3sWasHere, Lol);
Wait(random(10));
Until(Lol.x = 0);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
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);
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
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(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
repeat
MMouse(13, 13, 13, 13);
if SudokuMenu then
ClickMouse2(true);
wait(2000 + Random(2000));
until(not SudokuMenu);
Mouse(13, 13, 13, 13, true);//Closes Sudoku Menu
//Result := False;
LogOut;
Exit;
end;
end;
procedure LoadArrays;
begin
debug('LoadArrays');
Disguise('LoadArrays');
OwnArr[1] := Point(20, 100); //Mind
dtm[1]:= BitmapFromString(30, 29, 'beNqdletOE1EUhfGnD2HC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ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888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fKO5+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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc236MtLY9jMZHHBp6PD75AmFc' +
'VP1ayG8E8nSUZRl1wI0eamzuj0WddXcN9T4EjYqEEEuTP8bErg5OV' +
'4iIcJUPsP3Z3BefzflNTRyTS1/mIqBGtpATyYy9fOoNcuHUEOM4Vi' +
'zLh815jY3tbG2SEc2JBdlbAXGRrN7GQObbJxMh3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kgoVcREauG7GJACe5alEnfD6OxQb6+' +
'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
debug('Solving Sudoku');
Disguise('Solving Sudoku');
UnSolvable := false;
//ClearReport;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
debug('Compiling Report');
Disguise('Compiling Report');
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('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
debug('function DoSudoku');
Disguise('function DoSudoku');
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
Disguise('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
p: TPoint;
m: TTile;
ali: TNPC;
begin
debug('TalkToAli');
Disguise('TalkToAli');
Result := FindNPC('Ali Morrisane', ali);
writeln(booltostr(result));
if Result then
begin
m := GetMe.Tile;
if (Distance(m.x, m.y, ali.Tile.x, ali.Tile.y) > 2) then
begin
WalkToTile(ali.tile, 0, 0);
while CharacterMoving do
wait(20);
end;
p := TileToMS(ali.tile, 12);
Mouse(p.x, p.y, 4, 4, true);
end;
Respond;
end;
procedure SellShit;
var
Clerk: TNPC;
I, time: Integer;
runes: TStringArray;
gx, gy, mx, my: Integer;
p: TPoint;
item: TInvItem;
Begin
runes := ['blood rune', 'death rune', 'chaos rune', 'soul rune', 'cosmic rune', 'nature rune', 'law rune'];
if not FindNPC('Grand Exchange clerk', Clerk) then
begin
writeln('couldnt find clerk');
terminatescript;
end;
p := TileToMS(Clerk.Tile, 20);
Mouse(p.x, p.y, 2, 2, false);
R_ChooseOption('Exchange G');
Wait(5000 + Random(3000));
for i := 0 to 5 do
begin
if not R_ItemNameExists(item, runes[i]) then
continue;
Mouse(thaslots[i].x, thaslots[i].y, 3, 3, true);
Wait(3000 + Random(2000));
If not R_ClickItemName(runes[i], true, 'Offer') then
continue;
writeln('hai');
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
while findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) do
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(2000 + Random(1000));
end;
Mouse(thaslots[0].x, thaslots[0].y, 3, 3, true);
Wait(3000 + Random(2000));
If R_ClickItemName(runes[6], true, 'Offer') then
begin
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
time := getsystemtime;
repeat
if findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(3000 + Random(2000));
time := getsystemtime;
end;
wait(random(100));
if getsystemtime - time > 60000 then
begin
mouse(mx + 2, my + 2, 2, 2, true);
Wait(3000 + Random(2000));
Mouse(362, 285, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(466, 298, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(415, 296, 6, 6, true);
Wait(3000 + Random(2000));
end;
until ((not findcolor(mx, my, 2502201, msx1, msy1, msx2, msy2)) and (
not findcolor(mx, my, 101318, msx1, msy1, msx2, msy2)));
R_ClickItemName('Ring of duelling', False, 'Rub');
Wait(4000 + Random(3000));
FindNPCChatText('Duel', ClickLeft);
Wait(4000 + Random(3000));
WalkPath(PathToS);
end;
function caput: boolean;
var
Item: TInvItem;
begin
if not R_ItemIDExists(item, 995) then
result := false
else
result := GetItemStackSizeAt(item.slot) < 50000 ;
end;
procedure rlytalktoali;
var
i: integer;
begin
repeat
if TalkToAli then
break;
wait(random(1000));
i := i + 1;
if (i > 20) then
begin
writeln('fuck ali');
terminatescript;
end;
until(false);
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
dummy: integer;
chattime: integer;
rout: boolean;
begin
Smart_Members:= True;
Smart_Server := 56;
Smart_Signed := True;
SetupSRL;
ActivateClient;
DeclarePlayers;
MouseSpeed := 40;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
PathToGE := toge;
PathToS := ToStall;
repeat
debug(inttostr(GetMe.Level));
MakeCompass('N');
if caput then
begin
Report;
Writeln('GE');
R_ClickItemName('Varrock teleport', True, 'Break');
Wait(5000 + Random(3000));
MakeCompass('W');
WalkPath(PathToGe);
SellShit;
end;
if SudokuMenu then
DoSudoku;
repeat
rlytalktoali;
chattime := getsystemtime;
rout := false;
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;
rout := true;
end;
if (getsystemtime - chattime > 50000) then
break;
until(not(LoggedIn));
if (rout) then
break;
until(not(LoggedIn));
if(not(LoggedIn))then exit;
if (TimeFromMark(FailTime) > 1200000) then
begin
writeln('failed');
TerminateScript;
end;
debug('FailTime');
Disguise('FailTime');
if (GetSystemTime > ReportTime) then
Report;
debug('ReportTime');
Disguise('ReportTime');
until false;
end.
Hobbit
2010-12-12 20:13:39
From: Smartzkid
Get it in while you can! Powerbot Sudoku: "Update Coming 12/7" Fair warning - IT IS 2X AS FAST! OH SHIT! Okay, I'm done. We still win.
If anyone wants an account with ~1m and is willing to memberize and run the necessary quests, I have an account I can lend for a month. I don't mind if it gets banned, so you could try any optimization you want!
Their script:
http://www.powerbot.org/vb/showthread.php?t=523754
Read the last few pages of the thread, i lol'd :)
The Claw
2010-12-12 20:34:20
432 pages…even though this script was meant to be super secret its one of the most popular ever :p
Hobbit
2010-12-13 01:27:42
From: The Claw
432 pages…even though this script was meant to be super secret its one of the most popular ever :p
I think you mean posts? Theres only 44 pages :p
n3ss3s
2010-12-13 13:26:39
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include reflection/reflection.simba}
const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
DoSleep = false;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 30;
var
PathToGE: TTileArray;
PathToS: TTileArray;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
geslots: TIntegerArray;
thaslots: TPointArray;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
GeSlots := [0, 1, 2, 3, 4, 5];
ThaSlots := [Point(133, 154), Point(289, 154), Point(466, 154),
Point(132, 272), Point(289, 272), Point(444, 272)];
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
debug('Getting rune colours');
Disguise('Getting rune colours');
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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;
function toGe : TTileArray;
begin
SetLength(Result, 6);
Result := [
Tile(3208, 3427), Tile(3197, 3438), Tile (3186, 3450), Tile(3176, 3461), Tile(3164, 3463), Tile(3164, 3477),
Tile(3164, 3487)
];
end;
function tOStall : TTileArray;
begin
SetLength(Result, 2);
Result := [
Tile(3306, 3233), Tile(3308, 3219), tILE(3305, 3211)
];
end;
Procedure LoadPossibilities;
var
Tmp : Array of byte;
begin;
debug('LoadPossibilities');
Disguise('LoadPossibilities');
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 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;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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);
//ClickMouse(lol.x, lol.y, 1);
Lol := getNext(n3sWasHere, Lol);
Wait(random(10));
Until(Lol.x = 0);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
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);
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
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(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
repeat
MMouse(13, 13, 13, 13);
if SudokuMenu then
ClickMouse2(true);
wait(2000 + Random(2000));
until(not SudokuMenu);
Mouse(13, 13, 13, 13, true);//Closes Sudoku Menu
//Result := False;
LogOut;
Exit;
end;
end;
procedure LoadArrays;
begin
debug('LoadArrays');
Disguise('LoadArrays');
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+1EKQS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J54FjGzjO4SOZd+' +
'G/K5VwOP/NTk0tZTIibywvYVtwnCOVCISz9kp9fTVsJp02ciGXk20' +
'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/Eye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jLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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
debug('Solving Sudoku');
Disguise('Solving Sudoku');
UnSolvable := false;
//ClearReport;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
debug('Compiling Report');
Disguise('Compiling Report');
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('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
debug('function DoSudoku');
Disguise('function DoSudoku');
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
Disguise('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
p: TPoint;
m: TTile;
ali: TNPC;
begin
debug('TalkToAli');
Disguise('TalkToAli');
Result := FindNPC('Ali Morrisane', ali);
writeln(booltostr(result));
if Result then
begin
m := GetMe.Tile;
if (Distance(m.x, m.y, ali.Tile.x, ali.Tile.y) > 2) then
begin
WalkToTile(ali.tile, 0, 0);
while CharacterMoving do
wait(20);
end;
p := TileToMS(ali.tile, 12);
Mouse(p.x, p.y, 4, 4, true);
end;
Respond;
end;
procedure SellShit;
var
Clerk: TNPC;
I, time: Integer;
runes: TStringArray;
gx, gy, mx, my: Integer;
p: TPoint;
item: TInvItem;
Begin
runes := ['blood rune', 'death rune', 'chaos rune', 'soul rune', 'cosmic rune', 'nature rune', 'law rune'];
if not FindNPC('Grand Exchange clerk', Clerk) then
begin
writeln('couldnt find clerk');
terminatescript;
end;
p := TileToMS(Clerk.Tile, 20);
Mouse(p.x, p.y, 2, 2, false);
R_ChooseOption('Exchange G');
Wait(5000 + Random(3000));
for i := 0 to 5 do
begin
if not R_ItemNameExists(item, runes[i]) then
continue;
Mouse(thaslots[i].x, thaslots[i].y, 3, 3, true);
Wait(3000 + Random(2000));
If not R_ClickItemName(runes[i], true, 'Offer') then
continue;
writeln('hai');
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
while findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) do
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(2000 + Random(1000));
end;
Mouse(thaslots[0].x, thaslots[0].y, 3, 3, true);
Wait(3000 + Random(2000));
If R_ClickItemName(runes[6], true, 'Offer') then
begin
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
time := getsystemtime;
repeat
if findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(3000 + Random(2000));
time := getsystemtime;
end;
wait(random(100));
if getsystemtime - time > 60000 then
begin
mouse(mx + 2, my + 2, 2, 2, true);
Wait(3000 + Random(2000));
Mouse(362, 285, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(466, 298, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(415, 296, 6, 6, true);
Wait(3000 + Random(2000));
end;
until ((not findcolor(mx, my, 2502201, msx1, msy1, msx2, msy2)) and (
not findcolor(mx, my, 101318, msx1, msy1, msx2, msy2)));
R_ClickItemName('Ring of duelling', False, 'Rub');
Wait(4000 + Random(3000));
FindNPCChatText('Duel', ClickLeft);
Wait(4000 + Random(3000));
WalkPath(PathToS);
end;
function caput: boolean;
var
Item: TInvItem;
begin
if not R_ItemIDExists(item, 995) then
result := false
else
result := GetItemStackSizeAt(item.slot) < 50000 ;
end;
procedure rlytalktoali;
var
i: integer;
begin
repeat
if TalkToAli then
break;
wait(random(1000));
i := i + 1;
if (i > 20) then
begin
writeln('fuck ali');
terminatescript;
end;
until(false);
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
dummy: integer;
chattime: integer;
rout: boolean;
procedure handletalk;
begin
rlytalktoali;
chattime := getsystemtime;
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;
exit;
end;
if (getsystemtime - chattime > 50000) then
handletalk;
until(not(LoggedIn));
end;
begin
Smart_Members:= True;
Smart_Server := 56;
Smart_Signed := True;
SetupSRL;
ActivateClient;
DeclarePlayers;
MouseSpeed := 40;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
PathToGE := toge;
PathToS := ToStall;
repeat
debug(inttostr(GetMe.Level));
MakeCompass('N');
if caput then
begin
Report;
Writeln('GE');
R_ClickItemName('Varrock teleport', True, 'Break');
Wait(5000 + Random(3000));
MakeCompass('W');
WalkPath(PathToGe);
SellShit;
end;
if SudokuMenu then
DoSudoku;
handletalk;
if(not(LoggedIn))then exit;
if (TimeFromMark(FailTime) > 1200000) then
begin
writeln('failed');
debug('FailTime');
Disguise('FailTime');
TerminateScript;
end;
if (GetSystemTime > ReportTime) then
begin
Report;
debug('ReportTime');
Disguise('ReportTime');
end;
until false;
end.
Now it stopped at 400, I don't know if that has anything to do with the tweaks… Pisses me off to wake up with like a 2 hour proggy lol
Boreas
2010-12-13 13:38:50
From: Hobbit
I think you mean posts? Theres only 44 pages :p
Even so, with a 44 page thread that you don't even need to log in to see (plus whatever else on other forums), jagex must be watching Ali right?
Smartzkid
2010-12-13 13:59:49
From: Boreas
Even so, with a 44 page thread that you don't even need to log in to see (plus whatever else on other forums), jagex must be watching Ali right?
Jagex doesn't really seem to be doing much banning right now. Does anyone find it curiously odd that there are chatbots at GE on almost every world?
I've been running near 24x7 on 4 characters (all running at the same time) for about two months and no indication of any problems.
All I can say is
be careful because it's very possible that Jagex is suiting up for another mass ban.
HyperSecret
2010-12-13 14:21:14
Bring on the mass ban. I would love to see if my character gets caught in a mass ban, tbh. I have no indications like I usually do between using SIMBA and RSBot when a character is about to get banned.
Usually I see an increase in random events and also and increase specifically in the 'harder' ones. I get barely 1 random a day, if there. My friend that plays legit on my account also says he sees no increase in randoms at all.
I auto(ed) the following:
Thieving (79), all on wall safes [RSBot/Simba]
Magic (94), alch stunning [RSBot]
Fletching (99), castle wars lobby
Cooking (99), Rogue's Den [Simba]
Woodcutting (99), Ivy in taverly [Simba]
Firemaking (89), usually FoG [RSBot]
Pest Control, [RSBot]
Ali, 1 every 2/3 days and run through 10M [Simba]
I also auto my combat between Simba and RSBot.
I also only auto when I am at my computer studying. So I try not to put my character in any jeopardy. I also am active in a CC and talk to players usually that talk first. I think all this has helped me in getting my levels and not getting banned.
n3ss3s
2010-12-13 15:24:07
I haven't had a random event in like a year… All I'm botting is this, (last time something else was neXus AutoSorcGarden Pro, been about a month). Here's another tweak -
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include reflection/reflection.simba}
const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
DoSleep = false;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 30;
var
PathToGE: TTileArray;
PathToS: TTileArray;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
geslots: TIntegerArray;
thaslots: TPointArray;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
GeSlots := [0, 1, 2, 3, 4, 5];
ThaSlots := [Point(133, 154), Point(289, 154), Point(466, 154),
Point(132, 272), Point(289, 272), Point(444, 272)];
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
debug('Getting rune colours');
Disguise('Getting rune colours');
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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;
function toGe : TTileArray;
begin
SetLength(Result, 6);
Result := [
Tile(3208, 3427), Tile(3197, 3438), Tile (3186, 3450), Tile(3176, 3461), Tile(3164, 3463), Tile(3164, 3477),
Tile(3164, 3487)
];
end;
function tOStall : TTileArray;
begin
SetLength(Result, 2);
Result := [
Tile(3306, 3233), Tile(3308, 3219), tILE(3305, 3211)
];
end;
Procedure LoadPossibilities;
var
Tmp : Array of byte;
begin;
debug('LoadPossibilities');
Disguise('LoadPossibilities');
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 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;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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);
//ClickMouse(lol.x, lol.y, 1);
Lol := getNext(n3sWasHere, Lol);
Wait(random(10));
Until(Lol.x = 0);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
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);
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
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(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
repeat
MMouse(13, 13, 13, 13);
if SudokuMenu then
ClickMouse2(true);
wait(2000 + Random(2000));
until(not SudokuMenu);
Mouse(13, 13, 13, 13, true);//Closes Sudoku Menu
//Result := False;
LogOut;
Exit;
end;
end;
procedure LoadArrays;
begin
debug('LoadArrays');
Disguise('LoadArrays');
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' +
'Z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k20' +
'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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CWqq7sSpEuvDWfurX892' +
'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
debug('Solving Sudoku');
Disguise('Solving Sudoku');
UnSolvable := false;
//ClearReport;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
debug('Compiling Report');
Disguise('Compiling Report');
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('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
debug('function DoSudoku');
Disguise('function DoSudoku');
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
Disguise('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
p: TPoint;
m: TTile;
ali: TNPC;
begin
debug('TalkToAli');
Disguise('TalkToAli');
Result := FindNPC('Ali Morrisane', ali);
if Result then
begin
m := GetMe.Tile;
if (Distance(m.x, m.y, ali.Tile.x, ali.Tile.y) > 2) then
begin
WalkToTile(ali.tile, 0, 0);
while CharacterMoving do
wait(20);
end;
p := TileToMS(ali.tile, 12);
Mouse(p.x, p.y, 4, 4, true);
end;
Respond;
end;
procedure SellShit;
var
Clerk: TNPC;
I, time: Integer;
runes: TStringArray;
gx, gy, mx, my: Integer;
p: TPoint;
item: TInvItem;
Begin
runes := ['blood rune', 'death rune', 'chaos rune', 'soul rune', 'cosmic rune', 'nature rune', 'law rune'];
if not FindNPC('Grand Exchange clerk', Clerk) then
begin
writeln('couldnt find clerk');
terminatescript;
end;
p := TileToMS(Clerk.Tile, 20);
Mouse(p.x, p.y, 2, 2, false);
R_ChooseOption('Exchange G');
Wait(5000 + Random(3000));
for i := 0 to 5 do
begin
if not R_ItemNameExists(item, runes[i]) then
continue;
Mouse(thaslots[i].x, thaslots[i].y, 3, 3, true);
Wait(3000 + Random(2000));
If not R_ClickItemName(runes[i], true, 'Offer') then
continue;
writeln('hai');
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
while findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) do
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(2000 + Random(1000));
end;
Mouse(thaslots[0].x, thaslots[0].y, 3, 3, true);
Wait(3000 + Random(2000));
If R_ClickItemName(runes[6], true, 'Offer') then
begin
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
time := getsystemtime;
repeat
if findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(3000 + Random(2000));
time := getsystemtime;
end;
wait(random(100));
if getsystemtime - time > 60000 then
begin
mouse(mx + 2, my + 2, 2, 2, true);
Wait(3000 + Random(2000));
Mouse(362, 285, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(466, 298, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(415, 296, 6, 6, true);
Wait(3000 + Random(2000));
end;
until ((not findcolor(mx, my, 2502201, msx1, msy1, msx2, msy2)) and (
not findcolor(mx, my, 101318, msx1, msy1, msx2, msy2)));
R_ClickItemName('Ring of duelling', False, 'Rub');
Wait(4000 + Random(3000));
FindNPCChatText('Duel', ClickLeft);
Wait(4000 + Random(3000));
WalkPath(PathToS);
end;
function caput: boolean;
var
Item: TInvItem;
begin
if not R_ItemIDExists(item, 995) then
result := false
else
result := GetItemStackSizeAt(item.slot) < 50000 ;
end;
procedure rlytalktoali;
var
i: integer;
begin
repeat
if TalkToAli then
break;
wait(random(1000));
i := i + 1;
if (i > 20) then
begin
writeln('fuck ali');
terminatescript;
end;
until(false);
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
dummy: integer;
chattime: integer;
rout: boolean;
procedure handletalk;
begin
rlytalktoali;
chattime := getsystemtime;
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;
exit;
end;
if (getsystemtime - chattime > 50000) then
handletalk;
until(not(LoggedIn));
end;
begin
Smart_Members:= True;
Smart_Server := 56;
Smart_Signed := True;
SetupSRL;
ActivateClient;
DeclarePlayers;
MouseSpeed := 40;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
PathToGE := toge;
PathToS := ToStall;
repeat
debug(inttostr(GetMe.Level));
MakeCompass('N');
if caput then
begin
Report;
Writeln('GE');
R_ClickItemName('Varrock teleport', True, 'Break');
Wait(5000 + Random(3000));
MakeCompass('W');
WalkPath(PathToGe);
SellShit;
end;
if SudokuMenu then
DoSudoku;
handletalk;
if (not loggedin) then loginplayer;
if (TimeFromMark(FailTime) > 1200000) then
begin
writeln('failed');
debug('FailTime');
Disguise('FailTime');
TerminateScript;
end;
if (GetSystemTime > ReportTime) then
begin
Report;
debug('ReportTime');
Disguise('ReportTime');
end;
until false;
end.
Now I can't think of any reason it would stop at all since it does the G.E runs, it walks back to Ali if it clicks itself a few tiles away like it sometimes used to in the early days, also since we don't get any randoms, I replaced the terminate script on
not LoggedIn with log the fuck in if not loggedin. Not satisfied till I get this running 24/7 :D
marpis
2010-12-13 17:06:17
Looks like the runes barely sell in mid :-\ I refuse to sell under middle.
HyperSecret
2010-12-13 17:42:55
They have been selling at mid+ just fine for me. I offer at mid and for most runes I get above mid prices. Sometimes not instantly but definitely within 24 hours. Still makes over 1m/hr, so I don't mind.
n3ss3s
2010-12-13 19:19:33
Even faster detection on whether we are actually talking to ali or not.
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include reflection/reflection.simba}
const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
DoSleep = false;
SleepEvery = 3 * 60 * 60; //Minutes
SleepFor = 20 * 30;
var
PathToGE: TTileArray;
PathToS: TTileArray;
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;
ST, SF: Integer;
ColourArray: array [1..9] of integer;
geslots: TIntegerArray;
thaslots: TPointArray;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
GeSlots := [0, 1, 2, 3, 4, 5];
ThaSlots := [Point(133, 154), Point(289, 154), Point(466, 154),
Point(132, 272), Point(289, 272), Point(444, 272)];
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
debug('Getting rune colours');
Disguise('Getting rune colours');
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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;
function toGe : TTileArray;
begin
SetLength(Result, 6);
Result := [
Tile(3208, 3427), Tile(3197, 3438), Tile (3186, 3450), Tile(3176, 3461), Tile(3164, 3463), Tile(3164, 3477),
Tile(3164, 3487)
];
end;
function tOStall : TTileArray;
begin
SetLength(Result, 2);
Result := [
Tile(3306, 3233), Tile(3308, 3219), tILE(3305, 3211)
];
end;
Procedure LoadPossibilities;
var
Tmp : Array of byte;
begin;
debug('LoadPossibilities');
Disguise('LoadPossibilities');
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 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;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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);
//ClickMouse(lol.x, lol.y, 1);
Lol := getNext(n3sWasHere, Lol);
Wait(random(10));
Until(Lol.x = 0);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
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);
mousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
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(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
repeat
MMouse(13, 13, 13, 13);
if SudokuMenu then
ClickMouse2(true);
wait(2000 + Random(2000));
until(not SudokuMenu);
Mouse(13, 13, 13, 13, true);//Closes Sudoku Menu
//Result := False;
Exit;
end;
end;
procedure LoadArrays;
begin
debug('LoadArrays');
Disguise('LoadArrays');
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+Wy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NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech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yReZqRZcWCNjO1xTQ9ouXPysC8hYMvnaLGzbQwy457mktBvq6t' +
'gawV3zHqyNPba1sDRRcNewkUOlpcpEcE8yhtVMCi7bCkTwrM9/NxN' +
'k5v0zI7hsu3C/YSNfLCm5XlnJeBPL3YbbLtxtq8E9zoNfWBeKi8vL' +
'ysjcwzdRyC0h83ovZzXseXeT+dXycmJnzhvDYYkWWCG7BeDGDMBKW' +
'h/FTjjwEfmrCnzrQj5WA/gBytNqLn6wcp79Bwmw8AM=');
OwnArr[5] := Point(20, 250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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
debug('Solving Sudoku');
Disguise('Solving Sudoku');
UnSolvable := false;
//ClearReport;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
debug('Compiling Report');
Disguise('Compiling Report');
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('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
debug('function DoSudoku');
Disguise('function DoSudoku');
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
Disguise('Solved: '+inttostr(Solved)+' Sudokus');
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
p: TPoint;
m: TTile;
ali: TNPC;
begin
debug('TalkToAli');
Disguise('TalkToAli');
Result := FindNPC('Ali Morrisane', ali);
if Result then
begin
m := GetMe.Tile;
if (Distance(m.x, m.y, ali.Tile.x, ali.Tile.y) > 2) then
begin
WalkToTile(ali.tile, 0, 0);
while CharacterMoving do
wait(20);
end;
p := TileToMS(ali.tile, 12);
Mouse(p.x, p.y, 4, 4, true);
Result := DidClick(True, 500);
end;
Respond;
end;
procedure SellShit;
var
Clerk: TNPC;
I, time: Integer;
runes: TStringArray;
gx, gy, mx, my: Integer;
p: TPoint;
item: TInvItem;
Begin
runes := ['blood rune', 'death rune', 'chaos rune', 'soul rune', 'cosmic rune', 'nature rune', 'law rune'];
if not FindNPC('Grand Exchange clerk', Clerk) then
begin
writeln('couldnt find clerk');
terminatescript;
end;
p := TileToMS(Clerk.Tile, 20);
Mouse(p.x, p.y, 2, 2, false);
R_ChooseOption('Exchange G');
Wait(5000 + Random(3000));
for i := 0 to 5 do
begin
if not R_ItemNameExists(item, runes[i]) then
continue;
Mouse(thaslots[i].x, thaslots[i].y, 3, 3, true);
Wait(3000 + Random(2000));
If not R_ClickItemName(runes[i], true, 'Offer') then
continue;
writeln('hai');
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
while findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) do
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(2000 + Random(1000));
end;
Mouse(thaslots[0].x, thaslots[0].y, 3, 3, true);
Wait(3000 + Random(2000));
If R_ClickItemName(runes[6], true, 'Offer') then
begin
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
time := getsystemtime;
repeat
if findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(3000 + Random(2000));
time := getsystemtime;
end;
wait(random(100));
if getsystemtime - time > 60000 then
begin
mouse(mx + 2, my + 2, 2, 2, true);
Wait(3000 + Random(2000));
Mouse(362, 285, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(466, 298, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(415, 296, 6, 6, true);
Wait(3000 + Random(2000));
end;
until ((not findcolor(mx, my, 2502201, msx1, msy1, msx2, msy2)) and (
not findcolor(mx, my, 101318, msx1, msy1, msx2, msy2)));
R_ClickItemName('Ring of duelling', False, 'Rub');
Wait(4000 + Random(3000));
FindNPCChatText('Duel', ClickLeft);
Wait(4000 + Random(3000));
WalkPath(PathToS);
end;
function caput: boolean;
var
Item: TInvItem;
begin
if not R_ItemIDExists(item, 995) then
result := false
else
result := GetItemStackSizeAt(item.slot) < 50000 ;
end;
procedure rlytalktoali;
var
i: integer;
begin
repeat
if TalkToAli then
break;
wait(random(1000));
i := i + 1;
if (i > 20) then
begin
writeln('fuck ali');
terminatescript;
end;
until(false);
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
dummy: integer;
chattime: integer;
rout: boolean;
procedure handletalk;
begin
rlytalktoali;
chattime := getsystemtime;
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;
exit;
end;
if (getsystemtime - chattime > 50000) then
handletalk;
until(not(LoggedIn));
end;
begin
Smart_Members:= True;
Smart_Server := 56;
Smart_Signed := True;
SetupSRL;
ActivateClient;
DeclarePlayers;
MouseSpeed := 40;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
PathToGE := toge;
PathToS := ToStall;
repeat
debug(inttostr(GetMe.Level));
MakeCompass('N');
if caput then
begin
Report;
Writeln('GE');
R_ClickItemName('Varrock teleport', True, 'Break');
Wait(5000 + Random(3000));
MakeCompass('W');
WalkPath(PathToGe);
SellShit;
end;
if SudokuMenu then
DoSudoku;
handletalk;
if (not loggedin) then loginplayer;
if (TimeFromMark(FailTime) > 1200000) then
begin
writeln('failed');
debug('FailTime');
Disguise('FailTime');
TerminateScript;
end;
if (GetSystemTime > ReportTime) then
begin
Report;
debug('ReportTime');
Disguise('ReportTime');
end;
until false;
end.
Feel free to work on the GE routine, it's very shit and relies on you having it completely empty.
Quick note Cosmics sold instantly on max and Deaths sold in minutes on Max. Thought I'd share that Information. :p 9m/40m Liking the Profits still.
~BraK
E: more Notes sold Souls, Chaos, and Blood on max over night.
Smartzkid
2010-12-14 13:41:49
Note that RSBot is still down from the recent update.
n3ss3s
2010-12-16 15:13:25
Sudoku Solver 8h:28m:46s
Solved: 1279 | SpH: 151
Made some money there :D Not sure why it stopped as I was sleeping, could have simply disconnected…
marpis
2010-12-16 18:37:24
From: n3ss3s
Sudoku Solver 8h:28m:46s
Solved: 1279 | SpH: 151
Made some money there :D Not sure why it stopped as I was sleeping, could have simply disconnected…
Nice :D For some reason I can't get longer than ~1hr 40min proggies…
Think my longest is a little over 2 Hours. I'm currently using 120m, used about 70m so far. I want to see how much cash I'll get off it.
~BraK
YoHoJo
2010-12-17 01:28:49
I have a F2P account with about 13M(?) from what I remember and maybe about 20M of items (don't think I want to sell them all though).
If anyone want's to member the account and use the script on it (carefully!) and just use it to do fun runescape member stuff I guess they can.
n3ss3s
2010-12-17 15:19:12
Sudoku Solver 17h:29m:3s
Solved: 2049 | SpH: 117
SOLID.
(Started from 11m, so that includes a few GE trips as now its like closer to 30m…)
Markus
2010-12-17 17:42:03
n3ss3s please tell me you got some kind of sleeper in it.
Smartzkid
2010-12-17 18:18:48
N3ss3s, gonna get yo ass banned!
n3ss3s
2010-12-17 19:58:00
From: Markus
n3ss3s please tell me you got some kind of sleeper in it.
Fuck that I sleep so that the bot doesn't have to
on a side note anyone got use for 500k minds (+40k cosmics atm)
The Claw
2010-12-19 03:06:28
Lol n3s. Just wondering since this is still being used at other communities, it might not do much harm if the updated version with GE is posted on public boards here? The thread still gets some attention, it could be used a bit.
n3ss3s
2010-12-19 14:29:11
From: The Claw
Lol n3s. Just wondering since this is still being used at other communities, it might not do much harm if the updated version with GE is posted on public boards here? The thread still gets some attention, it could be used a bit.
The G.E is too shitty and simple, doesn't really give an image of us as good scripters… Also doesn't work if all of your slots aren't empty. Also, the scripts at other communities do NOT go to G.E, and as it's pretty easy to do when someone gets the idea at RSBot it's done for good… Now it's atleast being braked a bit as people leave it overnight with like 4m so they're done with that after like an hour…
The Claw
2010-12-22 23:11:52
Think I figured out why it stops sometimes, if you lose connection while doing the sudoku the mouse fucks up and sudoku screen can dissapear/close, when the mouse clicks again (thinking its in Sudoku) it moves the char away from Ali and script stops. Its weird but you can get a loading screen while doing sudoku…maybe cause I'm on unsigned. Either way seems pretty unusual/rare.
Fair enough n3ss3s, I changed my mind about that since hearing about the wildy vote anyway :p. Rune market could make a good comeback with that update
BTW guys…Sudoku Army? :sasmokin: Say, 5 accounts, 2m/hour on each, 10m/hour, thats ~100m/day, sell the mills $2 each…we could all make a lot of money really easily if this update goes through lol….thanks Jagex
marpis
2010-12-23 04:17:52
From: The Claw
Think I figured out why it stops sometimes, if you lose connection while doing the sudoku the mouse fucks up and sudoku screen can dissapear/close, when the mouse clicks again (thinking its in Sudoku) it moves the char away from Ali and script stops. Its weird but you can get a loading screen while doing sudoku…maybe cause I'm on unsigned. Either way seems pretty unusual/rare.
Fair enough n3ss3s, I changed my mind about that since hearing about the wildy vote anyway :p. Rune market could make a good comeback with that update
BTW guys…Sudoku Army? :sasmokin: Say, 5 accounts, 2m/hour on each, 10m/hour, thats ~100m/day, sell the mills $2 each…we could all make a lot of money really easily if this update goes through lol….thanks Jagex
If the update goes through, it will be more like $0,10 per mill or even less…
n3ss3s
2010-12-23 12:42:13
Nah the price of gp won't plummet because the demand will be on monstrous rise aswell…
Markus
2010-12-23 14:58:57
Mills only got cheaper after the update, as there will be less GE there will be a more balanced economy with hopefully less inflation.
n3ss3s
2010-12-24 23:11:08

wat
Smartzkid
2010-12-25 01:22:20
Wow, nice! So what's a mill worth nowadays?
n3ss3s
2010-12-25 03:20:17
about 1.5 dollarz
The Claw
2010-12-25 03:44:34
But hopefully that will rise, as with this update there will be no more items leaving the game through pking, they get transferred to the person who got the kill = more whips and armour staying in the game = the price for those decreases = 1m gp "value" increases = the price IRL increases. Opposite to inflation where prices keep rising, making the "value" of 1m "less" making them cheaper IRL.
But then again there are a lot of variables lol.
n3ss3s
2010-12-25 11:54:50
Elevated to godhood,

Time for RuneScape ;)
marpis
2010-12-26 08:06:26
Spent 1M in 10 minutes @ 157 sph, got runes worth of 1,18M
-> 1M profit per hour, spending 6M per hour :)
HyperSecret
2010-12-26 09:27:06
Hmm, you're still getting that? My SPH is roughly around 90-100, I guess I's got a slow version :p or shit connection
EDIT: Got the newest one that n3ss3s posted, and yea I definitely had a slower version.
ZephyrsFury
2010-12-26 12:52:15
Reduce the waits in Mouse, it'll go even faster.
n3ss3s
2010-12-26 14:47:44
From: ZephyrsFury
Reduce the waits in Mouse, it'll go even faster.
That's mentioned in the first post, silly ;)
lordsaturn
2010-12-26 15:02:57
Would someone be willing to lend me an account? I'd like to try to optimize this…
marpis
2010-12-26 16:12:58
From: lordsaturn
Would someone be willing to lend me an account? I'd like to try to optimize this…
Well… There's nothing to optimize really. I believe it's n3ss3s who already made it sort the TPA from the mousepos, so it always clicks the closest rune slot.
This is the version I'm using, solves sudoku in 5-9 seconds and sells at GE.
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include reflection/reflection.simba}
const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
DoSleep = true;
SleepEvery = 1200000; //Minutes
SleepFor = 12;
var
PathToGE: TTileArray;
PathToS: TTileArray;
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;
ST, SF, TimesInGE: Integer;
ColourArray: array [1..9] of integer;
geslots: TIntegerArray;
thaslots: TPointArray;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SMART_SERVER := 149;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
GeSlots := [0, 1, 2, 3, 4, 5];
ThaSlots := [Point(133, 154), Point(289, 154), Point(466, 154),
Point(132, 272), Point(289, 272), Point(444, 272)];
end;
procedure SudoMouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
a,b,c : integer;
begin
MMouse(mousex, mousey, ranx, rany);
Wait(2 + Random(4));
GetMousePos(b, c);
HoldMouse(b, c, mouseaction(left));
repeat
Wait(5 + Random(10));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, mouseaction(left));
Wait(2+Random(4));
end;
procedure SudoMouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
begin
case ClickType of
1 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, True);
2 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, False);
3 : MMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0);
else
srl_Warn('SudoMouseBox', 'ClickType is NOT a valid number!', warn_AllVersions);
end;
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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;
function toGe : TTileArray;
begin
SetLength(Result, 6);
Result := [
Tile(3208, 3427), Tile(3197, 3438), Tile (3186, 3450), Tile(3176, 3461), Tile(3164, 3463), Tile(3164, 3477),
Tile(3164, 3487)
];
end;
function tOStall : TTileArray;
begin
SetLength(Result, 2);
Result := [
Tile(3306, 3233), Tile(3308, 3219), tILE(3305, 3211)
];
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 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, i : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
end;
for z := 0 to 8 do
begin
SetArrayLength(n3sWasHere, 0);
CurrentRune := RandomArr[z];
SudoMouse(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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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
//SudoMouse(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
SudoMouse(Lol.x, Lol.y, 0, 0, True);
Lol := getNext(n3sWasHere, Lol);
Until(Lol.x = 0);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
if(GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 498170) or (GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 114921)then
try
SudoMouseBox(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);
SudoMousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
CanExit:= False;
except
end;
until(CanExit) or (not(LoggedIn))
writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
SudoMouseBox(14, 61, 89, 78, 1);
Result := true;
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
SudoMouse(13, 13, 13, 13, true);//Closes Sudoku Menu
//Result := False;
LogOut;
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/sxMR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9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpm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' +
'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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc236MtLY9jMZHHBp6PD75AmFc' +
'VP1ayG8E8nSUZRl1wI0eamzuj0WddXcN9T4EjYqEEEuTP8bErg5OV' +
'4iIcJUPsP3Z3BefzflNTRyTS1/mIqBGtpATyYy9fOoNcuHUEOM4Vi' +
'zLh815jY3tbG2SEc2JBdlbAXGRrN7GQObbJxMh3btXHWltpYm/HQy' +
'R+nmT1GjKZEzjdZFSMXH+jVlHTR/gq4ZL9sl9ptMiaFtKmlUa+WV1' +
'NIESNjO8nny0sRB4yU8T8EIjmnA1iPY1cVXFFgZC2y3fJLtaFMz/Y' +
'hmzrSR+NXBEKEQhTjYwPPFcgdt3mH7I9GwnE9oUvtVXXsE3aJ8Lti' +
'oaTyReZqRZcWCNjO1xTQ9ouXPysC8hYMvnaLGzbQwy457mkt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1ObMhMULGFNbJic' +
'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;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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)
writeln('');
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));
Writeln('Sold thru GE: '+inttostr(TimesInGE));
SendSRLReport;
writeln('');
ReportTime := GetSystemTime + 30000;
end;
procedure ScriptTerminate;
var
i: integer;
begin
for i := 1 to 9 do
FreeBitmap(DTM[i]);
Disguise('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
p: TPoint;
m: TTile;
ali: TNPC;
begin
Result := FindNPC('Ali Morrisane', ali);
if Result then
begin
m := GetMe.Tile;
if (Distance(m.x, m.y, ali.Tile.x, ali.Tile.y) > 2) then
begin
WalkToTile(ali.tile, 0, 0);
while CharacterMoving do
wait(20);
end;
p := TileToMS(ali.tile, 12);
Mouse(p.x, p.y, 4, 4, true);
Result := DidClick(True, 500);
end;
Respond;
end;
procedure SellShit;
var
Clerk: TNPC;
I, time: Integer;
runes: TStringArray;
gx, gy, mx, my: Integer;
p: TPoint;
item: TInvItem;
Begin
Inc(TimesInGE);
runes := ['blood rune', 'death rune', 'chaos rune', 'soul rune', 'cosmic rune', 'nature rune', 'law rune'];
if not FindNPC('Grand Exchange clerk', Clerk) then
begin
writeln('couldnt find clerk');
terminatescript;
end;
p := TileToMS(Clerk.Tile, 20);
Mouse(p.x, p.y, 2, 2, false);
R_ChooseOption('Exchange G');
Wait(5000 + Random(3000));
for i := 0 to 5 do
begin
if not R_ItemNameExists(item, runes[i]) then
continue;
Mouse(thaslots[i].x, thaslots[i].y, 3, 3, true);
Wait(3000 + Random(2000));
If not R_ClickItemName(runes[i], true, 'Offer') then
continue;
writeln('hai');
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
while findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) do
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(2000 + Random(1000));
end;
Mouse(thaslots[0].x, thaslots[0].y, 3, 3, true);
Wait(3000 + Random(2000));
If R_ClickItemName(runes[6], true, 'Offer') then
begin
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
time := getsystemtime;
repeat
if findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(3000 + Random(2000));
time := getsystemtime;
end;
wait(random(100));
if getsystemtime - time > 60000 then
begin
mouse(mx + 2, my + 2, 2, 2, true);
Wait(3000 + Random(2000));
Mouse(362, 285, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(466, 298, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(415, 296, 6, 6, true);
Wait(3000 + Random(2000));
end;
until ((not findcolor(mx, my, 2502201, msx1, msy1, msx2, msy2)) and (
not findcolor(mx, my, 101318, msx1, msy1, msx2, msy2)));
R_ClickItemName('Ring of duelling', False, 'Rub');
Wait(4000 + Random(3000));
FindNPCChatText('Duel', ClickLeft);
Wait(4000 + Random(3000));
WalkPath(PathToS);
end;
function caput: boolean;
var
Item: TInvItem;
begin
if not R_ItemIDExists(item, 995) then
result := false
else
result := GetItemStackSizeAt(item.slot) < 50000 ;
end;
procedure rlytalktoali;
var
i: integer;
begin
repeat
if TalkToAli then
break;
wait(random(1000));
i := i + 1;
if (i > 20) then
begin
writeln('fuck ali');
terminatescript;
end;
until(false);
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
dummy: integer;
chattime: integer;
rout: boolean;
procedure handletalk;
begin
rlytalktoali;
chattime := getsystemtime;
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;
exit;
end;
if (getsystemtime - chattime > 50000) then
handletalk;
until(not(LoggedIn));
end;
begin
Smart_Members:= True;
Smart_Signed := True;
ActivateClient;
DeclarePlayers;
SetupSRL;
MouseSpeed := 40;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
PathToGE := toge;
PathToS := ToStall;
repeat
debug(inttostr(GetMe.Level));
MakeCompass('N');
if caput then
begin
Report;
Writeln('GE');
R_ClickItemName('Varrock teleport', True, 'Break');
Wait(5000 + Random(3000));
MakeCompass('W');
WalkPath(PathToGe);
SellShit;
end;
if SudokuMenu then
DoSudoku;
handletalk;
if (not loggedin) then loginplayer;
if (TimeFromMark(FailTime) > 1200000) then
begin
writeln('failed');
debug('FailTime');
Disguise('FailTime');
TerminateScript;
end;
Report;
until false;
end.
lordsaturn
2010-12-26 17:04:28
From: marpis
Well… There's nothing to optimize really. I believe it's n3ss3s who already made it sort the TPA from the mousepos, so it always clicks the closest rune slot.
you're right. i saw the bitmaps and thought sudoku finding/solving could be improved by implementing interfaces.
Smartzkid
2010-12-26 18:03:08
Okay, so at $1.50 an hour, you could run 8 accounts on this and earn a pretty reasonable wage.
Sorry for asking, but what quests/etc are required for this?
lordsaturn
2010-12-26 21:42:14
From: Smartzkid
Okay, so at $1.50 an hour, you could run 8 accounts on this and earn a pretty reasonable wage.
Sorry for asking, but what quests/etc are required for this?
Not a guaranteed $1.50 though. And it might be more work maintaining the accounts than it is cut out for.
The Claw
2010-12-27 02:59:21
ITT: Everyone tries to discourage everyone else from making a GP business off this script, so that they themselves can go and do the same thing. :p
lordsaturn
2010-12-27 03:15:02
From: The Claw
ITT: Everyone tries to discourage everyone else from making a GP business off this script, so that they themselves can go and do the same thing. :p
Just stating the reasons why I never made tried to make any money off GP business D:
marpis
2010-12-27 03:27:10
You'll only have business if you have an xfer method :-\
The Claw
2010-12-27 03:44:36
From: marpis
You'll only have business if you have an xfer method :-\
You living in a cave, bro?
http://www.runescape.com/wilderness
n3ss3s
2010-12-27 13:26:05
From: The Claw
You living in a cave, bro?
http://www.runescape.com/wilderness
in,
A CAVE,
BRO?
HyperSecret
2010-12-27 13:57:04
From: Smartzkid
Sorry for asking, but what quests/etc are required for this?
The Feud
marpis
2010-12-27 14:38:40
From: The Claw
You living in a cave, bro?
http://www.runescape.com/wilderness
Oh I know that, I meant before the update, that I think will most likely never come :P
It's only under 500k votes and there are quite a lot of "No" and "NVM"
HyperSecret
2010-12-27 16:14:53
I can't get this to go to the GE when it is done with the money
n3ss3s
2010-12-27 17:14:24
From: HyperSecret
I can't get this to go to the GE when it is done with the money
Do u have varrock tabs with u? also need duel rings in inv, not equiped
procedure LoadPlayGround;
var
runeids: TIntegerArray;
x, y, z, i: integer;
begin
runeids := [8982, 8980, 8979, 8981, 8987, 8976, 8977, 8978, 8975];
SetLength(playground, 9);
for i := 0 to 8 do
SetLength(playground[i], 9);
for x := 0 to 8 do
for y := 0 to 8 do
begin
i := (11 + y * 2 + x * 18);
for z := 0 to 8 do
if GetModelID(288, i) = runeids[z] then
begin
playground[x][y] := z+1;
break;
end;
end;
end;
ill just leave this here
saves about 2 sec
HyperSecret
2010-12-27 19:47:33
From: marpis
Oh I know that, I meant before the update, that I think will most likely never come :P
It's only under 500k votes and there are quite a lot of "No" and "NVM"
Quite a lot :p, 512k votes, 8% no => ~40k votes. 90% yes, i think it will go through.
Naike
2010-12-27 20:42:45
Guys… I can't sudoku on unsigned!
lordsaturn
2010-12-27 21:39:39
SRL doesn't support unsigned client ATM. because unsigned client doesn't load in 'fixed' mode (screen size). it loads in 'resizable' mode.
n3ss3s
2010-12-27 21:49:08
signed doesn't really hurt you unless you want to multi log…
The Claw
2010-12-27 22:59:05
To auto unsigned: Do everything normally, except you have to manually log in and change the graphics settings.
From: The Claw
To auto unsigned: Do everything normally, except you have to manually log in and change the graphics settings.
^This. It's what I do. I'm sitting around 130m Now. Haven't run the script in a few weeks due to my vacation.
~BraK
n3ss3s
2010-12-29 01:36:35
Going to a waterpark (It is Wednesday, 1:32 a.m. right now), going to return on Thursday. I am attempting a 36-48 hour run, starting with a 52m cash pile. Looking to come back to more than 100m :D
ZephyrsFury
2010-12-29 02:14:44
From: n3ss3s
Going to a waterpark (It is Wednesday, 1:32 a.m. right now), going to return on Thursday. I am attempting a 36-48 hour run, starting with a 52m cash pile. Looking to come back to more than 100m :D
… and you come back on Thursday only to find the script failed after 15 mins :(
HyperSecret
2010-12-29 02:25:07
From: ZephyrsFury
… and you come back on Thursday only to find the script failed after 15 mins :(
lmfao, exactly the thing that came to my mind.
n3ss3s
2010-12-29 09:38:16
It's wednesday morning 9:38 kids, running liek nuthin
HyperSecret
2010-12-29 12:32:17
Why are they selling at LOW with this script (marpis version)?!?! cmon, don't fuck rune prices.
marpis
2010-12-29 15:35:22
From: HyperSecret
Why are they selling at LOW with this script (marpis version)?!?! cmon, don't fuck rune prices.
The GE part is from n3ss3s, it's so that you can start with like 5M and keep on running, so they sell instantly.
I use the GE script half of time and do half without GE and then sell for mid+
Smartzkid
2010-12-29 21:29:34
Perhaps sell half for min, half for mid? It will take one round to get going, but once it's got some being actively sold, you'll be able to make more money, support rune prices, and still run nonstop.
HyperSecret
2010-12-29 21:43:40
From: Smartzkid
Perhaps sell half for min, half for mid? It will take one round to get going, but once it's got some being actively sold, you'll be able to make more money, support rune prices, and still run nonstop.
I am thinking of working on a mid->lowest GE procedure, offer each at mid, if they don't sell, then sell @ lowest.
n3ss3s
2010-12-30 18:42:33
That's why I said the GE procedure is crappy, it has to be able to sell the bloods in like 30 sec or it'll fail, it doesn't really think that much…
EDIT: also script stopped at 12h :( Supposedly didn't find ali, o well still free money… Saw lots of fake titties in waterpark :D
Markus
2011-01-02 15:37:03
Got my main back (guy I sold to didn't play anymore and even forgot the pass, he left me 25 days of members though). Time to see how much this has improved over time! :)
Edit: OMG marpis version lagged like fuck, just add wait(50); in ali talk loop fixed it:
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include reflection/reflection.simba}
const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
DoSleep = true;
SleepEvery = 1200000; //Minutes
SleepFor = 12;
var
PathToGE: TTileArray;
PathToS: TTileArray;
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;
ST, SF, TimesInGE: Integer;
ColourArray: array [1..9] of integer;
geslots: TIntegerArray;
thaslots: TPointArray;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SMART_SERVER := 149;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'arko';
Players[0].Active := true;
GeSlots := [0, 1, 2, 3, 4, 5];
ThaSlots := [Point(133, 154), Point(289, 154), Point(466, 154),
Point(132, 272), Point(289, 272), Point(444, 272)];
end;
procedure SudoMouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
a,b,c : integer;
begin
MMouse(mousex, mousey, ranx, rany);
Wait(2 + Random(4));
GetMousePos(b, c);
HoldMouse(b, c, mouseaction(left));
repeat
Wait(5 + Random(10));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, mouseaction(left));
Wait(2+Random(4));
end;
procedure SudoMouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
begin
case ClickType of
1 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, True);
2 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, False);
3 : MMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0);
else
srl_Warn('SudoMouseBox', 'ClickType is NOT a valid number!', warn_AllVersions);
end;
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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;
function toGe : TTileArray;
begin
SetLength(Result, 6);
Result := [
Tile(3208, 3427), Tile(3197, 3438), Tile (3186, 3450), Tile(3176, 3461), Tile(3164, 3463), Tile(3164, 3477),
Tile(3164, 3487)
];
end;
function tOStall : TTileArray;
begin
SetLength(Result, 2);
Result := [
Tile(3306, 3233), Tile(3308, 3219), tILE(3305, 3211)
];
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 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, i : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
end;
for z := 0 to 8 do
begin
SetArrayLength(n3sWasHere, 0);
CurrentRune := RandomArr[z];
SudoMouse(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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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
//SudoMouse(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
SudoMouse(Lol.x, Lol.y, 0, 0, True);
Lol := getNext(n3sWasHere, Lol);
Until(Lol.x = 0);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
if(GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 498170) or (GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 114921)then
try
SudoMouseBox(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);
SudoMousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
CanExit:= False;
except
end;
until(CanExit) or (not(LoggedIn))
writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
SudoMouseBox(14, 61, 89, 78, 1);
Result := true;
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
SudoMouse(13, 13, 13, 13, true);//Closes Sudoku Menu
//Result := False;
LogOut;
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+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3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv6USidV38xtLi1upFHBqA6c5fKL' +
'yLvx3Ph8M56+JiYmF6Wm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' +
'+sfDzc2jnc/lYvFkb+/0YP/s6+H3b0c/T47/g68l2+9Xi2sfdguFg' +
'41Ppe0twY93v8A3+K+z0xr5ei2fza6/W9xaWd7J54FjGzjO4SOZd+' +
'G/K5VwOP/NTk0tZTIibywvYVtwnCOVCISz9kp9fTVsJp02ciGXk20' +
'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' +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8AM=');
OwnArr[5] := Point(20, 250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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)
writeln('');
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));
Writeln('Sold thru GE: '+inttostr(TimesInGE));
SendSRLReport;
writeln('');
ReportTime := GetSystemTime + 30000;
end;
procedure ScriptTerminate;
var
i: integer;
begin
for i := 1 to 9 do
FreeBitmap(DTM[i]);
Disguise('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
p: TPoint;
m: TTile;
ali: TNPC;
begin
Result := FindNPC('Ali Morrisane', ali);
if Result then
begin
m := GetMe.Tile;
if (Distance(m.x, m.y, ali.Tile.x, ali.Tile.y) > 2) then
begin
WalkToTile(ali.tile, 0, 0);
while CharacterMoving do
wait(20);
end;
p := TileToMS(ali.tile, 12);
Mouse(p.x, p.y, 4, 4, true);
Result := DidClick(True, 500);
end;
Respond;
end;
procedure SellShit;
var
Clerk: TNPC;
I, time: Integer;
runes: TStringArray;
gx, gy, mx, my: Integer;
p: TPoint;
item: TInvItem;
Begin
Inc(TimesInGE);
runes := ['blood rune', 'death rune', 'chaos rune', 'soul rune', 'cosmic rune', 'nature rune', 'law rune'];
if not FindNPC('Grand Exchange clerk', Clerk) then
begin
writeln('couldnt find clerk');
terminatescript;
end;
p := TileToMS(Clerk.Tile, 20);
Mouse(p.x, p.y, 2, 2, false);
R_ChooseOption('Exchange G');
Wait(5000 + Random(3000));
for i := 0 to 5 do
begin
if not R_ItemNameExists(item, runes[i]) then
continue;
Mouse(thaslots[i].x, thaslots[i].y, 3, 3, true);
Wait(3000 + Random(2000));
If not R_ClickItemName(runes[i], true, 'Offer') then
continue;
writeln('hai');
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
while findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) do
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(2000 + Random(1000));
end;
Mouse(thaslots[0].x, thaslots[0].y, 3, 3, true);
Wait(3000 + Random(2000));
If R_ClickItemName(runes[6], true, 'Offer') then
begin
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
time := getsystemtime;
repeat
if findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(3000 + Random(2000));
time := getsystemtime;
end;
wait(random(100));
if getsystemtime - time > 60000 then
begin
mouse(mx + 2, my + 2, 2, 2, true);
Wait(3000 + Random(2000));
Mouse(362, 285, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(466, 298, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(415, 296, 6, 6, true);
Wait(3000 + Random(2000));
end;
until ((not findcolor(mx, my, 2502201, msx1, msy1, msx2, msy2)) and (
not findcolor(mx, my, 101318, msx1, msy1, msx2, msy2)));
R_ClickItemName('Ring of duelling', False, 'Rub');
Wait(4000 + Random(3000));
FindNPCChatText('Duel', ClickLeft);
Wait(4000 + Random(3000));
WalkPath(PathToS);
end;
function caput: boolean;
var
Item: TInvItem;
begin
if not R_ItemIDExists(item, 995) then
result := false
else
result := GetItemStackSizeAt(item.slot) < 50000 ;
end;
procedure rlytalktoali;
var
i: integer;
begin
repeat
if TalkToAli then
break;
wait(random(1000));
i := i + 1;
if (i > 20) then
begin
writeln('fuck ali');
terminatescript;
end;
until(false);
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
dummy: integer;
chattime: integer;
rout: boolean;
procedure handletalk;
begin
rlytalktoali;
chattime := getsystemtime;
repeat
wait(50);
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;
exit;
end;
if (getsystemtime - chattime > 50000) then
handletalk;
until(not(LoggedIn));
end;
begin
Smart_Members:= True;
Smart_Signed := True;
ActivateClient;
DeclarePlayers;
SetupSRL;
MouseSpeed := 40;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
PathToGE := toge;
PathToS := ToStall;
repeat
debug(inttostr(GetMe.Level));
MakeCompass('N');
if caput then
begin
Report;
Writeln('GE');
R_ClickItemName('Varrock teleport', True, 'Break');
Wait(5000 + Random(3000));
MakeCompass('W');
WalkPath(PathToGe);
SellShit;
end;
if SudokuMenu then
DoSudoku;
handletalk;
if (not loggedin) then loginplayer;
if (TimeFromMark(FailTime) > 1200000) then
begin
writeln('failed');
debug('FailTime');
Disguise('FailTime');
TerminateScript;
end;
Report;
until false;
end.
Edit2: roflroflrofl, windows thinks my quadcore only got 1 core :(
n3ss3s
2011-01-02 21:17:36
Edit: OMG marpis version lagged like fuck, just add wait(50); in ali talk loop fixed it:
shit c0mpudr m8
Markus
2011-01-03 09:41:58
No way just a fucking quadcore (which windows detected as singlecore roflrofl). Oh well right now I AM autoing at a shitty laptop but it works.
The Claw
2011-01-03 10:02:36
Anyone here called "FURRY FANDOM"? He just ran past and said "Sudoku :)" then "bots >.<" lol
HyperSecret
2011-01-03 10:05:28
From: The Claw
Anyone here called "FURRY FANDOM"? He just ran past and said "Sudoku :)" then "bots >.<" lol
Not me BUT
I believe I found Nielsie the other day ;)
Markus
2011-01-03 10:39:45
Does Nielsie even have members? lol.
Oh well stupid bots @ sudoku,
marpis
2011-01-06 16:05:40
Yee, I've found my interest towards RS again thanks to this script being profitable again :)
I now have Bandos chest and Tassets, whip, some other crap worth ~10M and 40M cash! I've made around 80M in a couple of weeks!
I even took the time to get the new dragon defender.
_ChArMz
2011-01-11 01:46:43
has this been completely raped now?
I just solved 104 sodokus and only made ~300k….
sad..
marpis
2011-01-11 05:17:37
From: _ChArMz
has this been completely raped now?
I just solved 104 sodokus and only made ~300k….
sad..
Damn is it down again :( crap… Well, at least I have around 100M now.
I'm sitting with a little over 140M truly I was switching between this and my Herblore script. Mentioning Marpis how is your script coming along. Yours is more of a money making script than mine. Mine is more along the lines of AIO. Well it's getting there, I got the fire to work on it again. so I'll probably post some updates that it's been needing.
~BraK
HyperSecret
2011-01-11 09:37:28
I believe this is slower again. I seem to see more people when walking by there now than I had when we first started this back up. I guess just have to wait for it to get quiet again.
marpis
2011-01-11 09:47:46
From: BraK
I'm sitting with a little over 140M truly I was switching between this and my Herblore script. Mentioning Marpis how is your script coming along. Yours is more of a money making script than mine. Mine is more along the lines of AIO. Well it's getting there, I got the fire to work on it again. so I'll probably post some updates that it's been needing.
~BraK
I actually stopped working on it, and now that I don't need much more money I don't think I will continue writing it.
I'll probably write a barbarian agility runner within a couple of weeks, and when I need money again I'll see what I will write. Besides, the upcoming free trade can crash many money makers, like herblore. I don't want to spend days of scripting just to find it nerfed immediately.
True I was half doing mine for money but mainly to get free herblore XP. My script justing making unfinished potions got me from 10m @ lvl 60 to 80m @ lvl 83.
~BraK
Markus
2011-01-12 11:09:34
Just fyi with the drop of rune prices, enchanting bolts became profitable, too. Decent mage xp + profit pl0x? :p
Wanted
2011-01-12 14:34:34
Anyone think this will be viable once again with the new trading system?
marpis
2011-01-12 18:39:45
From: IceFire908
Anyone think this will be viable once again with the new trading system?
Impossible to know how the prices will turn out.
HyperSecret
2011-01-12 19:55:06
From: IceFire908
Anyone think this will be viable once again with the new trading system?
The GE will still be around, and I would think people will still just put up offers on there to get things in bulk and save time.
We can pretty much set our own gp/hr rate by selling @ a certain prices and waiting it out.
n3ss3s
2011-01-12 21:22:59
From: HyperSecret
The GE will still be around, and I would think people will still just put up offers on there to get things in bulk and save time.
We can pretty much set our own gp/hr rate by selling @ a certain prices and waiting it out.
I think in the "What things are true" thread that was made by a forum mod on the official rs forums, they said they will still have a recommended price to guide clueless ppl, so yea I think we can pretty much do souls 400 ea bloods 400 ea deaths 300 ea nats 300 ea cosmics 200 ea laws 300 ea chaos 150 ea…
From: n3ss3s
I think in the "What things are true" thread that was made by a forum mod on the official rs forums, they said they will still have a recommended price to guide clueless ppl, so yea I think we can pretty much do souls 400 ea bloods 400 ea deaths 300 ea nats 300 ea cosmics 200 ea laws 300 ea chaos 150 ea…
IIRC they are just removing the min/max trade values, but everything else will remain basically the same. I could easily be wrong though.
Wanted
2011-01-12 21:39:00
I suspect prices in general will rise and have more of a merchantable flexibility (like the good old days) where bulk and convenience directly factor into the price of all things. This method may be one of the first they have to kill after the upcoming market unbalance.
n3ss3s
2011-01-12 21:44:06
IIRC they are just removing the min/max trade values, but everything else will remain basically the same. I could easily be wrong though.
Which will mean if u want runes u pay moar :D
Assume cap for a rune is 200-300. Someone is selling runes for 251 ea. Someone tries to buy for 250, not getting them, someone buys for 251 and is getting them. If both buy for 300 ea, it depends on who got there first. Well, with removal of caps, some kid who wants his runes just blasts the shit out of the scale and buys the runes for 500 ea, we win.
EDIT: Should try to get a hold of like 10 accs with a few mills and the feud done, bot like 500M in 2 days and claim win before its nerfed :D
Wanted
2011-01-12 21:47:11
True, the GE will function much more rapidly and awesome without the cap on items.
Boreas
2011-01-12 22:41:36
So several runes are at their caps now?
The Claw
2011-01-13 00:45:02
From: Markus
Just fyi with the drop of rune prices, enchanting bolts became profitable, too. Decent mage xp + profit pl0x? :p
How so?
Markus
2011-01-13 00:53:58
Bloods and cosmics used to be but aren't atm, only the bad runes like mind/body are severely capped. We only got the regular trade caps (25k/4 hours) to worry about (and someone needs to buy our runes).
But free trade will come with Wildy update. Wildy update = HUUUUGEEE influx of rune prices in the beginning, that means we might make 2m/hour again for a week :D
@The Claw: unenchanted bolts + runes < enchanted bolt price
Boreas
2011-01-20 01:18:27
Markus you posing motherfucker!
Original Maker Of Sudoku Since Rsbot 2.XX
I Have Seen Many Scripts Copying My Script, If You Haven't Already Noticed "Remixed Sudoku"
Is A Direct Copy Of My OLDER Legend Sudoku. Now I have Gotten Sick of The Posers & "Copy & Pasters"
I Bring You Back Legend Sudoku 2X Better & With More Updates
http://www.powerbot.org/vb/showthread.php?t=579344lol getting 97 sph btw
The Claw
2011-01-20 01:31:34
Lol what a noob….didnt do shit compared to us here but he gets his ego in a knot trying to get rep+ or e-penis+ or something.
Boreas: 97 sph with RSBot? Cause the latest one here is 150+. :p
Boreas
2011-01-20 01:36:40
The one on page 36. I didn't modify Mouse though, is that how you get 150?
Markus
2011-01-20 01:40:16
Lol legend sudoku wasn't even one of the first clone, Perfectius has the honour of being the first one (for iBot though).
Sudoku-speed is really dependent on computer speed. At my old laptop I get around 90SpH but at my desktop I get around 120SpH (without having done Contact so I got the long chat).
From: The Claw
Lol what a noob….didnt do shit compared to us here but he gets his ego in a knot trying to get rep+ or e-penis+ or something.
Boreas: 97 sph with RSBot? Cause the latest one here is 150+. :p
Shhh let them think they are the best. More money for us with the superior script. :p
~BraK
The Claw
2011-01-20 02:06:52
Of course ;) But yea Boreas theres tweaks you can do to Mouse and other stuff I think too, they're scattered through this thread…n3ss3s's was the fastest for me. (4gb ram, dual core 2.7ghz)
n3ss3s
2011-01-20 15:20:12
http://www.powerbot.org/vb/showthread.php?t=579344&p=6360010&viewfull=1#post6360010/rant
Also, I chuckled
70+ an hour? that would highly increase the ban risk. I reduced it to just be a little bit safe well lagged it.
erm here..
(a user of the rsbot script)
HyperSecret
2011-02-01 09:52:25
We need to start posting what we are able to sell runes for.
I currently have all on the medium suggested price from the GE except deaths/bloods. I currently have those at 400each (thought people would buy).
None have sold as of yet and I have had them on the GE for 10-15 minutes.
n3ss3s
2011-02-01 19:11:27
Well earlier today I bought runes at suggested price and didn't get a single gp back, so you might wanna sell on that.
HyperSecret
2011-02-02 14:17:57
Yea, all sell @ suggested prices, (over time, except cosmics/chaos). Chaos i sold for 50ea (suggested is 64?), cosmic i sold for 100ea (suggested is 141?), I got more back than my sell offer for the cosmic so they sold for over 100
HyperSecret
2011-02-07 12:09:29
For anyone who cares, this is HUGE money atm, i would say at least 1.5m/hr.
Everything but cosmics sell @ mid instantly and sell for mid+.
Put offer in at mid and you will get more on every rune, easily. I put 28k souls on for mid, 10.8m and sold for 13.8m :p
I just bought a crap account with 1m on it members, and started this. I am currently at 120m after 15 days, and I haven't even been doing in constantly. mainly only on weekends.
marpis
2011-02-07 13:18:20
From: HyperSecret
For anyone who cares, this is HUGE money atm, i would say at least 1.5m/hr.
Everything but cosmics sell @ mid instantly and sell for mid+.
Put offer in at mid and you will get more on every rune, easily. I put 28k souls on for mid, 10.8m and sold for 13.8m :p
I just bought a crap account with 1m on it members, and started this. I am currently at 120m after 15 days, and I haven't even been doing in constantly. mainly only on weekends.
Damn, I'd sure like to make a few mills more but… I'm kinda scared of jages "new system" :p Maybe in 2, 3 months if none of you have gotten banned I'll start this again.
Hobbit
2011-02-07 13:18:32
So ummm im getting 197 SPH…. thats a little too fast isnt it? It solves it >7 seconds
=/
HyperSecret
2011-02-07 13:43:37
From: Hobbit
So ummm im getting 197 SPH…. thats a little too fast isnt it? It solves it >7 seconds
=/
I get around, 110-125 (depending on my connection). I am just getting to 200m (for now) and transferring.
_ChArMz
2011-02-07 13:45:20
+--------+-------+-------+----------+
| Name | GE | Inv | Total |
| Blood | 398 | 12819 | 5101962 |
| Death | 384 | 12928 | 4964352 |
| Mind | 5 | 14572 | 72860 |
| Law | 316 | 14748 | 4660368 |
| Nature | 199 | 13759 | 2738041 |
| Body | 4 | 14801 | 59204 |
| Chaos | 56 | 14925 | 835800 |
| Soul | 345 | 14685 | 5066325 |
| Cosmic | 113 | 14664 | 1657032 |
+--------+-------+-------+----------+
Ran: 3h:13m:39s
Solved: 499 | SpH: 155
Profit: 5565045 | PpH: 1724145
+-----------------------------------+
~12-14 seconds to enter sudoku
~6 seconds to complete convo
n3ss3s
2011-02-10 04:22:00
So ummm im getting 197 SPH…. thats a little too fast isnt it? It solves it >7 seconds
=/
60 sph is a little too fast, too late to worry about that 1
HyperSecret
2011-02-11 09:24:37
Man people are in RAPE mode for this atm. Runes aren't selling as 'easily' as before but they are still selling for a good $$$ making amount.
I am done with this for now up to 180m total wealth, and I lost 20m yesterday staking, Yay me! :D
Cazax
2011-02-11 09:52:06
Yeah, my soul runes won't sell even after I lowered a lot the price.
Simply Freaking Amazing that this is still working !!! I just appealed my account that was banned exactly a year ago while using this script (my auto-respoders fault, not the script btw) and it took them all of 3 hours to deny it….maybe it will be unbanned in another year like my last account…..
The Claw
2011-02-17 13:30:27
RAM, you can buy it back for $22.50 from Jagex bro but they take some of your items and xp. However they dont take items which you only have 1 of, so rares etc should be safe.
From: The Claw
RAM, you can buy it back for $22.50 from Jagex bro but they take some of your items and xp. However they dont take items which you only have 1 of, so rares etc should be safe.
hmm, and this is verified ?, how do you approach them, because email, and message center doesn't seem to work…and please don't tell me I need to buy the card from 7 Eleven….
http://villavu.com/forum/showthread.php?p=780489#post780489
Hobbit
2011-02-17 13:54:58
Apparently they have to approach you first.
From: Hobbit
Apparently they have to approach you first.
They did….

I know the script didn't fail, I did rape it, but kept a low sph, and breaks, etc..I was using a new responder and it hyper spammed nonsense, tried playing it off, but know I was reported…I was happily surpriesed when they unbanned my main after 2 years, so if they don't approach me, maybe in another year….I did have about 2B on this account, mostly made from this script :), without looking back over 36+ pages, how many other bans have there been thus far
? Anybody else get a distinction of "Macroing Major" or Macroing Minor" ?
Wanted
2011-02-17 16:29:17
Lol sounds like a college degree.
Markus
2011-02-17 16:32:47
My main got a 7-day from Mage Me Fast = macroing minor (some really messed up random-handling bug, the plant..).
And afaik this script 0 bans?
Btw it got leaked (Ian) so RSBot is raping this now, too.
HyperSecret
2011-02-17 16:36:10
I had 2 accounts that used this 24/7 back in the day, it was the only script that they used. After 4 months of using it, they both eventually got 10 day temp bans, that is it. I am using it currently with the same players :p.
HyperSecret
2011-02-19 15:17:24
GetMousePos(ffsx, ffsy);
SortTPAFrom(n3sWasHere, Point(ffsx, ffsy));
Lol := n3sWasHere[0];
Repeat <----------------------------- //line 434 HERE
if ((Lol.x > 0) or (Lol.y > 0)) then
begin
SudoMouse(Lol.x, Lol.y, 0, 0, True);
Lol := getNext(n3sWasHere, Lol);
end;
Until((Lol.x = 0) or (Lol.y = 0));
Error: Out Of Range at line 434, anyone else getting this?
n3ss3s
2011-02-21 23:08:26
which one did u copy paste it from, I might've posted here and then fixed some idiot mistake
cant look at it atm, but n3swashere is a TPA of the slots to be clicked for the current rune if u wana try to see whats wrong
HyperSecret
2011-02-22 00:00:47
From: n3ss3s
which one did u copy paste it from, I might've posted here and then fixed some idiot mistake
cant look at it atm, but n3swashere is a TPA of the slots to be clicked for the current rune if u wana try to see whats wrong
Yea, I looked at that. I just cba atm to really debug it, so just wondering if anyone else was getting it, not a big deal.
Gu3st...
2011-02-22 18:43:10
I can't believe this script is still going… :O
How many millions did you guys make before it got leaked?
n3ss3s
2011-02-22 19:02:16
Idk, I know Hobbit and RAM had both made about 500M somewhere around page 20…
The Claw
2011-02-27 09:06:10
~1.2b :)
Gu3st...
2011-02-27 09:27:07
Woah, that's pretty astounding…!
I had to hack and slash to get it to work, something to do with the walk/sell @ GE functions, didn't feel like digging for answers at 5 am when I was going to bed ……
Sudoku Solver 4h:6m:29s
Solved: 249 | SpH: 61

I started with 10m, so….500kish/ hour ? my sph was around 100 for the first 10 mins I watched it, not sure what happened to my average, other then it seemed to have a few
"Unsolvable sudoku..
Failed to Solve :(" every 20 minutes or so…
Regardless,
muchas gracias amigos~RAM
n3ss3s
2011-02-28 15:21:08
Idk which one r u using, that 61 sph is making me sad :D
I just noticed my version doesn't compile, was reflection updated? (as in functions added/removed)
Version from page 36, everything I commented out to get it to work…..
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include reflection/reflection.simba}
const
Rule7proof = false; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = false;
DoSleep = true;
SleepEvery = 1200000; //Minutes
SleepFor = 12;
var
//PathToGE: TTileArray;
PathToS: TTileArray;
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;
ST, SF, {TimesInGE: Integer;}
ColourArray: array [1..9] of integer;
geslots: TIntegerArray;
thaslots: TPointArray;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SMART_SERVER := 149;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
GeSlots := [0, 1, 2, 3, 4, 5];
ThaSlots := [Point(133, 154), Point(289, 154), Point(466, 154),
Point(132, 272), Point(289, 272), Point(444, 272)];
end;
procedure SudoMouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
a,b,c : integer;
begin
MMouse(mousex, mousey, ranx, rany);
Wait(2 + Random(4));
GetMousePos(b, c);
HoldMouse(b, c, mouseaction(left));
repeat
Wait(5 + Random(10));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, mouseaction(left));
Wait(2+Random(4));
end;
procedure SudoMouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
begin
case ClickType of
1 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, True);
2 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, False);
3 : MMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0);
else
srl_Warn('SudoMouseBox', 'ClickType is NOT a valid number!', warn_AllVersions);
end;
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
ColourArray[1] := getcolor(22, 103);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(77, 204);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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;
//function toGe : TTileArray;
{begin
SetLength(Result, 6);
Result := [
Tile(3208, 3427), Tile(3197, 3438), Tile (3186, 3450), Tile(3176, 3461), Tile(3164, 3463), Tile(3164, 3477),
Tile(3164, 3487)
];
end; }
function tOStall : TTileArray;
begin
SetLength(Result, 2);
Result := [
Tile(3306, 3233), Tile(3308, 3219), tILE(3305, 3211)
];
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(5, 50));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 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, i : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
end;
for z := 0 to 8 do
begin
SetArrayLength(n3sWasHere, 0);
CurrentRune := RandomArr[z];
SudoMouse(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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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
//SudoMouse(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
SudoMouse(Lol.x, Lol.y, 0, 0, True);
Lol := getNext(n3sWasHere, Lol);
Until(Lol.x = 0);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
if(GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 498170) or (GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 114921)then
try
SudoMouseBox(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);
SudoMousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
CanExit:= False;
except
end;
until(CanExit) or (not(LoggedIn))
writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
SudoMouseBox(14, 61, 89, 78, 1);
Result := true;
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
SudoMouse(13, 13, 13, 13, true);//Closes Sudoku Menu
//Result := False;
LogOut;
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0cF07U2kGQ6aORGyKRWDRK1MCNHwi38C0Z4' +
'CLbxicQ2y98iba0EDUS3zXvn2dP7NiGTAdlW1gjyzZbxuDqo8e8G7' +
'tukG3I2jKk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HJTJBKLRqkauPFDlkxy' +
'ke3gU4idF75E29qoGsG/0PiohdiQmaBiC2tkxebIAL8omdiQdTBp2' +
'/VcUtsstuAkVzl+Y7Xa9UBgPbTVzsBGvtrYSCcsieDie47V4Jqmnp' +
'BsCIvt+fznx5am63QC3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3Iqkf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P6jXBacvw+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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq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NO+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;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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)
writeln('');
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));
//Writeln('Sold thru GE: '+inttostr(TimesInGE));
SendSRLReport;
writeln('');
ReportTime := GetSystemTime + 30000;
end;
procedure ScriptTerminate;
var
i: integer;
begin
for i := 1 to 9 do
FreeBitmap(DTM[i]);
Disguise('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
repeat
if FindNPCChatText('all the runes', ClickLeft) then
begin
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkToAli: boolean;
var
p: TPoint;
m: TTile;
ali: TNPC;
begin
Result := FindNPC('Ali Morrisane', ali);
if Result then
begin
m := GetMe.Tile;
if (Distance(m.x, m.y, ali.Tile.x, ali.Tile.y) > 2) then
begin
WalkToTile(ali.tile, 0, 0);
while CharacterMoving do
wait(20);
end;
p := TileToMS(ali.tile, 12);
Mouse(p.x, p.y, 4, 4, true);
Result := DidClick(True, 500);
end;
Respond;
end;
{procedure SellShit;
var
Clerk: TNPC;
I, time: Integer;
runes: TStringArray;
gx, gy, mx, my: Integer;
p: TPoint;
item: TInvItem;
Begin
Inc(TimesInGE);
runes := ['blood rune', 'death rune', 'chaos rune', 'soul rune', 'cosmic rune', 'nature rune', 'law rune'];
if not FindNPC('Grand Exchange clerk', Clerk) then
begin
writeln('couldnt find clerk');
terminatescript;
end;
p := TileToMS(Clerk.Tile, 20);
Mouse(p.x, p.y, 2, 2, false);
R_ChooseOption('Exchange G');
Wait(5000 + Random(3000));
for i := 0 to 5 do
begin
// if not R_ItemNameExists(item, runes[i]) then
continue;
Mouse(thaslots[i].x, thaslots[i].y, 3, 3, true);
Wait(3000 + Random(2000));
// If not R_ClickItemName(runes[i], true, 'Offer') then
continue;
writeln('hai');
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
while findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) do
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(2000 + Random(1000));
end;
Mouse(thaslots[0].x, thaslots[0].y, 3, 3, true);
Wait(3000 + Random(2000));
{ If R_ClickItemName(runes[6], true, 'Offer') then
begin
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
time := getsystemtime;
repeat
if findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(3000 + Random(2000));
time := getsystemtime;
end;
wait(random(100));
if getsystemtime - time > 60000 then
begin
mouse(mx + 2, my + 2, 2, 2, true);
Wait(3000 + Random(2000));
Mouse(362, 285, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(466, 298, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(415, 296, 6, 6, true);
Wait(3000 + Random(2000));
end;
until ((not findcolor(mx, my, 2502201, msx1, msy1, msx2, msy2)) and (
not findcolor(mx, my, 101318, msx1, msy1, msx2, msy2)));
//R_ClickItemName('Ring of duelling', False, 'Rub');
Wait(4000 + Random(3000));
FindNPCChatText('Duel', ClickLeft);
Wait(4000 + Random(3000));
WalkPath(PathToS);
end; }
{function caput: boolean;
var
Item: TInvItem;
begin
if not R_ItemIDExists(item, 995) then
result := false
else
result := GetItemStackSizeAt(item.slot) < 50000 ;
end; }
procedure rlytalktoali;
var
i: integer;
begin
repeat
if TalkToAli then
break;
wait(random(1000));
i := i + 1;
if (i > 20) then
begin
writeln('fuck ali');
terminatescript;
end;
until(false);
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
dummy: integer;
chattime: integer;
rout: boolean;
procedure handletalk;
begin
rlytalktoali;
chattime := getsystemtime;
repeat
wait(50);
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;
exit;
end;
if (getsystemtime - chattime > 50000) then
handletalk;
until(not(LoggedIn));
end;
begin
Smart_Members:= True;
Smart_Signed := True;
ActivateClient;
DeclarePlayers;
SetupSRL;
MouseSpeed := 40;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
// PathToGE := toge;
PathToS := ToStall;
repeat
debug(inttostr(GetMe.Level));
MakeCompass('N');
//if caput then
//begin
//Report;
//Writeln('GE');
// R_ClickItemName('Varrock teleport', True, 'Break');
//Wait(5000 + Random(3000));
//MakeCompass('W');
//WalkPath(PathToGe);
//SellShit;
//end;
if SudokuMenu then
DoSudoku;
handletalk;
if (not loggedin) then loginplayer;
if (TimeFromMark(FailTime) > 1200000) then
begin
writeln('failed');
debug('FailTime');
Disguise('FailTime');
TerminateScript;
end;
Report;
until false;
end.
Gu3st...
2011-02-28 15:58:56
Page 36? I got 24 pages… What post number are you talking about?
n3ss3s
2011-02-28 16:02:43
O then ur just not using the mouse edits
From: Zyt3x
Page 36? I got 24 pages… What post number are you talking about?
#
880
From: n3ss3s
O then ur just not using the mouse edits
Jah, 100sph still seems high to me, I never did use run the script in Rape mode( no need to, $/hour was
AWESOME) & (my only ban from this is from my own programming stupidity :redface:)…..but this script has proven itself, my general theory is that they must not monitor mouse movements while inside of "game' ? …I have no problem tweaking the waits when I get a chance, especialy with the RS economy, I agree that you need to run this balls out to justify using it, as compared to some other scripts out there with equivalency of $/hour ratios, some even giving xp….
n3ss3s
2011-02-28 17:09:35
In an official post they said they monitor repetitive, accurate and fast patterns, on which none of them can put too much weight since experienced players are able to do that pretty well.
Well, on top of them not having much weight, we, in fact, are only qualified for the speed. If you took a 100 sudoku mouse sequences and slapped them in MS paint, you wouldn't see a pattern :)
HyperSecret
2011-02-28 17:46:19
From: n3ss3s
I just noticed my version doesn't compile, was reflection updated? (as in functions added/removed)
Yes, i don't remember which function it was though.
Sudoku Solver 4h:31m:28s
Solved: 281 | SpH: 62
fuck ali
Successfully executed.
Again, Thanks…
Sudoku Solver 11h:0m:25s
Solved: 632 | SpH: 57
fuck ali
Successfully executed.
Narcle
2011-03-16 20:56:37
With ring of wealth now can go back and forth pretty damn fast.
Sudoku Solver 0h:9m:45s
Solved: 19 | SpH: 117
Just a quick 10min run testing.
HyperSecret
2011-03-17 00:46:25
Yea I made roughly 300m or so the past 1.5 months. I am done with it now though. got enough for now.
Thinking of switching to potions (unf), but I LOVE TO WATCH THIS SCRIPT RUN, I have disabled my screen saver, and leave this up…it's a good conversation starter when friends come over, I swear, "Chicks Dig Sudoku" :p
~RAM
Narcle
2011-03-17 02:23:10
From: RAM
Thinking of switching to potions (unf), but I LOVE TO WATCH THIS SCRIPT RUN, I have disabled my screen saver, and leave this up…it's a good conversation starter when friends come over, I swear, "Chicks Dig Sudoku" :p
~RAM
lol, 80% of the time its talking then the actual puzzle is solved in like 3 seconds or less for me. Need to make some Gs again so will prob run this a bit.
I live in a Rural Area, and have for a few years now, looking forward to moving to town, and better/faster connection…doesn't matter how fast your comp is, if your bandwidth can't keep up :duh:
Narcle
2011-03-18 07:42:41
From: RAM
I live in a Rural Area, and have for a few years now, looking forward to moving to town, and better/faster connection…doesn't matter how fast your comp is, if your bandwidth can't keep up :duh:
Heh, I know how that is. You must be in the "3meg" just outside of the city. When I was in apartment there I could get the 8meg then and supposedly there is 40meg downtown. /drool
I'm back up North and out in the country, best I had was 3g net (cellphone) then Casair came into area, oh man am I so happy to have their wireless net. Can actually play Xbox live and all.
HyperSecret
2011-10-25 09:22:01
Maybe remove this thread that is in the free section and only keep this one alive? If this update today really does something, this could be a big money maker again…
YoHoJo
2011-10-25 12:39:37
Yes please remove all traces of this from free sections! Might be good money once/if all rune prices go up!
Markus
2011-10-25 13:19:35
I'll hide the thread ;)
Wizzup?
2011-10-25 13:27:11
Or don't be selfish and put it in the free section instead. It might get us a lot of users. Frankly I don't care about the money on my account, but I do care about SRL and the user base. (No offence to anyone and I'm not sure if making it public is a good idea, but right now I don't see anything against it)
Markus
2011-10-25 13:28:25
Only reason I released to pub was because someone here fucked us over, and to prevent people from buying it at certain competitors (so they would lose money). Nothing wrong with waiting for a few months.
Besides, last post in that thread was over a year ago and it doesn't even work.
n3ss3s
2011-10-25 15:09:38
Let's get this shit back on track x] Also we should actually make a paid sorceress' garden bot since there probably isn't a single person in there and Jagex at this victorious time probably thinks color bots are limited to power miners…
mastaraymond
2011-10-25 15:50:00
From: Wizzup?
Or don't be selfish and put it in the free section instead. It might get us a lot of users. Frankly I don't care about the money on my account, but I do care about SRL and the user base. (No offence to anyone and I'm not sure if making it public is a good idea, but right now I don't see anything against it)
Nah, it's about who deserves it, leechers don't, people who give input, do.
Markus
2011-10-25 16:10:27
So who here actually got members (fagex blocks my paypal) and can see if it still works?
I have no reason to assume it doesn't work currently, but maybe a few coords changed..
I'll test in just a minute…
Wizzup?
2011-10-25 16:12:37
From: mastaraymond
Nah, it's about who deserves it, leechers don't, people who give input, do.
Leechers can turn into contributors…
Markus
2011-10-25 16:13:27
The method is so well-known now, let them make it themselves? Great learning experience as the script is easy.
The script in the first post does not work; get's caught picking what size lock, and when choosing to examine, pick, or force. Also, it does nothing once your char is 'examining' the lock when helped through.
The last working version I used uses Reflection to click Ali so that clearly doesn't work right now. When I get out of the shower I'll throw together a color finder quick and test it out.
Markus
2011-10-25 16:33:49
Around page 14 or so, there is a working Ali finder by n3s.
First post hasn't worked for over years, just scroll back to find the most recent. Should still work, else you might just need to change a few coords.
_ChArMz
2011-10-25 17:27:18
I have one, that I made that had the option to use color or reflection, Ill have to dig it up
EDIT:
here you go, update your colors and you should be good to go…
HyperSecret
2011-10-25 19:11:42
I had one that use to work, then i deleted it when i deleted my vm :facepalm:
Using ChArMz's version with all the reflection stuff removed:
Sudoku solving failed!
Sudoku solving failed!
Failed to solve!
Unsolvable sudoku!
Failed to solve!
Sudoku solving failed!
Successfully executed.
I'll have to do some debugging to see why it's not solving properly, but it's really not a priority right now.
Edit:
The attached version works just fine. Took the version I had (which was n3s's I think) and added ChArMz's TalkToAli, and updated a couple things.
It doesn't walk to GE and sell, but the solving and talking to Ali works fine. We could always just through together some SPS paths for the walking if we wanted.
Smart is currently commented out as well since it doesn't work right now, but this is a confirmed working version for those of you who may want to start gathering runes now.
_ChArMz
2011-10-25 21:01:47
Did you set the constant UseReflection = True;, to false in my script…
cuz it should work as the solver is no different..hmmmm
no members to test :(
From: _ChArMz
Did you set the constant UseReflection = True;, to false in my script…
cuz it should work as the solver is no different..hmmmm
Yes, lol. It probably would have worked with the same tweaks I made to the other one.
Just copy+paste the LoadPlayground; array initialization and it will probably be fine. That's what I had to update.
The walking and selling bit I never really used in the first place. :p I can't remember whose copy I was using might have been Hypersecret's version.
Wizzup?
2011-10-26 09:50:17
Can we start using proper version control management already? :p
Markus
2011-10-26 09:52:04
Glad to hear it still works. This baby already survived >9000 interface updates (and I had to rewrote rune detection every time! Except for the last ones because then it was actually maintainable code) and only uses a few SRL functions so there's almost nothing that can break.
Gf Jagex, please beat sudoku :D
@wiz: na, the code is total anarchy and so should version control be.
Wizzup?
2011-10-26 10:04:26
From: Markus
Glad to hear it still works. This baby already survived >9000 interface updates (and I had to rewrote rune detection every time! Except for the last ones because then it was actually maintainable code) and only uses a few SRL functions so there's almost nothing that can break.
Gf Jagex, please beat sudoku :D
@wiz: na, the code is total anarchy and so should version control be.
Git is anarchy.
Markus
2011-10-26 12:06:35
this is private anarchy, git might leak even more than ssrl. Centralised anarchy xd
n3ss3s
2011-10-26 20:30:54
Speaking of someone losing code when deleting their VM, is TinyXP still what I want?
Narcle
2011-10-26 20:33:20
From: n3ss3s
Speaking of someone losing code when deleting their VM, is TinyXP still what I want?
For VM, yes. SMART works now though..
n3ss3s
2011-10-26 20:47:58
Yeah I'm just installing VMWare for shits and giggles and testing crap
Bam Bam
2011-11-12 04:16:11
It still works, but it didn't stop when out of money.
Newest Version Attached.
-Bam Bam
Edit: Updated the script to use smart, it does however load a random world as I have it setup so it probably won't switch players too well.
YoHoJo
2011-11-12 04:18:13
Thanks, lots of rune prices have 2Xed since the nuke. This should be pretty damn awesome now.
Anyone who's been using it recently guess a gp/hr for me?
Bam Bam
2011-11-12 04:40:59
I only made about 600k/hr and that's selling at market prices.
You need quite a bit of cash on hand to make this profitable too, I was only able to run it for about 45 minutes total.
YoHoJo
2011-11-12 04:53:02
Yea I remember that. 10M starting is plenty I bet huh?
Even 5M I bet would be fine? I forgot.
Bam Bam
2011-11-12 04:55:30
From: YoHoJo
Yea I remember that. 10M starting is plenty I bet huh?
Even 5M I bet would be fine? I forgot.
I took some off another account. I should have plenty now once the 2.5 mil tied up in the GE gets out. Ideally you'd have enough GP to never have to stop lol.
Markus
2011-11-12 05:01:41
iirc it wastes around 4m/5m per hour. Oh runes are a good investment for you money lovers, especially cosmics.
Shall I push the rune prices a bit further up by releasing my bolt enchanter? ;)
YoHoJo
2011-11-12 05:49:55
If we have a known tested working perfectly version I'll get membership ASAP and use it :D/
Gu3st...
2011-11-12 09:16:17
how many gp/h is this again? :)
From: YoHoJo
If we have a known tested working perfectly version I'll get membership ASAP and use it :D/
I posted a working version on the previous page.
Sir R. M8gic1an
2011-11-12 09:25:15
From: Zyt3x
how many gp/h is this again? :)
Just probably one of the most profitable scripts ever made. It used to make several mill per hour. Don't know how it is nowadays, but should still profit a lot..
-RM
Markus
2011-11-12 09:52:32
From: Zyt3x
how many gp/h is this again? :)
I'd say 250k-750k/hour, by looking at the rune prices.
Offtopic: anyone who can lend me a members account for two hours or so with at least magic 4 so I fix my bolt enchanter for colour only? It's one of the best ways to train magic imo and not too well known, but we can change that ;)
Bam Bam
2011-11-12 10:44:36
From: NCDS
I posted a working version on the previous page.
Well, yours is the one I downloaded and it didn't stop trying to buy runes when it was out of money.
I tweaked it just so it will log out when out of money.
From: Bam Bam
Well, yours is the one I downloaded and it didn't stop trying to buy runes when it was out of money.
I tweaked it just so it will log out when out of money.
Ah, I never tested that far when I fixed it. I didn't notice your other post either, my bad.
Bam Bam
2011-11-12 12:06:04
From: NCDS
Ah, I never tested that far when I fixed it. I didn't notice your other post either, my bad.
My fix isn't reliable anyways lol. We could count the coins in inv before and after each purchase which would probably work better than looking for NPC chat. Ofc, it might have been because I was accidentally on high detail, but other fonts were working so that probably wasn't the issue.
Hobbit
2011-11-12 13:43:12
I think it's time to invest some of my 475m and drive prices up :)
Edit:
…. We need to add an auto responder….
I was sudokuing for like 5 min and already people were pestering me. Luckily I checked as they were accusing me of botting and saved it and was like "…but jagex killed all the bots :S"
Bam Bam
2011-11-12 14:44:54
From: Hobbit
I think it's time to invest some of my 475m and drive prices up :)
Edit:
…. We need to add an auto responder….
I was sudokuing for like 5 min and already people were pestering me. Luckily I checked as they were accusing me of botting and saved it and was like "…but jagex killed all the bots :S"
Oh, well there wasn't anyone awake when I was doing it at 5am. And you said it was because of your name :P. Perhaps we should also add an option to disable purchase of certain runes.. Ie: The bloods and deaths I've had all day and can't seem to sell.
n3ss3s
2011-11-12 14:45:10
Lol :p Try an find the topic for yakman's markov chain implementation, I think either him or fawki provided a script for parsing an RS chat log and making chains out of it?
Bam Bam
2011-11-13 17:02:51
http://villavu.com/forum/showpost.php?p=707373&postcount=1Is there only a discount on the runes if you buy without looking at what you're getting?
HyperSecret
2011-11-13 17:20:50
This isn't making good money atm; cosmics, natures, and chaos need to get a little higher in price and rune prices need to stabilize so that people will buy runes to let us make profit on this.
Bam Bam
2011-11-13 18:13:28
From: HyperSecret
This isn't making good money atm; cosmics, natures, and chaos need to get a little higher in price and rune prices need to stabilize so that people will buy runes to let us make profit on this.
Yeah I sorta realized that after running it today. I'm moving on to other methods… lol
n3ss3s
2011-11-13 21:08:33
Nobody cares about my sorc garden? :(
From: n3ss3s
Nobody cares about my sorc garden? :(
I don't even know what that activity(?) is, lol.
YoHoJo
2011-11-13 21:45:29
From: NCDS
I don't even know what that activity(?) is, lol.
53 Thieving required, members only, 300k/hr.
That's all I know about it, I think it's a minigame in which you win herbs to sell for $.
http://runescape.wikia.com/wiki/Sorceress%27s_Garden
Markus
2011-12-02 03:20:45
Conversation Update
We are upgrading the main chat panels you see when interacting with NPCs. We’ve gone for a modern, fresher look, while still retaining something unique and fitting for RuneScape. These upgrades are not just graphical: you’ll be able to use number keys to select from multiple chat options AND press the space bar instead of ’Click to continue‘. You can even hold down the space bar to fast-track through conversations.
I don't even want to think how high SpH we will get with that. Right now we are maxxed at 180? But this should double that if the fast-tracking works..
YoHoJo
2011-12-02 03:22:45
Markus you been running lately? Hows the gp/hr on this? How much do you run daily?
Same questions to anyone else using this!
Markus
2011-12-02 03:23:25
Jagex doesn't want me to pay for members, thus I have no clue! But it should be a bit decent.
YoHoJo
2011-12-02 03:28:17
From: Markus
Jagex doesn't want me to pay for members, thus I have no clue! But it should be a bit decent.
PayPal blocked huh?
I can sell you PINs for USD via PP or GP if you want!
Markus
2011-12-02 03:53:23
Na not now :) I don't want to get back into actively rs playing/cheating atm and f2p rs is bad enough for me not to play. Blocked Paypal means no more buying members when drunk ^_^ I want to finish some other, more important stuff first (that has to do with SRL).
HyperSecret
2011-12-02 09:27:47
I have been watching the rune prices and I still don't think this is of "elite" money making atm. Cosmics and natures are rising but at the expense of souls taking a huge dive. Deaths and bloods have risen but just enough to cancel out the souls fall. Chaos runes aren't doing shit yet, this will make money again once natures get to the 300 range and cosmics get to the 200 range (imo), which they will get to, they are steadily rising.
n3ss3s
2011-12-02 15:04:04
What you wanna look at in the rune prices is the avg of blood/death/chaos/law/nature/cosmic/soul runes, I know certain runes will always sell and some hardly but this is usually a good indicator… IIRC 225gp average is something like 400k/h at ~150sph?
Also yea lol irl if fast tracking will be legit fast
Bam Bam
2011-12-11 02:39:46
How do you guys get 150sph?
YoHoJo
2011-12-11 02:45:23
From: Bam Bam
How do you guys get 150sph?
All low settings on rs, but CPU ussage to high.
SMART FPS slider all the way up.
After the SetupSRL; line make mouse speed really high.
Would be just general tips for making any script 'faster'.
Besides that shorten/remove any waits in the scripts or turn them into WaitOption/WaitFindColor etc etc (Basically no 'arbitrary' waits as I call them)
Bam Bam
2011-12-11 02:53:53
From: YoHoJo
All low settings on rs, but CPU ussage to high.
SMART FPS slider all the way up.
After the SetupSRL; line make mouse speed really high.
Would be just general tips for making any script 'faster'.
Besides that shorten/remove any waits in the scripts or turn them into WaitOption/WaitFindColor etc etc (Basically no 'arbitrary' waits as I call them)
It's not even working for me right now, and I'm too tired to debug it. It's clicking the center of the screen instead of Ali.. Did colors change?
YoHoJo
2011-12-11 02:55:40
Actually yeah a few days ago some update changed a lot of the mainscreen colors quite a bit in certain areas.
http://villavu.com/forum/showthread.php?t=68821:/ Someone needs to tweak it for it to work again.
Bam Bam
2011-12-11 03:05:28
I just had to change the color for Ali as far as I can tell. Wtf is up with this money pouch thing? Is there a function to return amount yet?
YoHoJo
2011-12-11 03:06:56
From: Bam Bam
I just had to change the color for Ali as far as I can tell. Wtf is up with this money pouch thing? Is there a function to return amount yet?
Hmm not that I know of, but just don't use it and you should be fine.
n3ss3s
2011-12-11 03:08:00
No, 150 sph = use the edit where it doesnt wait for shit and clicks the next point closest to current point rather than zigzag
EDIT: + change the wait(50)'s or w/e in Mouse.scar to (5)s
Bam Bam
2011-12-11 03:08:52
how do I not use the money pouch when everything seems to go into it by default? (Honest question. I mean I'm sure I can withdraw everything from it but is there a way to turn it off?)
HyperSecret
2011-12-11 03:15:54
This uses it's own mouse function (SudokuMouse) change the waits in there.
And I don't think you can turn the money pouch or anything off, I always just withdraw more money than is in there and put it in my inv.
HyperSecret
2011-12-11 21:14:15
IF you are going to start using this SELL for MID, EVERYTHING sells for MID if you give it a little time.
DO NOT sell for below and allow people to think they can buy for lower than mid, this is great money atm.
I have seen a couple people doing this now the past 2 days, and now is the first time some of my runes have not sold instantly for MID, making me think some others are selling below mid. Also, no runes have dropped in price the past week or so. So hopefully no one sell for below mid.
YoHoJo
2011-12-24 12:32:29
Hurr Bump Durr
Someone post the latest properly working ver? :p
Kyle Undefined
2011-12-24 12:48:16
Shuttleu says he has one that works, but I don't know how good it is.
HyperSecret
2011-12-24 13:14:09
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
const
Rule7proof = true; //TRUE TO BE LEGAL!
DisplayDetails = True;//shows all the crap in Debug/Report windows :P
debugmode = True;
DoSleep = true;
SleepEvery = 35; //Minutes
SleepFor = 8;
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;
ST, SF, {TimesInGE: Integer;}
ColourArray: array [1..9] of integer;
geslots: TIntegerArray;
thaslots: TPointArray;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
procedure DeclarePlayers;
begin
debug('Declaring Players');
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SMART_SERVER := 89;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
GeSlots := [0, 1, 2, 3, 4, 5];
ThaSlots := [Point(133, 154), Point(289, 154), Point(466, 154),
Point(132, 272), Point(289, 272), Point(444, 272)];
end;
procedure SudoMouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
a,b,c : integer;
begin
MMouse(mousex, mousey, ranx, rany);
Wait(2 + Random(8));
GetMousePos(b, c);
HoldMouse(b, c, mouseaction(left));
repeat
Wait(5 + Random(10));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, mouseaction(left));
Wait(75+Random(50));
end;
procedure SudoMouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
begin
case ClickType of
1 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, True);
2 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, False);
3 : MMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0);
else
srl_Warn('SudoMouseBox', 'ClickType is NOT a valid number!', warn_AllVersions);
end;
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
ColourArray[1] := getcolor(22, 102);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(76, 202);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(35, 100));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 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, i : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
end;
for z := 0 to 8 do
begin
SetArrayLength(n3sWasHere, 0);
CurrentRune := RandomArr[z];
SudoMouse(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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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
//SudoMouse(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
SudoMouse(Lol.x, Lol.y, 0, 0, True);
Lol := getNext(n3sWasHere, Lol);
Until(Lol.x = 0);
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
if(GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 498170) or (GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 114921)then
try
SudoMouseBox(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);
SudoMousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
CanExit:= False;
except
end;
until(CanExit) or (not(LoggedIn))
writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
SudoMouseBox(14, 61, 89, 78, 1);
Result := true;
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
SudoMouse(13, 13, 13, 13, true);//Closes Sudoku Menu
//Result := False;
LogOut;
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+Wy2dV38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4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1V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RZcWCNjO1xTQ9ouXPysC8hYMvnaLGzbQwy457mktBvq6t' +
'gawV3zHqyNPba1sDRRcNewkUOlpcpEcE8yhtVMCi7bCkTwrM9/NxN' +
'k5v0zI7hsu3C/YSNfLCm5XlnJeBPL3YbbLtxtq8E9zoNfWBeKi8vL' +
'ysjcwzdRyC0h83ovZzXseXeT+dXycmJnzhvDYYkWWCG7BeDGDMBKW' +
'h/FTjjwEfmrCnzrQj5WA/gBytNqLn6wcp79Bwmw8AM=');
OwnArr[5] := Point(20, 250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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)
writeln('');
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));
//Writeln('Sold thru GE: '+inttostr(TimesInGE));
SendSRLReport;
writeln('');
ReportTime := GetSystemTime + 30000;
end;
procedure ScriptTerminate;
var
i: integer;
begin
for i := 1 to 9 do
FreeBitmap(DTM[i]);
Disguise('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime: Integer;
begin
while (not SudokuMenu) and LoggedIn do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Inc(Solved);
Inc(ReportVars[0]);
Wait(50);
repeat
//if FindNPCChatText('all the runes', ClickLeft) then
if(GetColor(156, 406) = 13158600)then
begin
TypeSend('1');
wait(randomrange(500,1000));
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
Logout;
wait(500)
LoginPlayer;
//Mouse(13, 13, 13, 13, true);
wait(50);
end;
Result:= LoggedIn;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkingToAli: Boolean;
var
bmpText, x, y: Integer;
begin
bmpText := CreateBitmapMaskFromText('adventuring', NPCChars);
Result := FindBitmapMaskTolerance(bmpText, x, y, MCX1, MCY1, MCX2, MCY2, 50, 10);
FreeBitmap(bmpText);
end;
var
OnAliAttempts: Integer;
function TalkToAli: Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
P: TPoint;
B: TBox;
{i,} x, y, t: Integer;
label
OnAli, Found;
begin
if ( not LoggedIn ) then
Exit;
Result := False;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.44);
FindColorsTolerance(TPA, 6639416, MSX1, MSY1, MSX2, MSY2, 50);
ColorToleranceSpeed(1);
if Length(TPA) > 0 then
ATPA := SplitTPA(TPA, 20)
else
goto OnAli;
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
B := GetTPABounds(ATPA[0]);
with B do
MMouse(RandomRange(x1, x2 - 5), RandomRange(y1, y2), 0, 0);
Wait(15 + Random(25));
if ( not Pos('orrisan', rs_GetUpText) > 0 )then
Exit;
GetMousePos(x, y);
{if Random(25) = 3 then
begin
Mouse(x, y, 0, 0, False);
Result := WaitOption('alk-to Ali', 500);
end else }
begin
Mouse(x, y, 0, 0, True);
t := GetSystemTime;
while GetSystemTime - t < 500 do
begin
Result := CountColor(254, x - 5, y - 5, x + 5, y + 5) > 0;
if Result then
Exit; //!!!ORIGINALLY Break!!!!
if CountColor(65278, x - 5, y - 5, x + 5, y + 5) > 0 then
begin
WriteLn('Miss-clicked Ali!');
Flag;
Exit;
end;
Wait(RandomRange(2, 10));
end;
end;
Found :
begin
t := GetSystemTime;
while ( GetSystemTime - t < 7500 ) and
( not TalkingToAli ) do
Wait(75 + Random(50));
Result := TalkingToAli;
end;
Exit;
OnAli :
begin
if OnAliAttempts > 0 then
Exit;
WriteLn('Player is on Ali?');
MMouse(MSCX + 5, RandomRange(MSCY - 5, MSCY + 5), 2, 0);
Wait(50 + Random(50));
GetMousePos(x, y);
if Pos('orrisan', rs_GetUpText) > 0 then
begin
Mouse(x, y, 0, 0, True);
Result := FindColor(x, y, 254, x - 5, y - 5, x + 5, y + 5);
end else
begin
Mouse(x, y, 0, 0, False);
Result := WaitOption('alk-to Ali', 500);
end;
if Result then
begin
WriteLn('Yes');
goto Found;
end else WriteLn('No');
OnAliAttempts := OnAliAttempts + 1;
end;
end;
{
function TalkToAli: boolean;
var
p: TPoint;
m: TTile;
ali: TNPC;
begin
Result := FindNPC('Ali Morrisane', ali);
if Result then
begin
m := GetMe.Tile;
if (Distance(m.x, m.y, ali.Tile.x, ali.Tile.y) > 2) then
begin
WalkToTile(ali.tile, 0, 0);
while CharacterMoving do
wait(20);
end;
p := TileToMS(ali.tile, 12);
Mouse(p.x, p.y, 4, 4, true);
Result := DidClick(True, 500);
end;
Respond;
end;
}
{procedure SellShit;
var
Clerk: TNPC;
I, time: Integer;
runes: TStringArray;
gx, gy, mx, my: Integer;
p: TPoint;
item: TInvItem;
Begin
Inc(TimesInGE);
runes := ['blood rune', 'death rune', 'chaos rune', 'soul rune', 'cosmic rune', 'nature rune', 'law rune'];
if not FindNPC('Grand Exchange clerk', Clerk) then
begin
writeln('couldnt find clerk');
terminatescript;
end;
p := TileToMS(Clerk.Tile, 20);
Mouse(p.x, p.y, 2, 2, false);
R_ChooseOption('Exchange G');
Wait(5000 + Random(3000));
for i := 0 to 5 do
begin
// if not R_ItemNameExists(item, runes[i]) then
continue;
Mouse(thaslots[i].x, thaslots[i].y, 3, 3, true);
Wait(3000 + Random(2000));
// If not R_ClickItemName(runes[i], true, 'Offer') then
continue;
writeln('hai');
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
while findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) do
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(2000 + Random(1000));
end;
Mouse(thaslots[0].x, thaslots[0].y, 3, 3, true);
Wait(3000 + Random(2000));
{ If R_ClickItemName(runes[6], true, 'Offer') then
begin
Wait(2000 + Random(1000));
Mouse(285, 222, 4, 4, true);
Wait(1000 + Random(1000));
Mouse(240, 286, 10, 10, true);
Wait(3000 + Random(2000));
end;
time := getsystemtime;
repeat
if findcolor(gx, gy, 1999423, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(gx + 5, gy + 5, 0, 0, true);
Wait(2000 + Random(1000));
Mouse(418, 298, 2, 2, true);
Wait(3000 + Random(2000));
time := getsystemtime;
end;
wait(random(100));
if getsystemtime - time > 60000 then
begin
mouse(mx + 2, my + 2, 2, 2, true);
Wait(3000 + Random(2000));
Mouse(362, 285, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(466, 298, 3, 3, true);
Wait(3000 + Random(2000));
Mouse(415, 296, 6, 6, true);
Wait(3000 + Random(2000));
end;
until ((not findcolor(mx, my, 2502201, msx1, msy1, msx2, msy2)) and (
not findcolor(mx, my, 101318, msx1, msy1, msx2, msy2)));
//R_ClickItemName('Ring of duelling', False, 'Rub');
Wait(4000 + Random(3000));
FindNPCChatText('Duel', ClickLeft);
Wait(4000 + Random(3000));
WalkPath(PathToS);
end; }
{function caput: boolean;
var
Item: TInvItem;
begin
if not R_ItemIDExists(item, 995) then
result := false
else
result := GetItemStackSizeAt(item.slot) < 50000 ;
end; }
procedure rlytalktoali;
var
i: integer;
begin
repeat
if TalkToAli then
break;
wait(random(100));
i := i + 1;
if (i > 20) then
begin
writeln('fuck ali');
terminatescript;
end;
until(false);
end;
var
SleepTime: Integer;
FirstC: Boolean;
bTPA, wTPA, uTPA, TextTPA, TPA, MTPA: TPointArray;
Texts: TStringArray;
H: integer;
Chats: TStringArray;
ChatPhase, Countage: Integer;
dummy: integer;
chattime: integer;
rout: boolean;
procedure handletalk;
begin
rlytalktoali;
chattime := getsystemtime;
repeat
wait(50);
if(GetCOlor(261, 470) = 4144960)then
TypeSend(' ');
//SudoMouse(226, 463, 65, 10, true); //quickfix
//ClickContinue(True, False);
//If FindNPCChatText('Select an Option', Nothing) Then
if(GetColor(82, 399) = 13158600)then
TypeSend('1');
if(GetColor(80, 412) = 13158600)then
TypeSend('2');
if(GetColor(200, 445) = 13158600)then
TypeSend('3');
{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;
exit;
end;
if (getsystemtime - chattime > 50000) then
handletalk;
until(not(LoggedIn));
end;
begin
Smart_Members:= True;
Smart_Signed := True;
ActivateClient;
DeclarePlayers;
SetupSRL;
MouseSpeed := 40;
ScriptID := '1037';
LoadArrays;
Wait(1001);
ReportTime := GetSystemTime + 310000;
if not LoggedIn then
LoginPlayer;
debug('Logging in Player');
Disguise('Logging in Player');
Wait(1001);
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
MakeCompass('N');
SetAngle (true);
//MakeCompass('280');
Chats := ['I would like to have a look at your selection of runes',
'Try to open a large casket of runes',
'Examine lock'];
// PathToGE := toge;
//PathToS := ToStall;
repeat
MakeCompass('N');
//if caput then
//begin
//Report;
//Writeln('GE');
// R_ClickItemName('Varrock teleport', True, 'Break');
//Wait(5000 + Random(3000));
//MakeCompass('W');
//WalkPath(PathToGe);
//SellShit;
//end;
if SudokuMenu then
DoSudoku;
handletalk;
if (not loggedin) then loginplayer;
if (TimeFromMark(FailTime) > 1200000) then
begin
writeln('failed');
debug('FailTime');
Disguise('FailTime');
TerminateScript;
end;
Report;
until false;
end.
Uses the spacebar to click, does simple just check colors for when to use which option. This works
without having the "extra" quests done, I haven't tried on an account with all quests done.
Kyle Undefined
2011-12-28 17:43:22
Is it worth doing the quests in order to use this?
Yeah iirc the quest shorten the time it takes increasing the gp/h
Kyle Undefined
2011-12-28 18:11:27
What about GP wise?
Doing the quest decreases the time it takes to get to the Puzzle. Thereby increasing the GP per hour….
Kyle Undefined
2011-12-28 18:17:38
I know, you said that earlier :p I mean, and maybe I didn't explain good, are the prices of the runes good to make this worth doing? I know that prices of runes are rising, but have they risen enough?
Narcle
2011-12-28 19:27:35
From: Kyle Undefined
I know, you said that earlier :p I mean, and maybe I didn't explain good, are the prices of the runes good to make this worth doing? I know that prices of runes are rising, but have they risen enough?
Would have to do a test, add up rune prices (the ones u get) and run script a bit to see how many runes/gp you get. I don't think we ever got a average for it.
Kyle Undefined
2011-12-28 19:43:52
Ah ok, I'll do this in a bit.
Bam Bam
2011-12-29 01:06:28
Rune prices look horrible right now.
edit:
Does Jagex inject items into the market to stabilize it?
YoHoJo
2011-12-29 01:17:52
From: Bam Bam
Rune prices look horrible right now.
edit:
Does Jagex inject items into the market to stabilize it?
Highly doubt it!
HyperSecret
2011-12-29 10:40:45
For those of you who are interested, 2m+/hr atm. Doing it with the basic quests done (The Feud) and that is all. I get about 115-130 sph.
The script I posted earlier work for this situation ^^, I don't know how well/if it would work having less conversation.
Before the chat interface update, I ran it on my main for 3-4 hrs 1 time and was getting around 170 sph, with more quests done so less chatting.
I am currently making roughly, 15-20m/day doing this atm, always try to sell for mid if not then only sell for 5% less. Merching clan/people seem to really control prices of this. Sometimes my bloods/deaths sell for over mid instantly for a whole week, then the next they have to be sold @ 5% less to sell. It goes back and forth like that for bloods/deaths/souls. This is definitely good money though.
Kyle Undefined
2011-12-29 10:43:21
Wow, going to have to do the quests then. Awesome, thanks!
1.5b till I can get my white phat :D
Markus
2011-12-29 11:37:55
115 SpH huh, someone try if the spacebar-skip-convo-trick already exists in RS? Would be really easy to double the speed then :)
HyperSecret
2011-12-29 13:02:48
From: Markus
115 SpH huh, someone try if the spacebar-skip-convo-trick already exists in RS? Would be really easy to double the speed then :)
The script I posted earlier does use the space bar, but it doesn't "skip" any conversation it just replaces the need to use your mouse to click.
n3ss3s
2011-12-29 17:57:00
For those of you who are interested, 2m+/hr atm. Doing it with the basic quests done (The Feud) and that is all. I get about 115-130 sph.
Who wants to give/lend/rent/sell me 10 accs with the feud done?
Narcle
2011-12-29 20:09:39
Have to say its stupid fast now even with only basic quest done. Using it with SRL5 too (after some changes). Getting 110+ sph, really nice Hyper hehe.
n3ss3s
2011-12-29 20:18:14
I pmed King Tijn on sythe on how much is it going to cost to hook me up with 10 accs with The Feud done :stirthepot:
Narcle
2011-12-29 20:29:10
geez, Gold farmer :P
and I went through 2m in 25 mins O.o 113sph
YoHoJo
2011-12-29 20:31:40
From: n3ss3s
I pmed King Tijn on sythe on how much is it going to cost to hook me up with 10 accs with The Feud done :stirthepot:
Hope you didn't tell him what for…. :/!
n3ss3s
2011-12-29 20:37:29
From: YoHoJo
Hope you didn't tell him what for…. :/!
Nah
EDIT: LOL,
Training a def 1 account cost much more so I'll train att/str/def to 50 =$45 per account.
Quest: $7 per account.
You also need 30 Thieving: $5
If you are buying for 10 accounts I'll give you a deal of 80m per account.
Looks like I'm gonna be doing some training myself. (Unless someone has some accounts they can lend me)
HyperSecret
2011-12-29 23:35:30
n3ss3s, please don't abuse it too much. Let us all be able to steadily benefit from it.
n3ss3s
2011-12-29 23:41:02
Only gonna run 10 accs or w/e my comp lets me, not gonna do VPC's n shit
Narcle
2011-12-30 06:57:22
Sudoku Solver 1h:9m:24s
Solved: 151 | SpH: 131
pretty fast, i should get other quests done =/
HyperSecret
2011-12-30 09:16:18
Dude n3ss3s cmon man…
http://villavu.com/forum/showthread.php?p=876251#post876251Just give the idea out to everyone?
How fucking desperate are you? You know we don't like gold farming here, no matter what form it is in. Use this for your own personal account gain not to abuse.
Sorry but a little fucking annoying…
I think that I could speed it up even more :P If I get done with it, I will post it. Don't abse it too much ppl.
EDIT: Nvm, looks like it's done already :P
~Home
n3ss3s
2011-12-30 14:37:15
HyperSecret: You do realize the script has been out there for years now…
Deleted the topic anyways since people misread the title as "Ask him if he's going to bot with the accounts"..
Kyle Undefined
2011-12-30 14:48:26
I don't think that botting it with 10 accounts will change the outcome. I mean, it was fine until it got leaked and abused. Going to do this soon, but one account.
Narcle
2011-12-31 17:02:25
Sudoku Solver 5h:57m:47s
Solved: 708 | SpH: 119
Had too… Went through 28m.
What was the profit/loss for that 28m?
n3ss3s
2012-01-01 02:36:43
Probably around 50%, 225 rune average is about 20-25% profit, now its close to 300
Narcle
2012-01-01 07:02:23
Alright so I started with basically 50m (49.985…) after 3 runs it totaled to 10h:37m:22s.
Just sold all the runes and actually did like -2% to sell faster.
(72,127,778 - 49,985,000) / 10.623hours = 2,084,419 gp/h
:spot::spot::spot:
n3ss3s
2012-01-03 04:27:37
holy shit jesus.
Narcle
2012-01-05 13:17:53
NOOO rune prices are dropping. :(
I was actually thinking of releasing a script (or 4) to "help" the prices. Any suggestions? I've been working on a MAE hehe
Richard
2012-01-05 14:57:02
From: Narcle
NOOO rune prices are dropping. :(
I was actually thinking of releasing a script (or 4) to "help" the prices. Any suggestions? I've been working on a MAE hehe
That's quite a nice idea actually. Interesting how much more of an impact we now have on the market. Even something as simple as an alcher would help.
n3ss3s
2012-01-05 15:19:58
On the subject of us having an impact, we seriously need some sort of "quickstart" functionality, e.g people who don't want to edit scripts shouldn't have to look at an editor of any kind…
Gu3st...
2012-01-05 18:15:24
From: n3ss3s
On the subject of us having an impact, we seriously need some sort of "quickstart" functionality, e.g people who don't want to edit scripts shouldn't have to look at an editor of any kind…
You mean like, a script manager?
noidea
2012-01-05 18:38:53
From: n3ss3s
On the subject of us having an impact, we seriously need some sort of "quickstart" functionality, e.g people who don't want to edit scripts shouldn't have to look at an editor of any kind…
Umm, how does that benefit anyone. It leads to frustrating threads like
this.
I disagree completely with a script manager. Sorry about being off topic.
HyperSecret
2012-01-06 09:39:45
From: Narcle
NOOO rune prices are dropping. :(
I was actually thinking of releasing a script (or 4) to "help" the prices. Any suggestions? I've been working on a MAE hehe
Noob :duh:, Prices atm are falling/having to sell for less because of the barrows update. Everyone and their mother is at barrows this week trying to get double loot and a visage from the chest. The chest also gives runes, so everyone is dumping their runes into the GE.
We just currently have a large surplus of runes on the market, we only have to put up with this event for 4/5 more days… :garfield:
Narcle
2012-01-06 10:03:24
From: HyperSecret
Noob :duh:, Prices atm are falling/having to sell for less because of the barrows update. Everyone and their mother is at barrows this week trying to get double loot and a visage from the chest. The chest also gives runes, so everyone is dumping their runes into the GE.
We just currently have a large surplus of runes on the market, we only have to put up with this event for 4/5 more days… :garfield:
No, I knew about that. Even before this I was contemplating about making a script to raise rune prices.
Kyle Undefined
2012-01-06 10:06:07
How would you raise the prices? Just dump money into them and horde them?
Narcle
2012-01-06 10:07:54
From: Kyle Undefined
How would you raise the prices? Just dump money into them and horde them?
No release script(s) that require runes.
Kyle Undefined
2012-01-06 10:09:51
Ahh ok, makes sense, you'd have to make them work faster than Flights runecrafting scripts :p
HyperSecret
2012-01-06 10:51:28
An alch / stunner combination would do just fine.
Too bad we didn't have some sort of reflection, a rock lobster burst/barrage would be nice :).
The Claw
2012-01-08 23:12:45
I'm having some trouble starting this up again, using HyperSecret's version - it just clicks ali and sits there? From debugging I can see it doesn't find the "adventure" bitmap text but even when I change that line to a countcolor (to verify we've clicked ali) it still doesn't work.
Also, n3ss3s, would you please be able to post/PM your version of rune entering? :)
Narcle
2012-01-08 23:46:50
From: The Claw
I'm having some trouble starting this up again, using HyperSecret's version - it just clicks ali and sits there? From debugging I can see it doesn't find the "adventure" bitmap text but even when I change that line to a countcolor (to verify we've clicked ali) it still doesn't work.
Also, n3ss3s, would you please be able to post/PM your version of rune entering? :)
GetColor changed on one of them.
This is my modded version. Added a GP check etc.
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.simba}
{.include srl/srl.simba}
const
Rule7proof = true; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = True;
DoSleep = true;
SleepEvery = 35; //Minutes
SleepFor = 8;
var
SleepTime: Integer;
Playground : Array of Array of byte;
lolz : TStringArray;
DTM : array [1..9] of integer;
ownarr : array [1..9] of TPoint;
FailTime, ReportTime: integer;
NorthLast, UnSolvable: Boolean;
ColourArray: array [1..9] of integer;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
SOLVED = 0;
SPH = 1;
procedure DeclarePlayers;
begin
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SMART_SERVER := 1;
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := true;
end;
end;
procedure Debug(s : string);
begin
if debugmode then
writeln(s)
else
Status(s);
end;
procedure SudoMouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
a,b,c : integer;
begin
MMouse(mousex, mousey, ranx, rany);
Wait(2 + Random(8));
GetMousePos(b, c);
HoldMouse(b, c, mouse_Left);
repeat
Wait(5 + Random(10));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, mouse_Left);
Wait(75+Random(50));
end;
procedure SudoMouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
begin
case ClickType of
1 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, True);
2 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, False);
3 : MMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0);
else
srl_Warn('SudoMouseBox', 'ClickType is NOT a valid number!', warn_AllVersions);
end;
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
ColourArray[1] := getcolor(22, 102);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(76, 202);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(35, 100));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 CloseSudoku: boolean;
begin
if SudokuMenu then
begin
MouseBox(11,11,32,31, mouse_Left);
Result := True;
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, i : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
end;
for z := 0 to 8 do
begin
SetArrayLength(n3sWasHere, 0);
CurrentRune := RandomArr[z];
SudoMouse(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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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
//SudoMouse(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));
try
Lol := n3sWasHere[0];
Repeat
SudoMouse(Lol.x, Lol.y, 0, 0, True);
Lol := getNext(n3sWasHere, Lol);
Until(Lol.x = 0);
Except
Writeln('Error occured skipping it.');
end;
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
if(GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 498170) or (GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 114921)then
try
SudoMouseBox(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);
SudoMousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
CanExit:= False;
except
end;
until(CanExit) or (not(LoggedIn))
writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
SudoMouseBox(14, 61, 89, 78, 1);//open
Result := true;
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
CloseSudoku;
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A4l2dGhbRppZFvNjcravoIH/PyL4L8u/nruvoruMg6Z9ieRr7e' +
'2Hi34zZRC258ESwcwS0cF07U2kGQ6aORGyKRWDRK1MCNHwi38C0Z4' +
'CLbxicQ2y98iba0EDUS3zXvn2dP7NiGTAdlW1gjyzZbxuDqo8e8G7' +
'tukG3I2jKk7TmXlDaDLbg7JJ62urG7J4Cm2jVs5Cv19WTCkLhwf1t' +
'duDLRCcmEsGsCz38uNjVcJRPgxrfY3bYaHNsia0j8ho0cqatjtplA' +
'YvHAl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GvtrYSCcsieDie47V4Jqmnp' +
'BsCIvt+fznx5am63QC3PgGd4Y3OLFF1gZWBzZypKGB3WYDqcUFdzU' +
'D3LXn8INfWMBJTi0ceb9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtY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v' +
'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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc236MtLY9jMZHHBp6PD75AmFc' +
'VP1ayG8E8nSUZRl1wI0eamzuj0WddXcN9T4EjYqEEEuTP8bErg5OV'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X81NvEOHNBQsE2XsjWBC' +
'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;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
H,M,S: integer;
begin
ConvertTime(gettimerunning, H, M, S)
writeln('');
With Players[CurrentPlayer] do
begin
Players[CurrentPlayer].Integers[SPH] := Round((Integers[SOLVED] * 3600.0) / (GetTimeRunning / 1000.0));
Writeln('Sudoku Solver ' + inttostr(H) + 'h:' + inttostr(M) + 'm:' + inttostr(S)+'s');
Writeln('Solved: '+ inttostr(Integers[SOLVED])+' | SpH: ' + IntToStr(Integers[SPH]));
//Writeln('Sold thru GE: '+inttostr(TimesInGE));
end;
writeln('');
if (ReportTime < GetSystemTime) then
begin
//stats_commit;
ReportTime := GetSystemTime + 310000;
end;
end;
procedure ScriptTerminate;
var
i: integer;
begin
for i := 1 to 9 do
FreeBitmap(DTM[i]);
Disguise('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime, T: Integer;
begin
T := GetSystemTime + 30000;
while (not SudokuMenu) and LoggedIn and (T < GetSystemTime) do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Wait(50);
repeat
//if FindNPCChatText('all the runes', ClickLeft) then
if(GetColor(156, 406) = 13158600)then
begin
TypeSend('1');
wait(randomrange(500,1000));
Inc(Players[CurrentPlayer].Integers[SOLVED]);
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
CloseSudoku
wait(50);
Result := False;
end;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkingToAli: Boolean;
var
bmpText, x, y: Integer;
begin
bmpText := CreateBitmapMaskFromText('adventuring', NPCChars);
Result := FindBitmapMaskTolerance(bmpText, x, y, MCX1, MCY1, MCX2, MCY2, 50, 10);
FreeBitmap(bmpText);
end;
var
OnAliAttempts: Integer;
function TalkToAli: Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
B: TBox;
{i,} x, y, t: Integer;
label
OnAli, Found;
begin
if ( not LoggedIn ) then
Exit;
Result := False;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.44);
FindColorsTolerance(TPA, 6639416, MSX1, MSY1, MSX2, MSY2, 50);
ColorToleranceSpeed(1);
if Length(TPA) > 0 then
ATPA := SplitTPA(TPA, 20)
else
goto OnAli;
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
B := GetTPABounds(ATPA[0]);
with B do
MMouse(RandomRange(x1, x2 - 5), RandomRange(y1, y2), 0, 0);
Wait(15 + Random(25));
if ( not Pos('orrisan', rs_GetUpText) > 0 )then
Exit;
GetMousePos(x, y);
{if Random(25) = 3 then
begin
Mouse(x, y, 0, 0, False);
Result := WaitOption('alk-to Ali', 500);
end else }
begin
Mouse(x, y, 0, 0, True);
t := GetSystemTime;
while GetSystemTime - t < 500 do
begin
Result := CountColor(254, x - 5, y - 5, x + 5, y + 5) > 0;
if Result then
Exit; //!!!ORIGINALLY Break!!!!
if CountColor(65278, x - 5, y - 5, x + 5, y + 5) > 0 then
begin
WriteLn('Miss-clicked Ali!');
Flag;
Exit;
end;
Wait(RandomRange(2, 10));
end;
end;
Found :
begin
t := GetSystemTime;
while ( GetSystemTime - t < 7500 ) and
( not TalkingToAli ) do
Wait(75 + Random(50));
Result := TalkingToAli;
end;
Exit;
OnAli :
begin
if OnAliAttempts > 0 then
Exit;
WriteLn('Player is on Ali?');
MMouse(MSCX + 5, RandomRange(MSCY - 5, MSCY + 5), 2, 0);
Wait(50 + Random(50));
GetMousePos(x, y);
if Pos('orrisan', rs_GetUpText) > 0 then
begin
Mouse(x, y, 0, 0, True);
Result := FindColor(x, y, 254, x - 5, y - 5, x + 5, y + 5);
end else
begin
Mouse(x, y, 0, 0, False);
Result := WaitOption('alk-to Ali', 500);
end;
if Result then
begin
WriteLn('Yes');
goto Found;
end else WriteLn('No');
OnAliAttempts := OnAliAttempts + 1;
end;
end;
procedure rlytalktoali;
var
i: integer;
begin
repeat
if TalkToAli then
break;
wait(random(100));
i := i + 1;
if (i > 20) then
begin
writeln('fuck ali');
terminatescript;
end;
until(false);
end;
procedure handletalk;
var
chattime: integer;
begin
rlytalktoali;
chattime := getsystemtime;
repeat
wait(50);
if (GetCOlor(256, 460) = 11776948 )then
TypeSend(' ');
if (GetColor(82, 399) = 13158600) then
TypeSend('1');
if (GetColor(80, 412) = 13158600) then
TypeSend('2');
if (GetColor(200, 445) = 13158600) then
TypeSend('3');
if (GetColor(54, 61) = 1319729) then
begin
DoSudoku;
exit;
end;
if (getsystemtime - chattime > 50000) then
handletalk;
until(not(LoggedIn));
end;
Procedure SetupPlayer;
begin
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
ClickNorth(SRL_ANGLE_HIGH);
if not IsMoneyPouchOpen then
begin
WithdrawFromPouch(1);
ToggleMoneyPouch(True);
end;
ToggleMoneyPouch(True);
end;
var
GPs, LastAmount: Integer;
begin
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
DeclarePlayers;
SetupSRL;
MouseSpeed := 40;
AddOnTerminate('ScriptTerminate');
LoadArrays;
ReportTime := GetSystemTime + 310000;//for stats commit
SRL_Procs[srl_OnLogIn] := @SetupPlayer;
if not LoggedIn then
begin
Debug('Logging in Player');
Disguise('Logging in Player');
end;
LoginPlayer;
CloseSudoku;
repeat
MakeCompass('N');
if SudokuMenu then
DoSudoku;
handletalk;
if (not loggedin) then loginplayer;
if (TimeFromMark(FailTime) > 1200000) then
begin
writeln('failed');
Debug('FailTime');
Disguise('FailTime');
TerminateScript;
end;
Report;
ToggleMoneyPouch(True);
GPs := GetMoneyPouchAmount;
if GPs > 0 then
LastAmount := GPs
else
LastAmount := LastAmount-50000;
if (GPs < 50000) and (LastAmount < 120000) then
begin
Writeln('Out of GPs!');
Writeln(GPs);
Logout;
TerminateScript;
end;
with Players[CurrentPlayer] do
Disguise(MsToTime(GetTimeRunning, Time_Bare)+ ' '+ToStr(Integers[SOLVED])+'s/'+ToStr(Integers[SPH])+'ph ; GP: '+ToStr(GPs));
until false;
end.
The Claw
2012-01-08 23:55:44
Cheers, that works pretty well..however it makes me click "I want to look at your selection of runes" and then "Look at large casket"? It does everything else automatically.
Narcle
2012-01-09 00:07:26
From: The Claw
Cheers, that works pretty well..however it makes me click "I want to look at your selection of runes" and then "Look at large casket"? It does everything else automatically.
They prob changed it again. You'll have to update the GetColor cords/colors
HyperSecret
2012-01-09 03:02:10
Yes the other day, the GetColor for TypeSend(' '); got update and you had to get the new color. Besides that though, nothing has changed from my version. I am currently running it with only changing that.
The Claw
2012-01-09 09:06:40
Cheers guys, got it working now. However the script pretty much dies if it fails once, and when you're going this fast failures do happen due to random lag etc. Can't figure out how to make it keep going after 1 failure, any ideas? I'm getting 150/hour now, would be better if it kept going lol, even if it failed once or twice.
HyperSecret
2012-01-09 09:59:27
When it fails, it defaults to logging out but it should log back in and start working again…
Narcle
2012-01-09 10:07:21
From: The Claw
Cheers guys, got it working now. However the script pretty much dies if it fails once, and when you're going this fast failures do happen due to random lag etc. Can't figure out how to make it keep going after 1 failure, any ideas? I'm getting 150/hour now, would be better if it kept going lol, even if it failed once or twice.
Use mine, i changed it so it doesn't log out, just times out if it fails then starts over again.
HyperSecret
2012-01-09 11:52:43
From: Narcle
Use mine, i changed it so it doesn't log out, just times out if it fails then starts over again.
Have you gotten any randoms doing this? I thought the reason this was not done was so that we didn't get randoms. By clicking the 'X' to exit out of the soduko you go out the constant interface interaction, so that is why I thought we logged out.
Narcle
2012-01-09 13:38:37
From: HyperSecret
Have you gotten any randoms doing this? I thought the reason this was not done was so that we didn't get randoms. By clicking the 'X' to exit out of the soduko you go out the constant interface interaction, so that is why I thought we logged out.
None. I've ran it for the full 6 hours.
n3ss3s
2012-01-09 15:31:54
From: The Claw
I'm having some trouble starting this up again, using HyperSecret's version - it just clicks ali and sits there? From debugging I can see it doesn't find the "adventure" bitmap text but even when I change that line to a countcolor (to verify we've clicked ali) it still doesn't work.
Also, n3ss3s, would you please be able to post/PM your version of rune entering? :)
The posted versions have it in
n3ss3s
2012-01-17 17:18:25
Tbh, we've been raping this with quite the mouse speeds, what are your bets on bans for clickmouse?
EDIT: Disabling graphics seems to increase fuckups, any scientific backup for this?
EDIT: Rune prices on the rise
HyperSecret
2012-01-17 20:58:04
I have never had any of my accounts banned w/ this @ these mouse speeds :p
n3ss3s
2012-01-17 22:51:34
Yea me neither but I was wondering if we just blatantly used clickmouse, would they care? (Might not even be useful, not every rune-click registers when it's too fast)
cause
2012-01-23 16:43:53
hmm this isn't working for me (btw TRiLeZ I saw you there :P, canadian world), using Narcle's version. I did all the questing and stuff, gets stuck when you have all the options available to you (ie you should choose number 3, "see selection of runes"), also if I do rule7proof=true; the gp checker fails to find money.
Markus
2012-01-23 17:05:19
Rule7proof isn't used anywhere in the script anymore afaik :) Just there for legacy reasons.
cause
2012-01-23 17:08:56
lawl ok, I'm assuming the getcolor thing is broken.
TRiLeZ
2012-01-23 17:21:34
From: cause
hmm this isn't working for me (btw TRiLeZ I saw you there :P, canadian world), using Narcle's version. I did all the questing and stuff, gets stuck when you have all the options available to you (ie you should choose number 3, "see selection of runes"), also if I do rule7proof=true; the gp checker fails to find money.
Haha, hello.
I edited Narcle's script… fixed the chat handling, and also made it faster by pre-moving the mouse and remembering the last ali screen pos, then using those coords to re-click him, instead of re-searching the screen for him.

{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle, TRiLeZ *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.simba}
{.include srl/srl.simba}
const
Rule7proof = true; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = True;
DoSleep = true;
SleepEvery = 60; //Minutes
SleepFor = 8;
var
SleepTime, lastAliX, lastAliY, blahhh: Integer;
Playground : Array of Array of byte;
lolz : TStringArray;
DTM : array [1..9] of integer;
ownarr : array [1..9] of TPoint;
FailTime, ReportTime: integer;
NorthLast, UnSolvable: Boolean;
ColourArray: array [1..9] of integer;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
SOLVED = 0;
SPH = 1;
procedure DeclarePlayers;
begin
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SMART_SERVER := 1;
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := true;
end;
end;
procedure Debug(s : string);
begin
if debugmode then
writeln(s)
else
Status(s);
end;
procedure SudoMouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
a,b,c : integer;
begin
MMouse(mousex, mousey, ranx, rany);
Wait(2 + Random(8));
GetMousePos(b, c);
HoldMouse(b, c, mouse_Left);
repeat
Wait(5 + Random(10));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, mouse_Left);
Wait(75+Random(50));
end;
procedure SudoMouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
begin
case ClickType of
1 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, True);
2 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, False);
3 : MMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0);
else
srl_Warn('SudoMouseBox', 'ClickType is NOT a valid number!', warn_AllVersions);
end;
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
ColourArray[1] := getcolor(22, 102);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(76, 202);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(35, 100));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 CloseSudoku: boolean;
begin
if SudokuMenu then
begin
MouseBox(11,11,32,31, mouse_Left);
Result := True;
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, i : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
end;
for z := 0 to 8 do
begin
SetArrayLength(n3sWasHere, 0);
CurrentRune := RandomArr[z];
SudoMouse(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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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
//SudoMouse(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));
try
Lol := n3sWasHere[0];
Repeat
SudoMouse(Lol.x, Lol.y, 0, 0, True);
Lol := getNext(n3sWasHere, Lol);
Until(Lol.x = 0);
Except
Writeln('Error occured skipping it.');
end;
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
if(GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 498170) or (GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 114921)then
try
SudoMouseBox(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);
SudoMousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
CanExit:= False;
except
end;
until(CanExit) or (not(LoggedIn))
writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
SudoMouseBox(14, 61, 89, 78, 1);//open
Result := true;
MMouse(lastAliX, lastAliY, 0, 0);
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
CloseSudoku;
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' +
'VSCV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LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9B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YkWWCG7BeDGDMBKW' +
'h/FTjjwEfmrCnzrQj5WA/gBytNqLn6wcp79Bwmw8AM=');
OwnArr[5] := Point(20, 250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
H,M,S: integer;
begin
ConvertTime(gettimerunning, H, M, S)
writeln('');
With Players[CurrentPlayer] do
begin
Players[CurrentPlayer].Integers[SPH] := Round((Integers[SOLVED] * 3600.0) / (GetTimeRunning / 1000.0));
Writeln('Sudoku Solver ' + inttostr(H) + 'h:' + inttostr(M) + 'm:' + inttostr(S)+'s');
Writeln('Solved: '+ inttostr(Integers[SOLVED])+' | SpH: ' + IntToStr(Integers[SPH]));
//Writeln('Sold thru GE: '+inttostr(TimesInGE));
end;
writeln('');
if (ReportTime < GetSystemTime) then
begin
//stats_commit;
ReportTime := GetSystemTime + 310000;
end;
end;
procedure ScriptTerminate;
var
i: integer;
begin
for i := 1 to 9 do
FreeBitmap(DTM[i]);
Disguise('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime, T: Integer;
begin
T := GetSystemTime + 30000;
while (not SudokuMenu) and LoggedIn and (T < GetSystemTime) do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Wait(50);
repeat
//if FindNPCChatText('all the runes', ClickLeft) then
if(GetColor(156, 406) = 13158600)then
begin
TypeSend('1');
wait(randomrange(500,1000));
Inc(Players[CurrentPlayer].Integers[SOLVED]);
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
CloseSudoku
wait(50);
Result := False;
end;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkingToAli: Boolean;
var
bmpText, x, y: Integer;
begin
bmpText := CreateBitmapMaskFromText('adventuring', NPCChars);
Result := FindBitmapMaskTolerance(bmpText, x, y, MCX1, MCY1, MCX2, MCY2, 50, 10);
FreeBitmap(bmpText);
end;
var
OnAliAttempts: Integer;
function TalkToAli: Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
B: TBox;
{i,} x, y, t: Integer;
label
OnAli, Found;
begin
if ( not LoggedIn ) then
Exit;
Result := False;
if (IsUpText('alk-to Ali')) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
t := GetSystemTime;
while GetSystemTime - t < 500 do
begin
Result := CountColor(254, x - 5, y - 5, x + 5, y + 5) > 0;
if Result then
Exit; //!!!ORIGINALLY Break!!!!
if CountColor(65278, x - 5, y - 5, x + 5, y + 5) > 0 then
begin
WriteLn('Miss-clicked Ali!');
Flag;
Exit;
end;
Wait(RandomRange(2, 10));
end;
goto Found;
end;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.44);
FindColorsTolerance(TPA, 6639416, MSX1, MSY1, MSX2, MSY2, 50);
ColorToleranceSpeed(1);
if Length(TPA) > 0 then
ATPA := SplitTPA(TPA, 20)
else
goto OnAli;
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
B := GetTPABounds(ATPA[0]);
with B do
MMouse(RandomRange(x1, x2 - 5), RandomRange(y1, y2), 0, 0);
Wait(15 + Random(25));
if ( not Pos('orrisan', rs_GetUpText) > 0 )then
Exit;
GetMousePos(x, y);
{if Random(25) = 3 then
begin
Mouse(x, y, 0, 0, False);
Result := WaitOption('alk-to Ali', 500);
end else }
begin
Mouse(x, y, 0, 0, True);
t := GetSystemTime;
while GetSystemTime - t < 500 do
begin
Result := CountColor(254, x - 5, y - 5, x + 5, y + 5) > 0;
if Result then
begin
lastAliX := x;
lastAliY := y;
Exit; //!!!ORIGINALLY Break!!!!
end;
if CountColor(65278, x - 5, y - 5, x + 5, y + 5) > 0 then
begin
WriteLn('Miss-clicked Ali!');
Flag;
Exit;
end;
Wait(RandomRange(2, 10));
end;
end;
Found :
begin
t := GetSystemTime;
while ( GetSystemTime - t < 7500 ) and
( not TalkingToAli ) do
Wait(75 + Random(50));
Result := TalkingToAli;
end;
Exit;
OnAli :
begin
if OnAliAttempts > 0 then
Exit;
WriteLn('Player is on Ali?');
MMouse(MSCX + 5, RandomRange(MSCY - 5, MSCY + 5), 2, 0);
Wait(50 + Random(50));
GetMousePos(x, y);
if Pos('orrisan', rs_GetUpText) > 0 then
begin
Mouse(x, y, 0, 0, True);
Result := FindColor(x, y, 254, x - 5, y - 5, x + 5, y + 5);
end else
begin
Mouse(x, y, 0, 0, False);
Result := WaitOption('alk-to Ali', 500);
end;
if Result then
begin
WriteLn('Yes');
goto Found;
end else WriteLn('No');
OnAliAttempts := OnAliAttempts + 1;
end;
end;
procedure rlytalktoali;
var
i: integer;
begin
repeat
if TalkToAli then
break;
wait(random(100));
i := i + 1;
if (i > 20) then
begin
writeln('fuck ali');
terminatescript;
end;
until(false);
end;
function tchatwait: boolean;
var
ccount: Integer;
begin
ccount := CountColor(13158600, MCX1 + 80, MCY1 + 40, MCX2 - 40, MCY2 - 80);
Result := (not (ccount = blahhh));
end;
procedure handletalk;
var
chattime, ccount: integer;
begin
rlytalktoali;
chattime := getsystemtime;
repeat
wait(50);
if (GetCOlor(256, 460) = 11776948 )then
TypeSend(' ');
ccount := CountColor(13158600, MCX1 + 80, MCY1 + 40, MCX2 - 40, MCY2 - 80);
if (ccount = 641) then
begin
TypeSend('3');
blahhh := 641;
WaitFunc(@tchatwait, 10, 10000);
end else
if (ccount = 379) then
begin
TypeSend('2');
blahhh := 379;
WaitFunc(@tchatwait, 10, 10000);
end else
if (ccount = 36) then
begin
TypeSend('3');
MMouse(29, 212, 12, 12);
blahhh := 36;
WaitFunc(@tchatwait, 10, 10000);
end;
if (GetColor(54, 61) = 1319729) then
begin
DoSudoku;
exit;
end;
if (getsystemtime - chattime > 50000) then
handletalk;
until(not(LoggedIn));
end;
Procedure SetupPlayer;
begin
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
ClickNorth(SRL_ANGLE_HIGH);
if not IsMoneyPouchOpen then
begin
WithdrawFromPouch(1);
ToggleMoneyPouch(True);
end;
ToggleMoneyPouch(True);
end;
var
GPs, LastAmount: Integer;
begin
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
DeclarePlayers;
SetupSRL;
MouseSpeed := 100;
AddOnTerminate('ScriptTerminate');
LoadArrays;
ReportTime := GetSystemTime + 310000;//for stats commit
SRL_Procs[srl_OnLogIn] := @SetupPlayer;
if not LoggedIn then
begin
Debug('Logging in Player');
Disguise('Logging in Player');
end;
LoginPlayer;
CloseSudoku;
repeat
MakeCompass('N');
if SudokuMenu then
DoSudoku;
handletalk;
if (not loggedin) then loginplayer;
if (TimeFromMark(FailTime) > 1200000) then
begin
writeln('failed');
Debug('FailTime');
Disguise('FailTime');
TerminateScript;
end;
Report;
ToggleMoneyPouch(True);
GPs := GetMoneyPouchAmount;
if GPs > 0 then
LastAmount := GPs
else
LastAmount := LastAmount-50000;
if (GPs < 50000) and (LastAmount < 120000) then
begin
Writeln('Out of GPs!');
Writeln(GPs);
Logout;
TerminateScript;
end;
with Players[CurrentPlayer] do
Disguise(MsToTime(GetTimeRunning, Time_Bare)+ ' '+ToStr(Integers[SOLVED])+'s/'+ToStr(Integers[SPH])+'ph ; GP: '+ToStr(GPs));
until false;
end.
I'm currently getting 137 SpH.
cause
2012-01-23 17:33:28
Ah thank you! I seem to fail about every other puzzle I attempt to do, any ideas? I'm going to throw some waits around, see if that helps.
HyperSecret
2012-01-23 17:38:01
IF you are failing when entering the runes then change the last wait in the sudokumouse function.
cause
2012-01-23 18:58:19
Ok will do, I noticed if I close all my programs and high priority it, it doesn't fail. Going at about 120 SpH!! Stoked!
n3ss3s
2012-01-23 23:34:42
EDIT: nvm
the scar noob
2012-01-24 21:53:22
Does this one still works? I always wanted to test this one Mark :)
From: the scar noob
Does this one still works? I always wanted to test this one Mark :)
If you get one of the more recent versions posted it does.
weequ
2012-01-25 05:26:28
I will have to try this out sometime too ;D
HyperSecret
2012-01-25 09:29:35
From: illuminatiswag
If its sudoku ive bought one off someone and its not 2m+ and also prices are droping right now
http://villavu.com/forum/showthread.php?p=904585#post904585I really hope that someone here isn't selling/leaking this for their own gains, and some people are abusing the shit out of this. I have seen a big increase in the amount of people at sudoku, gonna not be good money soon…
n3ss3s
2012-01-25 15:06:44
I'm never watching when it starts walking around (I always log in somewhere near the pond), so I just added
if (rs_GetUpText = 'Walk here') then
Exit;
after the MMouse in Mouse().
cause
2012-01-25 16:08:37
Never had it wander for me…also that post by illuminatiswag is a little disconcerting, and Demise doesn't seem to stop going on about it.
n3ss3s
2012-01-25 16:14:58
From: cause
Never had it wander for me…also that post by illuminatiswag is a little disconcerting, and Demise doesn't seem to stop going on about it.
Thing is illuminati didn't say a word about it being our script, nor whether it was before or after the bot nuke etc
HyperSecret
2012-01-25 22:05:43
And mormonman is talking as if he has the script too…
noidea
2012-01-26 00:00:38
From: DemiseScythe
I am the person that is going to rape sudoku to 200k/hr so you go and feel better about yourself while you can.
From: DemiseScythe
Of course you did not buy it in Villavu, I think mods would know if you did and they are on all their right to ask inquiry on a possibly leaked script. You became part of this community, you listen to those above you and follow the rules.
I not gonna lie - she pisses me off on the daily. she's so full of herself and won't listen to anyone else. She CONSTANTLY is talking about and mentioning sudoku.
And with this flood of new people to the IRC its become so unsavory I don't do anything but idle anymore…
And Illuminati probably could have been handled a bit more elegantly rather than everyone jumping on him at the same time.
Narcle
2012-01-26 00:11:41
Its a server side Sudoku solver from my understanding. Send info out, gets results and places the runes. The solver clicks fast (like as fast as ours) but everything else is slow. The automation of the whole process I don't think is as fast. (the 120+ SpH we get I think is still way higher)
E:
I have yet to see code or it work, so I can't say for sure.
E2:
Also note people on thread saying its 400k p/h which is slow for us, lawl.
Kyle Undefined
2012-01-26 01:49:17
No one attacked him or anyone until the idiot(s) responded to our asking.
Markus
2012-01-26 04:52:37
I sent him a PM in which I said you are all immature noobs (and apologize for that) and I asked nicely for some information.
Hobbit
2012-01-26 15:14:51
The chat handling keep screwing up on me. The count color for the chat options keeps returning either 0 or numbers that are not handled. Sometimes it returns the proper numbers (Not often) and the improper numbers it returns are never consistent. :(
Narcle
2012-01-26 15:57:49
From: Hobbit
The chat handling keep screwing up on me. The count color for the chat options keeps returning either 0 or numbers that are not handled. Sometimes it returns the proper numbers (Not often) and the improper numbers it returns are never consistent. :(
Color count? The current chat handling we use atm is GetColor.
n3ss3s
2012-01-26 15:57:53
(Trilez's version r gawt broken handln)
the scar noob
2012-01-26 15:59:56
Are you guys serious? I always wanted to try this one, and now..after 2 years I can (have paypal acc for members), but the script is broken xD
EDIT: This Monday I will do an attempt on fixing the prob, I'll subscribe as member, do quests and then check it out to see if I can help.
TRiLeZ
2012-01-26 17:41:28
I'm running my version right now, and it's working fine… I'm using SMART in Safe Mode with min settings and max CPU from the client with the SMART slider all the way up, it that makes a difference.
On the other hand, yesterday I decided to overclock my modded version to make it go super fast…
The proggie I had from this morning showed I had 198 SPH for the 6 hours I ran it.
My current proggie:
Sudoku Solver 0h:30m:20s
Solved: 101 | SpH: 200
Nobody ask for my overclocked version. It's private. :f:
n3ss3s
2012-01-26 17:45:29
Nobody ask for my overclocked version. It's private.
Cool, so is this
Kyle Undefined
2012-01-26 17:46:03
From: TRiLeZ
I'm running my version right now, and it's working fine… I'm using SMART in Safe Mode with min settings and max CPU from the client with the SMART slider all the way up, it that makes a difference.
On the other hand, yesterday I decided to overclock my modded version to make it go super fast…
The proggie I had from this morning showed I had 198 SPH for the 6 hours I ran it.
My current proggie:
Nobody ask for my overclocked version. It's private. :f:
Can I have your overclocked version? :p That's badass though.
TRiLeZ
2012-01-26 18:12:35
From: Kyle Undefined
Can I have your overclocked version? :p That's badass though.
Haha. It's pretty much just lowering the waits. :p
Today, the script has been running for an hour, resulting in me making 2.4m. That's before selling though… it's still above 2m/h though. :)
n3ss3s
2012-01-26 18:20:12
Haha. It's pretty much just lowering the waits.
Thing is, when I (and others?) lower the waits, the mouse clicks become inaccurate, you'll start seeing "I cannot remove this rune" or w/e :/ Did you make it enter them multiple times or something?
HyperSecret
2012-01-26 21:56:30
Trilez, I assume you are running this on an account that has more than ONLY the fued done?
Hobbit
2012-01-26 22:08:34
I have much more quest done so I always have to edit the chat, but this was just messed up. I picked different colors and its more stable now. Ive also added bitmap backups to 1 of the chat screens and to the green next arrow cause it seems to miss it. Working great @135 SPH right now
the scar noob
2012-01-26 23:15:22
I kinda fixed chat, but solver doesn't work?
in chat: "It is still locked"
E: It's the large sudoku right? Btw, this is kinda weird since the solver itself works for the rest?:/
E:
From: Hobbit
I have much more quest done so I always have to edit the chat, but this was just messed up. I picked different colors and its more stable now. Ive also added bitmap backups to 1 of the chat screens and to the green next arrow cause it seems to miss it. Working great @135 SPH right now
Mind sharing your version?xD
n3ss3s
2012-01-26 23:39:27
E: It's the large sudoku right? Btw, this is kinda weird since the solver itself works for the rest?:/
Narcle's version on p43 (I Think) has a working chatter..
the scar noob
2012-01-26 23:43:39
From: n3ss3s
Narcle's version on p43 (I Think) has a working chatter..
I edited that one, there was a wrong getcolor coord.
The prob is, that the solver doesn't work for some reason :/
E: Simba crashed once..I'll restart my pc and try again.
noidea
2012-01-26 23:52:46
From: Demiscytehe
After HE[noidea] threatened to BAN me TWICE on irc when I say I wanted to make one?
We already had this argument, Wizzup said I was allowed to MAKE and RELEASE whatever I wanted.
Since that thread has been closed -
Just to clarify, this is completely outrageous and I did no such thing. I said once on irc she could be banned for it (because she just wouldn't stop bringing it up ALL the time). I never said that I nor anyone else would ban her. Jesus christ - women blowing stuff up all the time.
Coh3n
2012-01-27 00:00:00
From: noidea
Since that thread has been closed -
Just to clarify, this is completely outrageous and I did no such thing. I said once on irc she could be banned for it (because she just wouldn't stop bringing it up ALL the time). I never said that I nor anyone else would ban her. Jesus christ - women blowing stuff up all the time.
She is very sensitive, yes. All I tell her is to not take things personally. Seems to help a little, but I think the best thing is to just ignore her, and try not to piss her off.
Flight
2012-01-27 00:12:06
From: Coh3n
She is very sensitive, yes. All I tell her is to not take things personally. Seems to help a little, but I think the best thing is to just ignore her, and try not to piss her off.
Seems like she herself was adding fuel to the fire.
From: DemiseScythe
How is this thread illegal and this one legal:
http://villavu.com/forum/showthread.php?t=73051
Enforce the rules all round or dont bother.
Noidea just but' hurt there is going to be a public sudoku.
Besides chill your vegball… it is illegal to sell it on this site and
finished product is not going to be either sold on here nor
writen with SRL, so just chillax.
I asked the question about where she heard about Noidea's opinions because I thought that was referred to in his post here in the SSRL section; implying someone has been telling her what's going on here in this section.
I apologize to everyone else for having made this comment in this thread. If you'd like to have it removed then that's fine, just delete this post. I only wanted to straighten out my reasoning for having asked her that question.
Coh3n
2012-01-27 00:16:29
Yeah, she's really sensitive. Usually when someone says stuff like she did (quoted in your post) it's because they were offended somehow by the people they're talking about.
I, in no way, agree with the way she handles it sometimes, that's why on IRC I try to get her to settle down.
Wanted
2012-01-27 00:29:04
From: noidea
Since that thread has been closed -
Just to clarify, this is completely outrageous and I did no such thing. I said once on irc she could be banned for it (because she just wouldn't stop bringing it up ALL the time). I never said that I nor anyone else would ban her. Jesus christ - women blowing stuff up all the time.
http://www.youtube.com/watch?v=vzTry4bUfUs
Hobbit
2012-01-27 01:47:12
From: Coh3n
I, in no way, agree with the way she handles it sometimes, that's why on IRC I try to get her to settle down.
That's what my pipe down comment was about. Her explosive personality.
Narcle
2012-01-27 02:02:49
From: Wanted
http://www.youtube.com/watch?v=vzTry4bUfUs
HAHA +1
Also I figured they changed the GetColors, just update them. I also had the same problem as n3s, maybe TRi has a badass computer? That or I was honestly thinking of using ClickMouse heh (the speeds are unreal already). Did you try it yet Hyper?
@Demise
She always blows up, or NEVER lets it go.
Hobbit
2012-01-27 02:15:20
I just through the bitmap loading in with the LoadArrays procedure.
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle, TRiLeZ *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.simba}
{.include srl/srl.simba}
const
Rule7proof = true; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = True;
DoSleep = true;
SleepEvery = 60; //Minutes
SleepFor = 8;
var
SleepTime, lastAliX, lastAliY, blahhh: Integer;
Playground : Array of Array of byte;
lolz : TStringArray;
DTM : array [1..9] of integer;
ownarr : array [1..9] of TPoint;
FailTime, ReportTime: integer;
NorthLast, UnSolvable: Boolean;
ColourArray: array [1..9] of integer;
howare, howare2, chat: integer;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
SOLVED = 0;
SPH = 1;
procedure DeclarePlayers;
begin
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SMART_SERVER := 1;
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := true;
end;
end;
procedure Debug(s : string);
begin
if debugmode then
writeln(s)
else
Status(s);
end;
procedure SudoMouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
a,b,c : integer;
begin
MMouse(mousex, mousey, ranx, rany);
Wait(2 + Random(8));
GetMousePos(b, c);
HoldMouse(b, c, mouse_Left);
repeat
Wait(5 + Random(10));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, mouse_Left);
Wait(75+Random(50));
end;
procedure SudoMouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
begin
case ClickType of
1 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, True);
2 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, False);
3 : MMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0);
else
srl_Warn('SudoMouseBox', 'ClickType is NOT a valid number!', warn_AllVersions);
end;
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
ColourArray[1] := getcolor(22, 102);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(76, 202);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(35, 100));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 CloseSudoku: boolean;
begin
if SudokuMenu then
begin
MouseBox(11,11,32,31, mouse_Left);
Result := True;
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, i : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
end;
for z := 0 to 8 do
begin
SetArrayLength(n3sWasHere, 0);
CurrentRune := RandomArr[z];
SudoMouse(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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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
//SudoMouse(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));
try
Lol := n3sWasHere[0];
Repeat
SudoMouse(Lol.x, Lol.y, 0, 0, True);
Lol := getNext(n3sWasHere, Lol);
Until(Lol.x = 0);
Except
Writeln('Error occured skipping it.');
end;
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
if(GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 498170) or (GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 114921)then
try
SudoMouseBox(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);
SudoMousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
CanExit:= False;
except
end;
until(CanExit) or (not(LoggedIn))
writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
SudoMouseBox(14, 61, 89, 78, 1);//open
Result := true;
MMouse(lastAliX, lastAliY, 0, 0);
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
CloseSudoku;
Result := False;
Exit;
end;
end;
procedure LoadArrays;
begin
howare := BitmapFromString(26, 12, 'meJxTlBFSBCM1RTHKkSLMtMGJTp' +
'w4gZUhJ4WOTsAAsghcHMjAYxpWhGwIsjkQBNeLSWL1BRzgspdI05A' +
'F8fsCq0qamkakT/EHOBrCr5JU0wggSX4IkhbjRUNwKeIRAHBBtxM=');
howare2 := BitmapFromString(19, 7, 'meJxjYGCoXnsTiBiQGLUb7iIjuDg' +
'EYKpH17jpAQgh6YWwISrRSIg4VAuSRog4HGBqx6IRrBfZ/RA2XBdC' +
'EE0XGGFqxGIaNo0QvXDQtOUBWgDi0gX17KYHQC0QBADB7coG');
chat := BitmapFromString(6, 8, 'meJxjYGB4+/49AxIAcv/++wdEyIIX' +
'L17CFNy8eQtEcP/hQxCRzv6eXbt2nz59ZtWq1UDu7DlzJk+ZMnv2H' +
'IgsUAqIgLqQDQGKIHMBAkI0eg==');
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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rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[8] := Point(70, 200); //dea
dtm[8]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/H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' +
'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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc236MtLY9jMZHHBp6PD75AmFc' +
'VP1ayG8E8nSUZRl1wI0eamzuj0WddXcN9T4EjYqEEEuTP8bErg5OV' +
'4iIcJUPsP3Z3BefzflNTRyTS1/mIqBGtpATyYy9fOoNcuHUEOM4Vi' +
'zLh815jY3tbG2SEc2JBdlbAXGRrN7GQObbJxMh3btXHWltpYm/HQy' +
'R+nmT1GjKZEzjdZFSMXH+jVlHTR/gq4ZL9sl9ptMiaFtKmlUa+WV1' +
'NIESNjO8nny0sRB4yU8T8EIjmnA1iPY1cVXFFgZC2y3fJLtaFMz/Y' +
'hmzrSR+NXBEKEQhTjYwPPFcgdt3mH7I9GwnE9oUvtVXXsE3aJ8Lti' +
'oaTyReZqRZcWCNjO1xTQ9ouXPysC8hYMvnaLGzbQwy457mktBvq6t' +
'gawV3zHqyNPba1sDRRcNewkUOlpcpEcE8yhtVMCi7bCkTwrM9/NxN' +
'k5v0zI7hsu3C/YSNfLCm5XlnJeBPL3YbbLtxtq8E9zoNfWBeKi8vL' +
'ysjcwzdRyC0h83ovZzXseXeT+dXycmJnzhvDYYkWWCG7BeDGDMBKW' +
'h/FTjjwEfmrCnzrQj5WA/gBytNqLn6wcp79Bwmw8AM=');
OwnArr[5] := Point(20, 250); //water
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
H,M,S: integer;
begin
ConvertTime(gettimerunning, H, M, S)
writeln('');
With Players[CurrentPlayer] do
begin
Players[CurrentPlayer].Integers[SPH] := Round((Integers[SOLVED] * 3600.0) / (GetTimeRunning / 1000.0));
Writeln('Sudoku Solver ' + inttostr(H) + 'h:' + inttostr(M) + 'm:' + inttostr(S)+'s');
Writeln('Solved: '+ inttostr(Integers[SOLVED])+' | SpH: ' + IntToStr(Integers[SPH]));
//Writeln('Sold thru GE: '+inttostr(TimesInGE));
end;
writeln('');
if (ReportTime < GetSystemTime) then
begin
//stats_commit;
ReportTime := GetSystemTime + 310000;
end;
end;
procedure ScriptTerminate;
var
i: integer;
begin
for i := 1 to 9 do
FreeBitmap(DTM[i]);
Disguise('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime, T: Integer;
begin
T := GetSystemTime + 30000;
while (not SudokuMenu) and LoggedIn and (T < GetSystemTime) do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Wait(50);
repeat
//if FindNPCChatText('all the runes', ClickLeft) then
if(GetColor(156, 406) = 13158600)then
begin
TypeSend('1');
wait(randomrange(500,1000));
Inc(Players[CurrentPlayer].Integers[SOLVED]);
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
CloseSudoku
wait(50);
Result := False;
end;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkingToAli: Boolean;
var
bmpText, x, y: Integer;
begin
bmpText := CreateBitmapMaskFromText('adventuring', NPCChars);
Result := FindBitmapMaskTolerance(bmpText, x, y, MCX1, MCY1, MCX2, MCY2, 50, 10);
FreeBitmap(bmpText);
end;
var
OnAliAttempts: Integer;
function TalkToAli: Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
B: TBox;
{i,} x, y, t: Integer;
label
OnAli, Found;
begin
if ( not LoggedIn ) then
Exit;
Result := False;
if (IsUpText('alk-to Ali')) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
t := GetSystemTime;
while GetSystemTime - t < 500 do
begin
Result := CountColor(254, x - 5, y - 5, x + 5, y + 5) > 0;
if Result then
Exit; //!!!ORIGINALLY Break!!!!
if CountColor(65278, x - 5, y - 5, x + 5, y + 5) > 0 then
begin
WriteLn('Miss-clicked Ali!');
Flag;
Exit;
end;
Wait(RandomRange(2, 10));
end;
goto Found;
end;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.44);
FindColorsTolerance(TPA, 6639416, MSX1, MSY1, MSX2, MSY2, 50);
ColorToleranceSpeed(1);
if Length(TPA) > 0 then
ATPA := SplitTPA(TPA, 20)
else
goto OnAli;
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
B := GetTPABounds(ATPA[0]);
with B do
MMouse(RandomRange(x1, x2 - 5), RandomRange(y1, y2), 0, 0);
Wait(15 + Random(25));
if ( not Pos('orrisan', rs_GetUpText) > 0 )then
Exit;
GetMousePos(x, y);
{if Random(25) = 3 then
begin
Mouse(x, y, 0, 0, False);
Result := WaitOption('alk-to Ali', 500);
end else }
begin
Mouse(x, y, 0, 0, True);
t := GetSystemTime;
while GetSystemTime - t < 500 do
begin
Result := CountColor(254, x - 5, y - 5, x + 5, y + 5) > 0;
if Result then
begin
lastAliX := x;
lastAliY := y;
Exit; //!!!ORIGINALLY Break!!!!
end;
if CountColor(65278, x - 5, y - 5, x + 5, y + 5) > 0 then
begin
WriteLn('Miss-clicked Ali!');
Flag;
Exit;
end;
Wait(RandomRange(2, 10));
end;
end;
Found :
begin
t := GetSystemTime;
while ( GetSystemTime - t < 7500 ) and
( not TalkingToAli ) do
Wait(75 + Random(50));
Result := TalkingToAli;
end;
Exit;
OnAli :
begin
if OnAliAttempts > 0 then
Exit;
WriteLn('Player is on Ali?');
MMouse(MSCX + 5, RandomRange(MSCY - 5, MSCY + 5), 2, 0);
Wait(50 + Random(50));
GetMousePos(x, y);
if Pos('orrisan', rs_GetUpText) > 0 then
begin
Mouse(x, y, 0, 0, True);
Result := FindColor(x, y, 254, x - 5, y - 5, x + 5, y + 5);
end else
begin
Mouse(x, y, 0, 0, False);
Result := WaitOption('alk-to Ali', 500);
end;
if Result then
begin
WriteLn('Yes');
goto Found;
end else WriteLn('No');
OnAliAttempts := OnAliAttempts + 1;
end;
end;
procedure rlytalktoali;
var
i: integer;
begin
repeat
if TalkToAli then
break;
wait(random(100));
i := i + 1;
if (i > 20) then
begin
writeln('fuck ali');
terminatescript;
end;
until(false);
end;
function tchatwait: boolean;
var
ccount: Integer;
begin
ccount := CountColor(13158600, MCX1 + 80, MCY1 + 40, MCX2 - 40, MCY2 - 80);
Result := (not (ccount = blahhh));
end;
procedure handletalk;
var
chattime, ccount : integer;
begin
rlytalktoali;
chattime := getsystemtime;
repeat
wait(75);
if (FindColorTolerance(x,y,1845025,MCX1,MCY1,MCX2,MCY2,10)) or (FindBitmap(chat,x,y)) or (FindBitmap(howare2,x,y)) then
TypeSend(' ');
ccount := CountColor(13158600, MCX1 + 80, MCY1 + 40, MCX2 - 40, MCY2 - 80);
if (ccount = 156) then
begin
TypeSend('1');
blahhh := 156;
WaitFunc(@tchatwait, 10, 5000);
end else
if (FindBitmap(howare,x,y)) then
begin
TypeSend('1');
blahhh := 0;
WaitFunc(@tchatwait, 10, 5000);
end else
if (ccount = 641) then
begin
TypeSend('3');
blahhh := 641;
WaitFunc(@tchatwait, 10, 5000);
end else
if (ccount = 366) then
begin
TypeSend('2');
blahhh := 379;
WaitFunc(@tchatwait, 10, 5000);
end else
if (ccount = 36) then
begin
TypeSend('3');
MMouse(29, 212, 12, 12);
blahhh := 36;
WaitFunc(@tchatwait, 10, 5000);
end;
if (GetColor(54, 61) = 1319729) then
begin
DoSudoku;
exit;
end;
if (getsystemtime - chattime > 50000) then
handletalk;
until(not(LoggedIn));
end;
Procedure SetupPlayer;
begin
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
ClickNorth(SRL_ANGLE_HIGH);
if not IsMoneyPouchOpen then
begin
WithdrawFromPouch(1);
ToggleMoneyPouch(True);
end;
ToggleMoneyPouch(True);
end;
var
GPs, LastAmount: Integer;
begin
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
DeclarePlayers;
SetupSRL;
MouseSpeed := 100;
AddOnTerminate('ScriptTerminate');
LoadArrays;
ReportTime := GetSystemTime + 310000;//for stats commit
SRL_Procs[srl_OnLogIn] := @SetupPlayer;
if not LoggedIn then
begin
Debug('Logging in Player');
Disguise('Logging in Player');
end;
LoginPlayer;
CloseSudoku;
repeat
MakeCompass('N');
if SudokuMenu then
DoSudoku;
handletalk;
if (not loggedin) then loginplayer;
if (TimeFromMark(FailTime) > 1200000) then
begin
writeln('failed');
Debug('FailTime');
Disguise('FailTime');
TerminateScript;
end;
Report;
ToggleMoneyPouch(True);
GPs := GetMoneyPouchAmount;
if GPs > 0 then
LastAmount := GPs
else
LastAmount := LastAmount-50000;
if (GPs < 50000) and (LastAmount < 120000) then
begin
Writeln('Out of GPs!');
Writeln(GPs);
Logout;
TerminateScript;
end;
with Players[CurrentPlayer] do
Disguise(MsToTime(GetTimeRunning, Time_Bare)+ ' '+ToStr(Integers[SOLVED])+'s/'+ToStr(Integers[SPH])+'ph ; GP: '+ToStr(GPs));
until false;
end.
Markus
2012-01-27 02:28:36
Question, do I have permission to say in her face she has the personality of a junky who's out of crack? Because that's the only thing I can think of that comes close to describing it.
Tbh if I have to choose between working antirandoms or no more schizophrenic hypersensitive attention whore, I'd choose the latter.
Narcle
2012-01-27 02:34:13
From: Markus
Question, do I have permission to say in her face she has the personality of a junky who's out of crack? Because that's the only thing I can think of that comes close to describing it.
Tbh if I have to choose between working antirandoms or no more schizophrenic hypersensitive attention whore, I'd choose the latter.
I have to agree. I have a feeling Coh3n will rewrite 80% of it anyways and I want to look at it when I have free time, specially random detection system I want to make that flawless.
Coh3n
2012-01-27 02:51:57
From: Narcle
I have to agree. I have a feeling Coh3n will rewrite 80% of it anyways and I want to look at it when I have free time, specially random detection system I want to make that flawless.
You guys are free to say what you want. I am rewriting.. more like 95% of it anyway. BUT, she's much better at making the DTMs work than I am, AND she's willing to do the stupid repetitive code (which helps me out a lot).
I'm going to try to get it new code on git soon, it's just not ready. Narcle, the actual detection of the randoms looks for the NPC chat name (of the person who's talking) or most randoms (some, like Evil Bob, won't work that way), so there should be no problems there. Here's the status of the new system:
http://villavu.com/forum/showthread.php?p=900978#post900978
n3ss3s
2012-01-27 04:30:41
Idk what the fuck are people on about with the chat colors, I havent had to update shit
Narcle
2012-01-27 05:01:43
From: Coh3n
You guys are free to say what you want. I am rewriting.. more like 95% of it anyway. BUT, she's much better at making the DTMs work than I am, AND she's willing to do the stupid repetitive code (which helps me out a lot).
I'm going to try to get it new code on git soon, it's just not ready. Narcle, the actual detection of the randoms looks for the NPC chat name (of the person who's talking) or most randoms (some, like Evil Bob, won't work that way), so there should be no problems there. Here's the status of the new system:
http://villavu.com/forum/showthread.php?p=900978#post900978
Yeah I know. I talked to her and got the Font file she had. I will eventually finish it (just in case its needed in future). She does work I'll grant her that, but her attitude is /wrist. I just want to make sure the detection system is updated, I've come back many times and seen that my script ran an extra 2 hours while in an random… Don't want that to happen in future.
Anyways back on topic, we'll continue this else where if needed.
Markus
2012-01-27 05:33:08
EDIT: Someone trusted said Demise said showed the script. It's the old (now-removed) public one patched up to work.
EDIT 2: Same person says it is Wanted/IceFire doing a remake to release for free at scar-divi.
You got an antirandom thread in devs. that's good.
Harri PM'ed me today, it summarizes the situation and I replied him telling what I know. Opinion plz:
From: Markus
From: Harry
Do you know the username of the person making a Sudoku solver for SCAR? Demise talks about it but has refused to give me the person's name. I wish to whip some common sense into the guy before he publicly releases it in a few days (or so I have been informed). I can't even sudoku myself; I just do not want to see the RS economy even more ruined with every single public goldfarmer using it. It was pretty nice when everyone forgot about it :/
I have NO IDEA and I wish I knew who was. I know Cruiz1n or w/ever he's called made a (really crude) one, but we gave him SRL Membership if he'd stfu. Little bit of bribing never hurts right? :p
If Demise actually had the skills to create such a thing herself, I'd say it is her, but I doubt someone not even able to utilise a for-loop is able to create such a thing (even with php sudoku solvers taken into account).
From what I know, someone is going to release it for free @ Freddy's place. I doubt Freddy is willing to corporate as I'm at the Simba developer list and such blabla although I did stick up for him at times and never was anti-SCAR. Hmmm, could it be Icefire or Naum trying to get OSI more popular?? It's a bit far-fetched and I don't think they'd do such a low act, but I'm all out of ideas.
TL;DR: IDK, it's a faggot.
HyperSecret
2012-01-27 09:51:02
From: Markus
EDIT: Someone trusted said Demise said showed the script. It's the old (now-removed) public one patched up to work.
EDIT 2: Same person says it is Wanted/IceFire doing a remake to release for free at scar-divi.
I figured some people probably had that scripted stored away on their HD somewhere and dusted it off.
I also seen Icefire/Wanted post on this thread and thought to myself, hmm, I hope he doesn't release/distribute this for OSI to try to "get back" at us.
the scar noob
2012-01-27 17:10:18
Forget my post though, the prob was that I was running it on a slow laptop.
Now I'm running it on my PC and the solving works :)
E: Flawless!!
Sudoku Solver 0h:58m:9s
Solved: 98 | SpH: 101
Out of GPs!
21000
Coh3n
2012-01-27 19:13:43
From: Markus
EDIT: Someone trusted said Demise said showed the script. It's the old (now-removed) public one patched up to work.
EDIT 2: Same person says it is Wanted/IceFire doing a remake to release for free at scar-divi.
You got an antirandom thread in devs. that's good.
Harri PM'ed me today, it summarizes the situation and I replied him telling what I know. Opinion plz:
I wouldn't be surprised if it's IceFire. Not because he wants to "get back" at us, but to attract users to OSI. You have to admit, it would definitely draw in users.
Things is, we can't really stop anyone from writing their own, unless Markus, you patent the idea and do some other legal shit that I'm unaware of.
Hobbit
2012-01-27 19:49:05
Tweaked it a little bit more and smoothed out the chat (for me anyways)
Took us... 10094 msecs!!!!
Sudoku Solver 0h:4m:7s
Solved: 10 | SpH: 145
{******************************************************************************)
(* *)
(* ALI SODUKU SOLVER *)
(* *)
(* by Markus *)
(* Modded & Improved by Narcle, TRiLeZ *)
(* Credits to Ray, Wizz, King of Knives, n3ss3s and The Crew! *)
(******************************************************************************)
(* *)
(* DESCRIPTION: This script solves 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. *)
(* *)
(******************************************************************************}
program ALISODUKUSOLVER;
{.include srl/srl/misc/smart.simba}
{.include srl/srl.simba}
const
Rule7proof = true; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
debugmode = True;
DoSleep = true;
SleepEvery = 60; //Minutes
SleepFor = 8;
var
SleepTime, lastAliX, lastAliY, blahhh: Integer;
Playground : Array of Array of byte;
lolz : TStringArray;
DTM : array [1..9] of integer;
ownarr : array [1..9] of TPoint;
FailTime, ReportTime: integer;
NorthLast, UnSolvable: Boolean;
ColourArray: array [1..9] of integer;
howare, howare2, chat: integer;
const
XStart = 118;
YStart = 8;
XOff = 37;
YOff = 37;
SOLVED = 0;
SPH = 1;
procedure DeclarePlayers;
begin
Disguise('Declaring Players');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SMART_SERVER := 1;
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := true;
end;
end;
procedure Debug(s : string);
begin
if debugmode then
writeln(s)
else
Status(s);
end;
procedure SudoMouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
a,b,c : integer;
begin
MMouse(mousex, mousey, ranx, rany);
Wait(2 + Random(8));
GetMousePos(b, c);
HoldMouse(b, c, mouse_Left);
repeat
Wait(5 + Random(10));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, mouse_Left);
Wait(75+Random(50));
end;
procedure SudoMouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
begin
case ClickType of
1 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, True);
2 : SudoMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, False);
3 : MMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0);
else
srl_Warn('SudoMouseBox', 'ClickType is NOT a valid number!', warn_AllVersions);
end;
end;
Procedure LoadPlayGround;
var
X,Y,D,i, cx, cy: Integer;
s, ss : string;
begin
ColourArray[1] := getcolor(22, 102);
ColourArray[2] := GetColor(28, 164);
ColourArray[3] := GetColor(29, 308);
ColourArray[4] := GetColor(79, 318);
ColourArray[5] := GetColor(30, 264);
ColourArray[6] := GetColor(68, 161);
ColourArray[7] := GetColor(79, 268);
ColourArray[8] := GetColor(76, 202);
ColourArray[9] := GetColor(35, 212);
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 9 do
begin
if FindColor(cx, cy, colourarray[i], x*xoff+xstart, y*yoff+ystart, (x+1)*xoff+xstart-5, (y+1)*yoff+ystart-5) then
begin
d := i;
break;
end;
end;
if d > 0 then
try
SS := SS + lolz[d-1] + ' | '
except end else
SS := SS + ' | ';
s := s + inttostr(D);
Playground[Y][X] := D;
end;
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 EnterSudokuAnswer(rune, xposition, yposition: Integer);
begin
try
Wait(RandomRange(67, 477));
//if not FindColorCircle(cx, cy, 1679124, ownarr[rune].x, ownarr[rune].y, 30) then
MouseBox(ownarr[rune].x, ownarr[rune].y, ownarr[rune].x+20, ownarr[rune].y+20, 1);
Wait(RandomRange(35, 100));
MouseBox(xposition*XOff+XStart+4, yposition*YOff+YStart+4, (xposition+1)*XOff+XStart-9, (yposition+1)*YOff+YStart-8, 1);
except
end;
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;
{for Add := 1 to 9 do
begin
if Solver[xpos][ypos].Number = Add then
begin
EnterSudokuAnswer(Add, xpos, ypos);
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 CloseSudoku: boolean;
begin
if SudokuMenu then
begin
MouseBox(11,11,32,31, mouse_Left);
Result := True;
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, i : integer;
randomarr : TIntegerArray;
randompoints : T2DPointArray;
CurPoint : TPoint;
canexit : boolean;
n3sWasHere: TPointArray;
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
end;
for z := 0 to 8 do
begin
SetArrayLength(n3sWasHere, 0);
CurrentRune := RandomArr[z];
SudoMouse(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];
if Solver[CurPoint.x][CurPoint.y].number = CurrentRune then
begin
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
//SudoMouse(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));
try
Lol := n3sWasHere[0];
Repeat
SudoMouse(Lol.x, Lol.y, 0, 0, True);
Lol := getNext(n3sWasHere, Lol);
Until(Lol.x = 0);
Except
Writeln('Error occured skipping it.');
end;
end;
repeat
CanExit:= True;
for x:= 0 to 8 do
for y:= 0 to 8 do
if(GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 498170) or (GetColor(X*XOff+XStart+18, Y*YOff+YStart+18) = 114921)then
try
SudoMouseBox(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);
SudoMousebox(X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8, 1);
CanExit:= False;
except
end;
until(CanExit) or (not(LoggedIn))
writeln('Took us... '+inttostr(TimeFromMark(SudoTime))+' msecs!!!!');
SudoMouseBox(14, 61, 89, 78, 1);//open
Result := true;
MMouse(lastAliX, lastAliY, 0, 0);
MarkTime(T);
while SudokuMenu and (TimeFromMark(T) < 10000) do
Wait(50);
if not SudokuMenu then
begin
Status('Sudoku Solved!');
MarkTime(FailTime);
Exit;
end;
if SudokuMenu then
begin
Status('Sudoku Solving Failed!');
CloseSudoku;
Result := False;
Exit;
end;
end;
procedure LoadArrays;
begin
howare := BitmapFromString(26, 12, 'meJxTlBFSBCM1RTHKkSLMtMGJTp' +
'w4gZUhJ4WOTsAAsghcHMjAYxpWhGwIsjkQBNeLSWL1BRzgspdI05A' +
'F8fsCq0qamkakT/EHOBrCr5JU0wggSX4IkhbjRUNwKeIRAHBBtxM=');
howare2 := BitmapFromString(19, 7, 'meJxjYGCoXnsTiBiQGLUb7iIjuDg' +
'EYKpH17jpAQgh6YWwISrRSIg4VAuSRog4HGBqx6IRrBfZ/RA2XBdC' +
'EE0XGGFqxGIaNo0QvXDQtOUBWgDi0gX17KYHQC0QBADB7coG');
{ chat := BitmapFromString(6, 8, 'meJxjYGB4+/49AxIAcv/++wdEyIIX' +
'L17CFNy8eQtEcP/hQxCRzv6eXbt2nz59ZtWq1UDu7DlzJk+ZMnv2H' +
'IgsUAqIgLqQDQGKIHMBAkI0eg=='); }
chat := BitmapFromString(3, 5, 'meJxjYICCVatWR0ZGARmyTpZiljoZ' +
'GRm8blpAxq5duwWjTASsVS9evAQAzOIMAQ==');
OwnArr[1] := Point(20, 100); //Mind
dtm[1]:= BitmapFromString(30, 29, 'beNqdletOE1EUhfGnD2HCI/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9mgLvC673sGdj17qZzJ9+pahdjBmAlHR+t' +
'YnvLDfio81Y7jxeM6MruJUzUAH6AQkb14wfL99p/plWVbQ==');
OwnArr[4] := Point(70, 300); //law
dtm[4] := BitmapFromString(30, 29, 'beNqdlW1LU3EYh+2DBL7pfd' +
'9BkEEkkqhYMiwZZmYyxjLTZJm2TM2WutR8aLnMh1w+NZuis4L6Gr3' +
'tW3TBD27+nHN2HMHNYWznXPfvXPd9zs4v/T2/oGpqKtaF14Yz99c/' +
'Hm5uHu18LhUKJ3t7pwf7Z18Pv387+nly/B98XbL9frWw9mE3nz/Y+' +
'FTc3hL8ePcLfIP/Ojutkq/Tctns+rvFrZXlnVwOOLGBkxw+pfAu/H' +
'e5HA7n1+zk5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0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O5+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+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
'8JPMu/HcmEwzn14mhoenRUZGXZ6axLTjOkUpkhXP2fFFRLuxoPG7k' +
'xURCthF8K6Eq+M8Kz4od7H1i5LnxNwuTb4GLj3lkVSiBME/yLtxvm' +
'ys97Q8GenqMPDv2GjjCPCVUhRKqYiUwTzL01IX7yfHu7pH+/smXw2' +
'jq1QhSCXSUPOeR3QjhYJ5kMuk0cNc236MtLY9jMZHHBp6PD75AmFc' +
'VP1ayG8E8nSUZRl1wI0eamzuj0WddXcN9T4EjYqEEEuTP8bErg5OV' +
'4iIcJUPsP3Z3BefzflNTRyTS1/mIqBGtpATyYy9fOoNcuHUEOM4Vi' +
'zLh815jY3tbG2SEc2JBdlbAXGRrN7GQObbJxMh3btX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oVcREauG7GJACe5alEnfD6OxQb6+' +
'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;
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;
Wait(50);
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;
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;
end;
LoadPossibilities;
Wait(50);
for y := 0 to 8 do
begin;
str := '';
for I := 0 to 8 do
str := str + '-' + 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
H,M,S: integer;
begin
ConvertTime(gettimerunning, H, M, S)
writeln('');
With Players[CurrentPlayer] do
begin
Players[CurrentPlayer].Integers[SPH] := Round((Integers[SOLVED] * 3600.0) / (GetTimeRunning / 1000.0));
Writeln('Sudoku Solver ' + inttostr(H) + 'h:' + inttostr(M) + 'm:' + inttostr(S)+'s');
Writeln('Solved: '+ inttostr(Integers[SOLVED])+' | SpH: ' + IntToStr(Integers[SPH]));
//Writeln('Sold thru GE: '+inttostr(TimesInGE));
end;
writeln('');
if (ReportTime < GetSystemTime) then
begin
//stats_commit;
ReportTime := GetSystemTime + 310000;
end;
end;
procedure ScriptTerminate;
var
i: integer;
begin
for i := 1 to 9 do
FreeBitmap(DTM[i]);
Disguise('Show Me The Money !!!!');
end;
function DoSudoku: Boolean;
var
SudoTime, T: Integer;
begin
T := GetSystemTime + 30000;
while (not SudokuMenu) and LoggedIn and (T < GetSystemTime) do
Wait(50);
if not (SudokuMenu or LoggedIn) then
Exit;
MarkTime(SudoTime);
if SudokuSolver then
begin
Wait(50);
repeat
//if FindNPCChatText('all the runes', ClickLeft) then
if(GetColor(156, 406) = 13158600)then
begin
TypeSend('1');
wait(randomrange(500,1000));
Inc(Players[CurrentPlayer].Integers[SOLVED]);
Result := true;
Exit;
end;
wait(50);
until (Not LoggedIn)
end else begin
Writeln('Failed to Solve :(');
CloseSudoku
wait(50);
Result := False;
end;
Respond;
end;
Function CountUpColor(Color:string; Q1, U1, Q2, U2, Count1, Count2:Integer):Boolean;
var ColStats:TIntegerArray;
Begin
Result := False;
SetArrayLength(ColStats,2);
Case Uppercase(Color) Of
'Y': ColStats:=[1105118, 36];
'B': ColStats:=[13882894, 30];
End;
Result := InRange(CountColorTolerance(ColStats[0], Q1, U1, Q2, U2, ColStats[1]), Count1, Count2);
End;
function TalkingToAli: Boolean;
var
bmpText, x, y: Integer;
begin
bmpText := CreateBitmapMaskFromText('adventuring', NPCChars);
Result := FindBitmapMaskTolerance(bmpText, x, y, MCX1, MCY1, MCX2, MCY2, 50, 10);
FreeBitmap(bmpText);
end;
var
OnAliAttempts: Integer;
function TalkToAli: Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
B: TBox;
{i,} x, y, t: Integer;
label
OnAli, Found;
begin
if ( not LoggedIn ) then
Exit;
Result := False;
if (IsUpText('alk-to Ali')) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
t := GetSystemTime;
while GetSystemTime - t < 500 do
begin
Result := CountColor(254, x - 5, y - 5, x + 5, y + 5) > 0;
if Result then
Exit; //!!!ORIGINALLY Break!!!!
if CountColor(65278, x - 5, y - 5, x + 5, y + 5) > 0 then
begin
WriteLn('Miss-clicked Ali!');
Flag;
Exit;
end;
Wait(RandomRange(2, 10));
end;
goto Found;
end;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.44);
FindColorsTolerance(TPA, 6639416, MSX1, MSY1, MSX2, MSY2, 50);
ColorToleranceSpeed(1);
if Length(TPA) > 0 then
ATPA := SplitTPA(TPA, 20)
else
goto OnAli;
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
B := GetTPABounds(ATPA[0]);
with B do
MMouse(RandomRange(x1, x2 - 5), RandomRange(y1, y2), 0, 0);
Wait(15 + Random(25));
if ( not Pos('orrisan', rs_GetUpText) > 0 )then
Exit;
GetMousePos(x, y);
{if Random(25) = 3 then
begin
Mouse(x, y, 0, 0, False);
Result := WaitOption('alk-to Ali', 500);
end else }
begin
Mouse(x, y, 0, 0, True);
t := GetSystemTime;
while GetSystemTime - t < 500 do
begin
Result := CountColor(254, x - 5, y - 5, x + 5, y + 5) > 0;
if Result then
begin
lastAliX := x;
lastAliY := y;
Exit; //!!!ORIGINALLY Break!!!!
end;
if CountColor(65278, x - 5, y - 5, x + 5, y + 5) > 0 then
begin
WriteLn('Miss-clicked Ali!');
Flag;
Exit;
end;
Wait(RandomRange(2, 10));
end;
end;
Found :
begin
t := GetSystemTime;
while ( GetSystemTime - t < 7500 ) and
( not TalkingToAli ) do
Wait(75 + Random(50));
Result := TalkingToAli;
end;
Exit;
OnAli :
begin
if OnAliAttempts > 0 then
Exit;
WriteLn('Player is on Ali?');
MMouse(MSCX + 5, RandomRange(MSCY - 5, MSCY + 5), 2, 0);
Wait(50 + Random(50));
GetMousePos(x, y);
if Pos('orrisan', rs_GetUpText) > 0 then
begin
Mouse(x, y, 0, 0, True);
Result := FindColor(x, y, 254, x - 5, y - 5, x + 5, y + 5);
end else
begin
Mouse(x, y, 0, 0, False);
Result := WaitOption('alk-to Ali', 500);
end;
if Result then
begin
WriteLn('Yes');
goto Found;
end else WriteLn('No');
OnAliAttempts := OnAliAttempts + 1;
end;
end;
procedure rlytalktoali;
var
i: integer;
begin
repeat
if TalkToAli then
break;
wait(random(100));
i := i + 1;
if (i > 20) then
begin
writeln('fuck ali');
terminatescript;
end;
until(false);
end;
function tchatwait: boolean;
var
ccount: Integer;
begin
ccount := CountColor(13158600, MCX1 + 80, MCY1 + 40, MCX2 - 40, MCY2 - 80);
Result := (not (ccount = blahhh));
end;
procedure handletalk;
var
chattime, ccount : integer;
begin
rlytalktoali;
chattime := getsystemtime;
repeat
wait(75);
if (FindColorTolerance(x,y,1845025,MCX1,MCY1,MCX2,MCY2,10)) or (FindBitmap(chat,x,y)) or (FindBitmap(howare2,x,y)) then
TypeSend(' ');
ccount := CountColor(13158600, MCX1 + 80, MCY1 + 40, MCX2 - 40, MCY2 - 80);
if (ccount = 156) then
begin
TypeSend('1');
blahhh := 156;
WaitFunc(@tchatwait, 10, 5000);
end else
if (FindBitmap(howare,x,y)) then
begin
TypeSend('1');
blahhh := 999;
WaitFunc(@tchatwait, 10, 5000);
end else
if (ccount = 641) then
begin
TypeSend('3');
blahhh := 641;
WaitFunc(@tchatwait, 10, 5000);
end else
if (ccount = 366) then
begin
TypeSend('2');
blahhh := 379;
WaitFunc(@tchatwait, 10, 5000);
end else
if (ccount = 36) then
begin
TypeSend('3');
MMouse(29, 212, 12, 12);
blahhh := 36;
WaitFunc(@tchatwait, 10, 5000);
end;
if (GetColor(54, 61) = 1319729) then
begin
DoSudoku;
exit;
end;
if (getsystemtime - chattime > 50000) then
handletalk;
until(not(LoggedIn));
end;
Procedure SetupPlayer;
begin
MarkTime(FailTime);
MarkTime(SleepTime);
Clickcontinue(true, true);//quick chat world check
loadarrays;
NorthLast:= True;
ClickNorth(SRL_ANGLE_HIGH);
if not IsMoneyPouchOpen then
begin
WithdrawFromPouch(1);
ToggleMoneyPouch(True);
end;
ToggleMoneyPouch(True);
end;
var
GPs, LastAmount: Integer;
begin
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
DeclarePlayers;
SetupSRL;
MouseSpeed := 100;
AddOnTerminate('ScriptTerminate');
LoadArrays;
ReportTime := GetSystemTime + 310000;//for stats commit
SRL_Procs[srl_OnLogIn] := @SetupPlayer;
if not LoggedIn then
begin
Debug('Logging in Player');
Disguise('Logging in Player');
end;
LoginPlayer;
CloseSudoku;
repeat
MakeCompass('N');
if SudokuMenu then
DoSudoku;
handletalk;
if (not loggedin) then loginplayer;
if (TimeFromMark(FailTime) > 1200000) then
begin
writeln('failed');
Debug('FailTime');
Disguise('FailTime');
TerminateScript;
end;
Report;
ToggleMoneyPouch(True);
GPs := GetMoneyPouchAmount;
if GPs > 0 then
LastAmount := GPs
else
LastAmount := LastAmount-50000;
if (GPs < 50000) and (LastAmount < 120000) then
begin
Writeln('Out of GPs!');
Writeln(GPs);
Logout;
TerminateScript;
end;
with Players[CurrentPlayer] do
Disguise(MsToTime(GetTimeRunning, Time_Bare)+ ' '+ToStr(Integers[SOLVED])+'s/'+ToStr(Integers[SPH])+'ph ; GP: '+ToStr(GPs));
until false;
end.
Wanted
2012-01-27 20:59:43
OH look. You guys are pointing fingers at me. What a surprise…
SRL doesn't have some bullshit patent on sudoku solvers lol, there's been soo many of them since before this method was ever discovered here. A lot better ones too (like ridiculous ones in java)
This method will get all of you (and us) banned, lol. It's a miracle the over paid idiots at Jagex haven't caught and banned everyone who's ever used this, in fact I wouldn't be surprised if they had a big list of everyone's usernames.
Anyways, yes I am writing my own solver (that is significantly faster than this one) that works a lot differently from this one and releasing it (obviously not on SRL) to the public with a built in kill switch so I can ensure at least it's not mass abused anything to the point where jagex actually has to higher someone competent enough to do add "if solvedinlessthan1minuteAUTOMATICBAN" to runescape's awesome macro detection.
Why am I doing this? Three reasons:
1) TO GET BACK AT SRL … j/k seriously? Do you think anyone actually spends the time I do just to trolololol? Use your brains. I'm not doing it for that lol.
2) Very few of you have actually built a community the size or success that SRL was. You all have no idea how difficult it really is. I need users, and this is a good way to get them. I mean 4m/ph that's a pretty effective way.
3) I like a good challenge, my method of solving sudoku is the biggest and funnest mind fuck I've done in a long time. Reminds me of the golden days of scripting where I could just work on my scripts, have fun, and not worry about all the stupid politics I left SRL to get away from.
P.S. FFS leave Demise out of this. She's pretty upset with the way things are been with all that she is trying to contribute to SRL. Right now she's doing a hell of a lot more than any of you ever done for this community in a few short months compared to the years spent here by all and getting that type of treatment in return.
But whatever, none of this really matters to me… but once again I was dragged into it. Yay for wasting time.
Much Love
Daniel
2012-01-28 01:36:49
From: Wanted
OH look. You guys are pointing fingers at me. What a surprise…
…
But whatever, none of this really matters to me… but once again I was dragged into it. Yay for wasting time.
Much Love
But you just admitted it was you… It was a discussion, people speculated, and now you are having a hissy-fit because people assumed you were the one doing it (because all signs point to you)? Which, you are…
Markus
2012-01-28 01:42:50
Nice that you'll release this publicly to get users! Your plan is almost flawless.
The flaw: if you release it there, I'll release it here thus cancelling you out. Can't think of any parts where you'd be able to cut a few ms (solver itself maybe? takes 200ms or so) but I'm curious to see how much faster it will really be.
Also killswitch is a genius idea, I'll add that one.
Friendly advice: users want nature or abyss crafter, dungeoneering, pest control and an essminer. That would also get you a lot of users.
Edit: If you'd also like quite a few scripters behind you, set up a decent payscript platform, a bit like RSCA did (but then different). Scripters will love you and so will leechers,
the scar noob
2012-01-28 02:31:45
From: Markus
Nice that you'll release this publicly to get users! Your plan is almost flawless.
The flaw: if you release it there, I'll release it here thus cancelling you out. Can't think of any parts where you'd be able to cut a few ms (solver itself maybe? takes 200ms or so) but I'm curious to see how much faster it will really be.
Also killswitch is a genius idea, I'll add that one.
Friendly advice: users want nature or abyss crafter, dungeoneering, pest control and an essminer. That would also get you a lot of users.
Edit: If you'd also like quite a few scripters behind you, set up a decent payscript platform, a bit like RSCA did (but then different). Scripters will love you and so will leechers,
Like a boss.
Wanted
2012-01-28 03:38:12
From: Markus
Nice that you'll release this publicly to get users! Your plan is almost flawless.
The flaw: if you release it there, I'll release it here thus cancelling you out. Can't think of any parts where you'd be able to cut a few ms (solver itself maybe? takes 200ms or so) but I'm curious to see how much faster it will really be.
Also killswitch is a genius idea, I'll add that one.
Friendly advice: users want nature or abyss crafter, dungeoneering, pest control and an essminer. That would also get you a lot of users.
Edit: If you'd also like quite a few scripters behind you, set up a decent payscript platform, a bit like RSCA did (but then different). Scripters will love you and so will leechers,
From: the scar noob
Like a boss.
Markus,
What part of "significantly' faster did you not understand? I currently have it running 33% to 100% faster than this one, little of that improvement has anything at all do do with the actual algorithm that generates the puzzle solution. I wouldn't be surprised if a lot of the people viewing this thread right now that, lets be honest, don't do shit for SRL besides leech, will probably be using it to earn money before the mass imminent ban that will occur from everyone using this very old, risky, and widely well known method
Hey cool thanks for the advice.. seriously? Act like we don't have stuff like payscript platforms already in the making. Also lol at the fact that no one else has ever created an abyss rune crafter entirely in color except for me or has had a decent working essence miner since the bot nuke other than me. Did I mention your advice is so inspiring and unique =/
Daniel,
having a hissy fit? Lol no. The only ones here throwing a hissy fit are the idiots (sorry to single you out Harry) that think "OMFG THAT ASSHOLE IS GONNA RELEASE SUDOKU FOR FREEZ" I'm just here for the free publicity and lulz. Don't know how you got a hissy fit out of that, then again most of SRL especially most everyone above SSRL is spoon fed that same old crap to believe everything the staff or whomever does is always right contrary to their natural instinct. So yea I guess "hissyfit" is a nice way of quantifying the massive confusion you probably have.
Hobbit
2012-01-28 03:51:41
Why can't we all just play nicely?
This current heated argument could have been easily avoided.
Wanted
2012-01-28 03:56:20
From: Hobbit
Why can't we all just play nicely?
This current heated argument could have been easily avoided.
I don't think it's a heated argument at all, but yes.. it
could of. Everyone simply learn not to drag me into something so pointless like this.
Please, continue with the topic of this thread…
Markus
2012-01-28 04:13:33
From: Wanted
What part of "significantly' faster did you not understand? I currently have it running 33% to 100% faster than this one,
From what I heard of your beta testers, yours isn't actually faster. Most time is spent waiting for the NPC convo and that runs at game clock. 18secs/sudoku right? That would give us 200 sudokus per hour, same rate we have.
Hey cool thanks for the advice.. seriously? Act like we don't have stuff like payscript platforms already in the making. Also lol at the fact that no one else has ever created an abyss rune crafter entirely in color except for me or has had a decent working essence miner since the bot nuke other than me. Did I mention your advice is so inspiring and unique =/
I know you did, I'm not stupid and I don't have any kind of memory loss issues FYI, it was a good script. Why don't you update it for OSI? Note: if this is a lot of work (I have *no* idea), please don't take this as some kind of sarcastic remark, it's not.
If they don't come for those scripts that people want and you already have, why would they come for a ripped money-making method that can be found here, too? It gives
zero added value to your platform.
Good that you are setting up a payscript platform, didn't know that. Looking forward to seeing it :)
edit: might wish to do some strategic collaboration with runedream, as their forums are atm more active than yours and they can only do getcolor..
Daniel
2012-01-28 06:00:47
From: Wanted
Daniel,
having a hissy fit? Lol no. The only ones here throwing a hissy fit are the idiots (sorry to single you out Harry) that think "OMFG THAT ASSHOLE IS GONNA RELEASE SUDOKU FOR FREEZ" I'm just here for the free publicity and lulz. Don't know how you got a hissy fit out of that, then again most of SRL especially most everyone above SSRL is spoon fed that same old crap to believe everything the staff or whomever does is always right contrary to their natural instinct. So yea I guess "hissyfit" is a nice way of quantifying the massive confusion you probably have.
Hissy fit: A childish display of anger or frustration; an overly dramatic tantrum.
Your response to their criticisms and accusations fits that definition quite nicely. Yes, they were having a
little hissy fit over a Sudoku solver being released publicly, and speculating about one being released publicly over at the SCAR Divi forums, but yours was way over the top straight from the word go:
OH look. You guys are pointing fingers at me. What a surprise… SRL doesn't have some bullshit patent on sudoku solvers lol
….Please don't in future :)
Wizzup?
2012-01-28 06:35:24
From: Wanted
1) TO GET BACK AT SRL … j/k seriously? Do you think anyone actually spends the time I do just to trolololol? Use your brains. I'm not doing it for that lol.
I suppose the real question would be, why have you created OSI in the first place, if it wasn't for yourself? This has puzzled me all along, there isn't really anything to gain. Except for I suppose ``power'', or to get back at SRL because we didn't do it ``your way''. Because OSI surely isn't superior to SRL, the design has the same ``flaws'' that you used to spout about and for all I can see it's hardly better at all. The main difference is that you have very few people who actually want to work on it and that your program doesn't work in Simba. (Also, OSI unofficially stands for Open Source Initiative, which I found pretty funny since it's actually directly supporting closed source products)
We've had fun all the time when scripting - except when you started whining about something which we all agreed was silly. You see how easily arguments like that can be twisted?
Most of the stuff you have done is actually definitely done to ``get back at srl'' - even though we never really did anything to _you_ as a person. Sure, we had our disagreements, but that is the case with everyone. You chose to leave because you didn't agree with out direction, and that's that. That doesn't mean we made you leave - it means you couldn't cope with the general opinion here.
- Copying all our code (SRL 4) and stripping credits is a direct assault. Then adding a few petty credits back is still blatantly offensive and no one will ever forgive you for that kind of theft. We know you started with srl 4, so don't try to cover it up. Keep the credits just like srl has been doing for over 6 (or is it 7 now?) years.
- Posting your script in the Simba section on mopar - same thing. Fighting with people there - why? Because people don't want you there and yet you insist on forcing it upon them.
- Your typically offensive stance against SRL and Simba on places other than villavu - same thing. It's childish and offensive.
The Sudoku incident is just another attack, even though you may not see it. This has long been the ``treasured secret'' of SSRL - which has been leaked a few times.
Then again, I usually just try not to read and respond to your posts, but I was somewhat invited to reply in this case. What you really need is people who work with you - something you had here. Now it's up to you to find people who share your closed mindset. Good luck, I hope you find what you want, because most people (including me) have just stopped caring. It's the best way not to get offended everything you post something - I can highly suggest this to everyone else who feels offended by IceFire908 - just stop giving a f*ck.
Wizzup?
2012-01-28 07:29:39
To sum up my last post, it is pretty obvious that you are indeed doing this at least partially to ``get back at us''. Why? Because you are definitely (partially) driven by hatred and/or jealousy. How do you know, you might ask?
It's pretty simple. If all you wanted to do was to set up a nice community where you could script without ``politics'', you would not have set it up the way you did.
First of all, you would have informed the developers of why you are leaving - stating a few main reasons why you left. You'd then ask for permissions to use parts of SRL (explicitly, since you don't want to get mixed up in more politics, you just ask if you can use it and then credit everyone involved appropriately.) You already failed to do this, because you ``dislike'' something about us (I'll leave you to fill in what that is). Next, if you would have gotten permission, you could perhaps advertise it here a little, because the entire thing went alright and most people OK'd your decisions for the reasons you told us. Again, you didn't do this - you know how our advertisement rules are and yet started to include quite huge pictures in your signature. Next, your signature over the last few months has also been offensive - even though it may not have been directly offensive, you people here know what you are getting at. You'd probably ask some of the members here if they wanted a decent status on your forum, like SRL has the auto member-isation for leaders of other communities.
At some point you stated you'd like to share code between SRL and OSI - but you really already made the decision for us by acting so offensive generally. And, as you stated yourself - your main objective is to gather ``users'', which makes you a competitor - and an offensive one at that. At some point you and some others lost their developer rank, which is again only natural. Somehow this enraged you once again - did you not see that coming, did you not anticipate that? Are you just angry to make it seem like we pushed you away? Shortly after that, you noticed you still had commit access. So to ``troll'' us further, you made one or two additional (quite useless) commits, even though you knew you weren't supposed to anymore. Yes, you are doing things to ``get back at us'', obviously you'd love to have a user base the size of SRL, competent and friendly developers who respect one another. But you're not going to get it while you yourself don't respect others. You really, really lack respect - if you have respect for others, you're not showing it. The wiki pages you've been creating also very much show the same lack of attitude and general hatred towards SRL. (And they also prove some of my points - like making it seem we pushed you away.)
Anyway, you would also keep a very low profile seeing that you have a past of being very offensive and harmingly direct. (not right, direct) You'd try not to trip on the toes of others to stay out of the politics. And last but not least, you'd definitely respect the SSRL ``secret''. Again, if you really needed Sudoku and didn't want to offend us - you could have asked here, stating that it has been leaked several times and the idea is now generally widely known. That would have also avoided an argument like this.
Hobbit
2012-01-28 17:34:12
We need to start pushing market prices up.
Sell your runes at +5% (minimum). Yes it takes longer to sell but right now, rune prices are dropping fast. I did a load the other day for +10%, it took about a day and a half to sell, but they sold. People who play RS for the most part are not patient people. When they go to buy something in GE and it doesn't get bought right away, they will raise their offer until they get it.
We control a large portion of the rune supply. I have ~65k stacks of each runes. That is approximately 585,000 runes in total, from a couple days work. That sold in less time to took to get them. We have power, we need to control the market.
Runes are like petrol to the US. It is extremely consumable and people will constantly need them (for the foreseeable future).
Kyle Undefined
2012-01-28 17:50:29
I'm just going to ignore all the drama that's going on now and from past events, since I wasn't around when they started.
Putting this thread back on topic, I've never used this, but if there was a script that used up runes like a mofo, couldn't that bring the profit of this method back up?
the scar noob
2012-01-28 17:51:28
From: Hobbit
We need to start pushing market prices up.
Sell your runes at +5% (minimum). Yes it takes longer to sell but right now, rune prices are dropping fast. I did a load the other day for +10%, it took about a day and a half to sell, but they sold. People who play RS for the most part are not patient people. When they go to buy something in GE and it doesn't get bought right away, they will raise their offer until they get it.
We control a large portion of the rune supply. I have ~65k stacks of each runes. That is approximately 585,000 runes in total, from a couple days work. That sold in less time to took to get them. We have power, we need to control the market.
Runes are like petrol to the US. It is extremely consumable and people will constantly need them (for the foreseeable future).
Agreed! But do we
really have the power to control the runes market?
Btw, nice stack =p
Narcle
2012-01-28 18:41:11
From: Kyle Undefined
I'm just going to ignore all the drama that's going on now and from past events, since I wasn't around when they started.
Putting this thread back on topic, I've never used this, but if there was a script that used up runes like a mofo, couldn't that bring the profit of this method back up?
Yes, but what? Effectively. Only other way I see it is making sure all scripts use runes (to some extent). Like add Magic attacking to fighting scripts, or making one that uses just a certain type of rune? Hell I was even thinking about Mage arena again. (I started a enchanter just have to finish it)
Hobbit
2012-01-28 18:41:52
From: Kyle Undefined
Putting this thread back on topic, I've never used this, but if there was a script that used up runes like a mofo, couldn't that bring the profit of this method back up?
Good thinking, it would have to be an Alcher, Enchanter or Combat spell script though.
From: the scar noob
Agreed! But do we really have the power to control the runes market?
Btw, nice stack =p
There are lets say 7 of us who use this regularly. We can do 65k dumps each in a matter of a couple days. So if we all had dumps like mine (585k total), that is 4,095,000 runes (non elemental).
The other ways of gaining runes:
-Buy from shop (Slow, expensive, no one does it)
-Combat (It would take you months if not years to get 65k of any rune from monster drops)
-Rune crafting (Slow for the upper level runes we are doing)
I'd say we have enough sway to stabilize the market, if not increase prices.
On the topic of a free/lite version, we could re implement the auto GE selling and have the script sell for them (+10%) of course :p Maybe restrict the lite version to an hour a day per user or something? (If we ever come to releasing public (ie srl members))
Wanted
2012-01-28 19:26:16
From: Markus
From what I heard of your beta testers, yours isn't actually faster. Most time is spent waiting for the NPC convo and that runs at game clock. 18secs/sudoku right? That would give us 200 sudokus per hour, same rate we have.
Isn't actually faster? I've been benchmarking mine directly next to yours with specifically placed wait times in many places measuring many different aspects. I'm easily well above 200sph probably at least 250 or higher in some cases, also this solver only gets 200sph at absolute maximum tuning efficiency (ideal mouse speed among other things). When you run it just the way it is now you get about 135sph =/
From: Markus
I know you did, I'm not stupid and I don't have any kind of memory loss issues FYI, it was a good script. Why don't you update it for OSI? Note: if this is a lot of work (I have *no* idea), please don't take this as some kind of sarcastic remark, it's not.
If they don't come for those scripts that people want and you already have, why would they come for a ripped money-making method that can be found here, too? It gives zero added value to your platform.
Good that you are setting up a payscript platform, didn't know that. Looking forward to seeing it :)
Yes it is a lot of work simply because RS has changed quite a few times in all of the jagex changes to runescape. An abyss script takes a quite a lot of information gathering (obviously 13 portals, 13 altars, tons of obstacles, other things by ACA) can take quite a bit of total time for just for the redundancy data collection, not to mention the difficult less redunant challenges aspects… I am however in the long process of doing it and progress is good.
Well if you were a leecher (SSRLs can and often are leechers too) then would you want to use the 135-200sph way or the 190-250 sph way? I think I would go for the one that makes me nearly double the cash. But either way all of our solvers even if they are made to absolute perfection are complete jokes in comparison the best sudoku solvers that have been out there.
I really don't understand why anyone would even be remotely upset at the idea of me having another sudoku solver out there to public when SRL has had one many times before, java kids have already made one 4x as fast (literally) and this is well known and abused not to mention the extremely risky and stupid idea it is to even use this method in the first place. It all just goes back to the whole mentality of everything I am doing is malicious to SRL regardless of what is actually going on.
From: Markus
edit: might wish to do some strategic collaboration with runedream, as their forums are atm more active than yours and they can only do getcolor..
I think I'd rather sell out to a dicing clan and make them a bot (oh I'm already doing that lmao). Yea runedream is a joke….
From: Wizzup?
I suppose the real question would be, why have you created OSI in the first place, if it wasn't for yourself? This has puzzled me all along, there isn't really anything to gain. Except for I suppose ``power'', or to get back at SRL because we didn't do it ``your way''. Because OSI surely isn't superior to SRL, the design has the same ``flaws'' that you used to spout about and for all I can see it's hardly better at all. The main difference is that you have very few people who actually want to work on it and that your program doesn't work in Simba. (Also, OSI unofficially stands for Open Source Initiative, which I found pretty funny since it's actually directly supporting closed source products)
I never joined SRL, SRL members, SSRL, or SRL development under any pretense that I would be forced to develop my projects to be compatible (much less REQUIRED) to work with anything other than SCAR.
Ok I know you don't actually wonder why I made OSI. The answer is fairly obvious, but then again the lack of research and really just overall I can tell you all just don't operate on a mutual level of respect where you actually know an in depth amount of your surroundings and innerthinkings of those people that your community actually consists of, not to mention anything at all about your neighboring communities ( I mean really… someone mentioned Naum being involved in this at the top of this page and he hasn't been active in half a year…)
So let me just translate all of my thoughts (even if they are incredibly obvious) in to he most easy to understand description.
Sure simba had some bugs and SRL feel to pieces, I never really hated anything for just being generally bad or hard to deal with. For me, it was how it was marketed. "SRL 5 will be simba only" "SCAR is a thing of the past" "Everything will be simba from now on" then going onto "SCAR is a piece of shit" "I hate SCAR" "Simba is better than SCAR" then going onto "Everything will be simba from now on" "Posting things about SCAR is advertisement" "Quit saying simba isn't absolutely perfect"
I mean who does this shit?? I tried simba plenty of times and found a lot of good things about it, but I never understood why SCAR had to be thrown under a bridge in order to further simba.
I guess you got what you wanted. I still don't see why you insist on making me out to be a villain here. I tried the best I could to continue to exist, and coexist side by side this community long before ever making the decision to go through with the OSI concept. You didn't want anything SCAR around SRL ever again because it got in the way of the idea of everyone using simba and giving it feedback. Now look at SRL, it's completely SCAR-free.. infact if you still use SCAR you're portrayed as an ignorant close minded faggot who needs to gtfo. Victory for simba!!
This all probably would of been fine if simba was ever actually what everyone made it out to be: some flawless opensource replacement for SCAR. And let's face it, it's not. I mean look at me? Do you think I would use SCAR if simba was better? Is it a coincidence I was literally the only truly active developer for SRL during these transitional phases? All the people pushing simba so hard had no idea of the effects it had on those trying to actually make the transition over. Hell you all still have problems this late in the game…. look at the CTS2 problems… there's so many things that needed to be cleared up before every pushing simba they way you all did, but instead you rushed it and it's no coincidence those who actually knew what was going on got fed up with it and those who didn't know what the hell was going on acted all confused and hated us.
Hopefully that makes some sense to your one tracked open sourced and linux or die trying mind.
From: Wizzup?
We've had fun all the time when scripting - except when you started whining about something which we all agreed was silly. You see how easily arguments like that can be twisted?
We all enjoyed scripting until it wasn't all of us scripting. It was Wizzup and his crew working on simba pushing hard to make changes on the active development team causing us massive headaches not caring at all what we were going through. Constantly having to accommodate everything for simba's needs long before it was ready.
From: Wizzup?
Most of the stuff you have done is actually definitely done to ``get back at srl'' - even though we never really did anything to _you_ as a person. Sure, we had our disagreements, but that is the case with everyone. You chose to leave because you didn't agree with out direction, and that's that. That doesn't mean we made you leave - it means you couldn't cope with the general opinion here.
I still don't see how you put this in a motive for me to destroy SRL. Sure I want to surpass SRL but I wouldn't go as far you all did with simba and throw SCAR under the bridge.
From: Wizzup?
- Copying all our code (SRL 4) and stripping credits is a direct assault. Then adding a few petty credits back is still blatantly offensive and no one will ever forgive you for that kind of theft. We know you started with srl 4, so don't try to cover it up. Keep the credits just like srl has been doing for over 6 (or is it 7 now?) years.
- Posting your script in the Simba section on mopar - same thing. Fighting with people there - why? Because people don't want you there and yet you insist on forcing it upon them.
- Your typically offensive stance against SRL and Simba on places other than villavu - same thing. It's childish and offensive.
Why do you feel the need to constantly brainwash and lie to members of this community? Or do you just have absolutely no idea what's in OSI (or SRL for that matter) OSI doesn't copy anything from SRL. Sure some of the general methoding ideas resemble SRL's.. honestly get over it. At first I wasn't sure how to handle accreditation for a lot of things for example your filter points pie was written completely differently but I still felt that you(wizzup) might of deserved credit for coming up with the idea in the first place. I certainly wasn't going to scrap something I had been relying on for years just to avoid hard feelings with someone. "Because OSI surely isn't superior to SRL" Are you joking me right now? Your chooseoption amongst many things is a complete piece of shit, I mean look at flag and so many things in SRL.. none of the random solvers work or if they don't can't execute properly. What the hell is your argument for this? Perhaps you should take a look into the include which is supposed to be the foundation of your community (not simba) and do something about it and maybe actually compare it to OSI for once so you don't make retarded statements like these. I mean I could sit here all day and explain how many advantages I have put into OSI that people here have needed or not even known they've needed for years, but chances are you won't look into any of that either, hopefully one of these followers of yours does it for you but that's not likely to happen either honestly.
Yea I say some offense things about SRL… like you don't do this about me ( hell SRL is one of the most offense places I know about everything other than SRL) everyone here has always been so malicious towards their neighbors. Of course OSI is probably the first threat of its kind to SRL, but that still doesn't commit that fact that everyone here has been talking shit about every surrounding community from the start. Hell when I first made the decision (that I was really forced to make) to go through with OSI I made the attempt to have a mutually benefiting existence but that isn't what you wanted so instead everyone started hating on it and Fawki made that thread "OSI must leave a crap" where honestly I let the anger get the better of me. But FFS mayne, I know I'm not perfect… do you honestly think everything you done in these past couple of years was handled perfectly? I mean come on at least acknowledge your own faults if you expect to get anything out of bringing up the past like this otherwise you're just wasting both our time (as usual).
From: Wizzup?
The Sudoku incident is just another attack, even though you may not see it. This has long been the ``treasured secret'' of SSRL - which has been leaked a few times.
Hate to break it to you but this is no treasured secret at all. In fact, as I've stated and as it's well known everyone knows about this and many of used it (better versions of it I might add) plus it's going to get everyone ban/blacklisted from runescape etc. this is just stupid why am I having to spell out such obvious things to everyone? Why can't people just be intelligent and not get butthurt for stupid reasons?
From: Wizzup?
Then again, I usually just try not to read and respond to your posts, but I was somewhat invited to reply in this case. What you really need is people who work with you - something you had here. Now it's up to you to find people who share your closed mindset. Good luck, I hope you find what you want, because most people (including me) have just stopped caring. It's the best way not to get offended everything you post something
Cool I was dragged into this topic too.
From: Wizzup?
I can highly suggest this to everyone else who feels offended by IceFire908 - just stop giving a f*ck.
Smartest thing I've heard you say yet.
From: Wizzup?
To sum up my last post, it is pretty obvious that you are indeed doing this at least partially to ``get back at us''. Why? Because you are definitely (partially) driven by hatred and/or jealousy. How do you know, you might ask?
It's pretty simple. If all you wanted to do was to set up a nice community where you could script without ``politics'', you would not have set it up the way you did.
First of all, you would have informed the developers of why you are leaving - stating a few main reasons why you left. You'd then ask for permissions to use parts of SRL (explicitly, since you don't want to get mixed up in more politics, you just ask if you can use it and then credit everyone involved appropriately.) You already failed to do this, because you ``dislike'' something about us (I'll leave you to fill in what that is). Next, if you would have gotten permission, you could perhaps advertise it here a little, because the entire thing went alright and most people OK'd your decisions for the reasons you told us. Again, you didn't do this - you know how our advertisement rules are and yet started to include quite huge pictures in your signature. Next, your signature over the last few months has also been offensive - even though it may not have been directly offensive, you people here know what you are getting at. You'd probably ask some of the members here if they wanted a decent status on your forum, like SRL has the auto member-isation for leaders of other communities.
At some point you stated you'd like to share code between SRL and OSI - but you really already made the decision for us by acting so offensive generally. And, as you stated yourself - your main objective is to gather ``users'', which makes you a competitor - and an offensive one at that. At some point you and some others lost their developer rank, which is again only natural. Somehow this enraged you once again - did you not see that coming, did you not anticipate that? Are you just angry to make it seem like we pushed you away? Shortly after that, you noticed you still had commit access. So to ``troll'' us further, you made one or two additional (quite useless) commits, even though you knew you weren't supposed to anymore. Yes, you are doing things to ``get back at us'', obviously you'd love to have a user base the size of SRL, competent and friendly developers who respect one another. But you're not going to get it while you yourself don't respect others. You really, really lack respect - if you have respect for others, you're not showing it. The wiki pages you've been creating also very much show the same lack of attitude and general hatred towards SRL. (And they also prove some of my points - like making it seem we pushed you away.)
Anyway, you would also keep a very low profile seeing that you have a past of being very offensive and harmingly direct. (not right, direct) You'd try not to trip on the toes of others to stay out of the politics. And last but not least, you'd definitely respect the SSRL ``secret''. Again, if you really needed Sudoku and didn't want to offend us - you could have asked here, stating that it has been leaked several times and the idea is now generally widely known. That would have also avoided an argument like this.
You come to such long detailed conclusions based on such little research and understanding.
Kyle Undefined
2012-01-28 20:27:54
Not trying to be a dick, but could yalls discussion move elsewhere? It's really off topic, and it's pretty annoying to read to be honest. It's useless drama that we, as SRL, don't need.
I have no idea why we can't all coexist here, besides, we are here for learning and not drama filled attacks towards each other.
Sorry if I'm in the wrong, but I just think this isn't needed.
/ontopic I was actually planning to make an enchanter, would this help?
Narcle
2012-01-28 20:32:03
From: Kyle Undefined
/ontopic I was actually planning to make an enchanter, would this help?
Probably, I have a bunch of code for it if you want. Like walking around in arena and entering arena both work nicely. (Oh looks like I have ClickShape too, I did more then I thought lol)
Kyle Undefined
2012-01-28 20:38:47
Oh, I was talking about just enchanting jewelry at the bank lol.
Flight
2012-01-28 22:30:05
From: Narcle
Probably, I have a bunch of code for it if you want. Like walking around in arena and entering arena both work nicely. (Oh looks like I have ClickShape too, I did more then I thought lol)
Are you talking about
this Mage Arena?
Narcle
2012-01-28 22:30:20
From: Kyle Undefined
Oh, I was talking about just enchanting jewelry at the bank lol.
Oh oh, that too. XD
@Flight
http://www.tip.it/runescape/?page=mage_training_arena.htm
n3ss3s
2012-01-29 04:20:54
I managed to enter the runes at high enough speed to get 250 sph on the regular RS screen, but when I implemented it into sudoku with SMART fast clicking somehow causes misclicks… I don't think SMART would be the cause of that but anyways… But yea, it's possible to get 250 sph with minimal quests.
Gu3st...
2012-01-29 06:54:22
From: Wanted
So I'm making an OSI sudoku solver to be posted here in the public (via github…as a display of power and user interest.. going to put in a 'kill switch' for obvious reasons)
It's quite amazing, I've got it fully functioning (missing a few extra features and finalization) nothing major.. not for a testing phase at least… except for it can only solve about 4/5 puzzles (the more difficult ones go beyond the current algorithms capacity which only involves checking row, column and section.
The chat handling is probably faster than SRL's (would be by nature) I have it set up to work for my current chat (around 4700ms avg for me)… it can be different for different people depending on your quests and crap so if anyone wants to help add that by adding more cases to the count color clause in the chat section that would be helpful.
The tile grabbing is up to 6xs faster than SRL's (15-45ms vs 60-140ms). This part is probably perfected.
The solution generator is quite good (30-90ms ~40ms avg) but it only works for 4/5 puzzles… needs another step involved to get those harder puzzles this is where the most help is needed.
The solution executor is quite fast (7000-11000ms ~ 9000ms avg) which appears to be around 12000-19000 ms in SRL's. This is probably also perfected. However testing and messing around with the mouse speed and the waits in FastMMouse might be worth looking into.
The handling of stuff in between is pretty solid, I think I got that covered. 1 full solve including everything is 17000ms-25000ms which far surpasses SRL's 24000-35000ms. I believe this puts our solvers per hour (SPH) when you include it running the way it is now (like skipping a few hard puzzles) right up there with SRL, and if it didn't skip any puzzles would probably surpass it by as much as 33%-100%++ so potentially 4-6.25 mil per hour potential here.
How on earth is this not "you not coming back at SRL"???
mastaraymond
2012-01-29 07:56:32
The solution generator is quite good (30-90ms ~40ms avg) but it only works for 4/5 puzzles… needs another step involved to get those harder puzzles this is where the most help is needed.
My sudoku solver rules!
Wanted
2012-01-29 13:47:00
From: Zyt3x
How on earth is this not "you not coming back at SRL"???
Me doing speed comparisons with this one somehow means I am
"GETTING REVENGE ON SRL". Seriously I know a lot of you partake in smoking cannabis on the regular, maybe it's just all the paranoia pent up from years of substance abuse.
Try actually reading the valid arguments posted by me in this thread and replying to them instead of coming to (less than intelligent) conclusions.
From: mastaraymond
My sudoku solver rules!
Derp is works differently which is why its faster, still thinking of the best implementation for the final step. It's based off of human reasoning rather than bruteforce computer like implementations, as you can('tprobablyimagine) it's quite a bit tricker coming up with than following exactly what some
C programmer describes.
You can still get get an accurate speed comparison in its current state, which is still funny because even without it being completed it matches this one which is imho funny.
Wizzup?
2012-01-29 14:11:21
I solved sudoku's in less than a millisecond several years ago. Using only logic, implemented a lot, iirc even hidden quads or something - just didn't do XY-Wing. How's that for e-peen?
Even if it takes more than a second to solve one, what does it matter? Fact remains that humans solving sudoku's pretty much instantly is still a VERY easy way to get banned because it is so easy to detect. (I wonder why Jagex doesn't do this in the first place)
As for your post, I'll follow up my own suggestion and not reply to your utter nonsense. The reason Simba is now used here is not because ``it was forced on everyone'', because as you well know that doesn't work. It's a fine tool and it came at a very convenient time for SRL, a time in which scar got very buggy which got a lot of scripters frustrated. In other words, it's not my fault Simba quickly gained a lot of support. After that it did not and still does not make sense to support both programs because they do very much the same thing but are backed by very different people with very different opinions on how to get things done. This constantly led to issues and every time I tried to do something inventive, you tried to counter it because scar wouldn't or couldn't keep up. It is a very logical decision to stop supporting a product that doesn't really support you - and it was a very good thing for the community as a whole. The only arbitrary thing here is your devotion to scar.
If it bothers you that people point out facts (which you call advertisement), you should indeed not be here and create your myths somewhere else. (Isn't it exactly what you are doing - ``just pointing out facts'' about how your solver is faster? - Hint: It is) There is no one here who agrees with you and this is not the place to vent your anger.
I suggest you very much keep your voice down once more and stop insulting people around here, as it is still not appreciated and allowed. Although I find it very ironic that you, of all people are trying to insult people for (if that's true) using drugs. Remember that temporary ban? Right.
Wanted
2012-01-29 14:23:12
From: Wizzup?
I solved sudoku's in less than a millisecond several years ago. Using only logic, implemented a lot, iirc even hidden quads or something - just didn't do XY-Wing. How's that for e-peen?
Even if it takes more than a second to solve one, what does it matter? Fact remains that humans solving sudoku's pretty much instantly is still a VERY easy way to get banned because it is so easy to detect. (I wonder why Jagex doesn't do this in the first place)
As for your post, I'll follow up my own suggestion and not reply to your utter nonsense. The reason Simba is now used here is not because ``it was forced on everyone'', because as you well know that doesn't work. It's a fine tool and it came at a very convenient time for SRL, a time in which scar got very buggy which got a lot of scripters frustrated. In other words, it's not my fault Simba quickly gained a lot of support. After that it did not and still does not make sense to support both programs because they do very much the same thing but are backed by very different people with very different opinions on how to get things done. This constantly led to issues and every time I tried to do something inventive, you tried to counter it because scar wouldn't or couldn't keep up. It is a very logical decision to stop supporting a product that doesn't really support you - and it was a very good thing for the community as a whole. The only arbitrary thing here is your devotion to scar.
If it bothers you that people point out facts (which you call advertisement), you should indeed not be here and create your myths somewhere else. (Isn't it exactly what you are doing - ``just pointing out facts'' about how your solver is faster? - Hint: It is) There is no one here who agrees with you and this is not the place to vent your anger.
I suggest you very much keep your voice down once more and stop insulting people around here, as it is still not appreciated and allowed. Although I find it very ironic that you, of all people are trying to insult people for (if that's true) using drugs. Remember that temporary ban? Right.
It's funny because I don't want to be here at all. If someone wants to bring up my name or start talking about the past then I am almost obligated to reply especially if they are making horrible false statements that (sound like/are) accusations.
I mean really what would you expect from anyone? Much less someone who you
already know is going to respond on the tap of the shoulder.
I know your reasons for simba and you know my reasons for where I am. I've cooped with it and moved on, so should you. Stop acting like I have no reason for the things I do, just like I know you have your reasons. We went our separate ways and it was for the best.
Now if you all would let me I would like to go back to lurking as you all just broke my longest lurking record yet.
Wizzup?
2012-01-29 14:26:16
From: Wanted
I know your reasons for simba and you know my reasons for where I am. I've cooped with it and moved on, so should you. Stop acting like I have no reason for the things I do, just like I know you have your reasons. We went our separate ways and it was for the best.
I really don't know your reasons. Or rather, your motivation. But continue this over PM if you wish.
Hobbit
2012-01-29 15:00:28
From: Wizzup?
I really don't know your reasons. Or rather, your motivation. But continue this over PM if you wish.
Thank you.
Now anyone else have ideas for boosting prices? Could make a tele tab maker, that would consume a lot of laws?
Markus
2012-01-29 15:01:04
Release a bolt enchanter to public? Good mage xp, cheap when the runes are cheap and it consumes the higher level runes.
Hobbit
2012-01-29 15:07:49
We should make AIO script and call it SMUT. SRL Magic UTility
It can do like bolt enchantment, jewelry enchantment, alchemy (hi/lo), and anything else that would consume our sudoku runes :p
Kyle Undefined
2012-01-29 15:10:43
Bolt and jewelry enchanter would help, was kind of working on a jewelry enchanter.
the scar noob
2012-01-29 15:22:57
Sudoku Solver 1h:1m:39s
Solved: 114 | SpH: 111
GetMoneyPouchAmount is broke, so script never logs acc out. i will try to fix this when I have time.
Richard
2012-01-29 15:45:55
From: the scar noob
GetMoneyPouchAmount is broke, so script never logs acc out. i will try to fix this when I have time.
I noticed this yesterday, seems a little bit temperamental. Working fine for me right now, but I think it will sometimes try and read it when the sudoku screen is still up.
the scar noob
2012-01-29 18:52:33
From: Richard
I noticed this yesterday, seems a little bit temperamental. Working fine for me right now, but I think it will sometimes try and read it when the sudoku screen is still up.
Hmm, when I got back at my acc I saw it didn't had enough money to buy runes anymore,but the script kept solving sudoku's :s
After I had no money, it solved 25 more.
Flight
2012-01-29 21:59:04
From: Hobbit
We should make AIO script and call it SMUT. SRL Magic UTility
It can do like bolt enchantment, jewelry enchantment, alchemy (hi/lo), and anything else that would consume our sudoku runes :p
I can help with this if you'd like. I put together a high-alcher in just short of 5 minutes as an example for registered SRL'er, just to give him a basic understanding of how one would work.
Hobbit
2012-01-31 00:55:51
I dont have time to write one right now :p
http://villavu.com/forum/showthread.php?t=73765^Subtle >.>
cause
2012-01-31 02:11:18
haha nice one hobbit
Markus
2012-01-31 02:11:51
> money-making script
> Fighter with ancients.
Right :rolleyes:
Coh3n
2012-01-31 02:23:08
From: Flight
I can help with this if you'd like. I put together a high-alcher in just short of 5 minutes as an example for registered SRL'er, just to give him a basic understanding of how one would work.
I think those could all be added to MSI pretty easily.
n3ss3s
2012-01-31 16:47:44
Btw never thought about how this removes money from the economy :D GP goes to Ali, runes get removed by casting –> lolwat
YoHoJo
2012-01-31 17:07:59
From: n3ss3s
Btw never thought about how this removes money from the economy :D GP goes to Ali, runes get removed by casting –> lolwat
I wonder how much GP Ali has!? Let's hack him, sell it all, and share the $!
Richard
2012-01-31 17:15:40
In theory, doesn't that act alone reduce the cost of runes though? Less money in economy, prices decrease. More supply, less cost! Although, nature runes are actually commonly used to make more money!
What are the estate agents, though? All the rooms in those houses must rake in millions!
HyperSecret
2012-02-01 00:22:38
Did anyone SpH rate drop a lot after the update today? I fixed the talking and such but I went from 130-140 /hr down to 40-50….
Markus
2012-02-01 16:10:57
oh look what I just found at pastebin.
From: Wanted
So I'm making an OSI sudoku solver to be posted here in the public (via github…as a display of power and user interest.. going to put in a 'kill switch' for obvious reasons)
It's quite amazing, I've got it fully functioning (missing a few extra features and finalization) nothing major.. not for a testing phase at least… except for it can only solve about 4/5 puzzles (the more difficult ones go beyond the current algorithms capacity which only involves checking row, column and section.
The chat handling is probably faster than SRL's (would be by nature) I have it set up to work for my current chat (around 4700ms avg for me)… it can be different for different people depending on your quests and crap so if anyone wants to help add that by adding more cases to the count color clause in the chat section that would be helpful.
The tile grabbing is up to 6xs faster than SRL's (15-45ms vs 60-140ms). This part is probably perfected.
The solution generator is quite good (30-90ms ~40ms avg) but it only works for 4/5 puzzles… needs another step involved to get those harder puzzles this is where the most help is needed.
The solution executor is quite fast (7000-11000ms ~ 9000ms avg) which appears to be around 12000-19000 ms in SRL's. This is probably also perfected. However testing and messing around with the mouse speed and the waits in FastMMouse might be worth looking into.
The handling of stuff in between is pretty solid, I think I got that covered. 1 full solve including everything is 17000ms-25000ms which far surpasses SRL's 24000-35000ms. I believe this puts our solvers per hour (SPH) when you include it running the way it is now (like skipping a few hard puzzles) right up there with SRL, and if it didn't skip any puzzles would probably surpass it by as much as 33%-100%++ so potentially 4-6.25 mil per hour potential here.
Here's the rough Alpha version now, hope to get a Beta out tomorrow (hopefully with that extra solution generator step)
program New;
{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}
//{$DEFINE SMART} // Comment out to disable SMART
{$I OSI\OSI.scar}
{$I OSI\Divi\Misc\Debug.scar}
const
UseRegularMouse = False;
FastMouseSpeed = 100;
var
CurrentTile, Solves: Integer;
PinCheck: Boolean;
procedure ScriptTerminate;
begin
FreeOSI;
end;
procedure WaitR(Min, Max: Integer);
begin
Wait(Min + RandomG((Max - Min), OSI_Variance));
end;
procedure FastMMouse(X, Y, RX, RY: Integer);
var
InitMouseSpeed: Integer;
begin
if (UseRegularMouse) then
begin
MMouse(X, Y, RX, RY);
Exit;
end;
InitMouseSpeed := MouseSpeed;
MouseSpeed := FastMouseSpeed;
MMouse(X, Y, RX, RY);
MouseSpeed := InitMouseSpeed;
end;
procedure FastMouse(X, Y, RX, RY: Integer; Left: Boolean);
var
P: TPoint;
begin
if (UseRegularMouse) then
begin
Mouse(X, Y, RX, RY, Left);
Exit;
end;
FastMMouse(X, Y, RX, RY);
WaitR(2, 10);
GetMousePos(P.X, P.Y);
HoldMouse(P.X, P.Y, Left);
WaitR(20, 60);
GetMousePos(P.X, P.Y);
ReleaseMouse(P.X, P.Y, Left);
WaitR(85, 125);
end;
procedure FastMouseBox(x1, y1, x2, y2: Integer; TypeC: ClickActions);
var
P: TPoint;
begin
if (UseRegularMouse) then
begin
FastMouseBox(X1, Y1, X2, Y2, TypeC);
Exit;
end;
P := RRectanglePoint(X1, Y1, X2, Y2);
case (TypeC) of
ClickLeft: FastMouse(P.X, P.Y, 0, 0, True);
ClickRight: FastMouse(P.X, P.Y, 0, 0, False);
MoveTo: FastMMouse(P.X, P.Y, 0, 0);
end;
end;
procedure FastMouseCircle(Radius, CX, CY: Integer; TypeC: ClickActions);
var
P: TPoint;
begin
if (UseRegularMouse) then
begin
MouseCircle(Radius, CX, CY, TypeC);
Exit;
end;
P := RCirclePoint(CX, CY, Radius);
case TypeC of
ClickLeft: FastMouse(P.X, P.Y, 0, 0, True);
ClickRight: FastMouse(P.X, P.Y, 0, 0, False);
MoveTo: FastMMouse(P.X, P.Y, 0, 0);
end;
end;
function GrabTiles: TIntegerArray;
var
Colors: array[0..8] of Integer;
GrabPos: TPointArray;
I, II, T: Integer;
O, P: TPoint;
begin
WriteLn('Grabbing tiles...');
T := GetSystemTime;
SetLength(Result, 81);
GrabPos := [Point(39, 111), Point(29, 164), Point(69, 170), Point(28, 212), Point(76, 202),
Point(30, 264), Point(72, 257), Point(33, 308), Point(80, 319)];
for I := 0 to 8 do
Colors[I] := GetColor(GrabPos[I].X, GrabPos[I].Y);
for I := 0 to 80 do
begin
O := Point(118 + ((I mod 9) * 37), 8 + ((I div 9) * 37));
if (GetColor(O.X + 2, O.Y + 2) <> 68) then
Continue;
for II := 0 to 8 do
begin
if (FindColor(P.X, P.Y, Colors[II], O.X, O.Y, O.X + 31, O.Y + 31)) then
begin
Result[I] := II + 1;
if (not (TIAContains([3, 4], II))) then
Break;
end;
end;
end;
WriteLn('Tiles grabbed. (' + IntToStr(GetSystemTime - T) + 'ms)');
end;
procedure GetTileInfo(Index: Integer; var R, C, Sec: Integer);
begin
R := Index div 9;
C := Index mod 9;
Sec := ((R div 3) * 3) + ((C div 3) mod 3);
end;
procedure SetTileInfo(Index, Value: Integer; var Row, Column, Section: T2DIntegerArray);
var
R, C, L, Sec: Integer;
begin
GetTileInfo(Index, R, C, Sec);
L := Length(Row[R]);
SetLength(Row[R], L + 1);
Row[R][L] := Value;
L := Length(Column[C]);
SetLength(Column[C], L + 1);
Column[C][L] := Value;
L := Length(Section[Sec]);
SetLength(Section[Sec], L + 1);
Section[Sec][L] := Value;
end;
function GetPossibleValues(Index: Integer; Row, Column, Section: T2DIntegerArray): TIntegerArray;
var
I, R, C, Sec, L: Integer;
begin
Result := [];
GetTileInfo(Index, R, C, Sec);
for I := 1 to 9 do
begin
if (TIAContains(Row[R], I)) then
Continue;
if (TIAContains(Column[C], I)) then
Continue;
if (TIAContains(Section[Sec], I)) then
Continue;
L := Length(Result);
SetLength(Result, L + 1);
Result[L] := I;
end;
end;
function GenerateSolution(Tiles: TIntegerArray): TIntegerArray;
var
Row, Column, Section, PossibleValues: T2DIntegerArray;
I, II, T: Integer;
begin
SetLength(Row, 9);
SetLength(Column, 9);
SetLength(Section, 9);
SetLength(Result, 81);
for I := 0 to 80 do
Result[I] := Tiles[I];
WriteLn('Generating Solution...');
T := GetSystemTime;
for I := 0 to 80 do
SetTileInfo(I, Result[I], Row, Column, Section);
SetLength(PossibleValues, 81);
repeat
for I := 0 to 80 do
if (Result[I] = 0) then
begin
PossibleValues[I] := GetPossibleValues(I, Row, Column, Section);
if (Length(PossibleValues[I]) = 1) then
begin
Result[I] := PossibleValues[I][0];
SetTileInfo(I, Result[I], Row, Column, Section);
//WriteLn(IntToStr(I) + ' has to be ' + IntToStr(Result[I]));
Break;
end;
end;
until (I > 80);
II := 0;
for I := 0 to 80 do
if (Result[I] > 0) then
Inc(II);
if (II <> 81) then
begin
WriteLn('Unable to generate solution!');
Result := [];
Exit;
end;
WriteLn('Solution generated. (' + IntToStr(GetSystemTime - T) + 'ms)');
end;
{if (Length(Row[R]) = 8) then
for I := 1 to 9 do
if (not (TIAContains(Row[R], I))) then
begin
Result := [I];
Exit;
end;
if (Length(Column[C]) = 8) then
for I := 1 to 9 do
if (not (TIAContains(Column[C], I))) then
begin
Result := [I];
Exit;
end;
if (Length(Section[Sec]) = 8) then
for I := 1 to 9 do
if (not (TIAContains(Section[Sec], I))) then
begin
Result := [I];
Exit;
end; }
function SolveSudoku: Boolean;
var
InitialTiles, Solution: TIntegerArray;
AI: array[0..8] of Integer;
I, II, H, T: Integer;
ATPA: T2DPointArray;
TPA: TPointArray;
begin
Result := False;
InitialTiles := GrabTiles;
Solution := GenerateSolution(InitialTiles);
if (Length(Solution) <> 81) then
Exit;
T := GetSystemTime;
for I := 0 to 80 do
if (Solution[I] = InitialTiles[I]) then
Solution[I] := 0;
SetLength(ATPA, 9);
for I := 0 to 8 do
for II := 0 to 80 do
if (Solution[II] = (I + 1)) then
begin
SetLength(ATPA[I], AI[I] + 1);
ATPA[I][AI[I]] := Point(118 + ((II mod 9) * 37), 8 + ((II div 9) * 37));
Inc(AI[I]);
end;
SetLength(TPA, 9);
TPA[0] := Point(28, 112);
for I := 2 to 9 do
TPA[I - 1] := Point(28 + ((I mod 2) * 50), 111 + ((I div 2) * 50));
for I := 0 to 8 do
SortTPAEx(ATPA[I], TPA[I]);
WriteLn('Executing solver...');
T := GetSystemTime;
for I := 0 to 8 do
if (Length(ATPA[I]) > 1) then
begin
if (CurrentTile <> (I + 1)) then
begin
FastMouseCircle(12, TPA[I].X, TPA[I].Y, ClickLeft);
CurrentTile := I + 1;
end;
H := High(ATPA[I]);
for II := 0 to H do
FastMouseBox(ATPA[I][II].X, ATPA[I][II].Y, ATPA[I][II].X + 31, ATPA[I][II].Y + 31, ClickLeft);
end;
WriteLn('Solver executed. (' + IntToStr(GetSystemTime - T) + 'ms)');
Result := True;
end;
function UnlockLargeCasket: Boolean;
var
P: TPoint;
begin
Result := False;
if (SolveSudoku) then
FastMouseBox(15, 64, 87, 78, ClickLeft)
else
begin
WriteLn('Getting new tile set...');
FastMouseBox(17, 17, 26, 26, ClickLeft);
Exit;
end;
if (not (WaitFindColorTolerance(P.X, P.Y, 7913190, 201, 352, 315, 367, 0, True, 50, 100, 5000, 6000))) then
begin
WriteLn('Casket still locked! Solve failed!');
WriteLn('Getting new tile set...');
FastMouseBox(17, 17, 26, 26, ClickLeft);
Exit;
end;
TypeSend('1');
if (PinCheck) then
if (WaitFunc(@PinScreen, True, 50, 100, 1000, 2000)) then
if (not (EnterBankPin(Players[CurrentPlayer].Pin))) then
Exit;
PinCheck := False;
Result := True;
end;
function TalkToAli: Boolean;
var
ATPA: T2DPointArray;
TPA: TPointArray;
P: TPoint;
begin
Result := False;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.25);
FindColorsTolerance(TPA, 9662030, MSX1, MSY1, MSX2, MSY2, 11);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
ATPA := SplitTPA(TPA, 8);
if (Length(ATPA) < 1) then
Exit;
SortATPASize(ATPA, True);
P := MiddleTPA(ATPA[0]);
MMouse(P.X, P.Y, 0, 0);
if (not (IsUpTextMulti(['to A', 'Ali', 'li M', 'orrisa', 'risane']))) then
Exit;
GetMousePos(P.X, P.Y);
Mouse(P.X, P.Y, 0, 0, True);
Result := True;
end;
function ObtainLargeCasket: Boolean;
var
T, TT: Integer;
begin
if (not (TalkToAli)) then
Exit;
Result := False;
WriteLn('Obtaining large casket from Ali...');
T := GetSystemTime;
TT := GetSystemTime + RR(30000, 40000);
repeat
case CountColor(13158600, 43, 382, 483, 468) of
416: TypeSend('3');
1669: TypeSend('2');
2232: TypeSend('2');
else
if (CountColor(0, 30, 403, 371, 440) = 666) then
begin
WriteLn('Insufficient funds!');
Logout;
Exit;
end
else
if (GetColor(289, 460) = 11776948) then
TypeSend(' ');
end;
Wait(1);
if (GetSystemTime > TT) then
begin
WriteLn('Failed to obtain large casket from Ali!');
Logout;
Exit;
end;
until (GetColor(31, 32) = 0);
WriteLn('Large casket obtained. (' + IntToStr(GetSystemTime - T) + 'ms)');
Result := True;
end;
procedure InitScript;
begin
SetUpOSI;
end;
procedure MainLoop;
var
T: Integer;
begin
PinCheck := True;
repeat
T := GetSystemTime;
if (not (ObtainLargeCasket)) then
Exit; // FIX
if (UnlockLargeCasket) then
begin
Inc(Solves);
WriteLn('Solve #' + IntToStr(Solves) + ' took : ' + IntToStr(GetSystemTime - T) + 'ms');
end;
until (not (LoggedIn));
end;
begin
InitScript;
MainLoop;
end.
{var
TIA: TIntegerArray;
T, I: Integer;
S: string;
begin
SetUpOSI;
TIA := GrabTiles;
S := '';
for I := 0 to 80 do
begin
S := S + IntToStr(TIA[I]);
if (Length(S) = 9) then
begin
WriteLn(S);
S := '';
end;
end;
CurrentTile := 0;
//SolveSudoku(ManualSetUp);
///GrabTiles;
TalkToAli;
//UnlockLargeCasket;
end. }
searched for site:pastebin.com sudoku scar
http://pastebin.com/1sD0F7us
Richard
2012-02-01 16:48:44
Why does he have to be constantly attacking our edition? I have no problem with him making a sudoku script (as much as I'd rather him not lower profits), but him doing at to get back at us is so desperately immature…
Gu3st...
2012-02-01 17:29:09
From: Markus
oh look what I just found at pastebin.
searched for site:pastebin.com sudoku scar
http://pastebin.com/1sD0F7us
I pasted that :o
n3ss3s
2012-02-01 20:57:31
I don't understand how 200% * 2m/h is 6m/h
Markus
2012-02-01 21:08:12
Noone knows.
n3s you are quite optimisation freak right? Try to make sudoku work without srl (just rip chooseoption) and then try it with Lape, that should also shave some milliseconds off as its just faster than ps.
HyperSecret
2012-02-08 10:10:33
Kyle Undefined
2012-02-08 10:12:45
It only does small caskets, so it should be fine :p
HyperSecret
2012-02-08 10:28:20
From: Kyle Undefined
It only does small caskets, so it should be fine :p
Yep, btw, does anyone have a more current version than the one Hobbit posted? I formatted my PC and didn't take anything off of it since I only use it for SIMBA.
n3ss3s
2012-02-08 15:46:04
Btw the other day I had an idea cross my mind, the price avg for water/fire/earth/air runes is around 25gp, and you get about 25 of each rune (atleast for the large casket), so that's 2.5k a casket. With high (80+ is enough for 99% success I think?), that'll be something like 500 sph, = 1.25m/h
HyperSecret
2012-02-08 17:26:57
From: HyperSecret
http://villavu.com/forum/showthread.php?p=916174#post916174
:duh:
The reason why I said this, was because of people getting the idea and hearing about the amount of money it can make and deciding to make their own :p
Markus
2012-02-08 17:29:42
n3ss3s
2012-02-08 17:56:24
lols
Markus
2012-02-08 17:57:00
especially that only 1 guy responded, lolzorz.
HyperSecret
2012-02-12 03:56:00
From: HyperSecret
Yep, btw, does anyone have a more current version than the one Hobbit posted? I formatted my PC and didn't take anything off of it since I only use it for SIMBA.
Anyone?
Anyone know the current gp/h rates.
Richard
2012-05-15 14:22:48
Is anyone else finding this method of making money to actually be at a loss now?
From: Richard
Is anyone else finding this method of making money to actually be at a loss now?
Less people making runes while training RC'ing would make me think the pries would rise. However, I remember a time a year or so back when I used to lose money running this sometimes, or just make very little.
YoHoJo
2012-05-15 17:00:17
Pretty sure there are lots of scrips for this floating around and stuff and the gp/hr is pretty bad.
Ask Smurg, he would know he has made his own and uses it.
The Claw
2013-02-22 03:04:46
inb4 SSRL spams sudoku and rules the economy
YoHoJo
2013-02-22 03:05:52
From: The Claw
inb4 SSRL spams sudoku and rules the economy
Already looked into this. I believe Rouge Trader Sudoku was in a LATER version of RS than what Jagex is releasing.
n3ss3s
2013-02-22 03:07:53
From: yohojo
already looked into this. I believe rouge trader sudoku was in a later version of rs than what jagex is releasing.
http://runescape.salmoneus.net/activities/rogue-trader.htmlAugust 16 2005
YoHoJo
2013-02-22 03:17:32
So far oldest instance I can find about Ali Rouge Trader is "12 Oct 07" SO CLOSE D:
I think we are getting August 07 RS? Anyone know?
Yeah I knew the Feud is that old, but the main reward for the quest isn't access to Ali, that was added later.
I'll keep looking for older talk about him.
Edit:
Ali Existed since at least 17 Nov 05 hopefully he also hosted Sudoku since then too….!
Edit:
20 Jun 07 Confirmed.
OH MY GOD
I hope there aren't working traces of this all over the internet though…. I hardly feel it's 100% safe here D:.
We are going to make BANK!
The Claw
2013-02-22 03:18:11
I think we might need a game plan for this. With no GE it might be obvious if all of a sudden there's a few accounts selling mass amount of runes. People will catch on quick especially if we do it early on in the game. We will need to sell in small amounts, at a standard price. Instead of saying "selling 50k bloods cheap" say "selling 1k bloods" etc. I don't know how it will work but it could cause trouble if there's a bunch of accounts selling en masse. (assuming enough of us auto this to make it a problem)
YoHoJo
2013-02-22 03:36:02
Well I was talking with some people to day, we need to understand this is a FRESH servers as in there will be NO GP.
People will need to alch and sell to shops or do other NPC/Game related things for GP to even be in abundance in the game at first.
In the beginning it will just be collecting/bartering system.
Right?
And yeah very true Clawwww
n3ss3s
2013-02-22 03:39:28
From: The Claw
I think we might need a game plan for this. With no GE it might be obvious if all of a sudden there's a few accounts selling mass amount of runes. People will catch on quick especially if we do it early on in the game. We will need to sell in small amounts, at a standard price. Instead of saying "selling 50k bloods cheap" say "selling 1k bloods" etc. I don't know how it will work but it could cause trouble if there's a bunch of accounts selling en masse. (assuming enough of us auto this to make it a problem)
We will naturally have to sell them in low quantities for a long time anyways, 1. It will take probably weeks before trading is properly established / when you can pretty much buy/sell an item at will, 2. We won't have any damn money :D Have to mine rune ess or something for a few mill, which will let you do like 50 puzzles or something, you watch that go by in half an hour, go sell, etc.
I'll probably begin by doing rune mysteries and getting some combat so I can do the feud, then I'll just mine ess for a week straight or something. Btw, I'm willing to make a bet Wizzup's ess miner will work with the appropriate SRL lol
YoHoJo
2013-02-22 03:45:45
All ya'll niggas planning to farm post your Skypes, we should talk.
A.Lakhotia
I've got a buddy with lots of capital willing to spend it on severs/membership/etc and we get cuts of everything etc.
n3ss3s
2013-02-22 03:50:32
Oh btw, do we have some kind of an organized SRL archive with a revision from the time of the RS backup?
YoHoJo
2013-02-22 03:52:16
See my recently created threads, someone posted some old SRL version along with 2007 fonts on it too.
Skype?
Let's highly organize and coordiante this shit!
n3ss3s
2013-02-22 04:00:12
I think my skype is n3ss3s, I'm not used to using it though so I'll probably be a rare sight, although I'm at the computer most of my day
Oih, funny, I actually woke from my sleep thinking about this and here everyone is…. I miss watching this script run and the account I made all the gps (p-hat) on is still banned, shall be fun…. :sasmokin:
*and my nephew (who is a little slow in the head :redface: ) messaged me on FB asking about the "Auto-Script Writer" :duh:
The Claw
2013-02-22 22:00:28
Wish there was such a thing as an Auto-Script Writer :p
YoHoJo
2013-02-22 22:02:16
From: The Claw
Wish there was such a thing as an Auto-Script Writer :p
Dude, there is
Program AutoScriptWriterScript;
Begin
WriteLn('
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
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
SmartWorld = 160;//World?
Signed = true;//Signed Java?
var
Playground : Array of Array of byte;
lolz : TStringArray;
DTM : array [1..9] of integer;
ownarr : array [1..9] of TPoint;
FailTime, Solved, ReportTime: integer;
const
XStart = 116;
YStart = 8;
XOff = 37;
YOff = 37;
//STOOOOOOF
// mind = 1
// fire = 2
// earth= 3
// law = 4
// death= 5
// body = 6
// air = 7
// chaos= 8
// water= 9
//STOOOOOOF
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLid:= '';
SRLpassword:= '';
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
end;
Procedure LoadPlayGround;
var
X,Y,D,i: Integer;
s, ss : string;
begin
SetLength(playground, 9);
for i := 0 to 8 do
SetLength(playground[i], 9);
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.2, 0.2); //defaults
for y := 0 to 8 do
begin
//s := '';
SS := '';
for x := 0 to 8 do
begin
wait(1);
case CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0) of
0: D := 0; //Nothing
471: D := 1;//Mind
413: D := 2;
475: D := 3;
444: D := 4;
573: D := 5;
559: D := 6;
564: D := 7;
481: D := 8;
486: D := 9;
else
writeln('UNKNOWN COUNT! '+inttostr(CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0)));
end;
if d > 0 then
SS := SS + lolz[d-1] + ' | '
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;
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
SS := SS + lolz[Solver[x][y].number-1] + ' | ';
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 FindColor(x2, y2, 65536, X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8) then
continue;
if Solver[x][y].number = z then
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;
//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;
procedure LoadArrays;
begin
OwnArr[1] := Point(20, 100);
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' +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k5FImI/LG8hKxBSc5pRaBcK69WltbCZtJp42cX1hQbAq' +
'+tVAX8gfCA7ETI0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[5] := Point(70, 200); //dea
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4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nzhvDYYkWWCG7BeDGDMBKW' +
'h/FTjjwEfmrCnzrQj5WA/gBytNqLn6wcp79Bwmw8AM=');
OwnArr[9] := Point(20, 250); //water
dtm[9]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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 ', 'death', ' body', ' air ', 'chaos', 'water'];
end;
function SudokuSolver: boolean;
var
EmptyStone : SuSquare;
EmptyStack : SuStack;
begin
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..');
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
Writeln('Failed to Solve :(');
end;
function TalkToAli: boolean;
var
i, x, y, L: integer;
M: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 15855599, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(250+random(150));
if IsUpText('orris') then
begin
GetMousePos(x, y)
Mouse(x, y, 0, 0, false);
wait(25+random(25));
result := ChooseOption('orris');
FFlag(0);
Wait(200+random(200));
end;
end;
end;
begin
SmartSetup('world'+inttostr(SmartWorld), true, Signed, false);
while not SmartActive do wait(100);
SetTargetDC(SmartGetDC);
SetupSRL;
ClearDebug;
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;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
Clickcontinue(true, true);//quick chat world check
SetAngle(true);
repeat
if not LoggedIn then
LoginPlayer;
if CoinAmount('inv') < 59000 then
TerminateScript;
if SudokuMenu then
DoSudoku;
if TalkToAli then
begin
MarkTime(FailTime);
repeat
ClickContinue(true, true);
wait(100);
until FindNPCChatText('selection', ClickLeft) or (Not Loggedin)
while not Clickcontinue(true, true) and LoggedIn do
Wait(100);
while not FindNPCChatText('large', ClickLeft) and LoggedIn do
Wait(100);
while not Clickcontinue(true, true) and LoggedIn do
Wait(100);
repeat
if FindNPCChatText('amine', ClickLeft) then
begin
DoSudoku;
Break;
end;
wait(100);
until (Not LoggedIn)
end;
if (TimeFromMark(FailTime) > 600000) then
TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false
end.
');
end.
n3ss3s
2013-02-22 23:25:35
From: YoHoJo
Dude, there is
I'll play along and ask you to elaborate, because someone whos not even from SRL just asked me isn't there an auto script writer for members only or something l0l0l
Markus
2013-02-23 15:18:12
Hhaahahaha, this thing might own in 2007scape. The problem is that because of a lack of money I doubt the prices have inflated enough for this to be profitable…
But let's keep this in mind.
n3ss3s
2013-02-23 16:06:32
From: Markus
Hhaahahaha, this thing might own in 2007scape. The problem is that because of a lack of money I doubt the prices have inflated enough for this to be profitable…
But let's keep this in mind.
Yeah, it'll take until some kind of trading has been established… Also I don't want to be bringing in blood runes when nobody is able to craft them yet, that'd be the one thing that would bust us lol
Markus
2013-02-23 18:15:01
Uhm, blood rune crafting is a relatively recent update (way after wildy removal) so na that's not really a problem. We all got them from ankhous remember?
n3ss3s
2013-02-23 20:02:09
From: Markus
Uhm, blood rune crafting is a relatively recent update (way after wildy removal) so na that's not really a problem. We all got them from ankhous remember?
o rite.. Anyways, it'll take time before this is practical since you need to be able to rinse and repeat and right now nobody is buying bloods/deaths
HyperSecret
2013-02-24 13:25:08
I woke up this morning and was like, hmm…sudoku, was that in 2007? Lol, and you are guys already here talking about it.
I wasn't planning on really playing 07scape that much, but if this is available, why not :D
Markus
2013-02-26 13:48:47
Sudoku is one of the earliest minigames around! As you can see the original script is from june 2008 (wow, almost five years already!) so sure it was around in 2007.
weequ
2013-03-06 19:10:29
Do you get randoms while solving sudokus?
n3ss3s
2013-03-06 20:06:46
From: weequ
Do you get randoms while solving sudokus?
People using powerbot etc used to get banned and shit, but we never got a SINGLE random event or ban doing this.
The Claw
2013-03-07 02:11:47
Even running at something ridiculous like 150sp/h :p
Bam Bam
2013-06-10 22:28:15
I'm only a few months late here, but what is 2007scape?
I found it. Awesome!
Markus
2014-04-08 05:37:27
Does this still work in old-skool RS?
Gu3st...
2014-04-08 18:45:31
Re-reading this thread makes me happy :)
Also, why not just test it out yourself and then re-create it for SRL-6 you lazy bm leader
Widget
2014-08-19 22:07:04
Uhh it compiles now. It can't finish the whole conversation with him for some reason, and if you get to the sudoku it just fills it with mind runes. But progress!.. kinda.
(what is the
for A:= 1 to 10 do in the main loop supposed to do?)
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALIRAPER;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.simba}
const
Rule7proof = true; //TRUE TO BE LEGAL!
DisplayDetails = false;//shows all the crap in Debug/Report windows :P
SmartWorld = 160;//World?
Signed = true;//Signed Java?
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: Boolean;
t: integer;
const
XStart = 116;
YStart = 8;
XOff = 37;
YOff = 37;
//STOOOOOOF
// mind = 1
// fire = 2
// earth= 3
// law = 4
// death= 5
// body = 6
// air = 7
// chaos= 8
// water= 9
//STOOOOOOF
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
//SRLid:= '';
//SRLpassword:= '';
Players[0].Name := 'I Am Widget';
Players[0].Pass := 'scytebcdpg9bm';
Players[0].Nick := 'idg';
Players[0].Active := true;
end;
Procedure LoadPlayGround;
var
X,Y,D,i: Integer;
s, ss : string;
begin
SetLength(playground, 9);
for i := 0 to 8 do
SetLength(playground[i], 9);
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.2, 0.2); //defaults
for y := 0 to 8 do
begin
//s := '';
SS := '';
for x := 0 to 8 do
begin
wait(1);
case CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0) of
0: D := 0; //Nothing
471: D := 1;//Mind
413: D := 2;
475: D := 3;
444: D := 4;
573: D := 5;
559: D := 6;
564: D := 7;
481: D := 8;
486: D := 9;
else
writeln('UNKNOWN COUNT! '+inttostr(CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0)));
end;
if d > 0 then
SS := SS + lolz[d-1] + ' | '
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;
//DrawBitmap(dtm[Solver[x][y].number], getdebugcanvas, x*30+(x/3*4), y*29+(y/3*4)); //Draw sudoku at debug (with roster).
SMART_DrawBitmap(true, dtm[Solver[x][y].number], point(x*30+(x/3*4), y*29+(y/3*4)));
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).
SMART_DrawBitmap(false, dtm[Solver[x][y].number], point(x*30+(x/3*4), y*29+(y/3*4)));
if FindColor(x2, y2, 65536, X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8) 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));
SMART_DrawBitmap(false, dtm[Solver[x][y].number], point(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;
procedure LoadArrays;
begin
OwnArr[1] := Point(20, 100);
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' +
'5fO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0+NvDo3uzb/Frj4hKesCy0owmPehftj802q/+F4' +
'KmXklZk3wC9f+RNStCA8ZpipC/eT08PD02Nj86+mKC5cfD0dTqa4E' +
'eQQHjPlYhG4G5vPiZ6eJ8mkyDPjL+YmXnIV4f0oboRiCriSLlwRns' +
'lihlUX3Mjx7u7BROL50NDU6DPgFFrgqAstrAs3IlfqwlFd8C8zaP9' +
'RKgnO8UFX10A8Pjr4GNUU59OCo1pQtBCZFqaLFhw1EQo4yaVFTjje' +
'j8X6+/pGBh4BJznnY8Za6EZENlcUfM1CcLTgnNg4MfLd2x3J3l6GK' +
'DgnwwfOB/hso26B8udXeMg4RzjTZFWM3NneriECpzxTkyL45idwsl' +
'p7bDNKI99qbpZq5gjfc5Xyu3IqkfWe4fE0cktj473OO6gW3H+hwUn' +
'uyvHstsjM0cgNkUgsGkU1cPHtfJPvTtYDRzhDtAcfIfa88CHa2opq' +
'SnyFlxzBjePCpZ1tgcwEFVtYIys2j4wLN/PuWF0zwLUtkPXIYNvzX' +
'pJtFtvgbvgQ7XohsNjaajewka/V1+OEJRHcDe8hSztwi63dZrED3/' +
'982dRwHSfAjQ888C0nOLFNCLb9gY0cqatjt9lAtLhw2xl3pn7h4X9' +
'YwEmOFh75QDOCG1/h9b8cGNjz341zl++Wv4sxQ7AqPT5axbamG/Cp' +
'jpttvF5ohCu7l2qihvBDqsqolfjhVfHaf6+Hoao=');
OwnArr[5] := Point(70, 200); //dea
dtm[5]:= BitmapFromString(30, 29, 'beNqdlW1LU2Ech+1Vn0B660f' +
'oCwiSJIORWGJiybBEzMxExjLTZJlmpmZmLmc+tFzmQy6fmk3RUUF9' +
'D6Ev0asu+MGfm3O24wh+jMP0XPfvXP/7Pkue/5s8I2Vl54rlzHuDm' +
'burH/fX1w+2PucymaOdneO93ZOv+9+/Hfw8OvwPvm7ZfL+cWfmwnU' +
'7vrX3Kbm4Ifrj9Bb7Bf50cl8jXv6USidV38xtLi1upFHBqA6c5fKL' +
'yLvx3Ph8M56+Ji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OHacOb+' +
'+sfDzc2jnc/lYvFkb+/0YP/s6+H3b0c/T47/g68l2+9Xi2sfdguFg' +
'41Ppe0twY93v8A3+K+z0xr5ei2fza6/W9xaWd7J54FjGzjO4SOZd+' +
'G/K5VwOP/NTk0tZTIibywvYVtwnCOVCISz9kp9fTVsJp02ciGXk20' +
'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[7] := Point(20, 200); //air
OwnArr[8] := Point(70, 250); //chaos
DTM[8]:= BitmapFromString(30, 29, 'beNqdle1KVGEUhe1XdAH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79Bwmw8AM=');
OwnArr[9] := Point(20, 250); //water
dtm[9]:= BitmapFromString(30, 29, 'beNqdlW1LU3EYxu1V36BXvfA' +
'j9B0EGUQiiYklw5JhZiZjLDNNpmnL1GyZy5kPLZfpzOXjbIoODeo7' +
'9aofXHBzOE+O4GKM6fld17nu+39O7urf3CWqq7sSpEuvDWfurX892' +
'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 ', 'death', ' body', ' air ', 'chaos', 'water'];
end;
function SudokuSolver: boolean;
var
EmptyStone : SuSquare;
EmptyStack : SuStack;
begin
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..');
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, 15855599, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y, 4, 4);
Wait(250+random(150));
if IsUpText('orris') then
begin
GetMousePos(x, y);
case Random(10) of
0: 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;
begin
//SmartSetup('world'+inttostr(SmartWorld), true, Signed, false);
//while not SmartActive do wait(100);
//SetTargetDC(SmartGetDC);
SetupSRL;
ClearDebug;
SMART_ClearCanvas;
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;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
Clickcontinue(true);//quick chat world check
NorthLast:= True;
MakeCompass('N');
SetAngle(0);
// DoSudoku;
// TerminateScript;
repeat
if not LoggedIn then
LoginPlayer;
// if CoinAmount('inv') < 59000 then
// TerminateScript;
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;
t := GetSystemTime();
if A < 11 then
repeat
writeln('A: '+inttostr(A));
//while ClickContinue(True) do
// wait(200);
ClickContinue(True);
writeln('(81,389)'+inttostr(GetColor(81,389))+', (436, 397)'+inttostr(GetColor(436, 397)));
// selection of runes
if((GetColor(81, 389) = 0) and (GetColor(436, 397) = 0)) or ((GetColor(81, 389) = 16777215) and (GetColor(436, 397) = 16777215))then
begin
writeln('selection');
MouseBox(76, 389, 441, 402, 1);
wait(300);
//large casket of runes
end else if((GetColor(144, 412) = 0) and (GetColor(338, 412) = 0)) or ((GetColor(144, 412) = 16777215) and (GetColor(338, 412) = 16777215))then
begin
writeln('casket');
MouseBox(134, 398, 381, 410, 1);
wait(300);
end else if((GetColor(215, 446) = 0) and (GetColor(302, 445) = 0)) or ((GetColor(215, 446) = 16777215) and (GetColor(302, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end;
if(GetColor(76,116) = 1188768)then // this might have to change
begin
DoSudoku;
break;
end;
wait(200);
until(not(LoggedIn) or (t + 25000 < GetSystemTime));
// if(not(LoggedIn))then exit;
// if (TimeFromMark(FailTime) > 600000) then
// TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
Markus
2014-08-27 09:09:11
The loop is to try it ten times just to be sure.
I'd first turn on DisplayDetails so you can get a view of what the script detects for runes, as I'd say rune detection is probably broken again as usually, it defaults to mind runes.
Widget
2014-11-18 03:55:59
Everything is hax but it should work
{******************************************************************************)
(* *)
(* 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. *)
(* *)
(******************************************************************************}
program ALIRAPER;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.simba}
const
Rule7proof = true; //TRUE TO BE LEGAL!
DisplayDetails = true;//shows all the crap in Debug/Report windows :P
SmartWorld = 160;//World?
Signed = true;//Signed Java?
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: Boolean;
t: integer;
const
XStart = 116;
YStart = 7;
XOff = 37;
YOff = 37;
//STOOOOOOF
// mind = 1
// fire = 2
// earth= 3
// law = 4
// death= 5
// body = 6
// air = 7
// chaos= 8
// water= 9
//STOOOOOOF
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
//SRLid:= '';
//SRLpassword:= '';
Players[0].Name := 'Widget';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
end;
Procedure LoadPlayGround;
var
X,Y,D,i: Integer;
colorcount: LongInt;
s, ss : string;
begin
SetLength(playground, 9);
for i := 0 to 8 do
SetLength(playground[i], 9);
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.2, 0.2); //defaults
for y := 0 to 8 do
begin
//s := '';
SS := '';
for x := 0 to 8 do
begin
wait(1);
colorcount := CountColorTolerance(8421769, x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 51)+
CountColorTolerance(getcolor(74, 163), x*xoff+xstart+4, y*yoff+ystart+4, x*xoff+xstart+xoff-5, y*yoff+yoff+ystart-5, 0);
case (colorcount) of
0: D := 0; //Nothing
477: D := 1; //Mind
427: D := 2; //fire
484: D := 3; //earth
461: D := 4; //law
581: D := 5; //death
564: D := 6; //body
573: D := 7; //air
490: D := 8; //chaos
495: D := 9; //water
(*
0: D := 0; //Nothing
471: D := 1; //Mind
413: D := 2; //fire
475: D := 3; //earth
444: D := 4; //law
573: D := 5; //death
559: D := 6; //body
564: D := 7; //air
481: D := 8; //chaos
486: D := 9; //water
*)
else
writeln('UNKNOWN COUNT! '+inttostr(colorcount));
end;
Writeln('At ('+IntToStr(x)+','+IntToStr(y)+') found '+IntToStr(colorcount)+'.');
if d > 0 then begin
SS := SS + lolz[d-1] + ' | '
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;
//DrawBitmap(dtm[Solver[x][y].number], getdebugcanvas, x*30+(x/3*4), y*29+(y/3*4)); //Draw sudoku at debug (with roster).
//SMART_DrawBitmap(true, dtm[Solver[x][y].number], point(x*30+(x/3*4), y*29+(y/3*4)));
end;
if DisplayDetails then
writeln(ss);
end;
Writeln('Got here 1 ');
// 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).
//SMART_DrawBitmap(false, dtm[Solver[x][y].number], point(x*30+(x/3*4), y*29+(y/3*4)));
if FindColor(x2, y2, 65536, X*XOff+XStart+4, Y*YOff+YStart+4, (X+1)*XOff+XStart-9, (Y+1)*YOff+YStart-8) 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));
//SMART_DrawBitmap(false, dtm[Solver[x][y].number], point(x*30+((x) div 3 * 4), y*29+((y) div 3 * 4)));
end;
end;
end;
end;
wait(750);
Writeln('Got here 2 ');
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('Got here 3 ');
//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;
procedure LoadArrays;
begin
OwnArr[1] := Point(20, 100);
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' +
'Z7sqeHJgpufBG0BL64fIR/t9dkTuB0k1Exckdbm5potyHgIrgRqQW' +
'Wj+A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' +
'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[7] := Point(20, 200); //air
OwnArr[8] := Point(70, 250); //chaos
DTM[8]:= BitmapFromString(30, 29, 'beNqdle1KVGEUhe1XdAHSr8B' +
'L6AYESZIpSSwxsWSwRMzMZBgmM03MtMnUzExzzI9MMx1z8qsxFR0q' +
'qNsQoZvoVw8s2LycM3McgsUwnJn32eusvfc5idN/EyeooOBULp14N' +
'pi5ufRxe2VlZ+3zbiq1v7FxsLV5+HX7+7edn/t7/8HXkdX3c6mFD+' +
'uLi1vLn9KrScH31r/AN/ivw4M8+frb/MTE0rup5OzM2vw8cGwDxzl' +
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q8Wlr7slMo7G98K2' +
'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 ', 'death', ' body', ' air ', 'chaos', 'water'];
end;
function SudokuSolver: boolean;
var
EmptyStone : SuSquare;
EmptyStack : SuStack;
begin
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..');
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, 15855599, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := SplitTPA(TPA, 40);
SortATPASize(ATPA, True);
L := High(ATPA)
for i := 0 to L do
begin
M := MiddleTPA(ATPA[i]);
MMouse(M.x, M.y + 10, 4, 4);
Wait(250+random(150));
if IsUpText('sane') then
begin
GetMousePos(x, y);
case Random(10) of
0: 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;
begin
//SmartSetup('world'+inttostr(SmartWorld), true, Signed, false);
//while not SmartActive do wait(100);
//SetTargetDC(SmartGetDC);
SetupSRL;
ClearDebug;
SMART_ClearCanvas;
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;
if not LoggedIn then
LoginPlayer;
MarkTime(FailTime);
Clickcontinue(true);//quick chat world check
NorthLast:= True;
MakeCompass('N');
SetAngle(0);
// DoSudoku;
// TerminateScript;
repeat
if not LoggedIn then
LoginPlayer;
(* if CoinAmount('inv') < 59000 then
begin
Writeln('Out of money');
TerminateScript;
end; *)
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;
t := GetSystemTime();
if A < 11 then
repeat
//while ClickContinue(True) do
// wait(200);
ClickContinue(True);
//ClickContinue(True);
// writeln('(81,389)'+inttostr(GetColor(81,389))+', (436, 397)'+inttostr(GetColor(436, 397)));
// selection of runes
// if((GetColor(81, 389) = 0) and (GetColor(436, 397) = 0)) or ((GetColor(81, 389) = 16777215) and (GetColor(436, 397) = 16777215))then
if (FindNPCChatText('selection of', ClickLeft)) then
begin
writeln('selection');
//MouseBox(76, 389, 441, 402, 1);
wait(300);
//large casket of runes (initial)
end else if((GetColor(138, 394) = 0) and (GetColor(337, 388) = 0)) or ((GetColor(138, 394) = 16777215) and (GetColor(337, 388) = 16777215))then
begin
writeln('casket');
MouseBox(144, 413, 375, 422, 1);
wait(300);
//large casket of runes (after 1st solve)
end else if((GetColor(137, 402) = 0) and (GetColor(381, 410) = 0)) or ((GetColor(137, 402) = 16777215) and (GetColor(381, 410) = 16777215))then
begin
writeln('casket2');
MouseBox(151, 403, 362, 411, 1);
wait(300);
//examine lock
end else if((GetColor(216, 436) = 0) and (GetColor(304, 445) = 0)) or ((GetColor(216, 436) = 16777215) and (GetColor(304, 445) = 16777215))then
begin
MouseBox(212, 433, 303, 448, 1);
wait(300);
end;
if(SimilarColors(GetColor(76,116), 1188768, 15))then // this might have to change
begin
DoSudoku;
break;
end;
wait(200);
until(not(LoggedIn) or (t + 25000 < GetSystemTime));
// if(not(LoggedIn))then exit;
// if (TimeFromMark(FailTime) > 600000) then
// TerminateScript;
if (GetSystemTime > ReportTime) then
Report;
until false;
end.
Edit: It might not even be profitable any more, ;_;
After 1M: [ATTACH=CONFIG]24466[/ATTACH]
Edit2: Lost ~20k :( [ATTACH=CONFIG]24469[/ATTACH]
The Mayor
2014-11-18 04:43:11
From: Widget
Everything is hax but it should work
Edit: It might not even be profitable any more, ;_;
After 1M: [ATTACH=CONFIG]24466[/ATTACH]
Wow, I totally forgot Al Kharid bank used to be rotated like that!
Gu3st...
2014-11-18 17:59:08
From: The Mayor
Wow, I totally forgot Al Kharid bank used to be rotated like that!
Wait, it's not anymore? o_O
It's been a long time since I last played….