I'm having problems getting the rand_prog to work. Even set at 100 percent the mob will not execute a simple command.
mpedit # add rand 100
mpechoat $r Test.
Even this isn't working, which should happen every heartbeat? Does anyone know of anything I can check to make sure I'm doing this right?
You are right, this doesn't work for a couple reasons. First of all I found a bug in handler.c
in char_to_room (around line 1309) in handler.c look for:
if( ( obj = get_eq_char( ch, WEAR_LIGHT ) ) != NULL && obj->item_type == ITEM_LIGHT && obj->value != 0 )
Below that add
if( !IS_NPC(ch) )
Why?: What was happening is that char_from_room was subtracting nplayer everytime a char exits the area and never added any, so nplayer was actually going negative. The progs that have checks in update.c make sure nplayer is positive before firing (which is a good thing)
Also note that the heartbeat progs (rand prog, time prog, etc) do not occur while area is in building phase, it has to be installed for that to happen.