Having an NPC give something to another visible NPC

Right now I7 allows you to give something to someone and vice versa.

Now how about asking an NPC to give something to another NPC who is in the room with you
and the NPC carrying the item or wearing the item ?

Can it be done or not? It doesn’t appear to be right now.

Example:
You are in a room with Bob and Bill.

Bill is carrying a coin and you want Bill to give the coin to Bob.

I tried asking Bill to try giving the coin to Bob but can not figure out the code.

Any help appreciated if it can be done.

A few modifications to the last example I provided should help.

Change the persuasion rule as follows:

Persuasion rule for asking someone to try giving something to someone: persuasion succeeds.

Now it will work for cases of NPC-to-NPC giving instead of just NPC-to-player.

Also add this rule:

Does the player mean asking someone for something when the second noun is enclosed by the person asked: it is likely.

Now NPCs will preferentially give the items they have on them when asked instead of another one in the room.

Sorry Otistdog but it doesn’t work:

[code]"

[GiveTest"

Starter is a room.

a man called Bob is in Starter.
a man called Bill is in starter.

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

Persuasion rule for asking someone to try giving something to someone who is not yourself:
persuasion succeeds.

Does the player mean asking someone for something when the second
noun is enclosed by the person asked: it is likely.

[/code]

Bill carries a rifle.

after examining Bill:
if the rifle is carried by Bill:
say “Bill is carrying a rifle.”;
otherwise:
do nothing.

Output:

Starter
You can see Bob and Bill here.

x bill
You see nothing special about Bill.

Bill is carrying a rifle.

bill, give rifle to bob
Bill is unable to do that.

The new code was intended as a modification to the example provided in your last post. Take a look at the following output and see if you can spot what needs to be changed:

Ok I think I see what needs to be changed:
You need to disable the rule for giving something which is not carried by yourself.

In the program output with actions and rules debugging on, you can see what’s happening in detail:

That shows that the parser correctly understood what was typed, and now it is time for action processing. First, the persuasion rules are checked because it is an action for an NPC. The persuasion rule that was added applies and succeed, so the (1) indicates a child action (Bill giving the rifle to Bob) will now be processed.

It goes through applicable rules looking for a success or failure, and you can see the point at which a rule fails:

The general block giving rule, which is part of the Standard Rules, prevents the action from being carried out. If that rule is not in effect, the action may succeed. There are many ways to disable that rule, but since you seem to want things to be given and received freely in this scenario, the most straightforward way is using a piece from my reply to your previous post:

The block giving rule is not listed in any rulebook.

[

The general block giving rule, which is part of the Standard Rules, prevents the action from being carried out. If that rule is not in effect, the action may succeed. There are many ways to disable that rule, but since you seem to want things to be given and received freely in this scenario, the most straightforward way is using a piece from my reply to your previous post:

The block giving rule is not listed in any rulebook.
[/quote]
OK