EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::GeorgeS's Tools (https://www.eqemulator.org/forums/forumdisplay.php?f=674)
-   -   Search Items table (https://www.eqemulator.org/forums/showthread.php?t=27890)

reddogut 04-14-2009 02:32 PM

Search Items table
 
I am trying to think of a way to search the items table for gear for a specific race or class only. For example, I want to be able to search the items table for Ranger or Warrior only gear.... or Froglok only gear.

Any ideas?

nosfentora 04-15-2009 09:24 AM

Code:

SELECT * FROM Items WHERE Classes=<calculate bitmask>
SELECT * FROM Items WHERE Races=<calculate bitmask>

or a combination of the above, where the bitmask to be is taken from the Wiki:

Code:

classes
  • The class or classes can use the item. Remember to add up the results.
    •     0 = None

    •     1 = Warrior

    •     2 = Cleric

    •     4 = Paladin

    •     8 = Ranger

    •     16 = Shadow Knight

    •     32 = Druid

    •     64 = Monk

    •     128 = Bard

    •     256 = Rogue

    •     512 = Shaman

    •     1024 = Necromancer

    •     2048 = Wizard

    •     4096 = Magician

    •     8192 = Enchanter

    •     16384 = Beastlord

    •     32768 = Berserker

    •     65535 = Any/All


  • IE, Monk (64) + Shaman (512) = 576


Code:

races
  • What race or races can use the item. Rememeber to add up the results.
    •     0 = None

    •     1 = Human

    •     2 = Barbarian

    •     4 = Erudite

    •     8 = ELF

    •     16 = HIE

    •     32 = Dark Elf

    •     64 = HEF

    •     128 = Dwarf

    •     256 = Troll

    •     512 = Ogre

    •     1024 = HFL

    •     2048 = Gnome

    •     4096 = Iksar

    •     8192 = Vah Shir

    •     16384 = Froglok

    •     32768 = Shroud


  • These are combined values, but with special meaning:
    •     32767 = Any/All

    •     65535 = Usually a container




AndMetal 05-25-2009 10:25 PM

You can also use bitwise AND (&):

Code:

SELECT * FROM items WHERE races & '512' AND classes & '512'
This would select all items that can be used by an Ogre Shaman, not just items that can only be used by an Ogre Shaman.

Hope this helps.

ChaosSlayerZ 05-26-2009 12:07 AM

I am not sure what this question doing in George's Tools forum - unles the poster wanted to know how to find froglok only items using George Item editor =)

In editor you click ADVANCED in top left conner and select desired race at the buttom

PS. We may want to consider creating a separate "SQL Help" forum =)


All times are GMT -4. The time now is 07:13 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.