PDA

View Full Version : HOWTO: Removing item limits


Dvinn
11-18-2004, 05:12 AM
BEGIN EDIT NOTE

(November 23, 2004) - Turns out that the method I was using never affected the ARTIFACT flag anyway, so I've updated this main post to include that data.

(November 22, 2004) - The method outlined here does remove the LORE flag from an item's inspection window, but it still gets treated as LORE anyway! To get the formerly LORE item working right, you need to also remove the "*" from the item's lore text. I'm still looking for a clean MySQL query to do that that won't also break the ARTIFACT tag. I'll be posting about that further down in this thread... Also note that I changed the non NO RENT value to so it would conform with properly collected non NO RENT items.

END EDIT NOTE

I saw a post this morning on these boards about how to remove the LORE flag from the items in someone's database. It occurs to me that there might be others wondering how to do similar-type things so I decided I might as well take a moment to post a few database mods that "unlock" the items in your database. These are all MySQL queries intended to be run an already-sourced database. Obviously, some of these mods are more unbalancing than others.

As written, these will affect every item in your database. See the end of this post for methods of applying these changes to single items.

Note that there is no simple way to undo a mass change like these without re-sourcing your entire item database.

Remove the LORE flag

UPDATE items SET loreflag=0;
UPDATE items SET lore=REPLACE(lore, '*', '');


Remove the NO DROP flag

UPDATE items SET nodrop=1;


Remove the NO RENT flag

UPDATE items SET norent=255;


Remove the Recommended Level flag

UPDATE items SET reclevel=0;


Remove the Required Level flag

UPDATE items SET reqlevel=0;


Remove the Recommend Skill Level flag

UPDATE items SET recskill=0;


Make item effects (procs and click effects) usable at level 0

UPDATE items SET hasteproclvl=0;


Remove the Deity Requirement flag

UPDATE items SET deity=0;


Make items usable by all races

UPDATE items SET races=32767;


Make items usable by all classes

UPDATE items SET classes=65535;


To target any of these changes at a specific item rather than your entire database, there are a couple methods you can use. I'll use the Dragoon Dirk's LORE flag as an example.

Method 1

UPDATE items SET loreflag=0 WHERE Name='Dragoon Dirk';
UPDATE items SET lore=REPLACE(lore, '*', '') WHERE Name='Dragoon Dirk';


This would remove the LORE flag from and item in your database that is named "Dragoon Dirk" but would not include items that have a name that does not exactly match (i.e. "Fabled Dragoon Dirk").

Method 2

UPDATE items set loreflag=0 where id='13942';
UPDATE items SET lore=REPLACE(lore, '*', '') WHERE id='13942';


This would remove the LORE flag from only the item with id 13942 (EQLive's "Dragoon Dirk") but would not include any other items, regardless of their name or id.

Use these changes in good health :).

sdabbs65
11-18-2004, 07:07 AM
thats a lot of very usefull commands.
I would like to post this on my website 2 if you don't mind.


well done, it should be a sticky.

Muuss
11-18-2004, 08:31 PM
None of these commands is reversable, and all of them but the 2 about dragoon's dirk insta change every of your items. Why not also posting how to make a quick backup/restore of the items table, like :

dump, will generate a text file named items.sql :

mysqldump -u `username` -p eq items > items.sql

restore (from mysql.exe) :

mysql> use eq;
mysql> delete from items;
mysql> source items.sql;

Dvinn
11-19-2004, 02:45 AM
thats a lot of very usefull commands.
I would like to post this on my website 2 if you don't mind.

Feel free.

Cisyouc
11-19-2004, 09:11 AM
None of these commands is reversable, and all of them but the 2 about dragoon's dirk insta change every of your items. Why not also posting how to make a quick backup/restore of the items table, like :

dump, will generate a text file named items.sql :

mysqldump -u `username` -p eq items > items.sql

restore (from mysql.exe) :

mysql> use eq;
mysql> delete from items;
mysql> source items.sql;Dont you need to do mysqldump -u username -p eq --table items > items.sql?

Dvinn
11-21-2004, 05:19 PM
I ran into an issue today regarding the method for removal of the LORE flag. While setting loreflag=0 does kill the flag that gets displayed in an item inspect window, it doesn't actually make the item non-LORE. Turns out you also need to remove the asterisk ("*") from the item's lore text. I used this query to do that:

UPDATE items SET lore = replace(lore, '*', '');

Unfortunately, that breaks the ARTIFACT tag as it kills the asterisk out of ALL items that have one in their descriptions (artifacts need to have that text prefixed by "*#").

What query could I run that would remove the asterisk unless it's followed by a pound sign?

animepimp
11-21-2004, 05:24 PM
UPDATE items SET lore = replace(lore, '*', '') WHERE NOT lore LIKE '*#'; should work.

Muuss
11-21-2004, 07:58 PM
Dont you need to do mysqldump -u username -p eq --table items > items.sql?

It should work without the --table as long as items is situated AFTER eq. Tho, adding --table can prevent errors :)

Dvinn
11-22-2004, 05:59 AM
UPDATE items SET lore = replace(lore, '*', '') WHERE NOT lore LIKE '*#'; should work.

I tried that and it doesn't change anything in my database. I did end up figuring something out that works, though:

First I change all occurances of '#*' to "##":

update items set lore=replace(lore, '#*', '##');

Then I kill all the asterisks in lore:

update items set lore=replace(lore, '*', '');

Then I switch '##' back over to '#*':

update items set lore=replace(lore, '##', '#*');

It's all moot, though, because even items with '#*' aren't showing the artifact flag (presumably the client only shows that flag now if artifactflag=1?).

So the PEQ database has no items that show the artifact flag to begin with.

Dvinn
11-22-2004, 03:57 PM
A little further research has lead me to conclude that item lore preceded bt "#*" was never an indication of the of the ARTIFACT flag to begin with (as was proposed in this thread (http://www.eqemulator.net/forums/viewtopic.php?t=11284)). Rather, items with "#*" were both artifacts and lore items. The pound sign alone indicated artifact status. The current incarnation of the client no longer respects this specification anyway (which is why the PEQ item database is somewhat broken with regards to the ARTIFACT flag).

Anyway, I've updated the first post in this thread to reflect the correct information.