Ejemplo n.º 1
0
Archivo: give.c Proyecto: Elohim/FGmud
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;
}
Ejemplo n.º 2
0
Archivo: give.c Proyecto: Elohim/FGmud
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;
}