The SetCurrentTitle function was protected in 3.3, meaning it can only be called from a hardware event. This makes it impossible for an AddOn to automatically set your title automatically, but it could be achieved if the AddOn created a button for you to press.
A simpler solution is to just use this macro (taken from Wowpedia [www{dot}wowpedia{dot}org/API_SetCurrentTitle]):
Code:
/run local t={}; for titles=1,GetNumTitles()-1,1 do if IsTitleKnown(titles)==1 then table.insert(t,titles) end; end; local x=random(#t); print("Using title: "..GetTitleName(t[x])); SetCurrentTitle(t[x])