MPEXAMPLES1
Keywords:
MPEXAMPLES1
Another example:
This program could be used on a temple guardian mobile, whose job is to prevent evil characters from entering the sanctuary. Let's assume the exit to the temple is north (exit 0) and the temple antechamber is room 2301
In #MOBILES text file:
M exit 1001 0
Or in the olc mobile edit:
MOBPrograms for [ 1000]:
Number Vnum Trigger Phrase
------ ---- ------- ------
[ 0] 1001 EXIT 0
In #MOBPROGS
#1001
if isgood $n
say Hail!
emote salutes $n.
if carries $n holy
mob transfer $n 2301
else
say If you wish to enter the temple, get a holy symbol.
endif
else
curse $n
say Get lost, you scum!
endif
How this works: The trigger is activated when the player tries to exit north from the room. If the player is of good alignment, the guard will greet the player. However, the guard will not let the player to the temple unless he or she carries a holy symbol. If the player is neutral or evil, the guard will curse and block the way.
More Examples: help mpexamples2
See Also
Mobhelp
Ifhelp
If Checks
Variables
Mob Asound
Mob Echo
Mob Oload
Mob Kill
Mob Flee
Mob Remove
Mob Junk
Mob Purge
Mob At
Mob Goto
Mob Transfer
Mob Force
Mob Cast
Mob Damage
Mob Delay
Mob Cancel
Mob Remember
Mob Forget
Mob Call
Mob Tgive
Mobprogram List
Mobile Programs
Triggers
Operators
Mpsyntax
Mp Building
Mpexamples
Mprog Character Variables
Mpcommands
Checkmoblog
Medit
Vnum
Trigger Hpcnt
Wimpy
Spells
Obj Type Token
Mpexamples1
Mpexamples2
Wizhelp
Mobsay
Mobemote
Olc Command
Building