Trying to use CiviCRM to take memberships for an event
You can alter the price options to hide lower-tier memberships with a custom extension.  This is a more maintainable alternative to editing the code directly, since it will work through an upgrade.

Check the docs for creating extensions and install civix.  Then use the buildAmount hook to edit the price sets.  Some folks think this is easier with the buildForm hook; you may want to try both.