I think I've discovered a new bug in swrfuss1.2. As I haven't found anything about it, I'm posting it here.
The bug occurs when creating a weapon with a sleep weaponspell. When using the weapon the mud crashes. You can test this bug by typing the following commands:
ocreate 800 escopeta
oset escopeta type weapon
oset escopeta weapontype blaster
oset escopeta numdamdie 5
oset escopeta sizedamdie 2
oset escopeta charges 1000
oset escopeta maxcharges 1000
oset escopeta wear take wield
slookup sleep (here, we can see that sleep is sn 64)
oset escopeta affect weaponspell 64
and the result is a segmentation fault.
The problem seems to be in not initializing target_name variable at magic.c and call get_char_room( ch, target_name ) in spell_sleep. This is called from one_hit (fight.c), at the end:
retcode = (*skill_table[aff->modifier]->spell_fun) ( aff->modifier, (wield->level+3)/3, ch, victim );
To solve it, in spell_sleep, type
CHAR_DATA *victim = (CHAR_DATA *) vo;
and comment out the lines:
if ( ( victim = get_char_room( ch, target_name ) ) == NULL )
send_to_char( "They aren't here.\n\r", ch );
Now, the weapon works but the fight continues even when the victim is affected by the sleep. Maybe a stop_fight should be added before victim->position = POS_SLEEPING; ? This doesn't work with snipe, though...
Thank you for your attention!