************* $MOB TRIGGERS: ************* #Global MTrigger - Random triggers execute even if zone is empty. #Random MTrigger - Executes the trigger every 13 seconds. Trig Arg: Not Used. Trig Narg: % chance it will execute every 13 seconds. Return: Not Used. * #Command MTrigger - Executes trigger when player types a certain command. %cmd%: Name of command that the player issued. %arg%: Any argument to the cmd. Thus, if the player types 'put dagger bag', %cmd% is 'put', and %arg% is 'dagger bag'. Trig Arg: '*' = All commands. Don't do this unless you have a way for the player to escape! or 'command' = Command the player types to execute the trigger. This should be the full command, not abbreviated. Trig Narg: Not Used. Return: 1 if command should be executed normally. If return is 0 or is omitted, the command will not be executed by the MUD. For instance, if you trigger on the command NORTH and return 1, then the trigger will execute, and the player will then walk north. If 0 is returned, the player will not move. * #Speech MTrigger - Executes trigger when player says or talks a certain word or phrase. %speech%: What was said. Trig Arg: Word or group of words used to execute the trigger. '*' matches everything. Trig Narg: '1' means trigger will execute if the word spoken by the player matches any of the words in Arg. '0' means trigger will execute if the entire phrase spoken by the player matches the entire Arg. Return: Not Used. For example, say Trig Arg is 'please help me'. If Narg is 1, and the player says 'help' or 'me' or 'please help' or any other combination of those three words, the trigger will execute. If Narg is 0, the player must say 'please help me' for the trigger to execute. * #Any MTrigger - Any given word or phrase the game echoes to the mobile executes the trigger. Some messages, mostly those that are broadcast to everyone in the world, such as gossips or weather changes, will not be be triggered by this. Notice there is no %actor% here, since you are triggering on pure text output only. Trig Arg: Word or phrase to execute the trigger. Trig Narg: Not Used. Return: Not Used. * #Death MTrigger - Executed when a certain mobile dies. If this refers to itself, you may ONLY refer to the mobile as long as its done instantly, without any WAITs before it. This is because to the game, the character no longer exists, and a mobile executing a trigger when the mobile doesn't exist will crash the game! For example, say you want to load a key on a certain mob when it dies. You would have to put it as the very first line in the trig, as MLOAD OBJ 312 or whatever. You can issue more commands after that, but there cannot be any WAITs in the trigger! For a wider range of things you can do when a mob dies, use a room death wtrigger, with the mob's vnum as the NARG. %victim%: Victim who was just killed. Trig Arg: List of mobile vnums that must die in the mob's room to execute the trigger. For example, if Trig Arg is 126 4001 807, then if anything with either of those 3 vnums dies in the room, the trigger is executed. If omitted, trigger will default to the mob, and the restrictions above must be followed! If '*' it will trigger when anything dies in the mob's room. Trig Narg: Chance the mob will execute the trigger. Return: Not Used. * #Greet MTrigger - Mob executes this trigger when something enters the room he is in. If he cannot see the person who walked in, or is otherwise unresponsive, the trigger will not execute. %direction%: Direction the person typed to enter the room. Trig Arg: Not Used. Trig Narg: Chance the mobile will execute the trigger. Return: If 0, the person who just walked in will be pushed back into the room he came from. If 1, he is allowed to remain in the room. * #Hunt MTrigger - Mob executes this trigger whenever it finishes hunting whatever it has previously been told to hunt. If you want your mobile to be able to hunt more than 1 thing, and do something different for each one, just create 1 Hunt MTrigger, and differentiate them in the code. Trig Arg: Not Used. Trig Narg: Not Used. Return: Not Used. For example, you tell your mob to hunt room #101, but you also want him to be able to hunt Bombatta (Vnum 114) at some other time. In your code, you would put: if %self.room% == 101 else if %self.inroom(114)% endif Notice the actual MHUNT command would have been in another trigger. This is only what happens when the mobile finishes hunting. * #Entry MTrigger - Mob executes this trigger whenever the mobile walks into a new room. Compare this to Greet MTrigger, which is executed when something ELSE enters his room. Trig Arg: Not Used. Trig Narg: Chance the mobile will execute the trigger. Return: If 0 is returned, the mobile will be pushed back into the room he came from. If 1, he is allowed to remain in the room. * #Receive MTrigger - Mob executes this trigger whenever he is given something. Trig Arg: Not Used. Trig Narg: VNum of the object that will execute the trigger. If this is -1, the trigger will be executed if ANY object is given to the mobile. If you choose to do it this way, include a line in the actual script, before the code to execute, such as: if %object.vnum% == 2407 This is actually preferred, since you can put an 'else' statement, saying what will happen if the vnum is NOT 2407, such as: if %object.vnum% == 2407 else say This is not the right object! give %object.name% %actor.name% end Thus, the mob will return the object. Doing it the other way, putting the VNum in the Narg, causes the mobile to simply keep the object, which is probably not what you want to happen. Return: If 0 is returned, the item will be given back to the person who did the giving. If 1, the mobile will keep the item. * #Fight MTrigger - Mob executes this trigger before each round of fighting. Trig Arg: Not Used. Trig Narg: Chance the mobile will execute the trigger. Return: Not Used. * #HitPrcnt MTrigger - Mob executes this trigger after each round of fighting, if his hit points get below a certain amount. Trig Arg: Not Used. Trig Narg: Percent of hit points the mob has to have, or below, for the trigger to execute. Return: Not Used. For example, if Trig Narg is 26, then the mob will execute the trigger when his hit points become equal or less than 26% of his total hit points. * #Violence MTrigger - Mob executes this trigger everytime the mob hits a target. Trig Arg: Not Used. Trig Narg: Percent of time the trigger executes. Return: return 0 to allow the violence to occur. * #Bribe MTrigger - Mob executes the trigger when given a specified amount of gold. %amount%: Amount of gold given to the mob. Trig Arg: Not Used. Trig Narg: Amount of gold to execute the trigger. Return: Not Used. * #Load MTrigger - Mob executes this trigger whenever it is loaded, either by a zone reset, or if it is created by magical means (Animate dead, for example), or Immortal means with the LOAD command. Trig Arg: Not Used. Trig Narg: Chance the mobile will execute the trigger. Return: Not Used. * #Greet Memory MTrigger - This is created by combining the GREET mtrigger with the MEMORY mtrigger. Mobile will execute this trigger whenever someone in its memory enters the room the mobile is in. Trig Arg: Not Used. Trig Narg: Chance the mobile will execute the trigger. Return: Not Used. * #Entry Memory MTrigger - This is created by combining the ENTRY mtrigger with the MEMORY mtrigger. Mobile will execute this trigger whenever it walks into a new room, and sees someone that it remembers. Trig Arg: Not Used. Trig Narg: Chance the mobile will execute the trigger. Return: Not Used. * #Social MTrigger - Mob executes this command whenever someone in the room performs an action. %social%: Name of social that was executed, such as 'chuckle' or 'bow'. %target%: Object or char the social was directed toward. Trig Arg: Social name or list of names to execute on, such as flex, or lick worship fume gag. If omitted or '*', it will trigger on every social. Trig Narg: Chance the mobile will execute the trigger. Return: If 0 the person will not be allowed to do the social. If 1, the person will be allowed to do it. * #Auto MTrigger - Mob executes this command whenever something executes the 'trigger' command in its script file. This is a special trigger, which doesn't actually trigger on a specific game event. Rather, you can use the TRIGGER command to automatically execute this trigger from a mob's script file. For example, suppose you want room 117 to wecho Hi whenever someone gives something to the mob. First, create an Auto MTrigger, and type wecho Hi as the script. Suppose the vnum of the Auto Mtrig is 148. Then, in the Receive MTrigger for the mob, you might type: if %object.vnum% == 101 trigger %locate.room(117)% 148 end Thus, the format for the trigger command is trigger Trig Arg: Not used. Trig Narg: Not used. Return: Not used. **************** $OBJ TRIGGERS: **************** * #Global OTrigger - Random triggers execute even if zone is empty. You must also select RANDOM trigger for this to work. * #Random OTrigger - Executes the trigger every 13 seconds. Trig Arg: Not Used. Trig Narg: % chance it will execute every 13 seconds. Return: Not Used. * #Command OTrigger - Executes trigger when player types a certain command. %cmd%: Name of command that the player issued. %arg%: Any argument to the cmd. Thus, if the player types 'put dagger bag', %cmd% is 'put', and %arg% is 'dagger bag'. Trig Arg: '*' = All commands. Don't do this unless you have a way for the player to escape! or 'command' = Command the player types to execute the trigger. This should be the full command, not abbreviated. Trig Narg: Bitvector stating where the object must be to execute the trigger. The values are 1 for Equipment, 2 for Inventory, and 4 for Room. If you want more than one value, simply add them up. For instance, if you want the object to be in someone's inventory or sitting in the room, but NOT in their equipment to execute the trigger, you would put 2 + 4 = 6 in the Trig Narg. If you wanted it to be only in their equipment to execute the trig, then put 1. If anywhere is valid, then put 1 + 2 + 4 = 7. Return: 1 if command should be executed normally. If return is 0 or is omitted, the command will not be executed by the MUD. For instance, if you trigger on the command NORTH and return 1, then the trigger will execute, and the player will then walk north. If 0 is returned, the player will not move. * #Timer OTrigger - Object executes this trigger when its timer reaches 0. The object timer is set in the script itself with the statement OTIMER #, where # is the number of ticks before the timer reaches 0. Trig Arg: Not Used. Trig Narg: Not Used. Return: Not Used. * #Death OTrigger - Object executes this trigger if it is sitting in a room where someone dies. Trig Arg: List of mob vnums, separated by spaces, whose death executes the trigger. Trig Narg: Chance the object will execute the trigger. Return: Not used. * #Open OTrigger - Object executes this trigger if it is opened. Trig Arg: Not Used. Trig Narg: Chance the object will execute the trigger. Return: If 0 is returned, the object will remained closed. Anything else, the object will open normally. * #Get OTrigger - Object executes this trigger when it is picked up from the room or extracted from a container. Trig Arg: Not Used. Trig Narg: Chance the object will execute the trigger. Return: If 0, the object will be put back in the room or inside the container. If 1, the character will be allowed to take the object. * #Drop OTrigger - Object executes this trigger whenever it is dropped or put inside of something. Trig Arg: Not Used. Trig Narg: Chance the object will execute the trigger. Return: If 0, the object will be given back to the player. If 1, the player will be allowed to let go of the object. * #Give OTrigger - Object executes this trigger when it is given to someone. Trig Arg: Not Used. Trig Narg: Chance the object will execute the trigger. Return: If 0, the object will be given back to the person who typed 'give'. If 1, the player will be allowed to give the object away. * #Wear OTrigger - Object executes this trigger when it is worn. Trig Arg: Not Used. Trig Narg: Not Used. Return: If 0, the object will fall back into the player's inventory. If 1, the player will be allowed to wear the object. * #Put OTrigger - Object executes this trigger whenever something is put inside of it. Trig Arg: List of object vnums that the trigger will execute on. If omitted or '*', trigger will be executed when anything dies in the room. Trig Narg: Chance the object will execute the trigger. Return: If 0, remove the object from the container. If 1, allow the object to be placed into the container. %cont%: The container object. %object%: The object going inside the container. * #Remove OTrigger - Object executes this trigger when it is removed. Trig Arg: Not Used. Trig Narg: Not Used. Return: If 0, the object will latch itself back onto the player. If 1, the player will be allowed to remove the object. * #Load OTrigger - Object executes this trigger whenever it is loaded, either by a zone reset, or if it is created by magical (Create food, for example), or Immortal means with the LOAD command. Trig Arg: Not Used. Trig Narg: Chance the object will execute the trigger. Return: Not Used. * #Auto OTrigger - Obj executes this command whenever something executes the 'trigger' command in its script file. Read the help for Auto MTrigger. ************** $ROOM TRIGGERS: ************** * #Global WTrigger - Random triggers execute even if zone is empty. You must also select RANDOM trigger for this to work. * #Random WTrigger - Executes the trigger every 13 seconds. Trig Arg: Not Used. Trig Narg: % chance it will execute every 13 seconds. Return: Not Used. * #Command WTrigger - Executes trigger when player types a certain command. %cmd%: Name of command that the player issued. %arg%: Any argument to the cmd. Thus, if the player types 'put dagger bag', %cmd% is 'put', and %arg% is 'dagger bag'. Trig Arg: '*' = All commands. Don't do this unless you have a way for the player to escape! or 'command' = Command the player types to execute the trigger. This should be the full command, not abbreviated. Trig Narg: Not Used. Return: 1 if command should be executed normally. If return is 0 or is omitted, the command will not be executed by the MUD. For instance, if you trigger on the command NORTH and return 1, then the trigger will execute, and the player will then walk north. If 0 is returned, the player will not move. * #Speech WTrigger - Executes trigger when player says or talks a certain word or phrase. %speech%: What was said. Trig Arg: Word or group of words used to execute the trigger. Trig Narg: '1' means trigger will execute if the word spoken by the player matches ANY of the words in Arg. '0' means trigger will execute if the ENTIRE phrase spoken by the player matches the ENTIRE Trig Arg. Return: Not Used. For example, say Trig Arg is 'please help me'. If Narg is 1, and the player says 'help' or 'me' or 'please help' or any other combination of those three words, the trigger will execute. If Narg is 0, the player must say 'please help me' for the trigger to execute. * #Death WTrigger - Room executes trigger if a mobile with the given vnum dies in the room. %actor%: Character who killed the victim. %victim%: Victim who was just killed. Trig Arg: List of mobile vnums that must die in the room to execute the trigger. For example, if Trig Arg is 126 4001 807, then if anything with either of those 3 vnums dies in the room, the trigger is executed. If omitted or '*', trigger will be executed when anything dies in the room. Trig Narg: Chance the room will execute the trigger. Return: If 0 is returned, the death cry produced by the mobile will not be heard. If 1, then it will be heard normally. * #ZoneReset WTrigger - Room executes trigger if it is in a zone that has just been reset. Trig Arg: Not Used. Trig Narg: Chance the room will execute the trigger. Return: Not Used. * #Enter WTrigger - Room executes the trigger whenever someone enters it. %direction%: Direction name the person walked in from. Thus, if the person types 'west' and walks into the room, %direction% will the 'east'. Trig Arg: Not Used. Trig Narg: Chance the room will execute the trigger. Return: If 0, the player will be pushed back into the room they came from. If 1, the player will be allowed to stay in the room. * #Drop WTrigger - Room executes the trigger whenever someone drops something in it. Trig Arg: Not Used. Trig Narg: Chance the room will execute the trigger. Return: If 0, the object will be forced back to the player who dropped it. If 1, the object will remain on the ground. * #Auto OTrigger - Room executes this command whenever something executes the 'trigger' command in its script file. Read the help for Auto MTrigger.