SRL Archive - SRL Bugs

small Frog random addition


Awkwardsaw

2010-04-23 21:51:18

my player got stuck in the Frog random because the Frog Herald kept telling my guy to speak with him first, before talking to the princess, and the script did nothing about it

heres my addition:

{*******************************************************************************
function Frog_ClickFrog: Boolean;
by: Awkwardsaw
Description: Clicks the Frog Herald, if he makes you talk to him first before
speaking with the Prince/ Princess. Also goes through the conversation
*******************************************************************************}
function Frog_Talk_Herald : boolean;
var
HeraldTPA : TPointArray;
Middle : TPoint;
ATPA: T2DPointArray;
I, X, Y : Integer;
begin
FindColorsSpiralTolerance(MMCX, MMCY, HeraldTPA, 1678613, MSX1, MSY1, MSX2, MSY2, 30);
ATPA := SplitTPA(HeraldTPA, 20);
for i := 0 to high(ATPA) do
begin
Middle := MiddleTPA(ATPA[i]);
mmouse(Middle.x, Middle.y, 1, 1);
wait(100 + random(300));
if not isuptext('erald') then
continue;
getmousepos(x, y);
mouse(x, y, 0, 0, true);
wait(200 + random(300));
While FindNPCChatText('ontinue', ClickLeft) Do
Wait(3000 + Random(500));
result := true;
break;
end;
end;

put it right before the Frog_ClickFrog function

i cant test much, because i dont have an account in this situation anymore

Awkwardsaw

2010-04-25 09:15:19

edit: i just tested this, with the current version and this version. this one worked and the other one didnt :)

marpis

2010-04-25 09:40:45

Oh, the talk-to-herald-first-thing must be new.
It wasn't like that when I made the solver.. Nice fix though :) thanks!