SRL Archive - SRL Archives

Balloon-ScapeRune Solver!


King of Knives

2007-10-29 17:44:41

I used my little annoyment script "CopyCat", while watching TV with my best friend. I glanced at the screen and found myself standing beside Prison Pete and the balloon animals. I knew that this random-event had yet to be solved, so, as last time, I thought: "Well, let's give it a try".

This is the culmination of todays work.

I call the balloon animals "Dogs". Don't ask me why.

The script contains:
> Autocolor, of course.
> Good object-identifying of the turning statues.
> Good failsafes, probably needs more though.
> Everything is supported. Except for running away, though. I forgot to clear that part out before leaving the random-event myself.
> Dog-finding rates (Popping them on the mainscreen)
Fat Dog: 50%
Tiny Dog: 20%
Horn Dog: 95%
Cat Dog: 20%


If you incidently should be in possession of an account at this random, please run this script and tell me how it worked. Also post bugs, ideas for improving, etc.

Here are a few of the "progress reports":
Portals left: 3
TARGET: Fat dog
Portals left: 3
TARGET: Fat dog
Portals left: 2
TARGET: Fat dog
Portals left: 1
TARGET: Horn dog
Portals left: 0

Portals left: 3
TARGET: Tiny dog
Portals left: 3
TARGET: Tiny dog
Portals left: 2
TARGET: Tiny dog
Portals left: 1
TARGET: Horn dog
Portals left: 0
ยจ

Portals left: 3
TARGET: Cat dog
Portals left: 3
TARGET: Tiny dog
Portals left: 3
TARGET: Cat dog
Portals left: 3
TARGET: Horn dog
Portals left: 2
TARGET: Fat dog
Portals left: 3
TARGET: Horn dog
Portals left: 3
TARGET: Tiny dog
Portals left: 3
TARGET: Cat dog
Portals left: 3
TARGET: Horn dog
Portals left: 2
TARGET: Horn dog
Portals left: 1
TARGET: Tiny dog
Portals left: 0


If you want to know more, just post your question here.
———
Code:
program Balloon_ScapeRune;
{.include SRL/SRL.scar}

var
srl_Dog: String;
srl_PortalsLeft: Integer;
srl_FatDog,srl_TinyDog,srl_HornDog,srl_CatDog: Integer;
ms_FatDog,ms_TinyDog,ms_HornDog,ms_CatDog: Integer;

function FindObjAdvUpText(var x,y: Integer; Boxsize,SBSize: Integer; UpText: String; Colors: TIntegerArray; Tol,MaxSkipBoxes: Integer): Boolean;
var
A,b: TIntegerArray;
Boxes: TBoxArray;
C,CsInBox,NB: Integer;
NBox: Boolean;
begin
SetArrayLength(a,GetArrayLength(Colors))
SetArrayLength(b,GetArrayLength(Colors))
if MaxSkipBoxes = 0 then MaxSkipBoxes:= 2;
SetArrayLength(Boxes,MaxSkipBoxes)
repeat
NBox:= False;
C:= 0;
CsInBox:= 0;
if FindColorSkipBoxArrayTolerance(A[C],B[C],Colors[C],MSx1,MSy1,MSx2,MSy2,Tol,Boxes)then
begin
repeat
Inc(C)
if FindColorTolerance(A[C],B[C],Colors[C],A[0]-BoxSize,B[0]-BoxSize,A[0]+BoxSize,B[0]+BoxSize,Tol)then
begin
Inc(CsInBox)
//Writeln('Found '+IntToStr(CsInBox+1)+' color in box')
end else NBox:= True;
until (CsInBox = GetArrayLength(Colors)-1) or (NBox)
end;
begin
if NB >= MaxSkipBoxes then Break;
if NBox then
begin
Boxes[NB]:= IntToBox(A[0]-SBSize,B[0]-SBSize,A[0]+SBSize,B[0]+SBSize)
Inc(NB)
end else
begin
MMouse(A[0],B[0],3,3)
Wait(120+random(70))
if IsUpText(UpText) then
begin
GetMousePos(x,y)
Result:= True;
Exit;
end else
begin
if NB >= MaxSkipBoxes then Break;
Boxes[NB]:= IntToBox(A[0]-SBSize,B[0]-SBSize,A[0]+SBSize,B[0]+SBSize)
Inc(NB)
end;
end;
end;
until(false)
end;

Procedure LoadDogDTMs;
begin
srl_FatDog := DTMFromString('78DA65CFC14A02510085E17B5F40B060C8664' +
'2891622BD450BA14DD0AA659B36BE820F106E0A2483705184826F' +
'60A241054EB531A195A29943816D8ADA16D45948F0CFBD8B33FFC' +
'0C730D79E18638606E778F1C864F5B4F3775BD70C6826FE88A6AA' +
'E9D29C7BA73435D74C83279A4813D284E96B9A8475CC2837A0196' +
'B1A348FA93ECD8275CCDBC68CE647734613F9139A6F4D93E6397E' +
'AF755595E66BF583A6A729D38C83D8BD3CD521CD8B3FA5D951EDD' +
'25492659A3D5581A6B5DCA429AA4A34EDB516CDBEEA80E63E7BEB' +
'FE4FCCB4572E5C53897D2713D26CAA3A34774B5D9A6DD525CD67F' +
'A9D26AF7AA0B9F1AE68B6547D9AD720FA37BF3A7F7A5A4991');
srl_TinyDog := DTMFromString('78DA633CC2C0C070930105DC95BEC5A001A41' +
'9A17CC6D3986A9EDB3E4555730F48AC4255B35B6E0BAA9AF74062' +
'25AA9A43F27B50D5B00059EB51D55C55BB88AA663790988DAAE68' +
'AC6595435EB80441FAA9ACBAA1750D52C0112EDA86A4EAB9F4055' +
'D300243251D55C5043B3AB1348E4A2AAB9A57B1D558D3A90750BC' +
'DCD929750D5E860AA7922FD10558D2A90F51055CD6DE99BA86AB4' +
'80ACA7A86A9E293EC674CF4734BB641E62BA074DCD330D34731C8' +
'1AC0DA86A0EA8A1C569082346DA38A37C12554D0C905580AAE6B8' +
'F4515435C98C18F1F550EA3EAA9A0E206B19AA9A238A0751D5CC0' +
'1B2D6A0AAB9A47C1EAEE63F100000F7AA47EE');
srl_HornDog := DTMFromString('78DA6DD23B4B03511005E0DD14A28D9548B2D' +
'9245B189074824110F1455A219595F80304416CACFD0176B1F109' +
'626B21826021480AD15D457C6C1E3E0326468C9BD829D8781AC13' +
'3E385E51E968F61B833E69A6918C3F8FE9CC7D89DD18BFBF7AFB9' +
'8D34C426701A6CB69052C224DFD8AC6A731F2BB35941B2D93CFCD' +
'78F30AD817736EB4821362F892A9B65A436361796C72687F449C4' +
'380B9FB0D9D0A69EAC69536753893FB1D9412AB0390A1FB2D9472' +
'AB2F1AC5336C7BA4ED9F2D914B479B62B6C1A48376C1AE95736DF' +
'DA0419318BAE90EAB99915A61DC667F331D16493D2A63515B0C9C' +
'07CB1F1A3576C46603A78EE7BDDBB6CC6617AD8B89698FB184C9A' +
'8D1771D94CC2E4B99FF33E617230076CAA83621633304B6C6AB6D' +
'8E769984536B791229B2CCC82D80DA7C46614665E1A51A75F9BEB' +
'C4251B0766964D292EEA74EA3A6E54BCF31CCCA6A863F33EFF00E' +
'26A66DE');
srl_CatDog := DTMFromString('78DA85D33D4BC3501805E07B7F82A0965A0B2' +
'EB185E2074AC182BAF90FFC030E2E3AB4839B8382835097226E82' +
'7470924645C40AD6A20E52B46AADD57E450D452C8A5B5DC4C523B' +
'89CF70E6638398187DC9BE48D3E554AB98A8E4B4F4E0571D67FD7' +
'3A8F68B0791D7B619343DCB279EAAAB339314DB6F3884D1AB1C9A' +
'63AFEC0C646AC0B33224C12B122F6335863B386586453EB2BB349' +
'2062C244848923A6D89406AED8FCAE33C9A6D873C3661E31C1A61' +
'C28B16922F6D89C5959365F88149B8CFF80CD3722CDE6C23A67D3' +
'867628F61CB8368D2DE6C712F31342DB6753098AE71A423BFEE75' +
'B8C9AFB71FA2B6C66D19ED9DCFB8A6C62A6F9F0BFB199416B8A67' +
'F716D8CCA1BDB371230E9B69B49698794F864D14ED53DC67F851C' +
'C185A924DC3E7B259D0C67FB1D3BECD66156D83CD5D6FC15C6B49' +
'7C0BAF78CF096DFC3B4EB82A661E2DCA66B7DB66B36C9A54C7169' +
'91F10366794');
ms_FatDog := DTMFromString('78DA635CC7C4C0708701054C92EB60D000D28' +
'C503EE316A09A5BA86A16C9CF4455B303A8E626AA9A2E8D2A5435' +
'DB816AEEA2AA69D7A84455B315A8E63EAA9A1D8AEB51D5EC04AAB' +
'98DAA66A72D1635E876C9D4A3A80100EAB21565');
ms_TinyDog := DTMFromString('78DA637CCAC0C060C0C8800C66CB4C66D000D' +
'23051C6BB986A3AAC6B50D55C0512FAA86AAA94F250D59C01127A' +
'68E6A8A399F31CD3AE4AA55C14350080810BD5');
ms_HornDog := DTMFromString('78DA63646162608865644006532CFA1934803' +
'44C949101A8261A554DB3593DAA9ADF40561CAA9A45EAF351D530' +
'01CD89475533CD6222AA9A7F40560CAA9A8D76EB50D57CC0B46BB' +
'DE23254355F81AC1054356D5AE5A86A3E61AAE9D4AEC2B42B1255' +
'4DBE4622AA9A8F405612AA9A09DA8D286A00242218FB');
ms_CatDog := DTMFromString('78DA637CCDC0C060C8C8800CDA95AB1934803' +
'44C94F1179030415533556F22AA1A46460C35D3FC26A1AA6103B2' +
'8C51D52C975E82AA8615C8D24355D36FD085A9C61C55CD4695752' +
'86A00AAF20C4F');
end;

Procedure FreeDogDTMs;
begin
FreeDTM(srl_FatDog)
FreeDTM(srl_TinyDog)
FreeDTM(srl_HornDog)
FreeDTM(srl_CatDog)
FreeDTM(ms_FatDog)
FreeDTM(ms_TinyDog)
FreeDTM(ms_HornDog)
FreeDTM(ms_CatDog)
end;

Function WaitUntilText(Text: String; MaxTime: Integer): Boolean;
var
a,b,Timer: Integer;
begin
MarkTime(Timer)
repeat
Wait(100+random(100))
if TimeFromMark(Timer) > MaxTime then
begin
Result:= False;
Exit;
end;
until FindText(a,b,Text,NPCChars,MCx1,MCy1,MCx2,MCy2)
Result:= True;
end;

Procedure ContConv(S: String);
begin
if WaitUntilText(S,10000) then ClickToContinue;
end;

Procedure PrisonPeteTalk;
begin
ContConv('happened')
ContConv('captured')
ContConv('Captured')
ContConv('stuck')
ContConv('captive')
ContConv('correct')
ContConv('contains')
ContConv('doors')
end;

Procedure FindLever;
var a,b,T: Integer;
begin
repeat
if FindObjAdvUpText(a,b,10,10,'ull',[1118484,8421770,3626083],10,100) then
begin
GetMousePos(a,b)
Mouse(a,b,0,0,true)
Break;
end else
begin
Mouse(717, 295,10,10,true)
FFlag(0)
if FindColorTolerance(a,b,195836,MMx1,MMy1,MMx2,MMy2,20) then
begin
Mouse(a,b,4,4,true)
FFlag(0)
Wait(500+random(200))
FindLever;
end;
end;
Wait(500+random(500))
until(false)
MarkTime(T)
repeat
Wait(100+random(100))
if FindText(a,b,'correct',SmallChars,MSx1,MSy1,MSx2,MSy2) then Break;
until(TimeFromMark(T) > 10000)
if TimeFromMark(T) > 10000 then FindLever;
end;

Function GetBalloonAnimal: Boolean;
var a,b: Integer;
begin
if FindDTM(srl_FatDog,a,b,MSx1,MSy1,MSx2,MSy2) then
begin
srl_Dog:= 'Fat'
Result:= True;
end;
if FindDTM(srl_TinyDog,a,b,MSx1,MSy1,MSx2,MSy2) then
begin
srl_Dog:= 'Tiny'
Result:= True;
end;
if FindDTM(srl_HornDog,a,b,MSx1,MSy1,MSx2,MSy2) then
begin
srl_Dog:= 'Horn'
Result:= True;
end;
if FindDTM(srl_CatDog,a,b,MSx1,MSy1,MSx2,MSy2) then
begin
srl_Dog:= 'Cat'
Result:= True;
end;
end;

Procedure GetTarget;
var Timer,TTimer,RandX: Integer;
begin
MarkTime(Timer)
MarkTime(TTimer)
case random(5) of
0: RandX:= 1000;
1: RandX:= 2000;
2: RandX:= 3000;
3: RandX:= 4000;
4: RandX:= 5000;
end;
repeat
Wait(10+random(10))
if TimeFromMark(Timer) > 10000+RandX then
begin
MMouse(4,4,700,450)
MarkTime(Timer)
case random(5) of
0: RandX:= 1000;
1: RandX:= 2000;
2: RandX:= 3000;
3: RandX:= 4000;
4: RandX:= 5000;
end;
end;
if TimeFromMark(TTimer) > 100000 then
begin
FreeDogDTMs;
LogOut;
end;
until(GetBalloonAnimal)
Writeln('TARGET: '+srl_Dog+' dog')
end;

Procedure RoomMiddle; Forward;

Procedure PopRight;
var
a,b,iTimer: Integer;
E: Extended;
FoundDog: Boolean;
begin
MouseSpeed:= 50+random(10)
case srl_Dog of
'Fat': begin
MarkTime(iTimer)
repeat
if FindDTMRotated(ms_FatDog,a,b,MSx1,MSy1,MSx2,MSy2,-20,20,0.1,E) then
begin
Mouse(a,b,2,2,true)
FFlag(0)
FoundDog:= True;
Break;
end;
until(TimeFromMark(iTimer) > 8000)
end;
'Tiny': begin
MarkTime(iTimer)
repeat
if FindDTMRotated(ms_TinyDog,a,b,MSx1,MSy1,MSx2,MSy2,-20,20,0.1,E) then
begin
Mouse(a,b,2,2,true)
FFlag(0)
FoundDog:= True;
Break;
end;
until(TimeFromMark(iTimer) > 8000)
end;
'Horn': begin
MarkTime(iTimer)
repeat
if FindDTMRotated(ms_HornDog,a,b,MSx1,MSy1,MSx2,MSy2,-20,20,0.1,E) then
begin
Mouse(a,b,2,2,true)
FFlag(0)
FoundDog:= True;
Break;
end;
until(TimeFromMark(iTimer) > 8000)
end;
'Cat': begin
MarkTime(iTimer)
repeat
if FindDTMRotated(ms_CatDog,a,b,MSx1,MSy1,MSx2,MSy2,-20,20,0.1,E) then
begin
Mouse(a,b,2,2,true)
FFlag(0)
FoundDog:= True;
Break;
end;
until(TimeFromMark(iTimer) > 8000)
end;
end;
MouseSpeed:= 20+random(6)
if not FoundDog then
begin
if FindColorTolerance(a,b,195836,MMx1,MMy1,MMx2,MMy2,20) then
begin
Mouse(a,b,4,4,true)
FFlag(0)
Wait(500+random(200))
RoomMiddle;
PopRight;
end;
end;
end;

Procedure RoomMiddle;
var a,b: Integer;
begin
if FindColorTolerance(a,b,229,MMx1,MMy1,MMx2,MMy2,40) then
begin
Mouse(a,b-40,10,10,true)
FFlag(0)
Wait(200+random(300))
end;
end;

Procedure ReturnKey;
var a,b,Key: Integer;
begin
Key := DTMFromString('78DA634C66626078CD80023435A518FE03694' +
'620FE0F048C3940350F18D000231209A40B806AEE115053045473' +
'93809A0A22D53C24A0261FA8E6090135B940356F09A8C904AA794' +
'7404D0A50CD47026AE2816ADE10509346849B13816A5EE0570300' +
'0A4716BC');
if WaitUntilText('key',10000) then
begin
if FindDTM(Key,a,b,MIx1,MIy1,MIx2,MIy2) then
begin
Mouse(a,b,5,5,true)
end;
end else
begin
PopRight;
ReturnKey;
end;
FreeDTM(Key)
end;

Procedure PP_KeyTalk;
var
a,b,T: Integer;
RightDog: Boolean;
begin
ContConv('thanks')
Wait(2000+random(2000))
MarkTime(T)
repeat
if TimeFromMark(T) > 20000 then Break;
if FindText(a,b,'wrong',NPCChars,MCx1,MCy1,MCx2,MCy2) then
begin
RightDog:= False;
Break;
end;
if FindText(a,b,'right',NPCChars,MCx1,MCy1,MCx2,MCy2) then
begin
RightDog:= True;
Break;
end;
until(false)
if RightDog then Dec(srl_PortalsLeft)
else Inc(srl_PortalsLeft)
if srl_PortalsLeft > 3 then srl_PortalsLeft:= 3;
ClickToContinue;
end;

Procedure EscapeTheRandom;
var a,b: Integer;
begin
if FindColorTolerance(a,b,1310462,MMx1,MMy1,MMx2,MMy2,20) then
begin
Mouse(a+30,b,10,10,true)
FFlag(0)
end;
end;

begin
SetupSRL;
ClearDebug;
LoadDogDTMs;
ActivateClient;
srl_PortalsLeft:= 3;
MakeCompass('N')
HighestAngle;
PrisonPeteTalk;
SetRun(True)
GameTab(4)
repeat
Writeln('Portals left: '+IntToStr(srl_PortalsLeft))
FindLever;
GetTarget;
Wait(1000+random(4000))
RoomMiddle;
PopRight;
ReturnKey;
PP_KeyTalk;
until(srl_PortalsLeft = 0)
Writeln('Portals left: '+IntToStr(srl_PortalsLeft))
FreeDogDTMs;
ContConv('before')
EscapeTheRandom;
ContConv('present')
ContConv('around')
end.

-Knives

Bobarkinator

2007-10-29 17:49:59

Wow, great work. Hope this works. Will test this as soon as I get it.

pwnaz0r

2007-10-29 17:50:18

If it works, nice (not really AMAZING, maybe smart but he just used DTMs, I still applaud your work, most couldn't do :D so don't feel like I'm putting you down or anywhere near that).

mastaraymond

2007-10-29 17:51:10

Wow, those dtms are huge! ^^. Good job.

Harry

2007-10-29 17:54:40

I see Dev status coming for you in the near future ;) Will try out once I get that random.

King of Knives

2007-10-29 17:58:18

@ pwnaz0r: I will never get that impression from you. You wouldn't ever put anybody down, unless it is useless leachers…

@ mastaraymond: What can I say? I love DTM's more than anything else. And ty.

@ Harry: Thanks :D

-Knives

R0b0t1

2007-10-29 18:44:37

Lies I tell you! Lies! ^^

Harry

2007-10-29 18:53:38

Just tried- for me it was a lagg machiene :( it just pulled lever, then lagged there, did some randoms mouse movements- did you make it so it would close the pop up window?

King of Knives

2007-10-30 09:48:58

Yes, it laggs a bit. I don't know why… It doesn't close the statue-popup window, it just clicks on the minimap, which closes it down automatically…

@ Robot: I don't lie :D If I can avoid it.

-Knives

MasterKill

2007-10-30 09:55:03

From: King of Knives
Yes, it laggs a bit. I don't know why… It doesn't close the statue-popup window, it just clicks on the minimap, which closes it down automatically…

@ Robot: I don't lie :D If I can avoid it.

-Knives


WoW, looks nice… some started it but didn't finish it.

about the lagg maybe add some waits?

i'll test to when an acount of me gest it.

n3ss3s

2007-10-30 10:03:59

Looks good, by the way, they're not all dogs xD

If you have any problems finding the obz don't hesitate to ask me make one.

King of Knives

2007-10-30 10:10:17

I know n3s. The first 2 balloon animals I got, were the fat and the tiny dog. So I started from there, and I didn't care about it all being dogs.

@ n3s: I won't, haha :P I'll make sure you're not in reach of sugar first, though.

-Knives

mat_de_b

2007-10-30 10:14:36

if the DTMs arent working you could try a count color tolerance :S its dodgy but i guess as they are all different sizes and shapes it may work…

King of Knives

2007-10-31 17:51:54

This thread is getting ridiculously little attention… So I had to use a little trick n3s taught me. Bad boy, rawr :P. (I know that's your word Harry)

Post guys, c'mon :P

My post in short: Bump

-Knives

WT-Fakawi

2007-10-31 18:03:09

Have you put this solver into your own SRL? You can do so by adding it to the SolveChatRandoms - Handler.

Try the balloon solver with my North Guard Fighter. You will have all the randoms you could possibly wish for within 12 hours :)

If it works, we are in business :)

King of Knives

2007-10-31 18:05:50

I have no way of detecting the random. I'm not good at that kind of stuff. I'll run this thing next time I get the random, and probably add, remove and modify some stuff to make it work. And probably add detection for it.

-Knives

Pancakes

2007-10-31 18:06:14

Fr33 BuMp 4 Y0uzz!

..And nice work ;)

WT-Fakawi

2007-10-31 18:25:16

From: King of Knives
I have no way of detecting the random. I'm not good at that kind of stuff. I'll run this thing next time I get the random, and probably add, remove and modify some stuff to make it work. And probably add detection for it.

-Knives


Goto: SRL/Core/AntiRandoms/ChatRandoms.scar
Scroll to line 273 e.o:

    'Prison Pete':                                    // ScapeRune balloons
begin
TakeScreen('Prison Pete');
Inc(ScapeRunes);
Logout;
Players[CurrentPlayer].Rand := 'Prison Pete';
//Players[CurrentPlayer].Loc := 'Prison Pete';
Result := True;
Exit;
end;

Put your SolveScapeRune in there, instead of the LogOut. If your code doesnt crash our scripts, I am willing to give it a shot. I run North Guards day and night. Garantueed ScapeRune within 12 hours.

the scar noob

2007-11-01 09:50:07

I just had the random, I took notes, let me edit this post when I wrote them all:)

-Tsn.

Edit: Ok the result was actually, sorry to say, bad.

Order of information

*number of tried time
*the right answer/balloon animal
*notes about how it went
*which animal it has chosen
*script picked the righ/false balloon animal

Order of information

———-
*1
*cat
*opened lever, after it it was slow in guessing the right balloon animal (in that window)
*ram
*WRONG
———-

*2
*cat
*rather fast run
*cat
*RIGHT
———-

*3
*cat
*opened lever, after that it took ages guessing the right balloon animal (in that window).
*car
*RIGHT
———-

*4
*cat
*opened lever, after it it was slow in guessing the right balloon animal (in that window).
After clicking to the center of the room it clicked 3 times on the floor.
*ram
*WRONG
———-

*5
*cat
*opened lever, after it it was fast in guessing the right balloon animal (in that window).
*ram
*WRONG
———-

*6
*sheep
*fast run.
*sheep
*RIGHT
———-

*7
*cat
*it did everything fast
*sheep
*WRONG
———-

*8
*sheep
*it did everything rather fast
*ram
*WRONG
———-

*9
*cat
*did the guessing fast, it did also clicked 3 times on the floor while searching for the balloon animals.
*ram
*WRONG
———-

*10
*ram
*everything went fast
*ram
*RIGHT
———-

*11
*dog
*again, it did everything rather fast and this time it clicked also on the floor, 2 times
*ram
*WRONG
———-

Debug Information:
Portals left: 3
TARGET: Cat dog
Portals left: 3
TARGET: Cat dog
Portals left: 2
TARGET: Cat dog
Portals left: 1
TARGET: Cat dog
Portals left: 2
TARGET: Tiny dog
Portals left: 3
TARGET: Fat dog
Portals left: 2
TARGET: Cat dog
Portals left: 3
TARGET: Fat dog
Portals left: 3
TARGET: Cat dog
Portals left: 3
TARGET: Horn dog
Portals left: 2
TARGET: Tiny dog
Successfully executed


Conclusion:
4 out of 11 times right.

I thought like, let's quit with it because I was making a function with that player:)
Sorry though, but it didn't worked great for me, it only had it right for 4 times.

I hope you have enjoyed reading my feedback, it took me some time to test/write down the information.

-Tsn.

n3ss3s

2007-11-01 10:14:13

:stirthepot:

All of the animals are different size… ;)

FindColors

GetArrayLength… ;)

Few days ago, I realized that maybe we should think about finding objects like:

"How does the human I detect an object?" "How do I detect an object"

Look at some thing near you, like the monitor of your computer.

Think how do you recognize it isnt just a painting in the wall…

First, we know it by detecting the edge of it, we can see a gray box differing from the other coloured background.

That is where we use first FindColors and then SplitTPA.
SplitTPA makes its own TPA for all the points that are next to each other.

So, first we'd do a FindColors, then we sort the ones that had enough points into their own arrays.

Done.


EDIT: Next thing about that human eye thing would propably be darkness/lightness. We have a game which sun shines always from west (rofl FaGex )

So, if there is a radical difference in luminosity of colours of two points, we know that other one isnt the same obj :)

Anyways, replicating human eye is too leet, thats why we wont do that, we dont want to make Andy cry ;)

ShowerThoughts

2007-11-01 11:19:06

let it hover the colors and then click it.. or doesnt it says ballon dog or cat or it says, balloon animal?

King of Knives

2007-11-01 11:45:28

If there was uptexts on them, it would be a piece of cake, Hermpie.

@TSN: Thanks for your feedback. I might have to change a few things here and there to make it work better, but they ARE hard to dissect from one another, those balloon animals.

@n3s: TPointArrays aren't my specialty. In fact, I don't even use it.

-Knives

the scar noob

2007-11-01 13:04:04

From: King of Knives
If there was uptexts on them, it would be a piece of cake, Hermpie.

@TSN: Thanks for your feedback. I might have to change a few things here and there to make it work better, but they ARE hard to dissect from one another, those balloon animals.

@n3s: TPointArrays aren't my specialty. In fact, I don't even use it.

-Knives


Good to know that my feedback was good enough:)
Don't be ashame, TPointArrays aren't my speciality neither;)

-Tsn.

ShowerThoughts

2007-11-01 13:15:42

me neither :D

i already thaught that they didn't got diff. uptexts.

n3ss3s

2007-11-01 13:43:34

TPointArrays maybe aren't your speciality, but specialities use TPointArrays :p Jk..

But seriously, thats propably the most reliable and effective technique I could think of in a situation like this, as you can see, it pops wrong animals a lot. Not saying that TPAs wouldnt, but they could find it more accurate using the pixel amount detected.

Anyways, good job, it anyways worked.

mastaraymond

2007-11-01 13:51:41

From: n3ss3s
TPointArrays maybe aren't your speciality, but specialities use TPointArrays :p Jk..

But seriously, thats propably the most reliable and effective technique I could think of in a situation like this, as you can see, it pops wrong animals a lot. Not saying that TPAs wouldnt, but they could find it more accurate using the pixel amount detected.

Anyways, good job, it anyways worked.

CountColorsTolerance? No need for TPA's in that one :>.

n3ss3s

2007-11-01 14:03:58

:stirthepot:

Wrong. First you do FindColors to get TPA of all screen C, then ya do SplitTPA, couple MiddleTPA, and then you can do CountColor inside a box you draw from the middle of TPA ;)

nielsie95

2007-11-01 15:59:31

Why don't you make one then..? ;)

Nice work Knives!
You're the first who made a beta balloon solver (I think) :)

King of Knives

2007-11-01 17:58:37

Thank you, nielsie :D I'm hoping to get SCAR to work again. It's been giving me the weirdest problems ever… Even just having codehints on while typing in a SRL-procedures freezes it completely…

-Knives

Harry

2007-11-01 18:02:17

Yeah, the hints on my scar lags the whole EXE.. :S

legendaryhero90

2007-11-01 18:18:04

From: Hy71194
Yeah, the hints on my scar lags the whole EXE.. :S


lol i thought only i had that problem :D

IMO, TPAs are just too much work. And i hate it when it fails because i would then have to start over.

pretty much like any other function or procedure i use or make. :D

King of Knives

2007-11-01 18:18:39

THANK GOD! 3rd re-install made it work… Finally SCAR can run again.

EDIT: I threw this script into my SRL antirandoms folder, and that was what caused SCAR to not work. I don't get it… I just…

-Knives

mastaraymond

2007-11-01 18:30:13

From: King of Knives
THANK GOD! 3rd re-install made it work… Finally SCAR can run again.

EDIT: I threw this script into my SRL antirandoms folder, and that was what caused SCAR to not work. I don't get it… I just…

-Knives
Your probably including your self, or you have got something like : program in the include file ;). I had the same error when i tried to include my own random solver:redface:

BobboHobbo

2007-11-02 01:15:56

Hmm, i never released this thread until today -.-, next time i get the random ill give it a shot.

the scar noob

2007-11-02 08:42:16

From: n3ss3s
TPointArrays maybe aren't your speciality, but specialities use TPointArrays :p Jk..

But seriously, thats propably the most reliable and effective technique I could think of in a situation like this, as you can see, it pops wrong animals a lot. Not saying that TPAs wouldnt, but they could find it more accurate using the pixel amount detected.

Anyways, good job, it anyways worked.


What about using CopyClientToBitmap and SetTargetBitmap?
In that way you can make a "screenshot" were the balloon animal is found (in a box of 30*30), the animal does't moves anymore (duh, it's a pic:D) and then you can begin comparing.

-Tsn.

the scar noob

2007-11-02 15:59:50

Ok, I had this random again and I thought: why not test it again?

right aswer-choosen answer
cat-cat
cat-ram
dog-ram
dog-ram
cat-cat
ram-ram
ram-ram

Debug info:
Portals left: 3
TARGET: Cat dog
Portals left: 2
TARGET: Cat dog
Portals left: 3
TARGET: Tiny dog
Portals left: 3
TARGET: Tiny dog
Portals left: 3
TARGET: Cat dog
Portals left: 2
TARGET: Horn dog
Portals left: 1
TARGET: Horn dog
Portals left: 0
Successfully executed


Yes, indeed, it solved it! Good job!

-Tsn.

n3ss3s

2007-11-02 16:59:36

Nielsie I would, but its hard for me to get any other random than box random…

EDIT: Stijn, ofcourse.

King of Knives

2007-11-02 18:51:22

TSN, thanks for testing it again :D It's very precious to me too know it works :D Thank you, thank you :D

EDIT:

Mastaraymond: I was:
1) Including SRL in the solver I put into antirandoms folders.
2) I had program blabla; in the script.
3) I had forgotten to make it a PROCEDURE and not just a mainloop…
But thanks for telling me what I was fucking up… How blind was I ?!?

-Knives

Serial_KillaZ

2007-11-07 21:25:15

Got ballon Random today and it clicks and turns run on and then times itself out.. Not sure if there has been any updates or anything to the random or not just letting you know my experience!

King of Knives

2007-11-08 07:56:19

I've found that many people say it laggs like shit… It probably needs a few wait(1) in the loop that tries to find the animal, after the lever is pulled.

-Knives

Serial_KillaZ

2007-11-09 14:44:25

From: King of Knives
I've found that many people say it laggs like shit… It probably needs a few wait(1) in the loop that tries to find the animal, after the lever is pulled.

-Knives




Alright ill give it a go again, when i get this random again!

King of Knives

2007-11-11 03:43:22

It should pull the lever. I don't get it. Maybe the DTM's take too much memory, but I don't know… They are fairly big.

-Knives

King of Knives

2007-11-16 12:58:09

Sorry for this double-post but I have a progress report :P :

Portals left: 3
TARGET: Cat dog
Portals left: 3
TARGET: Tiny dog
Portals left: 3
TARGET: Cat dog
Portals left: 3
TARGET: Horn dog
Portals left: 2
TARGET: Fat dog
Portals left: 3
TARGET: Horn dog
Portals left: 3
TARGET: Tiny dog
Portals left: 3
TARGET: Cat dog
Portals left: 3
TARGET: Horn dog
Portals left: 2
TARGET: Horn dog
Portals left: 1
TARGET: Tiny dog
Portals left: 0


Took a few tries, but it succeeded! :D
I made a new procedure to make it run away, and now the script should be fully running, by itself. I have updated the code in the first post.

-Knives

mickaliscious

2007-12-12 18:00:10

I'll add this to my antirandoms include and if I get one I'll let you know how it worked.

P1nky

2007-12-12 23:37:41

DUDE great job! i hope i can get 1 to test it out! =) great job once again

mickaliscious

2008-01-07 06:25:25

I have a character in the balloon scaperune. If you would like to further perfect this script let me know. I can pm you the account details.