PDA

View Full Version : HOWTO: Fixing the broken PEQ database LORE flags


Dvinn
11-24-2004, 01:37 AM
In trying to figure out what was going on with the missing ARTIFACT flags in the PEQ database, I got to noticing that there were quite a few items that were missing the actual LORE flag in the item inspect window (but due to the fact the the old LORE flag gets respected with regards to duplicate items, they were being treated as LORE anyway).

To make a long story short, here are two MySQL queries that'll patch up the missing LORE flags:


UPDATE items SET loreflag=1 WHERE lore LIKE '#*%';
UPDATE items SET loreflag=1 WHERE lore LIKE '*%';



While it might seem simpler to just use UPDATE items SET loreflag=1 WHERE lore LIKE '*';, that affects 1453 items in the database. That's two more than the other two queries would effect and indicates (to me, anyway) that there are two items in the database that have an asterisk in their lore that are likely NOT lore items (in other words, the asterisk isn't either the first or second character in the item's lore field... I have no idea which two items they are, though). If none of that made any sense, I apologize. Suffice it to say, though, that using the two queries in the code block above is almost certainly better than using the one I mentioned later :).

-- EDIT --

Well, I found the two extra items that where being affected by the query... Song: Chant of Battle* (id 9992) and Dull Axe* (id 55623). Neither should be LORE, so I was right; go with the two query method in the code block.

Aich
11-25-2004, 05:21 AM
Thanks to ur post I was able to make my adjustments I was looking for to my database.


UPDATE items SET gmflag=1 WHERE lore LIKE '*guide item%'
UPDATE items SET gmflag=1 WHERE lore LIKE 'guide item%'


Matches 25 items in the PEG_Kunark Database.
Another useful one is
UPDATE items SET gmflag=1 WHERE damage >=100;