Answered on another thread, but repeated here:
This is unfortunately a bit complicated. The easiest way is to have a mob do it. If you don't want the player to see the mob putting it into the container use %at% 0. Below is a trig of a bartender filling a pack of cigarettes using at 0 to not spam players.
Code:
Name: 'Order Beer and Cigs', VNum: [18101], RNum: [ 2184]
Trigger Intended Assignment: Mobiles
Trigger Type: Command , Numeric Arg: 100, Arg list: order
Commands:
if %cmd% == order && %arg% == beer
%send% %actor% %self.name% takes your order and heads for the bar room to get your beer.
wait 100
%send% %actor% %self.name% returns with your beer and places it by you.
%echoaround% %actor% %self.name% returns from the bar room with a beer and places it infront of %actor.name%.
%load% obj 18104
give pint %actor.name%
elseif %cmd% == order && %arg% == cigarettes
%send% %actor% %self.name% takes your order and heads for the bar room to get your cigarettes.
eval cigcount 1
while (%cigcount% <= 20)
%at% 0 %load% obj 18105
eval cigcount %cigcount% + 1
done
%at% 0 %load% obj 18106
%at% 0 put all pack
wait 100
%send% %actor% %self.name% returns from the bar room with your cigarettes and hands them to you.
%echoaround% %actor% %self.name% returns from the bar room with a pack of cigarettes and hands them to %actor.name%.
give pack %actor.name%