A flag refers to one or more bits that are used to store a binary value that has an assigned meaning.
Flags are members of a defined data structure, such as a database record, and the meaning of the value contained in a flag will generally be defined in relation to the data structure it is part of. In many cases, the binary value of a flag will be understood to represent one of several possible states or statuses. In other cases, the binary values may represent one or more attributes in a bit field, often related to abilities or permissions, such as "can be written to" or "can be deleted". However, there are many other possible meanings that can be assigned to flag values.
In OpenTibia, flags are used to designate group permissions, accesses and special functions within the game-server.