// legendsystem: Whisky, will update the legendlevel with any login

void update_legends()
{
    int lg_lev;

    if (apply(call,this_player(),"query_exp")   > 2000000 &&
        apply(call,this_player(),"query_age")   >  500000 &&
        apply(call,this_player(),"query_level") <      30)
    {
        lg_lev = (apply(call,this_player(),"query_exp")/500000 - 3);

        if (lg_lev > 150)  
            lg_lev = 150;

// setting the legendlevel here. with query_property("barbarian_legend")
// the current level can be asked afterwards 

        apply(call,this_player(),"add_property","barbarian_legend",lg_lev);
        apply(out,"extra_title",1,this_player());
    }
}

// extra title: will set the title Legend after the login 
void extra_title(object pl)
{
     apply(call,pl,"set_title","Legend");
}

