wizmap.c

ds2.9a12/lib/cmds/creators/wizmap.c · 1007 B

From the archive ds2.9a12.zip

Download the archive   « Back to the archive contents

#include <lib.h>

inherit LIB_DAEMON;

mixed cmd(string args) {
    int status = this_player()->GetProperty("wizmapping");
    string sstatus = "are";
    if(!status) sstatus = "are not";
    if(!args){
        write("You "+sstatus+" wizmapping.");
        return 1;
    }
    if(args == "on"){
        if(status) write("You are already wizmapping.");
        else write("You enable wizmapping.");
        this_player()->SetProperty("wizmapping", 1);
        return 1;
    }

    if(args == "off"){
        if(!status) write("You are already not wizmapping.");
        else write("You disable wizmapping.");
        this_player()->SetProperty("wizmapping", 0);
        return 1;
    }

    write("Try: help wizmap");
    return 1;

}

void help() {
    message("help", "Syntax: wizmap [on | off]\n\n"
      "If enabled, a simple map of your surroundings is displayed "
      "when your environment is described to you.\nSee also: "
      "env, terminal, brief, mute, gag, automap.",
      this_player());
}

Site Stats

Snippets: 1791
Codebases: 571