Background to this is, you look at the tarot card to see the meaning. If the card is reversed, the meaning changes. The trigger verifies if the card is rightsideup or upsidedown and gives the meaning of the card. I've expanded it a bit to use LOOK CARD or EXAMINE CARD.
Code:
Name: 'Look Card', VNum: [21102], RNum: [ 2582]
Trigger Intended Assignment: Rooms
Trigger Type: Command , Numeric Arg: 100, Arg list: *
Commands:
* Look Trigger Written by Fizban - June 06 2013
* This trigger changes the meaning of the card for reverse.
* If there is no argument, just look.
if !%arg%
return 0
halt
else
* The ~ anchors the comparison to the front of the word.
* rd /= card but ~rd is not a part of ~card while ~c is.
set arg ~%arg%
if ~card /= %arg%
if %cmd.mudcommand% == look || %cmd.mudcommand% == examine
* Check for the reverser. If it is in the room, give
* one meaning. If it is not, give the other.
eval rev %%findobj.%self.vnum%(21199)%%
if %rev% < 1
%force% %actor% look card
else
%force% %actor% look reverse
end
end
* to allow laughing or other l commands
else
return 0
end
end
This uses the look trigger that Fizban wrote for me and has tried to use his argument anchor. The anchor works in that LOOK ARD and LOOK RD don't fire. LOOK C will always default to LOOK CARD even if you want to LOOK CANDLE but LOOK CAN works for that.
However, I think I've gotten something wrong because it forces look to become look ~ and considers it part of look ~card. This forces a return 0 in two places. How do I fix this, please? I could actually switch to full name only (look card) but that's not as much fun
.
Please point out any errors or inefficiencies.