>I want to change so that the
>'snake' spec_proc will trigger more often.
the mobile_activity() function is where it's checked
but that function is called in comm.c in the heartbeat()
function.
Here is some code to help u out.
(i've included my FASTAGGR code too, it works off the same function)
Open Mobact.c
*************
after
void mobile_activity(void);
put
void mobile_instant(void);
and after the mobile_activity function put
void mobile_instant(void)
{
register struct char_data *ch, *next_ch, *vict;
int found;
for (ch = character_list; ch; ch = next_ch) {
next_ch = ch->next;
if (!IS_MOB(ch))
continue;
/* Examine call for special procedure */
if (MOB_FLAGGED(ch, MOB_FASTSPEC) && !no_specials) {
if (mob_index[GET_MOB_RNUM(ch)].func == NULL) {
log("SYSERR: %s (#%d): Attempting to call non-existing mob function.",
GET_NAME(ch), GET_MOB_VNUM(ch));
REMOVE_BIT(MOB_FLAGS(ch), MOB_FASTSPEC);
} else {
if ((mob_index[GET_MOB_RNUM(ch)].func) (ch, ch, 0, ""))
continue; /* go to next char */
}
}
/* Fast Aggressive Mobs */
if (MOB_FLAGGED(ch, MOB_FASTAGGR)) {
found = FALSE;
for (vict = world[ch->in_room].people; vict && !found; vict =
vict->next_in_room) {
if (IS_NPC(vict) || !CAN_SEE(ch, vict) || PRF_FLAGGED(vict, PRF_NOHASSLE))
continue;
if (MOB_FLAGGED(ch, MOB_WIMPY) && AWAKE(vict))
continue;
if (FIGHTING(ch))
continue;
if (MOB_FLAGGED(ch, MOB_FASTAGGR)) {
hit(ch, vict, TYPE_UNDEFINED);
found = TRUE;
}
}
}
}
}
Now open comm.c
******************
after
void mobile_activity(void);
put
void mobile_instant(void);
find this function 'void heartbeat(int pulse)'
after
if (!(pulse % PULSE_MOBILE))
mobile_activity();
put
if (!(pulse % PULSE_INSTANT))
mobile_instant();
Now open structs.h
******************
add the new mob flags MOB_FASTSPEC and MOB_FASTAGGR
and find
#define PULSE_MOBILE (10 RL_SEC)
and under that put in the time u want the FASTSPEC to happen
eg #define PULSE_INSTANT (5 RL_SEC)
That should be it. Hope it helps
Michael Gallagher
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/10/01 PDT