I swapped the positions of 0 and 1 here. When picking up items from a corpse, the auto-pickup feature works, but the auto-pickup does not work when using the Rogue's Pick Pocket and Pick Lock spells.
function IfShiftAutoloot() if IsShiftKeyDown() then SetAutoloot(0) else SetAutoloot(1) end end