SRL Archive - Bugs

Mime.


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:

//-----------------------------------------------------------------//
//-- 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…

i luffs yeww

2010-09-27 01:16:58

Great job! :)

rep++.

Wyn

2010-10-12 23:22:02

Can someone put this in the svn….

Cstrike

2010-10-12 23:31:14

Wow nice job :)
I'm going through the RSBot random.java files looking at how they did the tough randoms. Currently I'm getting multiple accounts stuck in many randoms– I'll try this soon! Hopefully it gets the mime done, if we can beat randoms… we will usually beat it once and for all minus random touch-ups due to updates.

kingarabian

2010-10-13 01:25:12

At this point which has more solved randoms? Reflection or Color?

Gu3st...

2010-10-13 03:06:12

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 or not R_LoggedIn 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 or not R_LoggedIn 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';
end;
Wait(100);
until(Animation <> '')

while not(FindColorTolerance(mx, my, 1122502, MCX1, MCY1, MCX2, MCY2, 40)) do
if R_InMime then Wait(200) else Break;

Wait(1000 + Random(500));
FindTextTPAEx(11503238, 10, MCX1, MCY1, MCX2, MCY2, mx, my, Animation, NPCChars, ClickLeft);
until (Result);

Result := (not R_InMime) and R_LoggedIn;

if Result then
Inc(RSolved[RMimes])
else
Inc(RFailed[RMimes]);
end;
Better readability and better logics (imo)
Nothing really changed to the function…. :P

Bad Boy JH

2010-10-13 04:24:11

colour obviously has more SOLVERS, working solvers I am unsure about. Reflection will solve them more reliably, and I think that it should be the way to go, however this does make me worry about us becoming the same as every other bot, and more prone to down time…its always an issue…

Cstrike

2010-10-13 12:04:31

From: kingarabian
At this point which has more solved randoms? Reflection or Color?


Reflection has less because there was a large dry-spell where most people who were working on it left.
Now the fire seems to be lit again.

Reflection random solving would be 100x better because it's pretty much flawless if coded right (excluding updates).
Color is great but it just keeps break way too much. You'd have to write many lines of code for example in color to find the princess frog from the other frogs, but in reflection it's a simple "GetIDOfMonsterAndLocation ('name');" (not exactly like that code ;)) and it will move the mouse to the frog perfectly each time.

Naike

2010-10-13 15:25:51

I'll add it when I know for certain that it works, have you tested it more than once?

Wyn

2010-10-13 15:44:26

From: Naike
I'll add it when I know for certain that it works, have you tested it more than once?


Haven't had mine since then. But I am certain it does.

Cstrike

2010-10-13 16:33:44

From: Bad Boy JH
colour obviously has more SOLVERS, working solvers I am unsure about. Reflection will solve them more reliably, and I think that it should be the way to go, however this does make me worry about us becoming the same as every other bot, and more prone to down time…its always an issue…

While that is true, anything that solves them flawlessly will be like any other bot. It just depends on how good the script is in looking human-like. If it solves randoms efficiently, then jagex won't be able to really stand any ground against them unless it screws up or takes forever.


From: Naike
I'll add it when I know for certain that it works, have you tested it more than once?


I'm setting all 10 of my army on RSBot to go nonstop until they run into a random with no random solve. Should get some soon :)

bolshak25

2010-10-14 14:33:58

i have an account in mime. i posted it on randoms section. pm me if u want him

Cstrike

2010-10-14 14:40:23

From: bolshak25
i have an account in mime. i posted it on randoms section. pm me if u want him


One way you could test it is:

1) Copy the following code into SRL/Reflection/Core/Antirandoms folder/Mime.simba, and replace the procedure in the mime.simba file with the updated one above. Do not replace the entire file, just the one above over the old one.

//By zyt3x
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 or not R_LoggedIn 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 or not R_LoggedIn 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';
end;
Wait(100);
until(Animation <> '')

while not(FindColorTolerance(mx, my, 1122502, MCX1, MCY1, MCX2, MCY2, 40)) do
if R_InMime then Wait(200) else Break;

Wait(1000 + Random(500));
FindTextTPAEx(11503238, 10, MCX1, MCY1, MCX2, MCY2, mx, my, Animation, NPCChars, ClickLeft);
until (Result);

Result := (not R_InMime) and R_LoggedIn;

if Result then
Inc(RSolved[RMimes])
else
Inc(RFailed[RMimes]);
end;

2) Run this procedure:
Be sure to declare your player

program ReflectionBasic;
{$DEFINE SMART}
{$i srl\srl.scar}
{$i reflection\reflection.simba}

const
{---SMART Setup Constants---}
WORLD = 121;
MEMBERS = false;
SIGNED = true;
{---------------------------}

Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

With Players[0] Do
Begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Integers[0] := 7; // ignore me
Pin := ''; // I steal your pin k?
End;
End;

begin
Smart_Members := MEMBERS;
Smart_Server := WORLD;
Smart_Signed := SIGNED;
SetupSRL;
SetUpReflectionEx(true);
DeclarePlayers;
LoginPlayer;
Cleardebug;
wait (2500+random(1000));
R_SolveMime;
end.

If you don't have reflection, just post and then someone would hopefully be happy to assist you (if no one wants to I'd be glad to)

bolshak25

2010-10-14 14:49:22

i am not on my home computer, so ill just let you do it

Cstrike

2010-10-14 15:10:18

From: bolshak25
i am not on my home computer, so ill just let you do it


Alright I shall.

If you can, change your pass from what it is to something else, that way I don't know whatever pass you used…. that'd be best. If you PM me the data, I will leave you in whatever position you were upon completing the random and log out….etc,etc

bolshak25

2010-10-14 15:34:16

sent it. just tell me whenever your done

Cstrike

2010-10-14 16:37:14

From: bolshak25
sent it. just tell me whenever your done


Completed.



Mime works! :D
Bug resolved if were basing it off of it completing the mime perfectly.

bolshak25

2010-10-14 17:29:01

glad my account could be used for something

Naike

2010-10-14 17:43:01

Now we need to sort out the detection..

ideas?

I have one, going to work on it right away!

Cstrike

2010-10-14 17:54:38

From: Naike
Now we need to sort out the detection..

ideas?

I have one, going to work on it right away!


I'm thinking of checking
1) How RSBot does it

and

2) Theres some reflection code in the randoms that allow you to use SRL color detection, but try reflection anyways
– I found they use music, which may help

Wyn

2010-10-15 10:50:53

It detects by the music and does it right…>.>