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); } }
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; }
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()); } }
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."); }
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."; }