When you enter the Bean challenges, the best way to acquire the most beans is to take the upper walkways first, because if you fall off, you won't be able to get back up. Also, if you have the right spells, you can get past certain obstacles, but try to get the beans on the main path first.
NOTE: This involves editing a game file so create a backup copy of the file beforehand.
Use a text editor to open the defuser.ini file in the drive letter:\ea games\harry potter and the chamber of secrets\system directory. Locate the following text:
Change the fDamageMultiplier values to something between 0.0 and 1.0 to take far less damage than you can ever imagine!
In the PC version, when you go into Moaning Myrtle's bathroom (the third floor in the moving staircase area) for the first time, cast Flipendo on the toilet nearest to you on the right as you enter the room with the toilets. To get to this, you must wait for the stall opposite of it to open, then jump onto the toilet and across the top of the stall and jump to the other side. Cast Flipendo on the toilet and a gnome will come out. Throw the gnome so it is between Harry and the toilet and cast Flipendo on the gnome. The spell should hit the toilet and another gnome should come out. Do this as many times as you can, throwing gnomes out of the stall as it gets crowded. Don't worry about beans, you can hit the gnomes with Flipendo to get them back. Once you have plenty of gnomes, put one gnome in each closed stall in the same position as before for unlimited everything else. The gnomes can also be positioned in various other places around the staircase area and the same trick can be used there, too, giving you unlimited rewards every time you put a gnome behind an object that yields a reward (even if you've already collected the reward before) via Flipendo. This is an easy way to obtain nearly unlimited health if you enough collect Wiggentree bark and Flobberworm mucus from the toilet glitch. Unlimited beans are also not hard to collect using this glitch. Note that the toilet glitch usually only works once, so get as many gnomes and other items from the toilets as you can the first time. Also note that if you throw the gnomes into a corner, they usually won't get back up so you can keep them there forever.
to easily win the duels, you do RICTUSEMPRA when you start adn then you cast EXPELLIARAMUS when the person you are dueling also casts it. The more times it bounces back and fourth, the more damage it will do. As it bounces more times you will also have to press Alt/Mouse button quicker. Only cast the RICTUSEMPRA the first time when you start the duel after that let the opponant attack and just use EXPELLIARAMUS even when your opponant uses MIMBLE WIMBLE as it will still take of Health. This way you can get as many Beans as needed very quickly
Go to Lockhart's classroom when class is NOT in session. Jump Harry up onto Lockhart's desk so that Harry is standing on top of it. Then jump up on to Lockhart's chair. Harry should almost be level with, and facing, the balcony. Jump Harry up so he climbs up on to it. You will get a total of sixteen beans on the balcony
Keep dueling the slytherin and get 200 beans each time. If you are about to loose all your health just keep firing Rectusempra and some of them will hit him.