Wyn
2010-09-26 23:00:09
Just watched mime. Doesn't click to continue when being told what to do. Everything else works perfectly.
Fixed:
Still looking for the exam random…gonna do that in reflection…
Fixed:
//-----------------------------------------------------------------//
//-- Reflection Resource Library --//
//-- ยป Mime Solver --//
//-----------------------------------------------------------------//
// * function R_InMime: Boolean; // * by Timer
// * function R_SolveMime : Boolean; // * by Seroko/Drags111
{*******************************************************************************
function R_InMime: Boolean;
by: Timer
Description: Checks if in Mime Random.
*******************************************************************************}
function R_InMime: Boolean;
begin
Result := ValidNPC('Mime');
end;
{*******************************************************************************
procedure Mime_ClearMessages;
By: Drags111
Description: Gets rid of grand exchange messages and such.
*******************************************************************************}
procedure Mime_ClearMessages;
var
qx, qy: integer;
begin
While FindColorTolerance(qx, qy, 8388608, 184, 425, 365, 457, 2) do
begin
Mouse(qx, qy+5, 0, 0, true);
MouseBox(19, 362, 393, 427, 3);
wait(100+Random(100));
ChatWait;
end;
end;
{*******************************************************************************
function R_SolveMime: Boolean;
by: Seroko/Drags111
Description: Checks for and solves the mime random.
*******************************************************************************}
function R_SolveMime: Boolean;
var
Mime : TNPC;
i, mx, my, x, y : Integer;
Animation : String;
begin
if not R_InMime then
Exit;
Writeln('Found Mime.');
Mime_ClearMessages;
repeat
if not R_InMime then Break;
if(FindColor(x, y, 16711680, 232, 450, 378, 459))then
MouseBox(232, 450, 378, 459, 1);
Animation := '';
R_ClickToContinue;
repeat
if not R_InMime then Break;
FindNPC('Mime', Mime);
i := Mime.Animation;
//if i > 0 then Writeln('Mimes Animation: '+inttostr(i));
case i of // Set our Animation text
857: Animation := 'Think';
860: Animation := 'Cry';
861: Animation := 'Laugh';
866: Animation := 'Dance';
1128: Animation := 'Glass Wall';
1129: Animation := 'Lean on air';
1130: Animation := 'Climb Rope';
1131: Animation := 'Glass Box';
else
Continue;
end;
Wait(100);
until (Animation <> '') or not R_LoggedIn or not R_InMime;
while not(FindColorTolerance(mx, my, 1122502, MCX1, MCY1, MCX2, MCY2, 40)) do
if R_InMime then Wait(100 + Random(100)) else Break;
Wait(1000 + Random(500));
FindTextTPAEx(11503238, 10, MCX1, MCY1, MCX2, MCY2, mx, my, Animation, NPCChars, ClickLeft)
Result := R_InMime;
until not(Result or R_LoggedIn or not R_InMime);
Result := R_LoggedIn;
if Result then
Inc(RSolved[RMimes])
else
Inc(RFailed[RMimes]);
end;
Still looking for the exam random…gonna do that in reflection…