Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, DotBot

Members: 0
Guests: 4
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Building » rand_prog not functioning?
Forum Rules | Mark all | Recent Posts

rand_prog not functioning?
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Dec 20, 2004, 6:07 am
Go to the top of the page
Go to the bottom of the page

crazytom

GroupMembers
Posts1
JoinedDec 20, 2004

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.

or even

say 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?
       
Post is unread #2 Jan 20, 2005, 7:57 am   Last edited Nov 24, 2007, 8:30 pm by Samson
Go to the top of the page
Go to the bottom of the page

Zarius
Apprentice
GroupMembers
Posts69
JoinedApr 23, 2002

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.

or even

say 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[2] != 0 )
    ++pRoomIndex->light;


Below that add

    if( !IS_NPC(ch) )
        ++pRoomIndex->area->nplayer;


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.
       
Pages:<< prev 1 next >>