In the context of Opportunistic Ad Hoc Networking paradigms, group communication schemes (Manycast) are difficult to conduct. In this article, we propose a general delivery scheme for Manycast group communications based on mobile code. Our proposal extends network addressing by moving from the static header field paradigm to a software codebased addressing scheme. We allow messages to be delivered using built-in software codes that consider application-defined, context-aware or history-based information. Additionally, we allow messages to carry a delivery state that permits them to perform refined delivery-decision-making methods. As a consequence of this scheme, we have found that new group communication schemes, besides the traditional ones, may be beneficial to improve the network performance and to provide new functionalities to emerging scenarios like intermittently connected networks of heterogeneous physical objects. We present an application of this scheme to solve, following an analytical delivery method, the problem of sending a message to k and only k nodes of a heterogeneous and opportunistic network scenario that fit best a given criterion. We show, using simulations, that our proposal performs better than traditional approaches. Finally, to show that our proposal is feasible, we present an implementation of our proposal in a real Opportunistic Ad Hoc network, a DTN network, compatible with the de facto standard Bundle Protocol.