The delusion of if there is no self, then there is no point to do anything is mainly due to that you are currently having the intellectual view of there is no self. Whereas deep down, you still believe in a self. When there is that self view, kamma still works very well. Thus your actions have consequences.
In terms of 5 aggregates way to see things, the 4 aggregates of form, consciousness, feelings, perception are the receiver of the results of kamma, but the mental factors lead by volition is the creator of kamma. Together the 5 aggregates which we commonly think of as a self is actually not worth calling a self due to them being impermanent, thus subject to suffering. Regardless, as long as the realization that there is no self had not been attained, kamma still works to its full extend. Once stream winner is attained, the kamma to go to lower realms become defunct. Once arahanthood had been attained, one can no longer produce kamma. Results of past kamma can still happen until the final death, but kamma with regards to all future lives becomes defunct.
So actions still plays a very important role as it can even affect the results which happens to you even if you attain to arahanthood. Of course, after you attained to arahanthood, you don't think in any sense "I attained to arahanthood" as the concept of self becomes totally known as a delusion, a story.
So to return to the details of your question, people who are not enlightened, do stuffs having the delusion of self, thus the motivation can be driven by greed, hatred, delusion, or non greed, non hatred, non delusion. Take note that a delusion of self is needed to drive greed, hatred, delusion. If there is a self, I want it to be happy, so I go after things which makes it happy (greed) and avoid things which makes it unhappy (hatred).
Arahants are not immobile people do does nothing even after realizing nonself fully. They can be motivated to do stuffs by generosity, loving-kindness, compassion, wisdom, etc. It's also pure altruism as there is no concept that the results of these good deeds will come back to the arahant, as indeed an arahant cannot produce kamma, so any good deeds he does, does not brings results (back to him). And he is incapable of unwholesome deeds as the roots for them are totally eradicated.