Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::GeorgeS's Tools

Development::GeorgeS's Tools A forum just for GeorgeS's tools

Reply
 
Thread Tools Display Modes
  #1  
Old 04-14-2009, 02:32 PM
reddogut
Sarnak
 
Join Date: Jun 2007
Posts: 83
Default 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?
Reply With Quote
  #2  
Old 04-15-2009, 09:24 AM
nosfentora
Discordant
 
Join Date: Oct 2004
Location: In a house
Posts: 377
Default

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
Reply With Quote
  #3  
Old 05-25-2009, 10:25 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

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.
__________________
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
  #4  
Old 05-26-2009, 12:07 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

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 =)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:17 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3