I7 / Can NPC's order other NPC's around?

I know I can cheat my way around it, but can I have a NPC persuade another NPC to do something? I looked around but just couldn’t find anything about it.

Can you give an example of what you’re trying to accomplish, with respect to player interaction? Or maybe some pseudocode showing how you would like it to work?

Is the idea for the player to be able to enter something like: “>BOB, TELL ALICE TO PUT THE COIN IN THE SLOT”?

Sure, I try making it a bit more clear! What I want is for military NPC’s to issue commands to those of lower rank, so that their hierachy is alive. They issue commands according to their AI or at random. I don’t plan on having the player issue commands to make other people issue commands. (fun idea, though!)

I tried this, but it just don’t work:

Persuasion rule for asking a person to try doing something: 
	persuasion succeeds. 

The Dark Woods is a room.

General Joe is a man in the Dark Woods.
Pete is a man in the Dark Woods.

The Sufficiently Illuminated Woods is a room.
The Sufficiently Illuminated Woods is north of the Dark Woods.

Every turn:
	If a random chance of 1 in 5 succeeds:
		Try General Joe asking Pete to go north; [This line fails!]

For that sort of thing, it seems to me the best thing to do would be to keep track of the person giving the order in a global variable. Then you could use normal “try asking rules” and have things like the persuasion rules check the person asking. Like this (tested in Playfic):

[code]The person ordering is a person that varies.

Persuasion rule for asking Lieutenant Schultz to try doing something:
if the person ordering is General Joe, persuasion succeeds;
say “Lieutenant Schultz does not take orders from [the person ordering].”;
persuasion fails.

The Dark Woods is a room.

General Joe is a man in the Dark Woods.
Lieutenant Schultz is a man in the Dark Woods.
Private Penguin is a man in the Dark Woods.

The Sufficiently Illuminated Woods is a room.
The Sufficiently Illuminated Woods is north of the Dark Woods.

Instead of jumping:
now the person ordering is General Joe;
say “General Joe orders Lt. Schultz to go north.”;
try asking Lieutenant Schultz to try going north;

After examining Schultz:
now the person ordering is Private Penguin;
say “Private Penguin orders Lt. Schultz to go north.”;
try asking Lieutenant Schultz to try going north.

Last every turn: now the person ordering is the player.

test me with “x schultz/ schultz, go north / jump”.[/code]

I tried a bit to make a phrase that allowed you to write “try [person1] ordering [person2] to [do something],” which would automatically set the person ordering to person1and then try asking person2 to do whatever, but I couldn’t work it out. I think it’d be a lot easier with the Editable Stored Actions extension, which would allow you to pass the actor, action name, noun, and second noun as parameters, and set a flag to indicate that the action is a request and should check the persuasion rules (which in turn could check the person ordering variable).

If you did want to enable commands like “Schultz, order Penguin to go north,” my advice would to do what I do whenever I need a parser hack, which is to get Draconis to write an extension that takes care of it.