Environmental Hazards package.

If you have a package, script or some other file that you would like to share and it is specifically written for the Distro, feel free to use this forum to post it. Please include a description, usage instructions, if necessary, and any special installation instructions.

Moderators: POL Developer, Distro Developer

Post Reply
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Environmental Hazards package.

Post by Yukiko »

Name: enviroeffects

Description: This package allows the placement of 5 different types of environmental hazards that will inflict damage upon a character. The hazards are a plume of fire, a plume of gas (non-poisonous), a plume of steam, lightning, and falling rocks. To place a hazard, use the command .envirohcfg. You will be presented with a gump. From the gump you can choose one of the hazards and the damage that will be inflicted and the range. The damage amount is limited to 5 decimal places. The range is limited to one decimal place. Once you have made your choice and entered the damage and range, click the OKAY button and target the location you want to place your hazard. An invisible tile will be placed at the location.

Whenever a mobile comes within the range you specified, and remains within the range, there is a chance of the environmental hazard occurring. Chance is determined by picking a random number and if that number happens to be 42, the effects will happen. The range check is performed every 1,000 milliseconds. With the exception of the falling rocks and the lightning hazards, the damage diminishes based on a mobile's distance from the hazard tile. Falling rocks and lightning do the damage you entered in the gump no matter how far the mobile is from the tile. Note that you must have your see invisible privilege enabled to see the hazard tile and it is a good idea to set your invulnerable privilege as well. The control script does not perform a command level check when dealing out damage.

If you want to make changes to how the damages are applied, see the effectControl script. It is pretty well commented. So it should be fairly easy to understand.

Some default settings can be set in the settings.cfg file.
Here is the settings.cfg file:

Code: Select all

Elem	Settings
{
	// The range to use generating the random number to determine
	// if the effect will happen. Do not set below 42 without
	// modifying the effectControl script.
    ChanceRange		100

	// DefaultDamage is the number that will appear in the gump
	// Damge: text entry.
	DefaultDamage	5

	// DefaultRange is the number that will appear in the gump
	// Range: text entry.
	DefaultRange	3
}
Attachments
envirohazards.zip
(6.72 KiB) Downloaded 255 times
Post Reply