SRL Archive - Test corner

Mordaut "What comes next" questions small fix.


Iroki

2011-02-04 10:40:35

Hello guys!! After a long peroid of inactivity i decided to do something useful :)
I realised that most of random solvers are broken so i decided to fix one of them :) This "lucky one" is Mr.Mordaut :spot:

It is almost compleated except two questions which i couldnt get :/
I made 2 versions, one for scar and one for simba but i dont know why the simba one isnt working properly, simba closes when i run solver, weird.

Give comments, try it, and if someone of you have acc in mordaut and there is one of this 2 questions pm me :)

Ok, it is enought, now is time for sources :P

mordaut.scar
program new;

{.include SRL/SRL.scar}

{
Slots:
_________________________________
| ______ ______ ______ |
| | | | | |
| | 0 | 1 | 2 | |
| |______|______|______| |
| |
| What comes next? |
| ______ ______ ______ ______ |
| | | | | | |
| | 3 | 4 | 5 | 6 | |
| |______|______|______|______| |
|_________________________________|
}
function M_SmallPuzzle2: integer;
var
i, j: integer;
begin

j := 0;
for i := 0 to 4 do
begin
j := Mordaut_GetSlotNr2(5.5, GetClientCanvas.Handle);

if (j > 0) then
begin
Result := j;
WriteLn('');
WriteLn('We should click at slot nr: ' + inttostr(j));
WriteLn('');
Exit;
end else
if (j = -1) then WriteLn('Could not find right slot. It is ' + inttostr(i + 1) + ' try.') else
WriteLn('Could not recognize for what we schould serch for. It is ' + inttostr(i + 1) + ' try.');

end;

if (j < 0) then WriteLn('There is somethink wrong, contact me on forums and give me info what is wrong');


end;


begin
setupsrl;
M_SmallPuzzle2;

end.


mordaut.simba
program new;
{$DEFINE SIMBA}
{$loadlib mordaut_simba}

{.include SRL/SRL.scar}


{
Slots:
_________________________________
| ______ ______ ______ |
| | | | | |
| | 0 | 1 | 2 | |
| |______|______|______| |
| |
| What comes next? |
| ______ ______ ______ ______ |
| | | | | | |
| | 3 | 4 | 5 | 6 | |
| |______|______|______|______| |
|_________________________________|
}
function M_SmallPuzzle2: integer;
var
i, j: integer;
begin

j := 0;
for i := 0 to 4 do
begin
j := Mordaut_GetSlotNr2(5.5, {$ifdef Simba}ExportImageTarget{$else}GetClientCanvas.Handle {$endif});

if (j > 0) then
begin
Result := j;
WriteLn('We should click at slot nr: ' + inttostr(j));
Exit;
end else
if (j = -1) then WriteLn('Could not find right slot. It is ' + inttostr(i + 1) + ' try.') else
WriteLn('Could not recognize for what we schould serch for. It is ' + inttostr(i + 1) + ' try.');

end;

if (j < 0) then WriteLn('There is somethink wrong, contact me on forums and give me info what is wrong');


end;


begin
SetUpSRL;
M_SmallPuzzle2;
end.


mordaut.dpr

library mordaut;


uses
SysUtils,
Classes,
Windows,
Math,
Graphics;

{$R *.res}

const
ax : array[0..7] of ShortInt = (1, 0,-1, 0, 1, 1,-1,-1);
ay : array[0..7] of ShortInt = (0, 1, 0,-1,-1, 1, 1,-1);

type
TSCARPlugFunc = record
Name: ansistring;
Ptr: Pointer;
end;

TOneStrProc = procedure(s: ansistring);
TSCARWindowHandle = function(): Integer;

type
TRGB32 = packed record
B, G, R, A: Byte;
end;
TRGB32Array = packed array[0..MaxInt div SizeOf(TRGB32) - 1] of TRGB32;
PRGB32Array = ^TRGB32Array;

TPointArray = array of TPoint;
{
TFill = record
Width, Height, Area,
MidX, MidY, x1, y1, groups,
x2, y2: Integer;
end; }

var
Writeln: TOneStrProc;
GetClientWindowHandle: TSCARWindowHandle;


var
FillInfo: Boolean;



{

Mr.Mordaut plugin
By: Iroki

}


function Mordaut_GetSlotNr2(ScanningTime: Extended; ClientHDC: HDC): integer; stdcall;

var
BMP: TBitmap;
Line: PRGB32Array;
Sx1, Sy1, Sx2, Sy2, x, y, sx, sy, a1, a2, b1, b2, Slot, i, w, h: integer;
Start, Stop, Freq: int64;
Time: double;
ObjToFind: ansistring;
Obj: array of ansistring;
Lum: array of extended;
CoMax: array of Integer;
CoMin: array of Integer;
BMaxArea: array of Integer;
BMinArea: array of Integer;
BArea: array of Integer;
BlackArea: array of Integer;
ObjectArea: array of Integer;
cM: array of array of array of Integer;
bM: array of array of array of Boolean;

ii, k: Integer;

begin
SetLength(Obj, 7);
SetLength(Lum, 7);
SetLength(CoMax, 7);
SetLength(CoMin, 7);
SetLength(BMaxArea, 7);
SetLength(BMinArea, 7);
SetLength(BArea, 7);
SetLength(BlackArea, 7);
SetLength(ObjectArea, 7);

for Slot := 0 to 6 do
begin
CoMax[Slot] := 0; CoMin[Slot] := 10202; BMaxArea[Slot] := 0; BMinArea[Slot] := 0;
BArea[Slot] := 0;
end;

QueryPerformanceFrequency(Freq);
QueryPerformanceCounter(Start);

Sx1 := 0; Sy1 := 0; Sx2 := 0; Sy2 := 0; a1 := 0; a2 := 0; b1 := 0; b2 := 0;
repeat

w := 456; h := 291;
Bmp := TBitmap.Create;
Bmp.Width := w;
Bmp.Height:= h;
Bmp.PixelFormat := pf32bit;
SetLength(cM, w + 1, h + 1, 7);
SetLength(bM, w + 1, h + 1, 7);
BitBlt(Bmp.Canvas.Handle, 0, 0, w, h, ClientHDC, 0, 0, SRCCOPY);

for Slot := 0 to 6 do
begin
BlackArea[Slot] := 0;
//////////////////////


{
Slots:
_________________________________
| ______ ______ ______ |
| | | | | |
| | 0 | 1 | 2 | |
| |______|______|______| |
| |
| What comes next? |
| ______ ______ ______ ______ |
| | | | | | |
| | 3 | 4 | 5 | 6 | |
| |______|______|______|______| |
|_________________________________|
}

case Slot of

0, 1, 2: begin
Sx1 := 55 + Slot*100;
Sy1 := 45;
Sx2 := Sx1 + 100;
Sy2 := 145;
end;

3, 4, 5, 6: begin
Sx1 := -245 + Slot*100;
Sy1 := 190;
Sx2 := Sx1 + 100;
Sy2 := 290;
end;
end;



for y := Sy1 to Sy2 do
begin
Line := bmp.ScanLine[y];
for x := Sx1 to Sx2 do
begin
cM[x][y][Slot] := RGB(Line[x].R, Line[x].G, Line[x].B);
if (Line[x].R <> 0) then
begin
if InRange(Line[x].R, 50, 85) then
if InRange(Line[x].G, 70, 105) then
if InRange(Line[x].B, 50, 95)then
begin
cM[x][y][Slot] := 0;
bM[x][y][Slot] := True;
inc(BlackArea[Slot]);
end;
end else
begin
cM[x][y][Slot] := 0;
bM[x][y][Slot] := True;
inc(BlackArea[Slot]);
end;
end;
end;

// for x := Sx1 to Sx2 do cM[x][Sy1][Slot] := 0;
// for x := Sx1 to Sx2 do cM[x][Sy2][Slot] := 0;

// for y := Sy1 + 1 to Sy2 - 1 do cM[Sx1][y][Slot] := 0;
// for y := Sy1 + 1 to Sy2 - 1 do cM[Sx2][y][Slot] := 0;

ObjectArea[Slot] := (10201 - BlackArea[Slot]); //10201 is (Sx2-Sx1)(Sy2-Sy1)



for sx := Sx2 - 1 downto Sx1 + 1 do
for sy := Sy1 + 1 to Sy2 - 1 do
begin
if (cM[sx][sy][Slot] <> 0) then
begin
a2 := sx;
break;
end;
end;

for sx := Sx1 + 1 to Sx2 - 1 do
for sy := Sy1 + 1 to Sy2 - 1 do
begin
if (cM[sx][sy][Slot] <> 0) then
begin
a1 := sx;
break;
end;
end;


for sy := Sy2 - 1 downto Sy1 + 1 do
for sx := Sx1 + 1 to Sx2 - 1 do
begin
if (cM[sx][sy][Slot] <> 0) then
begin
b2 := sy;
break;
end;
end;


for sy := Sy1 + 1 to Sy2 - 1 do
for sx := Sx1 + 1 to Sx2 - 1 do
begin
if (cM[sx][sy][Slot] <> 0) then
begin
b1 := sy;
break;
end;
end;


BArea[Slot] := (a2 - a1)*(b2 - b1);


if (ObjectArea[Slot] > CoMax[Slot]) then
begin
CoMax[Slot] := ObjectArea[Slot];
BMaxArea[Slot] := BArea[Slot];
end;

if (ObjectArea[Slot] < CoMin[Slot]) then
begin
CoMin[Slot] := ObjectArea[Slot];
BMinArea[Slot] := BArea[Slot];
end;

//////////////
end;

Bmp.Free;

QueryPerformanceCounter(Stop);
Time := (1E3 * (Stop - Start) / Freq);

Until (Time >= (ScanningTime * 1000));



for Slot := 0 to 6 do
begin
if (CoMax[Slot] <> 0 ) then Lum[Slot] := (BMaxArea[Slot]/CoMax[Slot]);

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~ Objects database ~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Obj[Slot] := 'unknown';
ObjToFind := 'unknown';
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


// Cook's hat ; White approw ; Bread
if (InRange(CoMin[0], 220, 330) and InRange(CoMax[0], 810, 900)) then
if (InRange(CoMin[1], 0, 65) and InRange(CoMax[1], 500, 570)) then
if (InRange(CoMin[2], 140, 270) and InRange(CoMax[2], 610, 680)) then ObjToFind := 'Q01';

// Scimitar ; Sword ; Battle axe
if (InRange(CoMin[0], 40, 110) and InRange(CoMax[0], 340, 400)) then
if (InRange(CoMin[1], 0, 60) and InRange(CoMax[1], 120, 180)) then
if (InRange(CoMin[2], 20, 70) and InRange(CoMax[2], 260, 300)) then ObjToFind := 'Q02';

// Thieve mask ; Forester hat ; Pirate hat
if (InRange(CoMin[0], 90, 280) and InRange(CoMax[0], 720, 800)) then
if (InRange(CoMin[1], 220, 310) and InRange(CoMax[1], 880, 950)) then
if (InRange(CoMin[2], 220, 340) and InRange(CoMax[2], 820, 900)) then ObjToFind := 'Q03';

// Bow ; Arrows ; Crossbow
if (InRange(CoMin[0], 20, 210) and InRange(CoMax[0], 300, 420)) then
if (InRange(CoMin[1], 0, 100) and InRange(CoMax[1], 270, 370)) then
if (InRange(CoMin[2], 70, 180) and InRange(CoMax[2], 270, 340)) then ObjToFind := 'Q04';

// Tinderbox ; Logs ; Candle
if (InRange(CoMin[0], 450, 1200) and InRange(CoMax[0], 1400, 1750)) then
if (InRange(CoMin[1], 200, 430) and InRange(CoMax[1], 860, 950)) then
if (InRange(CoMin[2], 50, 110) and InRange(CoMax[2], 120, 200)) then ObjToFind := 'Q05';

// Rake ; Watering can ; Spade
if (InRange(CoMin[0], 20, 120) and InRange(CoMax[0], 250, 340)) then
if (InRange(CoMin[1], 340, 440) and InRange(CoMax[1], 620, 780)) then
if (InRange(CoMin[2], 30, 130) and InRange(CoMax[2], 420, 520)) then ObjToFind := 'Q06';

// Brasneckle ; Tiara ; Holy symbol
if (InRange(CoMin[0], 20, 120) and InRange(CoMax[0], 230, 330)) then
if (InRange(CoMin[1], 100, 220) and InRange(CoMax[1], 200, 370)) then
if (InRange(CoMin[2], 50, 150) and InRange(CoMax[2], 420, 520)) then ObjToFind := 'Q08';

// Air rune ; Fire rune ; Staff
if (InRange(CoMin[0], 400, 500) and InRange(CoMax[0], 980, 1080)) then
if (InRange(CoMin[1], 400, 500) and InRange(CoMax[1], 980, 1080)) then
if (InRange(CoMin[2], 10, 100) and InRange(CoMax[2], 100, 200)) then ObjToFind := 'Q09';

// Cup of tea ; Beer ; Rum
if (InRange(CoMin[0], 550, 660) and InRange(CoMax[0], 940, 1080)) then
if (InRange(CoMin[1], 400, 500) and InRange(CoMax[1], 620, 720)) then
if (InRange(CoMin[2], 20, 120) and InRange(CoMax[2], 420, 580)) then ObjToFind := 'Q10';

// Banana ; Strawberry ; Pinapple
if (InRange(CoMin[0], 180, 280) and InRange(CoMax[0], 420, 520)) then
if (InRange(CoMin[1], 210, 290) and InRange(CoMax[1], 360, 430)) then
if (InRange(CoMin[2], 420, 500) and InRange(CoMax[2], 620, 700)) then ObjToFind := 'Q11';

// Kiteshield ; Sq shield ; Wooden shield
if (InRange(CoMin[0], 50, 280) and InRange(CoMax[0], 840, 940)) then
if (InRange(CoMin[1], 40, 200) and InRange(CoMax[1], 710, 810)) then
if (InRange(CoMin[2], 60, 260) and InRange(CoMax[2], 800, 900)) then ObjToFind := 'Q12';

// Shrimp ; Herring ; Bas
if (InRange(CoMin[0], 60, 150) and InRange(CoMax[0], 380, 460)) then
if (InRange(CoMin[1], 20, 120) and InRange(CoMax[1], 140, 220)) then
if (InRange(CoMin[2], 80, 230) and InRange(CoMax[2], 350, 440)) then ObjToFind := 'Q13';

// Tuna ; Harpoon ; Monkfish
if (InRange(CoMin[0], 120, 160) and InRange(CoMax[0], 520, 570)) then
if (InRange(CoMin[1], 10, 90) and InRange(CoMax[1], 210, 270)) then
if (InRange(CoMin[2], 340, 450) and InRange(CoMax[2], 860, 920)) then ObjToFind := 'Q14';

// Banana ; Garlic ; Slice of watermelon
if (InRange(CoMin[0], 180, 240) and InRange(CoMax[0], 440, 490)) then
if (InRange(CoMin[1], 180, 260) and InRange(CoMax[1], 320, 360)) then
if (InRange(CoMin[2], 80, 170) and InRange(CoMax[2], 520, 580)) then ObjToFind := 'Q15';

// Sword ; Full helmet ; Kite shield
if (InRange(CoMin[0], 0, 70) and InRange(CoMax[0], 100, 200)) then
if (InRange(CoMin[1], 250, 370) and InRange(CoMax[1], 470, 560)) then
if (InRange(CoMin[2], 80, 220) and InRange(CoMax[2], 840, 940)) then ObjToFind := 'Q17';

// Boots ; Boots ; Boots
if (InRange(CoMin[0], 290, 480) and InRange(CoMax[0], 690, 800)) then
if (InRange(CoMin[1], 230, 400) and InRange(CoMax[1], 630, 720)) then
if (InRange(CoMin[2], 160, 320) and InRange(CoMax[2], 440, 640)) then ObjToFind := 'Q18';

// Pickaxe ; Ore ; Hammer
if (InRange(CoMin[0], 110, 220) and InRange(CoMax[0], 280, 360)) then
if (InRange(CoMin[1], 170, 300) and InRange(CoMax[1], 650, 730)) then
if (InRange(CoMin[2], 30, 160) and InRange(CoMax[2], 250, 330)) then ObjToFind := 'Q19';

// Sq shield ; Wooden shield ; Sq shield
if (InRange(CoMin[0], 20, 210) and InRange(CoMax[0], 710, 830)) then
if (InRange(CoMin[1], 60, 220) and InRange(CoMax[1], 800, 890)) then
if (InRange(CoMin[2], 60, 220) and InRange(CoMax[2], 730, 800)) then ObjToFind := 'Q20';



if InRange(Slot, 3, 6) then
begin

//~~
if InRange(Lum[Slot], 1.05, 1.35) and InRange(BMaxArea[Slot], 1050, 1500) and InRange(BMinArea[Slot], 500, 700) and InRange(CoMax[Slot], 1000, 1200)
and InRange(CoMin[Slot], 500, 650) then Obj[Slot] := 'Q01'; // Cake
//~~
//~~
if InRange(Lum[Slot], 2.4, 4.2) and InRange(BMaxArea[Slot], 520, 1050) and InRange(BMinArea[Slot], 200, 800) and InRange(CoMax[Slot], 210, 290)
and InRange(CoMin[Slot], 130, 220) then Obj[Slot] := 'Q02'; // Mace
//~~
//~~
if InRange(Lum[Slot], 1.4, 2.5) and InRange(BMaxArea[Slot], 760, 1220) and InRange(BMinArea[Slot], 250, 650) and InRange(CoMax[Slot], 450, 540)
and InRange(CoMin[Slot], 150, 290) then Obj[Slot] := 'Q03'; // Jeaster hat
//~~
//~~
if InRange(Lum[Slot], 1.4, 8.0) and InRange(BMaxArea[Slot], 300, 1300) and InRange(BMinArea[Slot], 0, 200) and InRange(CoMax[Slot], 170, 270)
and InRange(CoMin[Slot], 0, 60) then Obj[Slot] := 'Q04'; // Longbow
//~~
//~~
if InRange(Lum[Slot], 1.2, 1.8) and InRange(BMaxArea[Slot],670, 870) and InRange(BMinArea[Slot], 400, 740) and InRange(CoMax[Slot], 450, 600)
and InRange(CoMin[Slot], 170, 330) then Obj[Slot] := 'Q05'; // Bullseye lataren
//~~
//~~
if InRange(Lum[Slot], 1.6, 3.5) and InRange(BMaxArea[Slot], 660, 1150) and InRange(BMinArea[Slot], 40, 180) and InRange(CoMax[Slot], 260, 400)
and InRange(CoMin[Slot], 40, 120) then Obj[Slot] := 'Q06'; // Gardening trowel
//~~



if InRange(Lum[Slot], 3.5, 5.4) and InRange(BMaxArea[Slot], 1020, 1750) and InRange(BMinArea[Slot], 95, 260) and InRange(CoMax[Slot], 270, 340)
and InRange(CoMin[Slot], 50, 160) then Obj[Slot] := 'Q07'; // Pickaxe



//~~
if InRange(Lum[Slot], 1.0, 2.0) and InRange(BMaxArea[Slot], 320, 570) and InRange(BMinArea[Slot], 120, 320) and InRange(CoMax[Slot], 250, 350)
and InRange(CoMin[Slot], 100, 200) then Obj[Slot] := 'Q08'; // Ring
//~~
//~~
if InRange(Lum[Slot], 1.1, 1.45) and InRange(BMaxArea[Slot], 1050, 1400) and InRange(BMinArea[Slot], 450, 550) and InRange(CoMax[Slot], 980, 1080)
and InRange(CoMin[Slot], 400, 500) then Obj[Slot] := 'Q09'; // Earth rune
//~~
//~~
if InRange(Lum[Slot], 1.0, 2.0) and InRange(BMaxArea[Slot], 380, 600) and InRange(BMinArea[Slot], 120, 320) and InRange(CoMax[Slot], 250, 350)
and InRange(CoMin[Slot], 130, 220) then Obj[Slot] := 'Q10'; // Glass
//~~
//~~
if InRange(Lum[Slot], 1.4, 3.0) and InRange(BMaxArea[Slot], 350, 650) and InRange(BMinArea[Slot], 30, 130) and InRange(CoMax[Slot], 200, 280)
and InRange(CoMin[Slot], 30, 90) then Obj[Slot] := 'Q11'; // Berry's
//~~
//~~
if InRange(Lum[Slot], 1.4, 2.6) and InRange(BMaxArea[Slot], 1100, 2000) and InRange(BMinArea[Slot], 100, 400) and InRange(CoMax[Slot], 700, 810)
and InRange(CoMin[Slot], 40, 200) then Obj[Slot] := 'Q12'; // Antidragon shield
//~~
//~~
if InRange(Lum[Slot], 3.0, 4.3) and InRange(BMaxArea[Slot], 1000, 1600) and InRange(BMinArea[Slot], 50, 250) and InRange(CoMax[Slot], 300, 420)
and InRange(CoMin[Slot], 40, 150) then Obj[Slot] := 'Q13'; // Swordfish
//~~
//~~
if InRange(Lum[Slot], 1.4, 3.1) and InRange(BMaxArea[Slot], 700, 1200) and InRange(BMinArea[Slot], 150, 360) and InRange(CoMax[Slot], 400, 450)
and InRange(CoMin[Slot], 70, 200) then Obj[Slot] := 'Q14'; // Trout
//~~
//~~
if InRange(Lum[Slot], 1.3, 2.3) and InRange(BMaxArea[Slot], 850, 1400) and InRange(BMinArea[Slot], 900, 1250) and InRange(CoMax[Slot], 600, 710)
and InRange(CoMin[Slot], 400, 510) then Obj[Slot] := 'Q15'; // Pineapple
//~~



if InRange(Lum[Slot], 1.1, 1.35) and InRange(BMaxArea[Slot], 1150, 1350) and InRange(BMinArea[Slot], 400, 600) and InRange(CoMax[Slot], 950, 1050)
and InRange(CoMin[Slot], 300, 370) then Obj[Slot] := 'Q16'; // Apple pie


//~~
if InRange(Lum[Slot], 1.3, 2.0) and InRange(BMaxArea[Slot], 1050, 1500) and InRange(BMinArea[Slot], 380, 700) and InRange(CoMax[Slot], 750, 900)
and InRange(CoMin[Slot], 300, 500) then Obj[Slot] := 'Q17'; // Platebody
//~~
//~~
if InRange(Lum[Slot], 1.1, 2.1) and InRange(BMaxArea[Slot], 800, 1350) and InRange(BMinArea[Slot], 300, 1100) and InRange(CoMax[Slot], 650, 800)
and InRange(CoMin[Slot], 280, 450) then Obj[Slot] := 'Q18'; // Boots
//~~
//~~
if InRange(Lum[Slot], 1.2, 2.1) and InRange(BMaxArea[Slot], 900, 1500) and InRange(BMinArea[Slot], 150, 520) and InRange(CoMax[Slot], 720, 820)
and InRange(CoMin[Slot], 150, 300) then Obj[Slot] := 'Q19'; // Bar
//~~
//~~
if InRange(Lum[Slot], 1.0, 1.8) and InRange(BMaxArea[Slot], 1000, 1600) and InRange(BMinArea[Slot], 120, 420) and InRange(CoMax[Slot], 820, 960)
and InRange(CoMin[Slot], 80, 220) then Obj[Slot] := 'Q20'; // Kiteshield
//~~


end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

end;



if (ObjToFind <> 'unknown') then
begin
for i := 3 to 6 do
begin
if (Obj[i] = ObjToFind) then Result := i else Result := -1;
end;
end else Result := -2;


{
Result := ('Slot: ' + inttostr(slott) + ' BMaxArea: ' + inttostr(BMaxArea[slott])
+ ' BMinArea: ' + inttostr(BMinArea[slott]) + ' CoMax: ' + inttostr(CoMax[slott])
+ ' CoMin: ' + inttostr(CoMin[slott]) + ' Lum: ' + floattostr(Lum[slott]) + ' ObjToFind: ' + ObjToFind + ' Where: ' + inttostr(k));
}

end;





function GetFunctionCount(): Integer; stdcall; export;
begin
Result := 1;
end;


function GetFunctionInfo(x: Integer; var ProcAddr: Pointer; var ProcDef: PAnsiChar): Integer; stdcall;
begin
case x of
0:
begin
ProcAddr := @Mordaut_GetSlotNr2;
StrPCopy(ProcDef, 'function Mordaut_GetSlotNr2(ScanningTime: Extended; ClientHDC: HDC): integer;');
end;

else
x := -1;
end;
Result := x;
end;


procedure SetFunctions(Funcs: array of TSCARPlugFunc); stdcall;
var
i: Integer;
begin
for i := 0 to Length(Funcs) - 1 do
begin
if Funcs[i].Name = 'Writeln' then
Writeln := Funcs[i].Ptr;
if Funcs[i].Name = 'GetClientWindowHandle' then
GetClientWindowHandle := Funcs[i].Ptr;
end;
FillInfo := false;
end;

exports GetFunctionCount;
exports GetFunctionInfo;
exports SetFunctions;

end.


mordaut.lpr

library mordaut_simba;

{$mode objfpc}{$H+}

uses
Classes, math,sysutils
{ you can add units after this };
{
type
TColor = -$7FFFFFFF-1..$7FFFFFFF;

const
cv_StdCall = 0; //StdCall
cv_Register = 1; //Register
clBlack = TColor($000000);
clMaroon = TColor($000080);
clGreen = TColor($008000);
clOlive = TColor($008080);
clNavy = TColor($800000);
clPurple = TColor($800080);
clTeal = TColor($808000);
clGray = TColor($808080);
clSilver = TColor($C0C0C0);
clRed = TColor($0000FF);
clLime = TColor($00FF00);
clYellow = TColor($00FFFF);
clBlue = TColor($FF0000);
clFuchsia = TColor($FF00FF);
clAqua = TColor($FFFF00);
clLtGray = TColor($C0C0C0); // clSilver alias
clDkGray = TColor($808080); // clGray alias
clWhite = TColor($FFFFFF); }


type
TRGB32 = packed record
B, G, R, A: Byte;
end;
PRGB32 = ^TRGB32;


TRetData = record
Ptr : PRGB32;
IncPtrWith : integer;
RowLen : integer;
end;
TTarget_Exported = record
Target : Pointer;

GetTargetDimensions: procedure(target: pointer; var w, h: integer); stdcall;
GetColor : function(target: pointer;x,y : integer) : integer; stdcall;
ReturnData : function(target: pointer;xs, ys, width, height: Integer): TRetData; stdcall;
FreeReturnData : procedure(target: pointer); stdcall;

GetMousePosition: procedure(target: pointer; var x,y: integer); stdcall;
MoveMouse: procedure(target: pointer; x,y: integer); stdcall;
ScrollMouse: procedure(target: pointer; x,y : integer; Lines : integer); stdcall;
HoldMouse: procedure(target: pointer; x,y: integer; left: boolean); stdcall;
ReleaseMouse: procedure(target: pointer; x,y: integer; left: boolean); stdcall;
IsMouseButtonHeld : function (target : pointer; left : boolean) : boolean;stdcall;

SendString: procedure(target: pointer; str: PChar); stdcall;
HoldKey: procedure(target: pointer; key: integer); stdcall;
ReleaseKey: procedure(target: pointer; key: integer); stdcall;
IsKeyHeld: function(target: pointer; key: integer): boolean; stdcall;
GetKeyCode : function(target : pointer; C : char) : integer; stdcall;
end;


function GetTickCount: DWord;
begin
Result := DWord(Trunc(Now * 24 * 60 * 60 * 1000));
end;

function RGB(R, G, B : Byte) : integer; inline;
begin
Result := R or (G shl 8) or (B Shl 16);
end;



var
w, h: integer;

{

Mr.Mordaut solver
By: Iroki

}


function Mordaut_GetSlotNr2(ScanningTime: Extended; ImageClient : TTarget_Exported): integer; Register;

var
Line: PRGB32;
Sx1, Sy1, Sx2, Sy2, x, y, sx, sy, a1, a2, b1, b2, Slot, i: integer;
Start: int64;
ObjToFind: string;
Obj: array of string;
Lum: array of extended;
CoMax: array of Integer;
CoMin: array of Integer;
BMaxArea: array of Integer;
BMinArea: array of Integer;
BArea: array of Integer;
BlackArea: array of Integer;
ObjectArea: array of Integer;
cM: array of array of array of Integer;
bM: array of array of array of Boolean;
RetData : TRetData;

begin
SetLength(Obj, 7);
SetLength(Lum, 7);
SetLength(CoMax, 7);
SetLength(CoMin, 7);
SetLength(BMaxArea, 7);
SetLength(BMinArea, 7);
SetLength(BArea, 7);
SetLength(BlackArea, 7);
SetLength(ObjectArea, 7);

for Slot := 0 to 6 do
begin
CoMax[Slot] := 0; CoMin[Slot] := 10202; BMaxArea[Slot] := 0; BMinArea[Slot] := 0;
BArea[Slot] := 0;
end;

start := GetTickCount;

Sx1 := 0; Sy1 := 0; Sx2 := 0; Sy2 := 0; a1 := 0; a2 := 0; b1 := 0; b2 := 0;
repeat

w := 456; h := 291;
SetLength(cM, w + 1, h + 1, 7);
SetLength(bM, w + 1, h + 1, 7);
RetData := ImageClient.ReturnData(ImageClient.Target,0,0,w,h);

for Slot := 0 to 6 do
begin
BlackArea[Slot] := 0;
//////////////////////


{
Slots:
_________________________________
| ______ ______ ______ |
| | | | | |
| | 0 | 1 | 2 | |
| |______|______|______| |
| |
| What comes next? |
| ______ ______ ______ ______ |
| | | | | | |
| | 3 | 4 | 5 | 6 | |
| |______|______|______|______| |
|_________________________________|
}

case Slot of

0, 1, 2: begin
Sx1 := 55 + Slot*100;
Sy1 := 45;
Sx2 := Sx1 + 100;
Sy2 := 145;
end;

3, 4, 5, 6: begin
Sx1 := -245 + Slot*100;
Sy1 := 190;
Sx2 := Sx1 + 100;
Sy2 := 290;
end;
end;



for y := Sy1 to Sy2 do
begin
Line := RetData.Ptr + RetData.RowLen *y;
for x := Sx1 to Sx2 do
begin
cM[x][y][Slot] := RGB(Line[x].R, Line[x].G, Line[x].B);
if (Line[x].R <> 0) then
begin
if InRange(Line[x].R, 50, 85) then
if InRange(Line[x].G, 70, 105) then
if InRange(Line[x].B, 50, 95)then
begin
cM[x][y][Slot] := 0;
bM[x][y][Slot] := True;
inc(BlackArea[Slot]);
end;
end else
begin
cM[x][y][Slot] := 0;
bM[x][y][Slot] := True;
inc(BlackArea[Slot]);
end;
end;
end;


ObjectArea[Slot] := (10201 - BlackArea[Slot]);



for sx := Sx2 - 1 downto Sx1 + 1 do
for sy := Sy1 + 1 to Sy2 - 1 do
begin
if (cM[sx][sy][Slot] <> 0) then
begin
a2 := sx;
break;
end;
end;

for sx := Sx1 + 1 to Sx2 - 1 do
for sy := Sy1 + 1 to Sy2 - 1 do
begin
if (cM[sx][sy][Slot] <> 0) then
begin
a1 := sx;
break;
end;
end;


for sy := Sy2 - 1 downto Sy1 + 1 do
for sx := Sx1 + 1 to Sx2 - 1 do
begin
if (cM[sx][sy][Slot] <> 0) then
begin
b2 := sy;
break;
end;
end;

for sy := Sy1 + 1 to Sy2 - 1 do
for sx := Sx1 + 1 to Sx2 - 1 do
begin
if (cM[sx][sy][Slot] <> 0) then
begin
b1 := sy;
break;
end;
end;


BArea[Slot] := (a2 - a1)*(b2 - b1);


if (ObjectArea[Slot] > CoMax[Slot]) then
begin
CoMax[Slot] := ObjectArea[Slot];
BMaxArea[Slot] := BArea[Slot];
end;

if (ObjectArea[Slot] < CoMin[Slot]) then
begin
CoMin[Slot] := ObjectArea[Slot];
BMinArea[Slot] := BArea[Slot];
end;

//////////////
end;

ImageClient.FreeReturnData(ImageClient.Target);


Until ((GetTickCount - Start) >= (ScanningTime * 1000));


for Slot := 0 to 6 do
begin
if (CoMax[Slot] <> 0 ) then Lum[Slot] := (BMaxArea[Slot]/CoMax[Slot]);

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~ Objects database ~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Obj[Slot] := 'unknown';
ObjToFind := 'unknown';
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


// Cook's hat ; White approw ; Bread
if (InRange(CoMin[0], 220, 330) and InRange(CoMax[0], 810, 900)) then
if (InRange(CoMin[1], 0, 65) and InRange(CoMax[1], 500, 570)) then
if (InRange(CoMin[2], 140, 270) and InRange(CoMax[2], 610, 680)) then ObjToFind := 'Q01';

// Scimitar ; Sword ; Battle axe
if (InRange(CoMin[0], 40, 110) and InRange(CoMax[0], 340, 400)) then
if (InRange(CoMin[1], 0, 60) and InRange(CoMax[1], 120, 180)) then
if (InRange(CoMin[2], 20, 70) and InRange(CoMax[2], 260, 300)) then ObjToFind := 'Q02';

// Thieve mask ; Forester hat ; Pirate hat
if (InRange(CoMin[0], 90, 280) and InRange(CoMax[0], 720, 800)) then
if (InRange(CoMin[1], 220, 310) and InRange(CoMax[1], 880, 950)) then
if (InRange(CoMin[2], 220, 340) and InRange(CoMax[2], 820, 900)) then ObjToFind := 'Q03';

// Bow ; Arrows ; Crossbow
if (InRange(CoMin[0], 20, 210) and InRange(CoMax[0], 300, 420)) then
if (InRange(CoMin[1], 0, 100) and InRange(CoMax[1], 270, 370)) then
if (InRange(CoMin[2], 70, 180) and InRange(CoMax[2], 270, 340)) then ObjToFind := 'Q04';

// Tinderbox ; Logs ; Candle
if (InRange(CoMin[0], 450, 1200) and InRange(CoMax[0], 1400, 1750)) then
if (InRange(CoMin[1], 200, 430) and InRange(CoMax[1], 860, 950)) then
if (InRange(CoMin[2], 50, 110) and InRange(CoMax[2], 120, 200)) then ObjToFind := 'Q05';

// Rake ; Watering can ; Spade
if (InRange(CoMin[0], 20, 120) and InRange(CoMax[0], 250, 340)) then
if (InRange(CoMin[1], 340, 440) and InRange(CoMax[1], 620, 780)) then
if (InRange(CoMin[2], 30, 130) and InRange(CoMax[2], 420, 520)) then ObjToFind := 'Q06';

// Brasneckle ; Tiara ; Holy symbol
if (InRange(CoMin[0], 20, 120) and InRange(CoMax[0], 230, 330)) then
if (InRange(CoMin[1], 100, 220) and InRange(CoMax[1], 200, 370)) then
if (InRange(CoMin[2], 50, 150) and InRange(CoMax[2], 420, 520)) then ObjToFind := 'Q08';

// Air rune ; Fire rune ; Staff
if (InRange(CoMin[0], 400, 500) and InRange(CoMax[0], 980, 1080)) then
if (InRange(CoMin[1], 400, 500) and InRange(CoMax[1], 980, 1080)) then
if (InRange(CoMin[2], 10, 100) and InRange(CoMax[2], 100, 200)) then ObjToFind := 'Q09';

// Cup of tea ; Beer ; Rum
if (InRange(CoMin[0], 550, 660) and InRange(CoMax[0], 940, 1080)) then
if (InRange(CoMin[1], 400, 500) and InRange(CoMax[1], 620, 720)) then
if (InRange(CoMin[2], 20, 120) and InRange(CoMax[2], 420, 580)) then ObjToFind := 'Q10';

// Banana ; Strawberry ; Pinapple
if (InRange(CoMin[0], 180, 280) and InRange(CoMax[0], 420, 520)) then
if (InRange(CoMin[1], 210, 290) and InRange(CoMax[1], 360, 430)) then
if (InRange(CoMin[2], 420, 500) and InRange(CoMax[2], 620, 700)) then ObjToFind := 'Q11';

// Kiteshield ; Sq shield ; Wooden shield
if (InRange(CoMin[0], 50, 280) and InRange(CoMax[0], 840, 940)) then
if (InRange(CoMin[1], 40, 200) and InRange(CoMax[1], 710, 810)) then
if (InRange(CoMin[2], 60, 260) and InRange(CoMax[2], 800, 900)) then ObjToFind := 'Q12';

// Shrimp ; Herring ; Bas
if (InRange(CoMin[0], 60, 150) and InRange(CoMax[0], 380, 460)) then
if (InRange(CoMin[1], 20, 120) and InRange(CoMax[1], 140, 220)) then
if (InRange(CoMin[2], 80, 230) and InRange(CoMax[2], 350, 440)) then ObjToFind := 'Q13';

// Tuna ; Harpoon ; Monkfish
if (InRange(CoMin[0], 120, 160) and InRange(CoMax[0], 520, 570)) then
if (InRange(CoMin[1], 10, 90) and InRange(CoMax[1], 210, 270)) then
if (InRange(CoMin[2], 340, 450) and InRange(CoMax[2], 860, 920)) then ObjToFind := 'Q14';

// Banana ; Garlic ; Slice of watermelon
if (InRange(CoMin[0], 180, 240) and InRange(CoMax[0], 440, 490)) then
if (InRange(CoMin[1], 180, 260) and InRange(CoMax[1], 320, 360)) then
if (InRange(CoMin[2], 80, 170) and InRange(CoMax[2], 520, 580)) then ObjToFind := 'Q15';

// Sword ; Full helmet ; Kite shield
if (InRange(CoMin[0], 0, 70) and InRange(CoMax[0], 100, 200)) then
if (InRange(CoMin[1], 250, 370) and InRange(CoMax[1], 470, 560)) then
if (InRange(CoMin[2], 80, 220) and InRange(CoMax[2], 840, 940)) then ObjToFind := 'Q17';

// Boots ; Boots ; Boots
if (InRange(CoMin[0], 290, 480) and InRange(CoMax[0], 690, 800)) then
if (InRange(CoMin[1], 230, 400) and InRange(CoMax[1], 630, 720)) then
if (InRange(CoMin[2], 160, 320) and InRange(CoMax[2], 440, 640)) then ObjToFind := 'Q18';

// Pickaxe ; Ore ; Hammer
if (InRange(CoMin[0], 110, 220) and InRange(CoMax[0], 280, 360)) then
if (InRange(CoMin[1], 170, 300) and InRange(CoMax[1], 650, 730)) then
if (InRange(CoMin[2], 30, 160) and InRange(CoMax[2], 250, 330)) then ObjToFind := 'Q19';

// Sq shield ; Wooden shield ; Sq shield
if (InRange(CoMin[0], 20, 210) and InRange(CoMax[0], 710, 830)) then
if (InRange(CoMin[1], 60, 220) and InRange(CoMax[1], 800, 890)) then
if (InRange(CoMin[2], 60, 220) and InRange(CoMax[2], 730, 800)) then ObjToFind := 'Q20';



if InRange(Slot, 3, 6) then
begin

//~~
if InRange(Lum[Slot], 1.05, 1.35) and InRange(BMaxArea[Slot], 1050, 1500) and InRange(BMinArea[Slot], 500, 700) and InRange(CoMax[Slot], 1000, 1200)
and InRange(CoMin[Slot], 500, 650) then Obj[Slot] := 'Q01'; // Cake
//~~
//~~
if InRange(Lum[Slot], 2.4, 4.2) and InRange(BMaxArea[Slot], 520, 1050) and InRange(BMinArea[Slot], 200, 800) and InRange(CoMax[Slot], 210, 290)
and InRange(CoMin[Slot], 130, 220) then Obj[Slot] := 'Q02'; // Mace
//~~
//~~
if InRange(Lum[Slot], 1.4, 2.5) and InRange(BMaxArea[Slot], 760, 1220) and InRange(BMinArea[Slot], 250, 650) and InRange(CoMax[Slot], 450, 540)
and InRange(CoMin[Slot], 150, 290) then Obj[Slot] := 'Q03'; // Jeaster hat
//~~
//~~
if InRange(Lum[Slot], 1.4, 8.0) and InRange(BMaxArea[Slot], 300, 1300) and InRange(BMinArea[Slot], 0, 200) and InRange(CoMax[Slot], 170, 270)
and InRange(CoMin[Slot], 0, 60) then Obj[Slot] := 'Q04'; // Longbow
//~~
//~~
if InRange(Lum[Slot], 1.2, 1.8) and InRange(BMaxArea[Slot],670, 870) and InRange(BMinArea[Slot], 400, 740) and InRange(CoMax[Slot], 450, 600)
and InRange(CoMin[Slot], 170, 330) then Obj[Slot] := 'Q05'; // Bullseye lataren
//~~
//~~
if InRange(Lum[Slot], 1.6, 3.5) and InRange(BMaxArea[Slot], 660, 1150) and InRange(BMinArea[Slot], 40, 180) and InRange(CoMax[Slot], 260, 400)
and InRange(CoMin[Slot], 40, 120) then Obj[Slot] := 'Q06'; // Gardening trowel
//~~



if InRange(Lum[Slot], 3.5, 5.4) and InRange(BMaxArea[Slot], 1020, 1750) and InRange(BMinArea[Slot], 95, 260) and InRange(CoMax[Slot], 270, 340)
and InRange(CoMin[Slot], 50, 160) then Obj[Slot] := 'Q07'; // Pickaxe



//~~
if InRange(Lum[Slot], 1.0, 2.0) and InRange(BMaxArea[Slot], 320, 570) and InRange(BMinArea[Slot], 120, 320) and InRange(CoMax[Slot], 250, 350)
and InRange(CoMin[Slot], 100, 200) then Obj[Slot] := 'Q08'; // Ring
//~~
//~~
if InRange(Lum[Slot], 1.1, 1.45) and InRange(BMaxArea[Slot], 1050, 1400) and InRange(BMinArea[Slot], 450, 550) and InRange(CoMax[Slot], 980, 1080)
and InRange(CoMin[Slot], 400, 500) then Obj[Slot] := 'Q09'; // Earth rune
//~~
//~~
if InRange(Lum[Slot], 1.0, 2.0) and InRange(BMaxArea[Slot], 380, 600) and InRange(BMinArea[Slot], 120, 320) and InRange(CoMax[Slot], 250, 350)
and InRange(CoMin[Slot], 130, 220) then Obj[Slot] := 'Q10'; // Glass
//~~
//~~
if InRange(Lum[Slot], 1.4, 3.0) and InRange(BMaxArea[Slot], 350, 650) and InRange(BMinArea[Slot], 30, 130) and InRange(CoMax[Slot], 200, 280)
and InRange(CoMin[Slot], 30, 90) then Obj[Slot] := 'Q11'; // Berry's
//~~
//~~
if InRange(Lum[Slot], 1.4, 2.6) and InRange(BMaxArea[Slot], 1100, 2000) and InRange(BMinArea[Slot], 100, 400) and InRange(CoMax[Slot], 700, 810)
and InRange(CoMin[Slot], 40, 200) then Obj[Slot] := 'Q12'; // Antidragon shield
//~~
//~~
if InRange(Lum[Slot], 3.0, 4.3) and InRange(BMaxArea[Slot], 1000, 1600) and InRange(BMinArea[Slot], 50, 250) and InRange(CoMax[Slot], 300, 420)
and InRange(CoMin[Slot], 40, 150) then Obj[Slot] := 'Q13'; // Swordfish
//~~
//~~
if InRange(Lum[Slot], 1.4, 3.1) and InRange(BMaxArea[Slot], 700, 1200) and InRange(BMinArea[Slot], 150, 360) and InRange(CoMax[Slot], 400, 450)
and InRange(CoMin[Slot], 70, 200) then Obj[Slot] := 'Q14'; // Trout
//~~
//~~
if InRange(Lum[Slot], 1.3, 2.3) and InRange(BMaxArea[Slot], 850, 1400) and InRange(BMinArea[Slot], 900, 1250) and InRange(CoMax[Slot], 600, 710)
and InRange(CoMin[Slot], 400, 510) then Obj[Slot] := 'Q15'; // Pineapple
//~~



if InRange(Lum[Slot], 1.1, 1.35) and InRange(BMaxArea[Slot], 1150, 1350) and InRange(BMinArea[Slot], 400, 600) and InRange(CoMax[Slot], 950, 1050)
and InRange(CoMin[Slot], 300, 370) then Obj[Slot] := 'Q16'; // Apple pie


//~~
if InRange(Lum[Slot], 1.3, 2.0) and InRange(BMaxArea[Slot], 1050, 1500) and InRange(BMinArea[Slot], 380, 700) and InRange(CoMax[Slot], 750, 900)
and InRange(CoMin[Slot], 300, 500) then Obj[Slot] := 'Q17'; // Platebody
//~~
//~~
if InRange(Lum[Slot], 1.1, 2.1) and InRange(BMaxArea[Slot], 800, 1350) and InRange(BMinArea[Slot], 300, 1100) and InRange(CoMax[Slot], 650, 800)
and InRange(CoMin[Slot], 280, 450) then Obj[Slot] := 'Q18'; // Boots
//~~
//~~
if InRange(Lum[Slot], 1.2, 2.1) and InRange(BMaxArea[Slot], 900, 1500) and InRange(BMinArea[Slot], 150, 520) and InRange(CoMax[Slot], 720, 820)
and InRange(CoMin[Slot], 150, 300) then Obj[Slot] := 'Q19'; // Bar
//~~
//~~
if InRange(Lum[Slot], 1.0, 1.8) and InRange(BMaxArea[Slot], 1000, 1600) and InRange(BMinArea[Slot], 120, 420) and InRange(CoMax[Slot], 820, 960)
and InRange(CoMin[Slot], 80, 220) then Obj[Slot] := 'Q20'; // Kiteshield
//~~


end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

end;


if (ObjToFind <> 'unknown') then
begin
for i := 3 to 6 do
begin
if (Obj[i] = ObjToFind) then Result := i else Result := (-1);
end;
end else Result := (-2);


end;





function GetFunctionCount(): Integer; stdcall; export;
begin
Result := 1;
end;

function GetFunctionCallingConv(x : integer) : integer; stdcall;
begin
result := 0;
case x of
0..0 : result := 1;
end;
end;

function GetFunctionInfo(x: Integer; var ProcAddr: Pointer; var ProcDef: PChar): Integer; stdcall;
begin
case x of
0:
begin
ProcAddr := @Mordaut_GetSlotNr2;
StrPCopy(ProcDef, 'function Mordaut_GetSlotNr2(ScanningTime: Extended; ImageClient : TTarget_Exported): integer;');
end;
else
x := -1;
end;
Result := x;
end;


exports GetFunctionCount;
exports GetFunctionInfo;
exports GetFunctionCallingConv;

end.



BraK

2011-02-04 11:17:00

Please post code in Tags.

~BraK

Iroki

2011-02-04 11:48:42

kk done:D

lordsaturn

2011-02-04 11:57:45

Calling AnyFunction(ExportImageTarget); will crash Simba. You must assign it to a variable first.

edit: when using in a plugin, obviously.

Naike

2011-02-04 17:48:39

Beautiful! :D

Iroki

2011-02-08 17:12:32

Does anyone tested it, any comments?
It seems that nobody is interested in my work :/

Naum

2011-02-08 18:29:10

From: Iroki
Does anyone tested it, any comments?
It seems that nobody is interested in my work :/


You know I'm ALWAYS interested in your work man!
I've been off and on SRL because of mass coursework being bombarded upon moi from various angles.
I WILL try and get some time to test it out… actually, ya know what? Tomorrow if I'm on, send me a message and I'll test it immediately :)
Good Job