Skip to main content

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