SRL Archive - First Scripts

Chinchompa Catcher


kylerperson

2011-05-12 21:49:04

Attempting to make a chin catcher hence the title. Im having a bit of trouble figuring out the ground item picking, i know this isnt much, but here is what i have so far, if someone could help with how to pick the boxes from the ground that would be very helpful.
program TehChomper;
{.Include SRL/SRL.scar}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Member := True;
Active := True;
end;

end;

Procedure SetTrap;

Var
InvTrap, X, Y:integer;

begin
InvTrap:= BitmapFromString(19, 32, 'meJyNlW1P2lAUx80+iPpmzpiZkC' +
'0anyZuIOCcCAhirbUWaqmIgMCaiqASdT7ELIu+MPrKj7p/cpLryW1' +
'LSE6a03P/v3seenMbmvsRCrDJmaU+Qd9VitPSh6Gh/tuSQ3pOjcXy' +
'QWyQQX///Ebg6GhoQAoZoa/VWl5Q1OZbPMSNplss2qqqD5JRUI7TM' +
'Qwrl1OS65lEYrVPm7wAyDTNSKezkUhsdm6BMvomlQqmBskGH474Fh' +
'Bz8PNUWCzxRL6z4iBRwH0rDDoABEolSeeHx6Ueg2TSbjScT3GFD8d' +
'bFe+LbDJjTazp4ysq79GXIv3+1fPe2b9t54Zeh6ejIzOx9908vRBS' +
'7D0VLh717l+tfb/j3im/r/PHvY/RbPqwvV5yfpkNwRJF4t3TBxJvN' +
'S9z9fONSof0SauFJcRLt698wvDt0xvr5HrfvQSIIgnMVrsArT8vCM' +
'JHarB8UPCJMp1eoXVuNLv6cWfnyIUYSVMHLpLiCR+7SSCndmttUGr' +
'FERRag8FBRAJFIkEp5ZagVgv1n3tVYiXQS23ZDUEl9EpcK+MJXwKB' +
'SNSmVefUsmpHFQu+BApEUBuFiqCARPLm900DjgRyJGdWQaWNMvri1' +
'FJWh0kgIZxK6TbSoUJQ0C9mtG8pdT75fuC/huPiyBFCVFKzOCXOqv' +
'fyoYsCBgS2ppooEhVyfdCVxXEphaQP+uPw/Qe//Mm+hJf7C/4DFDy' +
'68A==');
If (FindBitmapToleranceIn(InvTrap, X, Y, 0, 0, 750, 460, 25))
Then
Mouse(x, y, 4, 4, True);
end;

Procedure CheckTrap;
begin
end;

Procedure FixTrap;

Var
FailTrap, X, Y:integer;

begin
FailTrap:= BitmapFromString(40, 20, 'meJy91dtKAlEUBuCH6SoJioqiu2' +
'4KuvNGgqjMQ5anPGam42GabDw12ogNikgHiqAX6PH6dcFqozaFTsF' +
'3sQvqZ/17bbWpAdv/mi+5wKr/FsxXme+yxLwpmTljEliY61XaoWKd' +
'nWZVdpxWmCuRszw3fKUxf67CxNndyQJYlXuYrUNEabKJnXPbf5c73' +
'rk4tSW56x7JmdMgWtLZSOfidVvS86ozNbdpp9y42mLfdU7bNWPuyn' +
'58we7F4SjfPCl3E+U248HFws17Tqdz8Mth6eAu6shNVg1GoeLU4oa' +
'P55bLGtva3jEb9iDJZzwif6WXqnUYqhave6TqkVzD6Ot6hyXPMyYN' +
'iz/6bjpwcdtlYufijtFqcS6uCRSlQhqNNmQyBVh0BMjSbogt70X59' +
'4CSId3oEbHwiVWP9yxJMpNllZjcLAnU+pBpDohTixsuLpjJXtGwJv' +
'e75v66hZD2SCL6KwvWHxhdBMESgk11T/2ONnyDW8Ah3HiGH0M9cov' +
'Yhl+FU+fS1FhsBElPH2d3L4yah/FJh8POmksPKtZ6S9y/09TAoXB8' +
'bTB8vAAOluQCchHBuYDnzPC6GT5O6U+s+v6dOCMNSBzRAlDJlPsJr' +
'OnxyQ==')

If (FindBitmapToleranceIn(FailTrap, X, Y, 0, 0, 750, 460, 35))
Then
Mouse(x, y, 4, 4, True);
end;

begin
SetUpSRL;
SetTrap;
FixTrap;
end.




I was thinking it has to do something with R_ChooseOptionMulti but i wasnt able to implement it

Awkwardsaw

2011-05-12 22:20:02

dont use bitmaps, learn how to use TPAs, :)

or reflection ground items

bitmaps suck for object finding

kylerperson

2011-05-12 22:48:57

Thanks for the tip Awkward, im looking at the TPA tutorial at the moment its making me feel a little retarded tbh hahaha, are there any pointers that you could give to possibly make it a little easier? Although i will keep working at it.