示例#1
0
文件: vaarsuvius.c 项目: Elohim/FGmud
mixed cmd(string args) {
    object tp = this_player();
    string tmpfile;
    string ret = "";
    int massacre, survivors = 0;
    object *obs;

    if(!tp || !archp(tp)) return "No.";

    if(args) args = replace_string(args,"\"","");

    if(!args) return "Try: help vaarsuvius";

    else obs = findobs(args);

    if(!massacre = sizeof(obs)) {
        write("No such objects found.");
        return 1;
    }

    foreach(object ob in obs){
        ob->eventDestruct();
        if(ob) destruct(ob);
        if(ob){
            survivors++;
            write(identify(ob)+" survived the purge.");
        }
    }
示例#2
0
文件: decay.c 项目: arylwen/terebi
#include <lib.h>

inherit LIB_DAEMON;

void eventDecay();

static void create() {
    daemon::create();
    SetNoClean(1);
    call_out((: eventDecay :), 30);
}

static void eventDecay() {
    object *limbs = filter(findobs(LIB_LIMB), (: clonep($1) :) );
    object *corpses = filter(findobs(LIB_CORPSE), (: clonep($1) :) );

    corpses += find_inheritors(LIB_CORPSE);
    limbs += find_inheritors(LIB_LIMB);

    limbs->eventDecay();
    corpses->eventDecay();

    call_out((: eventDecay :), 30);
    return;
}