You sound like you're thinking only short term, and only in terms of keeping yourself busy. That's not how motivation works, unfortunately.
With that kind of approach you never see how your tasks fit into the bigger picture, so everything that comes along is more attractive because it's new. Discipline demands a plan.
Choose a goal that will take you 5 years to complete. Something concrete. Something like "build my own app" or "be an early employee at a hot start-up" or something else that takes multiple steps, and something you feel extremely excited about achieving.
Then outline those steps and get into the first one now. Then when a new opportunity comes along you can evaluate it by saying "is that a better 5 year goal?" If it isn't, "does that get me closer to my 5 year goal?" If not, ignore it and keep on keepin' on.
Voila: discipline through motivated planning.