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
  #16  
Old 02-07-2013, 03:10 AM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

Code:
UPDATE npc_types
INNER JOIN
pets
ON npc_types.id=pets.npcID
SET hp = hp * 8;
Reply With Quote
  #17  
Old 02-07-2013, 03:37 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

Quote:
Originally Posted by rencro View Post
Code:
UPDATE npc_types
INNER JOIN
pets
ON npc_types.id=pets.npcID
SET hp = hp * 8;
you'd still have the problem with 3 of them (for now) being non-client pets with that query.

Code:
UPDATE
    npc_types
INNER JOIN
    pets
ON
    npc_types.id = pets.npcID
AND
    pets.npcID < 29000
SET
    hp = hp * 8;
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
Reply With Quote
  #18  
Old 02-07-2013, 07:56 AM
Furniture
Hill Giant
 
Join Date: Aug 2012
Posts: 205
Default

all the pets have ids less then 999, so just run a query affecting those
Reply With Quote
  #19  
Old 02-07-2013, 03:28 PM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

Quote:
all the pets have ids less then 999, so just run a query affecting those
In my experience, when one goes customizing a database, the original structure no longer exists, so your statement may or may not be true, depending on whats been done to that specific database.

The original post asked for a custom column that would state if an npc in npc_type was a pet to help locate which ids in the table were pets. As can be seen by queries posted throughout this thread, thats not neccessary as there are many ways to determine which ids are tied to pets, as well, a query was given that actually makes the changes asked for further down the thread..

As for the three non pc pets in the pets table, they are, well, pets.
Reply With Quote
  #20  
Old 02-07-2013, 05:31 PM
Disorder
Hill Giant
 
Join Date: Apr 2010
Location: USA
Posts: 133
Default

Code:
UPDATE
    npc_types
INNER JOIN
    pets
ON
    npc_types.id = pets.npcID
AND
    pets.npcID < 29000
SET
    hp = hp * 8;
Is this in reference to a new table being created first, c0ncrete?
__________________
Disorder
Reply With Quote
  #21  
Old 02-07-2013, 06:03 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

nope, that was joining the npc type ids from a separate table that should already exist in your database called pets. i haven't done a lot of tinkering where the database is concerned for mobs and whatnot, so apparently the fact that it was there completely eluded me.

the table in question has at least 3 entries that are npc only pets... but as rencro pointed out, they're still pets. i guess you'd be modifying npc pets either way, considering pets summoned via spells are shared between npc/bot/pc. i'm not sure what i was thinking when i imagined there would be a difference.
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
Reply With Quote
  #22  
Old 02-07-2013, 06:37 PM
Disorder
Hill Giant
 
Join Date: Apr 2010
Location: USA
Posts: 133
Default

Interesting. I can't believe I didn't realize there was a pets table. Completely missed it. This helps tremendously.
__________________
Disorder
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 08:50 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