G400 for sure! Feels much better in hand than MX518, mainly because the top finish is "rough plastic" (while MX is glossy) which feels very nice in hand. Also you can change Hz from your drivers so you don't need to fuck with any hz programs.
As for which of the two left, g400 and mx518, to choose, well, you should take into account some considerations,
- difference in dpi (mx518 max 1800 - g400 max 3600); in case your care for those (high) numbers
- the mx518 is pretty old thus the sensor may be still good but maybe not what you expect it to be. Still I would take a peek at those problems #5 refers to
To sum up it is up to you to choose an old (usually considered as rock solid) mouse or its "newer" version. I would advice you to check the characteristics (and potential problems, again as #5 has mentioned but also search for those of mx518) of each and see which of them fits you better.
Last but not least, once you hace check those characteristics of course compare the price in case you have a tight budget.