SRL Archive - Other Scripts

Win 300k! Rs Money and a pker mage lvl 34


SKy Scripter

2007-01-16 20:02:15

you can delete this Post if youd like…………………………





program Message_In_A_Bottle;
///////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// BY : Sky Scripter \\
////////////////////////////////////////////////////////////////////////////////
// This Game Is based Off Of Message In a bottle ;)
// Message in a bottle is a Song
//
// Description = you save falling Bottles From hitting the floor
// if 3 bottles hit the floor then your out.
//
// anything past medHard is Hard so i put cheats on ;)
// this Game!!!!!! they work by holding buttons
// while playing this Game. you Must Figure Out
// Wich 3 Buttens To hold.
//////////////////////////////////////////////////////////////////////////
// Hint : Only 2 Buttons Will Say cheat activated while holding //
// On the bottom of the screen..... //
////////////////////////////////////////////////////////////////////////////////
// Not taking away your life when a bottle goes //
// past the bar. /////
////////////////////////////////////////////////////

Const
PlaySong = False; // Don't Bother Inless You have this Song
Mode = 2; // Easy = 1, MedHard= 2, hard=3, super hard = 4

var
frmDesign, Self: TForm;
App : TApplication;
Image : TImage;
Labal:Array [1..3] of TLabel;
Image2 : Array [1..2] of TImage;
Bar, Bottle, life, Count, Saved, speed, hun, mode2, widthBar : Integer;
CanvasBar, CanBottle : TCanvas;
Timer: TTimer;



procedure TimerEvent(Sender : TObject);
begin
Labal[3].Caption := '';
Count:=Count+1;
Labal[2].Caption := 'Lifes: ' +Inttostr(Life);

if (isKeyDown('l')) then
begin
Image.Width:= 82 + 30;
widthBar:= 30;
Labal[3].Caption := 'Cheat activated';
end;


////////
if (Image2[1].Left >= Image.Left-5-widthBar) and
(Image2[1].Left <= Image.Left + 82+widthBar) and
(Image2[1].Top >= Image.Top - 48) and
(Image2[1].Top <= Image.Top) then
begin
Saved:= Saved + 1;
Image2[1].Top:=-80;
Image2[1].Left := Random(364); // existing?
end;

if (Image2[2].Left >= Image.Left-5-widthBar) and
(Image2[2].Left <= Image.Left + 82+widthBar) and
(Image2[2].Top >= Image.Top - 48) and
(Image2[2].Top <= Image.Top) then
begin
Saved:=Saved+1;
Image2[2].Top:=-80;
Image2[2].Left := Random( Image2[1].Left);
end;
///////////
Labal[1].Caption := 'Bottles: ' + inttostr(Saved);

if (Image2[1].Top>=265) then
begin
Life:=Life-1;
Image2[1].Top:=-80;
Image2[1].Left := Random(364);
Labal[2].Caption := 'Lifes: ' +Inttostr(Life);
end;

if (Image2[2].Top>=265) then
begin
Life:=Life-1;
Image2[2].Top:=-80;
Image2[2].Left := Random(Image2[1].Left);
Labal[2].Caption := 'Lifes: ' +Inttostr(Life);
end;
////////////////////////////////////
If (Life <= 0) then
begin
Timer.ENABLED:= False;
If (App.MESSAGEBOX('GameOver, Saved: '+ inttostr(Saved)+ ' Bottles! Play Again?' ,'GameOver',4)=6) then
begin
Life:=3;
Saved:=0;
Count:=0; // GameOver
Timer.ENABLED:=True;
Image2[1].Top:=0;
Image2[1].Left := Random(364);
Image2[2].Top:=0;
Image2[2].Left := Random(Image2[1].Left);
end;
end;
/////////////////////////////

if (Saved = 100 * Hun ) then
begin
Timer.ENABLED:= False;
If (App.MESSAGEBOX('Wow you got '+ inttostr(100 * hun) + ' bottles would you like to take the next mode?', ' next Mode',4)=6) then
begin
Mode2:= mode2 + 1;
Life:=Life+1;
Saved:=0;
Count:=0; // Next Level
Timer.ENABLED:=True;
Image2[1].Top:=0;
Image2[1].Left := Random(364);
Image2[2].Top:=0;
Image2[2].Left := Random(Image2[1].Left);
end else
Hun:= hun +1;
Timer.ENABLED:=True;
end;
//////////////////////////////

Image2[1].Top := Image2[1].Top+ 5 * mode2;
If (Count>=20) then // Drop botttle
Image2[2].Top := Image2[2].Top + 5 * mode2;

//////////////////////////
if (IsFKeyDown(1)) then
Mode2:=1
else
Mode2:=Mode;
if mode2 = 2 then
Speed:= 3;
if mode2 = 3 then
Speed:= 4;
if mode2 = 4 then
Speed:= 5;
If (IsKeyDown('s')) then
begin
Labal[3].Caption := 'Cheat activated';
Speed:= 8;
end;

if (Image.Left<=300) then
If (IsArrowDown(1)) then
Image.Left := Image.Left + 10+ speed;

if (Image.Left>=0) then
If (IsArrowDown(3)) then
Image.Left := Image.Left - 10 - speed;
speed:=0;
Wait(10);
Image.Width:= 82;

widthBar:= 0;
Image.Show;
end;

procedure InitForm;
begin
hun:= 1;
mode2:= mode;
Life:=3;
frmDesign := CreateForm;
frmDesign.Left := 259;
frmDesign.Top := 132;
frmDesign.Width := 420;
frmDesign.Height := 350;
frmDesign.Caption := 'Message in a bottle by sky scripter';
frmDesign.Color := 0;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
App:= TApplication.Create(frmDesign);
Image:= TImage.Create(frmDesign);
Image.Left := 150;
Image.Top := 270;
Image.Width:= 82;
Image.Height:= 6;
Image.Visible:= True;
Image.Parent:= frmDesign;
CopyCanvas(CanvasBar, Image.Canvas,0, 0, 82, 6, 0, 0, 82, 6);
Image2[1]:= TImage.Create(frmDesign);
Image2[1].Left := Random(364);
Image2[1].Top := 0;
Image2[1].Width:= 28;
Image2[1].Height:= 48;
Image2[1].Visible:= True;
Image2[1].Parent:= frmDesign;
CopyCanvas(CanBottle, Image2[1].Canvas,0, 0, 28, 48, 0, 0, 28, 48);
Image2[2]:= TImage.Create(frmDesign);
Image2[2].Left := Random(364);
Image2[2].Top := 0;
Image2[2].Width:= 28;
Image2[2].Height:= 48;
Image2[2].Visible:= True;
Image2[2].Parent:= frmDesign;
CopyCanvas(CanBottle, Image2[2].Canvas,0, 0, 28, 48, 0, 0, 28, 48);
Timer := TTimer.Create(frmDesign);
Timer.ENABLED:= True;
Timer.INTERVAL:= 50;
Timer.ONTIMER:= @TimerEvent;
Labal[1]:= TLabel.Create(frmDesign);
Labal[1].Parent:= frmDesign;
Labal[1].Left := 0;
Labal[1].Top := 300;
Labal[1].Font.Color:= 16777215;
Labal[3]:= TLabel.Create(frmDesign);
Labal[3].Parent:= frmDesign;
Labal[3].Left := 150;
Labal[3].Top := 300;
Labal[3].Font.Color:= 16777215;
Labal[2]:= TLabel.Create(frmDesign);
Labal[2].Parent:= frmDesign;
Labal[2].Left := 350;
Labal[2].Top := 300;
Labal[2].Font.Color:= 16777215;
end;

procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;

procedure SetSelfWindowState(state: TWindowState);
begin
Self.WindowState:= state;
end;

procedure SafeSetSelfWindowState(state: TWindowState);
var
V: TVariantArray;
begin
setarraylength(V, 1);
V[0]:= state;
ThreadSafeCall('SetSelfWindowState', V);
end;

begin
Bar:= BitmapFromString(82, 6, 'z78DAB556CB0EC42008FCA7169B5EB' +
'BD9FFFFA6DDC40B86CC7410BD18823C0701DB655F3B9AD9737EFE' +
'949D77A75BE7BBDB8113CF39AD28D9697F722D4552D1F50808797' +
'1ACE0AD824F969FCC77880D9D3262A52A642DD7BD27AD71AC2424' +
'155D14610549DE95C88B1E5BFD35068F5BFC6691771C1F9512A1B' +
'F7D91D76B3D8706EF0E1EE1BE7E0C5518E6EDAAF9C3BD00CBB0CA' +
'7A16D95E562AAB6C132A8F1086996E385F7CC9DB0AD1DE0EC72A6' +
'A25B661656ECFF597B2F757FD46B2BFBBCA9F64D55499DA05701A' +
'ECDB7742543FEC8F81BB');

Bottle:= BitmapFromString(28, 48, 'z78DAEDD84B0A80300C45D12D1584' +
'D2B990FD2F49D049A144D28F21C5FB02CEC4C3A30E9A940821A42' +
'F67CE87FEC4D921340F4E8BB098C7535BF75386C6A7E119E177DD' +
'B667ACFDA23DEFDDCEC82DED3D913BF5BB524573AE3A09634E691' +
'2C7A93519D3294A70E2C48913274E9C3871E2C489F33FF7A35DEE' +
'9B3B3AE3EF19B45663FE47F6FD92A773D5EE6EDEE93984EC980B7' +
'154595D');
self:= GetSelf;
SetSelfWindowState(wsMinimized);
CanvasBar:= GetBitmapCanvas(Bar);
CanBottle:= GetBitmapCanvas(Bottle);
if (PlaySong) then
PlaySound(AppPath +'S.O.S.Wav');
SafeInitForm;
SafeShowFormModal;
SetSelfWindowState(wsNormal);

end.

Yakman

2007-01-17 02:41:32

this game i made a while ago http://www.villu-reborn.com/showthread.php?t=3018

Lorax

2007-01-17 08:43:27

I might join, when is the close date?

SKy Scripter

2007-01-17 10:05:48

hmm lets try a 4 days?

Lorax

2007-01-17 14:29:40

From: SKy Scripter
hmm lets try a 4 days?


I won't participate then :)
I would need a lot more time..

SKy Scripter

2007-01-17 16:25:15

ok but it only took me 1 day to make the one i made though …… so i personally think that's sad….


this game i made a while ago http://www.villu-reborn.com/showthread.php?t=3018


nice but……
i can't even get to work next time put them in
Tform wich works much better!

Yakman

2007-01-17 17:42:09

From: SKy Scripter

i can't even get to work next time put them in
Tform wich works much better!


i made this game a Looong time ago, when i had a lot more time, i didnt learn forms or events or anything, i know them now, and i bet i could make a much better game, except i have a lot less time…..

and how can you not get it to work, just download the scar file and press play, not setup needed

SKy Scripter

2007-01-18 13:46:46


and how can you not get it to work, just download the scar file and press play, not setup needed

the screen just stays black lol….

if more People join i will Extend the dead line and give more money!!

but if theres only like 2 people i wont give much money out

Yakman

2007-01-19 03:33:54

From: SKy Scripter
the screen just stays black lol….

if more People join i will Extend the dead line and give more money!!

but if theres only like 2 people i wont give much money out


hmm….thats odd,

well ill try to get some more people to make something, but in my experiance, people dont really like making scar games, they prefer rs scripts :(

SKy Scripter

2007-02-14 19:11:50

Sorry it's over :cartman: