OK, you have a 4 continent itinerary that needs to be made into a legal around the world and then maximized for miles.
This routing would make your trip a valid OWE itinerary, just hitting the cities you identified:
gib-lhr-syd-mel-per-hkg-lax-las-ord-lax-dub-lhr-gib
Note that I skipped DUB on the origination section. You only get 4 segments in Europe and there are no direct flights between DUB-GIB so you need to pass through LHR each time you go between them. This trip is 34812 miles.
Here is an enhanced itinerary that adds segments and miles:
gib-lhr-syd-mel-per-bne-hkg-dps-hkg-nrt-hkg-lax-las-ord-sju-jfk-lax-dub-lhr-gib
This trip comes in at 49987 miles. There are other tweaks that could be done to add a little more mileage if you wanted to give up some of the cities or do some surface segments (e.g. LAX-LAS is a very inefficient use of a OWE segment as is LHR-DUB).