I implemented a limited object flag in my MUD to control super objects from popping too frequently, here is what I have in my reset.c
--
Under case 'G' and case 'e' in reset.c
It doesn't do it all the time but sometimes this happens...
> reset area
Ibeilwyn wears a flowing black cloak about his body.
Ibeilwyn fits a black metal breastplate on his body.
Log: > > Limited item pop (a bloody spiked war helm) on Ibeilwyn. Fri Jul 30 02:52:48 2010
Ibeilwyn dons a bloody spiked war helm upon his head.
Done.
> l ib
Ibeilwyn stands before you, neither live nor dead. He stands perfectly still,
the only sign that he is not fake is the sound of his deep and raspy
breathing. About his body he wears a flowing black cloak that covers up
everything with the exception of his face and the hand that holds a massive
and deadly looking sword. Upon his head is a spiked helm, blood stains are
painfully visible on it. His frosted over eyes have no pupils. An intense red
aura surrounds him.
Ibeilwyn is in perfect health.
Ibeilwyn is using:
<worn on body> (Token Magic) a black metal breastplate
<worn about body> (Moderate Magic) a flowing black cloak
Mobile #3505 'Ibeilwyn' is a level 49 undead mage.
You peek at his inventory:
Nothing.
Notice he's not actually wearing the helm. Somehow it vanished. Any thoughts on what could be happening here? It happens maybe 10% of the time, the other 90% of the time it works as expected.
--
Under case 'G' and case 'e' in reset.c
if (!IS_OBJ_STAT(obj, ITEM_LIMITED)) {
get_objvalue(obj);
obj = obj_to_char(obj, mob);
if ( pReset->command == 'E' )
do_wear(mob, obj->name);
}
if (IS_OBJ_STAT(obj, ITEM_LIMITED)) {
if (number_percent() <= 40) {
get_objvalue(obj);
sysdata.limitedobjpops++;
sprintf(buf, "> > Limited item pop (%s) on %s. %s", obj->short_descr, mob->short_descr, (char *) ctime( ¤t_time ) );
log_string_plus( buf, LOG_NORMAL, LEVEL_GREATER);
obj = obj_to_char(obj, mob);
save_char_obj(mob);
do_wear(mob, obj->name);
//save_char_obj(mob);
}
else
do_wear(mob, "All");
}
lastobj = obj;
break;
break;
It doesn't do it all the time but sometimes this happens...
> reset area
Ibeilwyn wears a flowing black cloak about his body.
Ibeilwyn fits a black metal breastplate on his body.
Log: > > Limited item pop (a bloody spiked war helm) on Ibeilwyn. Fri Jul 30 02:52:48 2010
Ibeilwyn dons a bloody spiked war helm upon his head.
Done.
> l ib
Ibeilwyn stands before you, neither live nor dead. He stands perfectly still,
the only sign that he is not fake is the sound of his deep and raspy
breathing. About his body he wears a flowing black cloak that covers up
everything with the exception of his face and the hand that holds a massive
and deadly looking sword. Upon his head is a spiked helm, blood stains are
painfully visible on it. His frosted over eyes have no pupils. An intense red
aura surrounds him.
Ibeilwyn is in perfect health.
Ibeilwyn is using:
<worn on body> (Token Magic) a black metal breastplate
<worn about body> (Moderate Magic) a flowing black cloak
Mobile #3505 'Ibeilwyn' is a level 49 undead mage.
You peek at his inventory:
Nothing.
Notice he's not actually wearing the helm. Somehow it vanished. Any thoughts on what could be happening here? It happens maybe 10% of the time, the other 90% of the time it works as expected.