My final script is below:
1) Name : Gateway trigger
2) Intended for : Objects
3) Trigger types: Command
4) Numeric Arg : 7
5) Arguments : enter
6) Commands:
Code:
if %actor.room.vnum% != 7798
set original_vnum = %actor.room.vnum%
remote original_vnum %actor.id%
if %cmd.mudcommand% == enter && %arg% /= gateway
%send% %actor% You enter the gateway.
%echoaround% %actor% %actor.name% bravely enters the gateway.
%teleport% %actor% 7798
%force% %actor% look
%echoaround% %actor% %actor.name% just stepped through the gateway.
else
%send% %actor% %cmd% what?!
end
else
%echoaround% %actor% %actor.name% leaves and heads back to reality.
%teleport% %actor% %actor.original_vnum%
%force% %actor% look
%echoaround% %actor% %actor.name% appears out of a magical gateway.
end
W) Copy Trigger
Q) Quit
It works and teleports the player to the room 7798, but when the player types 'enter gateway' the 2nd time teleports them to 7798 again and gives this error:
oteleport target is an invalid room