void do_forcetick (CHAR_DATA *ch, char * argument)
{
weather_update ();
char_update ();
obj_update ();
aggr_update ();
tail_chain ();
update_handler();
send_to_char ("FORCETICK!\r\n", ch);
return;
}
void force_tick( CHAR_DATA *ch, int time )
{
AFFECT_DATA *paf;
AFFECT_DATA *paf_next;
for ( paf = ch->affected; paf != NULL; paf = paf_next )
{
paf_next = paf->next;
if (af->type == gsn_bearcall)
{
paf->duration = time;
}
}
return;
}
void update_handler( void )
{
static int pulse_area;
static int pulse_mobile;
static int pulse_violence;
static int pulse_point;
static int pulse_music;
…
void do_forcetick (CHAR_DATA *ch, char * argument)
{
weather_update ();
char_update ();
obj_update ();
send_to_char ("FORCETICK!\r\n", ch);
return;
}
void do_forcetick (CHAR_DATA *ch, char * argument)
{
weather_update(); /*line 4972*/
char_update();
obj_update();
send_to_char ("FORCETICK!\n\r", ch);
return;
}
void weather_update args ((void));
void char_update args ((void));
void obj_update args ((void));
void do_now( CHAR_DATA *ch, char *argument )
{
char arg1[MAX_INPUT_LENGTH];
CHAR_DATA *victim;
AFFECT_DATA *paf;
AFFECT_DATA *paf_next;
int sn;
bool done = FALSE;
argument = one_argument( argument, arg1 );
if ( ( victim = get_char_world( ch, arg1 ) ) == NULL )
{
send_to_char( "That player is not here.\r\n", ch);
return;
}
sn = skill_lookup(argument);
if ( sn < 0 )
{
send_to_char( "Sorry, no such spell.\r\n", ch );
return;
}
for ( paf = victim->affected; paf != NULL; paf = paf_next )
{
paf_next = paf->next;
if ( paf->type == sn )
{
paf->duration = 0;
done = TRUE;
}
}
if ( !done )
act( "$N is not affected by $t.",ch, argument, victim, TO_CHAR );
else
send_to_char( "Spell duration reduced.\r\n", ch );
return;
}
void do_forcetick (CHAR_DATA *ch, char * argument)
{
weather_update(); /*line 4972*/
char_update();
obj_update();
send_to_char ("FORCETICK!\n\r", ch);
return;
}
extern void do_something args((char_data *ch, argument));
This is what I've got in act_wiz.c:
It doesn't do what I'm wanting it to do though, for example.. I want to be able to spam out "forcetick" a dozen times and reduce the affect timers so I can test things easier… but it doesn't work, see:
You are affected by the following spells:
Spell: bearcall : modifies none by 0 for 29 hours
<32076hp 30227m 30727mv> forcetick
FORCETICK!
<32076hp 30227m 30727mv> aff
You are affected by the following spells:
Spell: bearcall : modifies none by 0 for 29 hours
Any improvements/ideas?