>
In order to give the builder some more control over what happens when an item is restricted, the restrict functions have been redone in DIL. Hopefully the following document will help you in understanding how the new restrict functions work. It is strongly recommended that you use these special DIL functions rather than their corresponding SFUN functions as the SFUN restrictions are not being updated as frequently.
What follows are the functions that are contained within the function.zon. This is an actual zone in the mud that contains only DIL functions. If you feel that there is a necessary function missing from this zone please e-mail Whistler [Ken Perry] at whistler@blinksoft.com
Note that if read straight through this document is very repetitive. The reason for all of the duplicate text is so that builders will be able to look up a single function without having to refer to other parts of the doc. Hopefully this format will be easier to use.
Example call:
At the end of this document under the header :Example Act DILs: you will find example acts for all DIL restrict functions.
Example call:
At the end of this document under the header :Example Act DILs: you will find example acts for all DIL restrict functions.
Example call:
At the end of this document under the header :Example Act DILs: you will find example acts for all DIL restrict functions.
Example call:
At the end of this document under the header :Example Act DILs: you will find example acts for all DIL restrict functions.
Example call:
At the end of this document under the header :Example Act DILs: you will find example acts for all DIL restrict functions.
Example call:
At the end of this document under the header :Example Act DILs: you will find example acts for all DIL restrict functions.
Example call:
At the end of this document under the header :Example Act DILs: you will find example acts for all DIL restrict functions.
Example call:
At the end of this document under the header :Example Act DILs: you will find example acts for all DIL restrict functions.
Example call:
At the end of this document under the header :Example Act DILs: you will find example acts for all DIL restrict functions.
Example call:
At the end of this document under the header :Example Act DILs: you will find example acts for all DIL restrict functions.
Example call:
At the end of this document under the header :Example Act DILs: you will find example acts for all DIL restrict functions.
Each of the following DILs are just examples of possible personal builder DILs. An experienced coder will find they can do all kinds of stuff inside the restrict function using these DILs but they were mainly made so that builders could design their own acts. For example you don't need to have the standard:
Have fun with your acts it will make the items a lot more fun.
/* Quest, guild and anti guild restricts. */ dilbegin quest_act(); code { act ("Your $2n burns your Ass and you drop it to the ground.", A_ALWAYS,self.outside,self,null,TO_CHAR); act ("$1n's $2n burns $1m and $1e drops it to the ground.", A_SOMEONE,self.outside,self,null,TO_REST); act ("Being in the right guild might help.", A_ALWAYS,self.outside,null,null,TO_CHAR); return; } dilend /* This code will work for alignent restrict. */ dilbegin ali_act (max_ali:integer,min_ali:integer); code { act ("Your $2n burns your Ass and you drop it to the ground.", A_ALWAYS,self.outside,self,null,TO_CHAR); act ("$1n's $2n burns $1m and $1e drops it to the ground.", A_SOMEONE,self.outside,self,null,TO_REST); if (self.outside.alignment>MAX_ALI) { act ("You are to good to use $2n", A_ALWAYS,self.outside,self,null,TO_CHAR); } else { act ("You are to evil to use $2n", A_ALWAYS,self.outside,self,null,TO_CHAR); } return; } dilend /* This is an example act of level restrict */ dilbegin level_act (amount:integer); code { act ("Your $2n burns you and you drop it to the ground.", A_ALWAYS,self.outside,self,null,TO_CHAR); act ("$1n's $2n burns $1m and $1e drops it to the ground.", A_SOMEONE,self.outside,self,null,TO_REST); act ("You are not high enough level to use $3n. $2t "+ "levels needed to use it.", A_ALWAYS, self.outside, itoa (amount), self, TO_CHAR); return; } dilend /* This is an example act for race restrict */ dilbegin race_act (); code { act ("Your $2n burns your Ass and you drop it to the ground.", A_ALWAYS,self.outside,self,null,TO_CHAR); act ("$1n's $2n burns $1m and $1e drops it to the ground.", A_SOMEONE,self.outside,self,null,TO_REST); act ("If you weren't so ugly your mom might not run to.", A_ALWAYS,self.outside,null,null,TO_CHAR); return; } dilend /* This is an example act for ability restrict */ dilbegin abi_act (min_abi:integer); var amount:integer; code { act ("Your $2n burns you and you drop it to the ground.", A_ALWAYS,self.outside,self,null,TO_CHAR); act ("$1n's $2n burns $1m and $1e drops it to the ground.", A_SOMEONE,self.outside,self,null,TO_REST); amount:=min_abi-activator.abilities[ABIL_STR]; act ("You are not strong enough to use $3n. $2t strength needed "+ "to use it.", A_ALWAYS, self.outside, itoa (amount), self, TO_CHAR); return; } dilend /* skill spell weapon example act */ dilbegin ex_act (min_abi:integer); var amount:integer; code { act ("Your $2n burns you and you drop it to the ground.", A_ALWAYS,self.outside,self,null,TO_CHAR); act ("$1n's $2n burns $1m and $1e drops it to the ground.", A_SOMEONE,self.outside,self,null,TO_REST); amount:=min_abi-activator.abilities[SKI_STEAL]; act ("You are not skilled enough to use $3n. $2t skill "+ "needed to use it.", A_ALWAYS, self.outside, itoa (amount), self, TO_CHAR); return; } dilend /* This is an example act for the sex restrict function. */ dilbegin sex_act (); code { act ("Your $2n burns you and you drop it to the ground.", A_ALWAYS,self.outside,self,null,TO_CHAR); act ("$1n's $2n burns $1m and $1e drops it to the ground.", A_SOMEONE,self.outside,self,null,TO_REST); act ("If you use that you might lose something you hold dear!", A_ALWAYS,self.outside,null,null,TO_CHAR); return; } dilend