Name: 'Push Ball & Touch Stone'
Trigger Intended Assignment: Rooms
Trigger Type: Command , Numeric Arg: 100, Arg list: touch push
Commands:
if %cmd% == push && 'ball /= '%arg%
%send% %actor% You push the ball and reveal a hole in the ground underneath it leading into a cave.
%door% %self.vnum% north room 4500
%echoaround% %actor% %actor.name% puts all of %actor.hisher% weight behind the ball and manages to move it.
elseif %cmd% == touch && 'stone /= '%arg%
%send% %actor% You reach forward and touch the stone, but suddenly feel as if you shouldn't be here and are perhaps invading.
%load% mob 500
%force% %self.people% mkill %actor%
else
%send% %actor% %cmd% what?!?
end
It can b any command. the arg list determines what command triggers the script. It does not have to be a real command, but if it is it will over-ride the actual command unless you add a return 0 to it, in such a case the script will fire, and then the command will be passed to the MUD (unless you add a return 0 near the top of the script and then wait a deci-second (or more) before the rest of the script continues to let the MUD do the normal command first. By using %arg% you can also make 'touch ball' and 'touch rug' do different things in the same room. The arg list can also be several words long like shown below (Example A) or be 100% open ended and trigger upon any command like shown in Example B.
Example A: