EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Database/World Building (https://www.eqemulator.org/forums/forumdisplay.php?f=596)
-   -   Adding column to npc_types (https://www.eqemulator.org/forums/showthread.php?t=36432)

rencro 02-07-2013 03:10 AM

Code:

UPDATE npc_types
INNER JOIN
pets
ON npc_types.id=pets.npcID
SET hp = hp * 8;


c0ncrete 02-07-2013 03:37 AM

Quote:

Originally Posted by rencro (Post 217794)
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;


Furniture 02-07-2013 07:56 AM

all the pets have ids less then 999, so just run a query affecting those

rencro 02-07-2013 03:28 PM

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.

Disorder 02-07-2013 05:31 PM

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?

c0ncrete 02-07-2013 06:03 PM

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.

Disorder 02-07-2013 06:37 PM

Interesting. I can't believe I didn't realize there was a pets table. Completely missed it. This helps tremendously.


All times are GMT -4. The time now is 03:24 AM.

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