Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-23-2009, 09:07 PM
Shadow-Wolf
Dragon
 
Join Date: Oct 2003
Posts: 511
Default Required items

Hello folks, need a little help. It's been forever since I've done anything eqemu related and I would like some info if anyone has it. What I am wanting to do is simple, I want to wipe my item table clean except for all items required for functioning spells and other misc required items. If anyone has a list of these items I would greatly appreciate you sharing it. If not I will look my self, I am simply trying to not reinvent the wheel here. Thank you for your time.
__________________
How about the power to kill a yak from 200 yards away...WITH MIND BULLETS! thats telekinesis kyle.
Reply With Quote
  #2  
Old 08-23-2009, 09:59 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by Shadow-Wolf View Post
What I am wanting to do is simple, I want to wipe my item table clean except for all items required for functioning spells and other misc required items.
Not exactly sure what you mean by this. No items are required for anything. Though, if you only want certain items available on your server, you might be better off wiping out the loot tables and creating new ones with the select items you want to have available. There isn't much need to clear out the items table as there are thousands of IDs still available that you can create items in.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 08-23-2009, 10:11 PM
Shadow-Wolf
Dragon
 
Join Date: Oct 2003
Posts: 511
Default

What I mean are items like bone chips and peridots, ttems that spells consume when they are used. I want to wipe the item database and build a new one with custom items organized in a way that makes development of a custom world easier for me. I just don't want to bother with the spell files therefore I want to leave the items consumed by them.
__________________
How about the power to kill a yak from 200 yards away...WITH MIND BULLETS! thats telekinesis kyle.
Reply With Quote
  #4  
Old 08-24-2009, 05:48 AM
drakelord
Hill Giant
 
Join Date: Nov 2002
Location: NC, USA
Posts: 182
Default

Quickest way I can think of is to make a list of all the item id's required by the spells, then just run a query in your choice of MySQL browser selecting for any entries with those ids. Back those up, wipe the table, then restore, and you have yourself an empty table.
__________________
Hmm.
Reply With Quote
  #5  
Old 08-24-2009, 04:10 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,450
Default

Simpler way is to use excel or a similar program to make a query for you. You can sort by reagent ID in navicat, and copy-paste it into excel. Something like
Code:
"Select * from items where id = (id from navicat) and
id = | (next id from navicat) | and"
with the | being a delimiter for the cell. Then, you can copy-paste into navicat, run the query, and use navicat's export tools to export all of the item IDs that are used by the spells table, and then empty the table (also using navicat) and import the SQL you also exported. Try that, see if it works.

If all else fails look into JOIN queries.

Protip: Navicat's ordering views + Excel = heaven.
Reply With Quote
  #6  
Old 08-25-2009, 01:26 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

Please use a simplied sql query rather than a long string

Code:
SELECT name  from items i where id IN (1003,1001,1002)
returns name where item id = 1001-1003

GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #7  
Old 08-25-2009, 03:14 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

I'm sure the syntax is 100% correct, but you should be able to do something like this:

Code:
DELETE FROM items 
	WHERE id NOT IN (
		(SELECT components1 FROM spells_new WHERE components1 > 1000), 
		(SELECT components2 FROM spells_new WHERE components2 > 1000), 
		(SELECT components3 FROM spells_new WHERE components3 > 1000), 
		(SELECT components4 FROM spells_new WHERE components4 > 1000), 
		(SELECT NoexpendReagent1 FROM spells_new WHERE NoexpendReagent1 > 1000), 
		(SELECT NoexpendReagent2 FROM spells_new WHERE NoexpendReagent2 > 1000), 
		(SELECT NoexpendReagent3 FROM spells_new WHERE NoexpendReagent3 > 1000), 
		(SELECT NoexpendReagent4 FROM spells_new WHERE NoexpendReagent4 > 1000)
	)
__________________
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
  #8  
Old 08-25-2009, 10:26 AM
pfyon's Avatar
pfyon
Discordant
 
Join Date: Mar 2009
Location: Ottawa
Posts: 495
Default

I was working on a query last night similar to AndMetal's, but it ended up running for about 2 hours before I killed it.
Reply With Quote
  #9  
Old 08-25-2009, 11:51 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Quote:
Originally Posted by AndMetal View Post
I'm sure the syntax is 100% correct, but you should be able to do something like this:

Code:
DELETE FROM items 
	WHERE id NOT IN (
		(SELECT components1 FROM spells_new WHERE components1 > 1000), 
		(SELECT components2 FROM spells_new WHERE components2 > 1000), 
		(SELECT components3 FROM spells_new WHERE components3 > 1000), 
		(SELECT components4 FROM spells_new WHERE components4 > 1000), 
		(SELECT NoexpendReagent1 FROM spells_new WHERE NoexpendReagent1 > 1000), 
		(SELECT NoexpendReagent2 FROM spells_new WHERE NoexpendReagent2 > 1000), 
		(SELECT NoexpendReagent3 FROM spells_new WHERE NoexpendReagent3 > 1000), 
		(SELECT NoexpendReagent4 FROM spells_new WHERE NoexpendReagent4 > 1000)
	)
effect_base_value1, 2, 3, and 4 are also used, to summon items I believe.
Reply With Quote
  #10  
Old 08-25-2009, 03:09 PM
Shadow-Wolf
Dragon
 
Join Date: Oct 2003
Posts: 511
Talking

Quote:
Originally Posted by AndMetal View Post
I'm sure the syntax is 100% correct, but you should be able to do something like this:

Code:
DELETE FROM items 
	WHERE id NOT IN (
		(SELECT components1 FROM spells_new WHERE components1 > 1000), 
		(SELECT components2 FROM spells_new WHERE components2 > 1000), 
		(SELECT components3 FROM spells_new WHERE components3 > 1000), 
		(SELECT components4 FROM spells_new WHERE components4 > 1000), 
		(SELECT NoexpendReagent1 FROM spells_new WHERE NoexpendReagent1 > 1000), 
		(SELECT NoexpendReagent2 FROM spells_new WHERE NoexpendReagent2 > 1000), 
		(SELECT NoexpendReagent3 FROM spells_new WHERE NoexpendReagent3 > 1000), 
		(SELECT NoexpendReagent4 FROM spells_new WHERE NoexpendReagent4 > 1000)
	)
With a little modification adding the fields Cavedude specified this will give me exactly what I needed. Thank you everyone for your help!
__________________
How about the power to kill a yak from 200 yards away...WITH MIND BULLETS! thats telekinesis kyle.
Reply With Quote
  #11  
Old 08-25-2009, 06:30 PM
Shadow-Wolf
Dragon
 
Join Date: Oct 2003
Posts: 511
Default

Hmm, while the syntax throws no errors there is something wrong with the statements logic as it deletes no items at all, looking into it.

Edit - When running this through an sql validator I get this

The following feature outside Core SQL-200x (draft) is used:
F561, "Full value expressions""
__________________
How about the power to kill a yak from 200 yards away...WITH MIND BULLETS! thats telekinesis kyle.
Reply With Quote
Reply


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 11:53 AM.


 

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