if CreatureRank == 3 then
CostRenew = CostRenew *0.9;
end
It needs to be placed after CreatureRank and CostRenew have been fully established.
My syntax and capitalization may be a little off. It's been a little while since I screwed with the attrcombiner.