%setSavedVar()

Aliases%setSavedVar( )
Parametersmixed @entity, string @varName, mixed @value [, string @entityType ]

    Sets the value of the variable that is within the persistent variable
context of the entity. The entity may be a pointer to a room, mob, or
object. It may also be the vnum of a room or a keyword of a mob or object.
A query is made to update the stored value of the variable everytime this
function is called. For this reason it is advisable to not call the
function for intermediate updates during calculations since the query is
resource consuming. The value being set is returned. It is important to
know that there can only be one shared saved variable OF THE SAME NAME for
all mobs, or all objects, or all rooms with the same vnum.

The @entity parameter may also be set to the vnum of a mobile or object.
If this is done then the optional @entityType parameter must be set to
"mobile" or "object" respectively.

Example:

if( %isPc( @n )
{
%setSavedVar( 10005, towerOwner, %getShortName( @n ) )
}
endif