Circumstance:
We had a entrance to this room from the West and we wanted to prohibit entry into any of the other rooms to those who were not Immortals, or in the same clan as the guard mob. We also added a specific entry for the clan master, in this case Garret. The trigger for this prog was ‘exall’ meaning anyone trying to exit the room that the mob is in, will trigger the prog.
Trigger:
exall
Code:
if strarg $s 1 “east”
or strarg $s 1 “north”
or strarg $s 1 “south”
if isimmort $n
say As you wish, divine one.
bow $n
elseif name $n Garret
emote bows deeply to +n, “Master Sloan”
elseif sameclan $n
if sex $n == 2
say Madam, looking lovely this evening
emote bows to $n as they walk past.
else
say Sir, always a pleasure
emote bows to $n as they walk past.
endif
else
sayto $n I’m terribly sorry…there is not admittance beyond these doors, allow me to escort you out.
emote grabs +n firmly by the arm and escorts them westward.
open west
prog force +n west
close west
prog abort
endif
endif
endif
Circumstance:
On the same mob as above we wanted a way that members of the clan could have the guards stand down, and allow entry to anyone who wished to enter. Those who are not members of the clan, but happen to know what to say, will only be told to go away. You will notice inside this prog we purge the current mob, and load another in its place. What we are actually doing is just loading a mob who doesn’t have the prog listed above on it at all, therefore allowing access to anyone. The trigger on this prog is a simple speech trigger with “guests†as the trigger word. This allows the clan member to say something like, “We are expecting guests†and the mob will stand down and allow entry.
Trigger:
Speech
Code:
if clan $n brotherhood
if sex $n == 1
prog mload 2507
sayto $n As you command, sir.
prog goto 3
elseif sex $n == 2
prog mload 2507
sayto $n As you command, ma’am.
prog goto 3
endif
else
sayto $n Right.. I’ll get right on that. In the meantime, why don’t you run along.
emote waves his hand dismissively.
break
endif
endif
Circumstance:
Now that we’ve had the guards stand down, and anyone can now enter the guild headquarters, we need a way to put them back on alert. Again we are only allowing clan members do this, and we will be reloading the original mob. The trigger will also remain speech, but with the trigger word being “alert.â€
Trigger:
Speech
Code:
if clan $n brotherhood
if sex $n == 1
prog mload 2500
sayto $n As you command, sir.
prog goto 3
elseif sex $n == 2
prog mload 2500
sayto $n As you command, ma’am.
prog goto 3
endif
else
sayto $n Right.. I’ll get right on that. In the meantime, why don’t you run along.
emote waves his hand dismissively.
break
endif
endif
Circumstance:
We wanted to be able to take a regular cigar object and light it by typing “light cigar.†All players in the room as well as the character with the cigar should see some indication that this action has been performed. In addition, we want the object to only last a certain amount of time once it has been lit. Since we are taking something that the player has typed in that is abnormal, we will be using the interp trigger.
Trigger:
Interp
Code:
if strarg *1.s “light”
if strarg *2.s “cigar”
prog echoat @n You hold @j in your hand and light it.
prog echoaround @n @n lights the end of @j
prog oset $j timer 20
else
endif
endif
Circumstance:
We would like a player to be able to type in “pluck flower†when they are in the same room as an object designated as a field of flowers. All players in the room as well as the character plucking the flower should see some indication that this action has been performed. After loading the flower object, it must be moved to the characters inventory. Since we are taking something that the player has typed in that is abnormal, we will be using the interp trigger.
Trigger:
Interp
Code:
if strarg *1.s “pluck”
if strarg 2.s “flower”
prog echoat @n You reach down and carefully pick the flower.
prog echoaround @n @n reaches down and carefully picks a flower.
prog oload
prog objtochar $n
prog abort
endif
endif