[Package Index | Mudlib Index | Effect Index]
Written by Gototh
.
void add_close_lock_commands(object player)This method adds the lock commands to the specified player. It's been abstracted out of init() to make it easier for some odd situations (like the t-shop).
int pick_unlock(object player)This is called when someone successfully unlocks the object. If there is a trap, and the trap function returns true, the object will not be opened. If the trap function returns false, the object will still be opened even if the trap is sprung.
int query_autolock()This tells us whether an object will lock automatically when closed.
int query_closed()This function tells you whether an object is open or closed. It returns 1 if the object is closed, and 0 if the object is open.
int query_closed_locked_status()This method returns the closed and locked status. The status is 0 if open and unlocked, 1 if locked, 2 if closed and 3 if closed and locked.
int query_difficulty()This returns the difficulty picking the lock on the object. By default it is set to 200 unless it has been changed with set_difficulty().
string query_key()This returns the property of the key that will unlock the object.
string query_lock_trap_func()This returns the name of the function to be called when some attempts to unlock the object.
object query_lock_trap_ob()This returns the object on which the trap function is stored. The trap function is called when someone tries to unlock the the object.
int query_locked()This tells us whether an object is locked. It returns 1 if the object is locked and 0 is the object is unlocked.
int query_open()This function tells you whether an object is open or closed. It returns 1 if the object is open and 0 if the object is closed.
string query_open_trap_func()This returns the name of the function to be called when someone tries to open the object.
object query_open_trap_ob()This returns the object on which the trap function is stored. The trap function is called when someone tries to open the the object.
string query_pick_skill()This returns the name of the skill which is used when determining if the object can be unlocked.
int query_stuck()This tells you whether an object is stuck or not. It will return 1 if the object is stuck, and 0 if the object is not stuck.
int query_transparent()This method returns the current transparent value of the object. A transparent object is one in which you can see the inventory even if it is closed. This is also used for light propogration.
int query_unlocked()This tells us whether an object is unlocked. It returns 1 if the object is unlocked and 0 is the object is locked.
void reset_transparent()This method removes the current objects transparent status. A transparent object is one in which you can see the inventory even if it is closed. This is also used for light propogration.
void set_autolock(int number)This sets the object so that it will lock automatically when closed.
varargs void set_closed(int no_event)This sets the object as being closed. If you are moving objects into the object, make sure that you do not set the object as closed and then try to move the objects in. Move the objects in and then close the object.
void set_difficulty(int i)This sets how difficult the lock on an object is to pick. By default it is set to 200.
void set_key(mixed val)This sets the property of the key that will unlock the object. This can be a string, or a function pointer which will evaluate to a string.
void set_lock_trap(object ob, string func)This sets the function to be called when someone attempts to unlock the object. The function does not have to be in the object's file, and can be specified using the 'ob' paramater. In most cases the function will be stored in the same file, so use this_object() in these cases. The function will be called with a single string parameter of "lock", "unlock" or "pick"
void set_locked()This sets the object as being locked. Remember to set the object as being closed before using this. In most cases you should probably use set_key() to set the key which opens the lock and use set_difficulty() to set the skill level required to pick the lock.
varargs void set_open(int no_event)This sets the object as being open. Note that to find out if an object is open we use query_closed() which will return 0 if the object is open.
void set_open_trap(object ob, string func)This sets the function to be called when someone attempts to open the object. The function does not have to be in the object's file, and can be specified using the 'ob' paramater. In most cases the function will be stored in the same file, so use this_object() in these cases. The function will be called with a single string parameter of "open" or "close"
void set_pick_skill(string str)This sets the skill that will be used when attempting to pick the lock. By default it is set to "covert.lockpick.safes" so it need only be changed if you want to check a different skill.
void set_stuck(int i)This can set an object as being stuck, or make it unstuck. Stuck objects cannot be opened, closed, locked or unlocked. Using set_stuck(1) will make the object stuck, and set_stuck(0) will unstick it.
void set_transparent()This sets the object as being transparent. A transparent object is one in which you can see the inventory even if it is closed.
void set_unlocked()This sets the object as being unlocked.