|
Regen Objects (Another Way) [by Mike Carpenter] |
|
|
|
Posted Wednesday, August 12th @ 11:35:26 PM, by George Greer in the Objects dept.
Added Jul 6, 1998. Click the link below to read it or download it.
From: Mike Carpenter <abram@DELTANET.COM>
Subject: Regen Items (another way)
I realize there is already a snippet on the Circlemud Snippet page, but
I wanted to contribute another way you could implement REGEN_ITEMS. It is
not fancy, just does what I want. With this version, a player cannot
wear 3 items and get a combined affect, this version just gives a flat
10 point increase on top of the normal gain(if the player is wearing
a regen item). You can adjust this to your liking.
/* In structs.h under Item Types*/
/* Look for ITEM_FOUNTAIN 23 or whatever your last item is */
/* add this*/
#define ITEM_MANA_REGEN 24
/* If you have OLC then*/
/* in olc.h look for #define NUM_ITEM_TYPES 30 */
/* add 1 to the number so *?
/* change it to this */
#define NUM_ITEM_TYPES 31
/* In constants.c look for item_types */
/* then right BEFORE "\n" */
/* add this and be sure to add the comma */
"MANA_REGEN",
/* in limits.c look for mana_gain */
/* right below int gain; */
/* add this */
int i;
/* then look for gain = graf(age(ch).year, 4, 8, 12, 16, 12, 10, 8); */
/* right below it add */
for (i=0; i< NUM_WEARS; i++) {
if(GET_EQ(ch, i)) {
if(GET_OBJ_TYPE(GET_EQ(ch, i)) == ITEM_MANA_REGEN) {
gain += 10; /* this can be played around with to your liking */
}
}
}
/* Thats it compile and reboot */
/* Just follow these steps for hit_gain and move_gain, making the flags */
/* and adjusting the above code, this is real easy. */
Enjoy,
Mike Carpenter(Abram at Legends of Blades & Magic)
<< Regen Objects [by Robert Sinland] | Reply | View as text | Flattened | Regen Rooms [by John Evans] >> |
|
Related Links |
|
|
|
CircleMUD Snippets |
|
|
Note: Not all of these snippets will work perfectly with
your version of code, so be prepared to fix one
or two bugs that may arise, and please let me know
what you needed to do to fix it. Sending a corrected
version is always welcome.
|
Finally, if you wish to use any of the snippets from this
page, you are more than welcome, just mention the
authors in your credits. If you wish to release any
of these snippets to the public on another site,
contact me FIRST.
|
|
|
|
|
|
|