PDA

View Full Version : My first script(Cooker)



Lancelot074
08-22-2007, 03:30 PM
//Made by Lancelot074
program New;
{.include OSi.txt}

const Fire = 3584499; //Change only if needed

Procedure Cook(FishType:integer);
var c,Cooked,RawFish,rawx,rawy,firex,firey,subx,suby:i nteger;
begin
case FishType of
0:begin RawFish := BitmapFromString(8, 4,
'000001874D23804921834C21874D238D51239757250000010 00001' +
'874D23804921874D23905325995928A35E2A0000010000018 74D23' +
'834C218D51230000010000010000010000000000000000010 00001' +
'000001000000000000000000000000'); subx:=20; suby:=20; end;//Lobster
1:begin RawFish := BitmapFromString(4, 4,
'000001B9AEADBFB6B6C6BEBE000001C4BBBACBC4C4D4CECE0 00001' +
'CDC6C5D6D0D0DAD4D4000000000001000001000001'); subx:=-2; suby:=20; end;//Trout
2:begin RawFish := BitmapFromString(4, 4,
'000001A98B86AE908AB59691000001B2938DBB9A95C1A49E0 00001' +
'BC9C97C2A5A1C4A9A5000000000001000001000001'); subx:=-2; suby:=20; end;//Salmon
3:begin RawFish := BitmapFromString(5, 2,
'564D42000001CAB7ADA67A5F000001000001DACEC7CFBEB60 00001' +
'302020'); subx:=0; suby:=8; end; //Shrimp
end;
while(FindBitmapToleranceIn(RawFish,rawx,rawy,560, 210,730,465,50))and(FindColorSpiralTolerance(firex ,firey,Fire,5,5,514,337,20))do
begin
Mouse(rawx-subx,rawy-suby,25,25,true);
Mouse(firex,firey,3,3,true);
c:=0;
while(FindBitmapToleranceIn(RawFish,x,y,rawx-10,rawy-10,rawx+10,rawy+10,50))and(c<30)do
begin
c:=c+1;
wait(75+random(25));
end;
Cooked:=Cooked+1;
status('Cooked: '+inttostr(Cooked));
wait(100+random(300));
end;
end;

begin
SetupOSi;
Cook(3);
end.


Well, this is my frist script, it basically cooks fish on a fire.
I know it looks nooby and it nooby but I need some help.
I still need to add multiple players and a banking procedure so I need some help with that if anyone can help. I also need to put in anti randoms and anti ban. All help is appreciated.:spot:

Pwnt by Pwnt
08-30-2007, 08:47 PM
yeah... not much =\ and im pretty sure you have to have {include SRL/SRL.scar} in there, and SetUpSRL; but I cant really tell because your script is so hard to read =\ my MSN is Pwnt_by_Pwnt@hotmail.com or PM me :) I can help

Kik
08-30-2007, 09:45 PM
Very well done for a first script. I'm glad to see a beginner take on something as hard as bitmaps instead of an autotalker (althought autotalkers are a very good way to get accustomed to SCAR). Good use of while loops Keep up the good scripting!

To Pwnt by Pwnt: I know you're trying to help all the new scripters, but try not to post in every single one of the last ten topics. It looks like you're just trying to get your post count up, and in a way it could be considered spam.

Pwnt by Pwnt
08-30-2007, 10:50 PM
=\ I dont care about post count, I just dont want new scripters to script wrong but think its right, and keep doin it wrong =\ then its hard to learn it the right way...

Lancelot074
09-01-2007, 03:06 PM
Thanks for the feedback, I'm currently trying to find a good place where you may position this script, such as Rouges Den. So, I'm trying to add bank procedures and multiple players + anti randoms and anti ban. Hopefully I will update the script soon.

HyperSecret
09-01-2007, 04:57 PM
if you need any help add me on msn or aim whichever and ill help, but nice job on the cook

lordofdapoop
09-03-2007, 07:20 AM
Looks good. I guess I'll test. It's late and I'm bored. ;-)

kornthebldgd
09-03-2007, 08:56 PM
whats it cook??

Lancelot074
09-03-2007, 11:27 PM
It, only cooks 4 fish as of now, it will not long at all to add in some more fish.

bob_the_noob
09-05-2007, 11:04 AM
gl on fixing the script i need a cooker+banker

ps:need to cook 42000 lobs:(