SRL Archive - Test corner

SolveFrog


Sumilion

2006-10-14 06:42:34

My exams are over, so i went scripting again ^^ , i thought about making a Frog colver that solves the frog cave instead of the frog random itself. I know, it's probably better to solve the frog random before you get to the cave, but if it fails then this would be a nice alternative.

I talked to Dankness about it and he told me he also made one and that it was in SRL. I never heard of it and also i thought it didn't exist because i find my players in the cave lots of times. So i checked it out, compared some stuff, well, here are the results :
- Dankness uses a Deformed BMP, only the search for it, so nothing else, took 1200msec on my pc, my DTMRotated took 300msec.
- Dankness his version ends up in the (almost) perfect middle of the center, mine however doesnt. It does walk to the center, but not always to the center of the center, has no further effect however.
- Because i use FindDtmRotated my dtm works in any angle of the MM, i believe that Dankness his version must be (near) north or it won't find the center.
Here is my code (I used a fairly simple AreWeInCave to find out if we are in the cave, was just purely for testing + i didn't finish it completely, I only have to end the conversation between you and the frogs, but this would mean my acc will leave the random)
program LeaveCave;
{.include SRL/SRL.scar}
Var
Center, Crown : Integer;
AngleVar : extended;

Procedure LoadDTMs;
Begin
Center := DTMFromString('78DA63EC6462603061400191C14E0C46409A1' +
'188FF0301E302A01A17881C13548D7971025C0D08302E07CA5812' +
'50B30828A34E40CD2CA08C3C0135BD401929026A9A80323204D45' +
'401651408A82904CAA81050930B94D125A0261B11CE38D5E40065' +
'AC08A8A904CA781050534F841A505C381050B30428634B40CD3CA' +
'08C1201351D84E3020008042788');
Crown := DTMFromString('78DA63CC616460D8C480027E9C9265B001D24' +
'01986FF40C0988F50C30C5573798D345C0D08306603591B50D5FC' +
'3E6F86AA0664D71654359F8FC9A2AAC9C4B4EBE57E54350015B91' +
'3ED');
End;

Function AreWeInCave : Boolean;
Var
Fx, Fy : integer;
Begin
Result := FindDTMRotated(Center, Fx, Fy, MMX1, MMY1, MMX2, MMY2, 0, pi*2, 0.1, AngleVar)
End;

Procedure LeaveCave;
Var
Fx, Fy, OptionMark : integer;
Begin
If Not(LoggedIn) Then Exit;
Repeat;
If (FindDTMRotated(Center, Fx, Fy, MMX1, MMY1, MMX2, MMY2, 0, pi*2, 0.1, AngleVar)) Then
Begin
Mouse(Fx, Fy, 0, 0, true);
FFlag(0);
Wait(300+Random(400));
MarkTime(OptionMark);
Repeat;
If (FindDTM(Crown, Fx, Fy, 90, 102, 473, 334)) Then
Begin
Mouse(Fx, Fy, 0, 0, false);
Wait(200+Random(500));
If (ChooseOption(Fx, Fy, 'Talk')) Then Break;
End Else Break;
Wait(200+Random(500));
Until(TimeFromMark(OptionMark) > 20000);
FFlag(0);
End;
Wait(300+Random(500));
Until(FindText(Fx, Fy, 'mph', NPCChars, MCX1, MCY1, MCX2, MCY2));
End;

begin
SetupSRL;
LoadDTMs;
ActivateClient;
Wait(500);
If (AreWeInCave) Then LeaveCave;
end.

Home

2006-10-14 08:03:05

Nice one ! Ya.. Frog random fucked up for me to :/

warship45

2006-10-14 09:12:57

yep my frog does not work eva i will test this when i get back home

Mutant Squirrle

2006-10-14 13:15:50

yeah frog anti isnt working for me either. If i get another one I will attempt to make a thing to pwn that nub frog

Cheesehunk

2006-10-14 15:40:28

AreWeInCave will cause lag with FindNormalRandoms; However, I guess the frog is originally spotted in FindTalk; So if you spot the frog saying your name, maybe have something so it only checks if you are in the cave after that.

Good job by the way.

Sumilion

2006-10-14 18:51:03

I know, i said in my first post i just made a quick function, can be a lot easier, but maybe there already is something like this in srl, i'm going to check it out.

By the way, thnx for all your positive responses ^^

@Mutant Squirle, why, don't you think mine is good :wink: , you can borrow my acc, he's still in the cave XD

Wizzup?

2006-10-15 03:53:03

I thought Dankness already made this?

Sumilion

2006-10-15 05:07:02

And that proves you didn't read my first post -_-

Wizzup?

2006-10-15 07:49:49

From: Sumilion
And that proves you didn't read my first post -_-


Hehe….busted.

Mutant Squirrle

2006-10-15 08:16:59

wizzy got owned :p

Dark_Sniper

2006-10-15 16:49:53

Yes he was :p

(you is refered to as wizzy!)



now guys dont worry he lived : http://www.snopes.com/photos/accident/carcrash01.asp

sorry wizzy you had to live though that ownage!

Sumilion

2006-10-15 16:56:02

Lol, don't be so hard on him, he's a nice guy[/suckup]:spongebob:

^^ Nice one darksniper :p

Wizzup?

2006-10-16 03:30:49

OK, bow let's get back on topic….haha…:D

bibi26

2006-11-11 15:41:54

It worked well with me, it went on the center and talked to the Queen ;)

EDIT : I've modified and completed the script and I included it in my script, it work perfectly, thanks :D

CamHart

2006-11-27 20:38:18

I'll use this, froggies always screw me up.