player_killing

tmi2_fluffos_v2/lib/doc/concepts/player_killing · 804 B

From the archive tmi2_fluffos_v2.zip

Download the archive   « Back to the archive contents

  The MudOS mudlib comes with player killing enabled. You may want to disarm
this, or only permit it in special "arena" rooms. To do this, you will need
to modify the _kill.c command as follows:

To prevent player killing entirely:

  Add a section of code to _kill.c after the victim is found.

    if (userp(victim)) {
        notify_fail ("You cannot kill other players.\n") ;
        return 0 ;
    }

To create an arena:

  Add a room property called "arena". Any room that permits player killing
should have this code:

        set ("arena", 1) ;

in its create function. Then, in _kill.c, do:

    if (userp(victim) && (int)environment(this_player())->query("arena")!=1)
        notify_fail ("You cannot kill players here.\n") ;
        return 0 ;
    }

that'll do whichever of the two you want.

Site Stats

Snippets: 1791
Codebases: 571