Simba Code:
(*
Frog
===
Written by: DemiseScythe
Stores all the routines to solve the Abyss random.
*)
{$DEFINE TEST} // Uncomment to test separately from the SRL include
{$i srl/srl.simba}
procedure Frog_Solve;
var //Royal is crowned frog, Chat is some text, lets us now we have successfully talked to the crowned frog.
Royal, Chat, Mark, dx, dy, i: Integer;
aFound: Extended;
begin
Royal := DTMFromString('mlwAAAHicY2dgYGBjZGBgBWJ2IOYGYkYg5oXSxUD5XCDOgtIFDBCxEiCWiZVl+HvPh+HhMRcwLZ+uwCCXqsAgFSHDwA+Ux4UZ8WAoAAAyGQxf');
Chat := DTMFromString('mbQAAAHicY2VgYGBlZGCYAKRLgDQPkPYB4itAdhoUzwXiZCA+c/o0Ayc3LxgHBwcx3Lhxi4EfqBYdM2LBYAAAti0KhA==');
Writeln('We started Royal Frog Random Event!');
if FindNPCChatText('and of', Nothing) then
ClickToContinue;
MakeCompass('w');
SetAngle(SRL_Angle_High);
MarkTime(Mark);
Writeln('We are handling NPC Chat!');
ClickToContinue;
Wait(1200 + Random(50)); //Should be enough to get us told to search for the Prince/Princess.
ClickToContinue;
Wait(1200 + Random(50));
ClickToContinue;
Wait(1200 + Random(50));
ClickToContinue;
Wait(1200 + Random(50));
Writeln('We are looking for the crowned frog!');
repeat
if FindDTMRotated(Royal, dx, dy, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/30, aFound) then
begin
Mouse(dx, dy, 3, 3, True); //Finds and talks to the crowned frog, might scan for 5-10 seconds but it will find right frog.
end;
until FindDTM(Chat, dx, dy, 7, 350, 380, 475) or (TimeFromMark(Mark) >= 600000); //Chat DTM confirms it is now talking to the frog.
Writeln('We found the crowned frog!');
Writeln('We are handling NPC Chat!');
repeat
ClickToContinue;
Wait(1200 + Random(50)); //All left to do is to spam ClickToContinue until we can see Inventory and we are done with event.
Inc(i);
until (TabExists(tab_Inv)) or (i >= 15);
if (i >= 15) then
begin
Writeln('We failed to solve this random!'); //In case we talked to the wrong frog, this will log the error and log out.
Writeln('Logging out!');
Players[CurrentPlayer].Active := False;
Logout;
end;
FreeDTM(Royal);
FreeDTM(Chat);
end;
{$IFDEF TEST}
begin
clearDebug();
activateClient();
setupSRL();
//Frog_Solve();
end.
{$ENDIF}
This is my solver for Frog Random Event, I know it is not worthy of include but it works, I will translate it into standard code when I have some time and would appreciate if Coh3n or someone else with good standards can help translate this code into this format:
If not, I will get to it eventually, let me know if you find anyone finds bugs and I will fix them. This is the best I can do with the supply of randoms I currently have.
-None. (I could add more DTMs to find the frog from different angles, speeding up the search, I'll fix that once I get some other randoms running).