You can do a lot of thing in g-code
This one does not use max temperature to change filament and make a different wipe (you have to follow the link to Github to get the code)