예제 #1
0
파일: manipulate.c 프로젝트: Elohim/FGmud
varargs mixed eventManipulate(object who, string component){
    mixed val;

    if( !component ){
        val = Manipulate["default"];
    }
    else {
        val = Manipulate[component];
    }
    if( arrayp(val) ){
        val = val[query_night()];
    }
    if( stringp(val) ){
        object env;

        env = environment(who);
        who->eventPrint(val);
        if( component ){
            env->eventPrint(who->GetName() + " moves the " + component +
                    " on " + GetDefiniteShort() + ".", who);
        }
        else {
            env->eventPrint(who->GetName() + " moves " +
                    GetDefiniteShort() + ".", who);
        }
        return 1;
    }
    else {
        if( functionp(val) & FP_OWNER_DESTED ){
            return "Error in evaluating functional.";
        }
        return evaluate(val, who, component);
    }
}
예제 #2
0
int go_north() {
	if(!MASTER->is_member() && query_night()) {
		write("Only reporters are allowed in the offices at night.");
		return 0;
	}
	write("Welcome to the Tirun Times News Room");
	return 1;
}
예제 #3
0
파일: look_in.c 프로젝트: Elohim/FGmud
string GetInternalDesc(){
    mixed val = InternalDesc;

    if( arrayp(val) ){
        val = val[query_night()];
    }
    if( stringp(val) ){
        return val;
    }
    else if( functionp(val) ){
        if( functionp(val) & FP_OWNER_DESTED ){
            return "Error evaluating internal description.";
        }
        return evaluate(val, this_player());
    }
}
예제 #4
0
파일: weaponry.c 프로젝트: Elohim/FGmud
string CheckOpen(string str) {
    object ob;

    ob = present("vendor");
    if( query_night() ) {
        if( ob ) ob->eventDestruct();
        return ("The cases of the weaponry are empty, as the weaponry "
                "has closed for the night.  The bazaar is "
                "east.");
    }
    if( !ob )
        return ("Fresh blood is splattered across broken cases which once "
                "housed display weapons sold in this weaponry.  The weapons are "
                "gone, and the vendor clearly murdered.  All you can do is "
                "shake your head and exit to the east.");
    return ("Sealed cases contain display weapons, exemplifying what the "
            "local vendor has to offer.  She buys and sells all sorts of "
            "weapons from adventurers who come here to sell of their "
            "discovered goods, or equip to continue adventuring.  An exit "
            "is east.");
}
예제 #5
0
파일: weaponry.c 프로젝트: Elohim/FGmud
string CheckItem(object ob) {
    if( query_night() ) return "They are empty.";
    else if ( present("vendor") ) return "They are filled with weapons.";
    else return "They are broken and covered in blood.";
}