I've coded in a few spec procs and have been noticing a few problems with
them.
First, ok, here's the code for one of 'em...
SPECIAL(spec_evil_cleric)
{
CHAR_DATA *victim;
CHAR_DATA *v_next;
if (!FIGHTING(ch))
return FALSE;
for (victim = world[ch->in_room].people; victim; victim = victim->next_in_room)
{
v_next = victim->next_in_room;
if ( FIGHTING(victim) == ch && number(0,2) == 0 )
break;
}
if ( victim == NULL )
return FALSE;
for ( ;; )
{
int min_level;
switch (number(0,7))
{
case 0: min_level = 0;
cast_spell(ch, victim, NULL, SPELL_CURSE); break;
case 1: min_level = 3;
cast_spell(ch, victim, NULL, SPELL_WEAKEN); break;
case 2: min_level = 6;
cast_spell(ch, victim, NULL, SPELL_CHILL_TOUCH); break;
case 3: min_level = 9;
cast_spell(ch, victim, NULL, SPELL_BLINDNESS); break;
case 4: min_level = 12;
cast_spell(ch, victim, NULL, SPELL_POISON); break;
case 5: min_level = 15;
cast_spell(ch, victim, NULL, SPELL_ENERGY_DRAIN); break;
case 6: min_level = 18;
cast_spell(ch, victim, NULL, SPELL_HARM); break;
case 7: min_level = 21;
cast_spell(ch, victim, NULL, SPELL_TELEPORT); break;
default: min_level = 24;
cast_spell(ch, victim, NULL, SPELL_WORD_OF_RECALL); break;
}
if ( GET_LEVEL(ch) >= min_level )
break;
}
return TRUE;
}
Now, the problem I'm getting is this:
Say a player goes into the room....
Mob is non aggro. The player then tries to look at the mob. Instead of
a description they get
Ok.
and whatever they do for a few turns they get Ok.
Finally they attack it... and nonte of the the mob's spells, say like
teleport and word of recall do nothing...
it'll say "<mob> looks at you and utters the words, 'word of recall'
and nothing will happen.
Help someone? :)
This archive was generated by hypermail 2b30 : 12/07/00 PST