Board Thread:Suggestions forum/@comment-25612015-20151129150230/@comment-25612015-20151203000554

HubToo wrote:

What I programmed on my server is:


 * nobles attract commoners of their faction. For each in-real-life week where they have been active, they receive spawn eggs of their faction: 1 / barons, 2 / counts, 4 / dukes, 8 / princes and 10 / kings. They can place them as they wish, but these are not hired units (command-able), just population


 * they can combine 9 eggs on a crafting table to get the corresponding chieftain/commander/captain/warlord/lord


 * they can use 8 eggs plus a certain item to get the various merchants of their faction

But I did nothing for other NPCs (warriors) that they can hire through an officer... After some struggle, I succeeded tonight with the first part.

I was initially using the /give command but that only worked with connected players.

So I implemented some functions to test if a given player is online, then /give the eggs to him, else add the eggs in his offline inventory.

The second and third parts were only a matter of configuration, so they were easy.

I have yet to document the recipes I designed for merchants and the whole thing will be activated on hARDA this sunday (the day of the Lords).