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); } }
mixed indirect_give_liv_obj(object target){ mixed tmp; if(!target){ return "#That doesn't seem to be here."; } if( environment() != this_player() ){ return "#You cannot give what is not yours."; } tmp = CanDrop(this_player()); if( tmp != 1 ){ return (tmp || "You can't drop " + GetDefiniteShort() + "."); } tmp = target->CanCarry(GetMass()); if( tmp != 1 ){ return (tmp || capitalize(GetDefiniteShort()) + " is too heavy."); } return 1; }
varargs mixed CanOpen(object who, object tool){ if(environment() && environment() != environment(who) && environment() != who) return "#That's not accessible to you."; if( !Closed ){ return capitalize(GetDefiniteShort()) + " is already open."; } else return 1; }
int ClimbMe(){ string omsg,imsg,dest; object who; //dest="/domains/campus/room/start"; dest="/domains/campus/room/uptree"; who=this_player(); omsg = "$N climbs up " + GetDefiniteShort() + "."; imsg = "$N comes climbing in."; who->eventMoveLiving(dest, omsg, imsg); }
varargs mixed CanClose(object who, string id){ if(who && environment() && environment() != environment(who) && environment() != who) return "#That's not accessible to you."; if( Closed ){ id = capitalize(GetDefiniteShort()) + " is already closed."; return id; } else return 1; }
varargs mixed CanManipulate(object who, string component){ mixed val; if( !component ){ component = "default"; } val = Manipulate[component]; if( !val ){ if( component == "default" ){ return 0; } else { return "#There is no " + component + " on " + GetDefiniteShort() + "."; } } else return 1; }
mixed direct_give_obj_to_liv(object what, object target){ mixed tmp; if( environment() != this_player() ){ return "#You cannot give what is not yours."; } tmp = CanDrop(this_player()); if( tmp != 1 ){ return (tmp || "#You can't drop " + GetDefiniteShort() + "."); } if(target && objectp(target)){ tmp = target->CanCarry(GetMass()); if( tmp != 1 ){ return capitalize(this_object()->GetDefiniteShort()) + " is too heavy."; } } return 1; }