Exemplo n.º 1
0
void set_wielding( mixed obj ) {
    object weapon;

    if( !obj )
        return;

    if( typeof(obj) == T_STRING ) {
        /* We've got to compile our own copy */
        weapon = clone_object( obj );
        if( weapon ) {
            weapon->setup();
            weapon->move( this_object() );
            do_wield( weapon );
        }
    } else {
        obj->move( this_object() );
        do_wield( obj );
    }
}
Exemplo n.º 2
0
int valid_leave(mixed me, string dir)
{
        int i;
        string room;

        if (dir == "south") {
                i = (int)me->query_temp("back_road");
                i = i + 1;
                if (i >= (random(5) + 5)) {
                    me->set_temp("back_road", 10);
                    return notify_fail("�������ô��ؼ���  �ðɣ�����������Ը������Ҫ�����ܴ�Ĵ���ร���\n�������֮�� �������Ҫ��ȥ�Ļ����������߰ɣ���\n");
                } else {
                        me->set_temp("back_road",i);
                        return notify_fail("�㻹��ؼң����˵ظ���û��·�����ˣ�\n");
                }
        }
        else if (dir == "north") {
                me->delete_temp("back_road");
                return 1;
                }
        else if (dir == "up" || dir == "����")
        {
            if ( (int) me->query_temp("back_road") >= 10 )
            {
                end_death(me);
		me->delete_temp("back_road");
                me->reincarnate();
                if(!stringp(room = me->query("startroom")))
                    room = STARTROOM;
                me->move(room);
                message_vision(
                "ͻȻ���н���һ����⣬�����޷�������ֱ�ӡ�\n����һ��������ɢȥ��һ����Ӱ���֣�$N���ڴ�����͵�ܻ����ˡ�\n",me);
                return notify_fail("���������ػ������ˡ�\n");
            } else
		return notify_fail("���ȥ���� û��ô�򵥣���\n");
        }
        else
        return 1;
}
Exemplo n.º 3
0
void set_wearing( mixed obj ) {
    object armor;

    if( !obj )
        return;

    if( typeof(obj) == T_STRING ) {
        /* We've got to compile our own copy */
        armor = clone_object( obj );
        if( armor ) {
            armor->setup();
            armor->move( this_object() );
            if( !query_slot( armor->query_slot() ) ) {
                do_wear( armor );
            }
        }
    } else {
        obj->move( this_object() );
        if( !query_slot( obj->query_slot() ) ) {
            do_wear( obj );
        }
    }
}