View Single Post
  #5  
Old 08-18-2009, 01:04 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

It's a bitmask.

Here's an excerpt from the Wiki:
Quote:
races

* What race or races can use the item. Rememeber to add up the results.
o 0 = None
o 1 = Human
o 2 = Barbarian
o 4 = Erudite
o 8 = ELF
o 16 = HIE
o 32 = Dark Elf
o 64 = HEF
o 128 = Dwarf
o 256 = Troll
o 512 = Ogre
o 1024 = HFL
o 2048 = Gnome
o 4096 = Iksar
o 8192 = Vah Shir
o 16384 = Froglok
o 32768 = Shroud
* These are combined values, but with special meaning:
o 32767 = Any/All
o 65535 = Usually a container
So, using the bitwise operator AND (&), running this query will make all items usable by Gnomes:

Code:
UPDATE items SET races = races & 2048
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote