That was actually the first thing I did but couldn't quite figure out what was going on.
Code:
i = take_all_of_item(225); change_coins(20 * i); if (gf(128,29) < 50) { inc_flag(128,29,i); award_party_xp(20 * i,average_level()); }
There's some counter, but it didn't appear to stop rewarding xp after 50 (bottles).