function CreateBuildCommandButtonEffectBJ takes integer unitId returns commandbuttoneffect
local race r = GetPlayerRace(GetLocalPlayer())
local integer abilityId
if (r == RACE_HUMAN) then
set abilityId = 'AHbu'
elseif (r == RACE_ORC) then
set abilityId = 'AObu'
elseif (r == RACE_UNDEAD) then
set abilityId = 'AUbu'
elseif (r == RACE_NIGHTELF) then
set abilityId = 'AEbu'
else
set abilityId = 'ANbu'
endif
set bj_lastCreatedCommandButtonEffect = CreateCommandButtonEffect(abilityId, UnitId2String(unitId))
return bj_lastCreatedCommandButtonEffect
endfunction