scripts/idlerpg: fixed idlerpg to handle not having a rank