guard.c

ds2.10/lib/domains/Praxis/obj/mon/guard.c · 481 B

From the archive ds2.10.zip

Download the archive   « Back to the archive contents

#include <lib.h>
#include ROOMS_H

inherit LIB_NPC;

private object __Target;

void heart_beat() {
    ::heart_beat();
    if(__Target && environment(__Target) != environment(this_object())) {
        message("say", "%^BOLD%^%^RED%^The guard tells you: %^RESET%^"+
                "An' where do ya think you're goin' buster??", __Target);
        __Target->eventMoveLiving(environment(this_object()));
    }
}

void set_target(object ob) {
    if(!ob) return;
    __Target = ob;
}

Site Stats

Snippets: 1791
Codebases: 571