Damage over time

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: Damage over time
Warrior
Member # 6629
Profile Homepage #0
I was wondering if someone could tell me if there is a script out there which deals damage randomly to the party. Say my party walked down a tight valley with many avalanches. Occasionally rocks fall down and wound the party.

PS: not scripts that trigger every X turns or X days...

--------------------
"When everything is coming your way, you're in the wrong lane."
Posts: 120 | Registered: Sunday, January 1 2006 08:00
Off With Their Heads
Member # 4045
Profile Homepage #1
Something like this...
beginstate START_STATE;
if (get_ran(1,1,10) < 2)
damage_char(1000,get_ran(5,1,10),0);
break;
If you want it only to trigger when you're between certain areas, you can just through in an "if" that depends on char_loc_x and char_loc_y.

[ Sunday, January 01, 2006 16:54: Message edited by: Kelandon ]

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Law Bringer
Member # 4153
Profile Homepage #2
(EDIT: Basically, what Kel said. Crud.)

You could just put something like this in the START_STATE of the town/outdoor section:
if(get_ran(1,1,10) == 1) {
damage_char(1000,20,0);
}
(This example would have a 10% chance of dealing 20 weapons damage to the party, every turn)

[ Sunday, January 01, 2006 16:56: Message edited by: Ephesos ]

--------------------
Gamble with Gaea, and she eats your dice.

I hate undead. I really, really, really, really hate undead. With a passion.
Posts: 4130 | Registered: Friday, March 26 2004 08:00
Warrior
Member # 6629
Profile Homepage #3
Thanks

--------------------
"When everything is coming your way, you're in the wrong lane."
Posts: 120 | Registered: Sunday, January 1 2006 08:00