A few scripts of mine.

Dec 27, 2007 at 6:39 AM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Jan 21, 2007
Location:
Posts: 1111
I'm bored, and I suppose I may as well give you guys a bit of a present. So, here's a few scripts of mine you can put in the Head.tsc file to make things easier, etc.

HEALTH FRAGMENT SCRIPT

Ever played zelda? Collecting life-ups during a game can be fun, but as cavestory proved, you get a little TOO much health for doing... barely anything. (Hence people striving to play a 3HP run... somewhat)

So, awhile back, this script was born. True, Runelancer attempted it first, but I suppose he couldn't have it function as well, seeing Sue's workshop wasn't out yet. Sell, here it is, straight from Eternal Chaos' Script. Use as you like, just throw my name in the Credits.

SCRIPT


Code:
#0050
<PRI<FAC0000<DNP0050<SOU0022
<ITJ0005:0055<ITJ0004:0051<MSG<GIT1004<IT+0004Got a =Life Fragment=!<NOD
Collect 3 to make a =Life-up=!<NOD<END

#0051
<MSG<GIT1005<IT-0004<IT+0005Got another =Life Fragment=!<NOD
Just 1 to go!<NOD<END

#0055
<MSG<GIT1006<IT-0005Got all 3 =Life Fragments=!<NOD
<CMU0016The =Life-up= is created!<WAI0160<NOD<RMU
<ML+0005Maximum HP increased by 5!<NOD<END


OUTSIDE THE SCRIPT

Now comes the easy part, making this script the best life-up script possible.
Set up an event as follows:

EVENT: 50
SPRITE: 32
FLAGS: 6000
FLAGID: (Whatever value you like, I use 101 as the 1st life-frag)

:So, what's so special about this? The script in the Head.tsc is run, as obviously stated. However, as you may or may not know, <DNP (Do-not-process) deletes the event from screen, and it turns on the flag the event had! What does this mean? Every time the script is run, given there's an ID specified, the flag is on, and will stay on. You're given an item for the event to use the next time it runs, aka the fragment.
The first time it's run, you get the 1st item.
The second time it's run, it notices you have the 1st item, then takes it away, giving you the 2nd.
The Third time, it takes away the 2nd item, and gives you HP, along with the message, and Life-Up jungle. Huzzah!

Wasn't that simple? You can use the exact same thing over and over without having to copy life-up script over and over. Best of all, you can add in more items and script chunks similar to 0051 to add more fragments.

Death - The game still running after failing a boss.

As Eternal chaos boasted, it can be done. Usually, one would think you could restore life, and <SMC (Show-my-character). Wrongo. For whatever reason, the character is perminently gone forever. The only solution is <INI (Initialization), or <LDP (Load-Profile). Here's a simple example:

Code:
*Pre-boss script*
*Boss start-up*
... ... [b]<FL+0150[/b]<END

-OHNOES! YOU DIED!-
(Meanwhile, in Head.tsc...)

#0040
<KEY<CMU0000<WAI0040<PRI[b]<FLJ0150:0050[/b]<WAI0040<CMU0003
<MSG
You have died.<NOD<CLR
Would you like to try again?<YNJ0049<CLO
<FAO0001<WAI0050<FLJ0099:0048<INI<END

#0050
<SK+0001<INI<END

*And, back to the 1st event run in the game*

#0200
<SKJ0001:0300...*Rest of opening stuff*

Pretty simple. However, My mod has 6 fragments before Pandimonium smites Daniruu. How am I to transfer them? Well, simple, but a long process...

Code:
<SK-0001<SK-0002<SK-0003<SK-0004<SK-0005<SK-0006<SK-0007<SK-0008<SK+0009

<FLJ0101:0051<FLJ0102:0052<FLJ0103:0053<FLJ0104:0054<FLJ0105:0055<FLJ0106:0056<EVE0060
#0051
<SK+0001
<FLJ0102:0052<FLJ0103:0053<FLJ0104:0054<FLJ0105:0055<FLJ0106:0056<EVE0060
#0052
<SK+0002
<FLJ0103:0053<FLJ0104:0054<FLJ0105:0055<FLJ0106:0056<EVE0060
#0053
<SK+0003
<FLJ0104:0054<FLJ0105:0055<FLJ0106:0056<EVE0060
#0054
<SK+0004
<FLJ0105:0055<FLJ0106:0056<EVE0060
#0055
<SK+0005
<FLJ0106:0056<EVE0060
#0056
<SK+0006
<EVE0060
#0060
<INI<END

This checks for every life-fragment ever gathered, then turns on a skipflag accordingly, along with the flag saying 'run the seperate start-script'.
Speaking of which, you'd have to add something in teh startscript to actually get the life back, huh?

Code:
#0300
<ML+0004
<SKJ0001:0351<SKJ0002:0352<SKJ0003:0353<SKJ0004:0354<SKJ0005:0355<SKJ0006:0356<EVE0380

#0351
<FL+0101<IT+0004
<SKJ0002:0352<SKJ0003:0353<SKJ0004:0354<SKJ0005:0355<SKJ0006:0356<EVE0380

#0352
<FL+0102<ITJ0004:0360<IT+0004
<SKJ0003:0353<SKJ0004:0354<SKJ0005:0355<SKJ0006:0356<EVE0380

#0353
<FL+0103<ITJ0005:0362<ITJ0004:0361<IT+0004
<SKJ0004:0354<FLJ0005:0355<SKJ0006:0356<EVE0380

#0354
<FL+0104<ITJ0005:0364<ITJ0004:0363<IT+0004
<SKJ0005:0355<SKJ0006:0356<EVE0380

#0355
<FL+0105<ITJ0005:0366<ITJ0004:0365<IT+0004
<SKJ0006:0356<EVE0380

#0356
<FL+0106<ITJ0005:0368<ITJ0004:0367<IT+0004
<EVE0380


#0360
<IT-0004<IT+0005
<SKJ0003:0353<SKJ0004:0354<SKJ0005:0355<SKJ0006:0356<EVE0380

#0361
<IT-0004<IT+0005
<SKJ0004:0354<FLJ0005:0355<SKJ0006:0356<EVE0380

#0362
<IT-0005<ML+0005
<SKJ0004:0354<FLJ0005:0355<SKJ0006:0356<EVE0380

#0363
<IT-0004<IT+0005
<SKJ0005:0355<SKJ0006:0356<EVE0380

#0364
<IT-0005<ML+0005
<SKJ0005:0355<SKJ0006:0356<EVE0380

#0365
<IT-0004<IT+0005
<SKJ0006:0356<EVE0380

#0366
<IT-0005<ML+0005
<SKJ0006:0356<EVE0380

#0367
<IT-0004<IT+0005
<EVE0380

#0368
<IT-0005<ML+0005
<EVE0380

#0380
*Turn back on all manditory flags before the initialize*
*Rest of code*

Fun, huh?

===

I guess I'll add mroe to the topic as I find neat scripting tricks. By the by, you don't have to use the flags or event numbers I used, they are only examples. Change them as you please...

Ah, I'll splerge. Here's my entire Head.tsc atm. I reorganized teh default scripts to a more... easy-to-use fasion; Life-ups use the same event as teh life capsule sprite; beds use the same as bed sprites; etc.

Prepare for text overload in 3... 2.. 1...

Code:
#0000
<END

#0001
<PRI<MSGEmpty.<NOD<END

#0002
<MNA<END

#0016
<PRI<MSG
Would you like to save the game?<YNJ0000<FL+0099<SVP<CLR
Game saved.<NOD<END

#0017
<PRI<FLJ0159:0018
<LI+1000<SOU0020<AE+<MSG
Health restored.<NOD<END
#0018
<PRI
<LI+1000<SOU0020<AE+<MSG
Health and Ammunition restored.<NOD<END

=====Missiles=====

#0029
<PRI<FLJ0160:0031<FLJ0159:0030<FL+0159<GIT0005<AM+0005:0010
<CMU0010Got the =Missile Launcher=!<WAI0160<NOD<RMU<CLRThe Missile Launcher is a powerful
weapon, but its ammo is limited.<NOD
You can replenish your stockpile
with items dropped by enemies.<NOD<END
#0030
<PRI<AM+0005:0005<MSG
<GIT0006Max missiles increased by <NUM0000!<NOD<END
#0031
<PRI<AM+0010:0005<MSG
<GIT0011Max missiles increased by <NUM0000!<NOD<END

=====Life Capsules=====

#0032
<PRI<FAC0000<DNP0032<SOU0022
<ITJ0005:0035<ITJ0004:0033<MSG<GIT1004<IT+0004Got a =Life Fragment=!<NOD
Collect 3 to make a =Life-up=!<NOD<END

#0033
<MSG<GIT1005<IT-0004<IT+0005Got another =Life Fragment=!<NOD
Just 1 to go!<NOD<END

=====Beds=====

#0034
<KEY<MSG
Do you want to rest?<YNJ0000<FAO0004<CMU0000<WAI0020<CLR.....<NOD<CLO
<WAI0050
<LI+1000<SOU0020<MYD0002<MSG
Health restored.<NOD<CLO<RMU<FAI0004<END

=====LifeUp=====

#0035
<MSG<GIT1006<IT-0005Got all 3 =Life Fragments=!<NOD
<CMU0016The =Life-up= is created!<WAI0160<NOD<RMU
<ML+0005Maximum HP increased by 5!<NOD<END

=====Deaths=====

#0040
<KEY<CMU0000<WAI0040<PRI<FLJ0150:0050<WAI0040<CMU0003
<MSG
You have died.<NOD<CLR
Would you like to try again?<YNJ0049<CLO
<FAO0001<WAI0050<FLJ0099:0048<INI<END

#0041
<KEY<CMU0000<WAI0040<PRI<WAI0040<CMU0003
<MSG
You have drowned.<NOD<CLR
Would you like to try again?<YNJ0049<CLO
<FAO0001<WAI0050<FLJ0099:0048<INI<END

#0046
<KEY<CMU0000<WAI0040<PRI<WAI0040<CMU0003
<MSG
You were never<HMC seen again...<NOD<CLR
Would you like to try again?<YNJ0049<CLO
<FAO0001<WAI0050<FLJ0099:0048<INI<END

#0048
<SMC<LDP<END

#0049
<CLO<FAO0004<ESC

=====

#0050
<PRI<CMU0000<FAO0004<WAI0020<FAC0013<MSGHmhmhm...<NOD<FAC0015
Hahahah!...<NOD<FAC0013<CLRFoolish Girl...<NOD
Are you still alive?<NOD<FAC0012
Surprizing...<NOD
I suppose I'll let
you live...<NOD<FAC0013 for now...<NOD<CLO<WAI0050
<FAC0013<MSGMy plan continues
to prove trutworthy...<NOD
Soon, I will become
the strongest being
on this planet...<NOD<FAC0015
A god of chaos...<NOD<SK-0001<SK-0002<SK-0003<SK-0004<SK-0005<SK-0006<SK-0007<SK-0008<SK+0009

<FLJ0101:0051<FLJ0102:0052<FLJ0103:0053<FLJ0104:0054<FLJ0105:0055<FLJ0106:0056<EVE0060
#0051
<SK+0001
<FLJ0102:0052<FLJ0103:0053<FLJ0104:0054<FLJ0105:0055<FLJ0106:0056<EVE0060
#0052
<SK+0002
<FLJ0103:0053<FLJ0104:0054<FLJ0105:0055<FLJ0106:0056<EVE0060
#0053
<SK+0003
<FLJ0104:0054<FLJ0105:0055<FLJ0106:0056<EVE0060
#0054
<SK+0004
<FLJ0105:0055<FLJ0106:0056<EVE0060
#0055
<SK+0005
<FLJ0106:0056<EVE0060
#0056
<SK+0006
<EVE0060
#0060
<INI<END

=====DemoEnd=====

#0075
<KEY<FAO0002<WAI0050<CMU0000<MS2And they lived
happily ever after.<NOD<CLR...You don't buy it?<NOD
Well, you'll have to wait
some more.<NOD
'Tis the end of Chapter 4.<NOD<CLRReunited at last,
the two run into a new
problem...<NOD And oddly
enough, Pandimonium
didn't attack,<NOD or even
question how Zarro
escaped.<NOD<CLR
Heheh...<NOD<TRA0000:0500:0000:0000


In the heart of the darkness, In the eyes of the flames;
A young dragoness comes forth - She calls out her name.

A battle begins, One to test all her might;
To prove what she's worth, She must win this fight.

When her adversaries fail, When she gives all she has -
The dragoness is rewarded. The "Wings of Seraph"


XX: head.tsc   4000 - 4099
4000:Almond…“ï

...nyahah. :D

Bonus poem for yas, too.
 
Dec 27, 2007 at 7:10 AM
Guy with Sword
Bobomb says: "I need a hug!"
Join Date: Jul 1, 2007
Location: Middle of Texas
Posts: 777
Age: 32
Mmmm... new scripts. :D
 
Dec 27, 2007 at 7:23 AM
Luls
"Bleep, Bloop, Bleep, Bloop"
Join Date: Oct 6, 2007
Location: I dunnos
Posts: 1584
<INI brings you back to the Starting Menu... How do you continue your game from there? You can't edit the script in the starting menu... o.o
 
Dec 27, 2007 at 3:37 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 33
Pronouns: No homie
Good work! :p
 
Dec 27, 2007 at 9:13 PM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Jan 21, 2007
Location:
Posts: 1111
Metalogz said:
<INI brings you back to the Starting Menu... How do you continue your game from there? You can't edit the script in the starting menu... o.o

<INI is like starting a new game: All switches off, and just you with 3HP/whatever you hacked the start value too. From there, it runs event 200 on the map you start from.

You're thinking of <ESC
 
Dec 28, 2007 at 6:12 AM
Justin-chan
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Oct 15, 2007
Location: Nowhere
Posts: 1920
Age: 31
lololol, he got it working already.
 
Dec 28, 2007 at 10:04 AM
Luls
"Bleep, Bloop, Bleep, Bloop"
Join Date: Oct 6, 2007
Location: I dunnos
Posts: 1584
ZTaimat said:
<INI is like starting a new game: All switches off, and just you with 3HP/whatever you hacked the start value too. From there, it runs event 200 on the map you start from.

You're thinking of <ESC

OH MY! IS WORKS!

*Is happy*
*lubz yuo*
 
Back
Top