Defined generate_loot
Added body code for generate_loot