I want to create a new variable (ageT) with the -cond- programming function. Is there any way I efficiently code my repetitive example below?

Code:
set obs 100
gen agegrp = runiformint(1,5)

gen age1 = cond(agegrp==1,0,.)
gen age2 = cond(agegrp==2,2,.)
gen age3 = cond(agegrp==3,4,.)
gen age4 = cond(agegrp==4,6,.)
gen age5 = cond(agegrp==5,8,.)
egen ageT = rowmax(age1 age2 age3 age4 age5)
Thanks