Log in

View Full Version : Mass item DB change?


Maceblade
01-12-2013, 01:09 PM
Is there a way you can do a mass item db change? for instance, lets say i wanted to increase damage of all weapons by 25%? or double HP and AC on all gear? Or make everything all/all?, using perl or is this an item editor I need?

Tabasco
01-12-2013, 01:27 PM
You can do a lot of that kind of thing with simple SQL.

UPDATE items SET damage = damage * 1.25 WHERE damage > 0
UPDATE items SET ac = ac * 2 WHERE ac > 0
UPDATE items SET hp = hp * 2 WHERE hp > 0
UPDATE items SET mana = mana * 2 WHERE mana > 0
UPDATE items SET classes = 65535 WHERE classes > 0
UPDATE items SET races = 65535 WHERE races > 0
UPDATE items SET deity = 0

Maceblade
01-12-2013, 01:30 PM
dude youre awesome thanks! :)

Maceblade
01-21-2013, 03:41 PM
Anyone know of a way to increase drop rates by zone? or a way to make pc's fearless via a quest? I dont need the quest script but more or less an example.

Zamthos
01-21-2013, 03:47 PM
You could touch up the lootdrops and make the items more likely to drop, however I don't quite understand what you mean by "fearless", are you talking about NPC special attacks? If so, here's the link: http://www.eqemulator.net/wiki/wikka.php?wakka=NPCSpecialAttacks

Maceblade
01-21-2013, 04:13 PM
well i was hoping there was a way i could do a quick increase via mysql rather than doing mob by mob with the editor. and by fearless i mean immune to fear. idk maybe somehow the result of the quest is to give the pal/sk aa fearless to quest completers.

Tabasco
01-21-2013, 04:32 PM
There are two approaches you could take, depending on what you mean by drop rates.
In loottable_entries you could manipulate multiplier, mindrop, and droplimit.
The other option is to adjust chance or multiplier per item in lootdrop_entries.

That by itself is not especially difficult until you throw in the by zone limitation.

You could cross reference spawns, but generally PEQ prefixes NPC ID's with the zone number and counts up with the trailing 3 digits.
In these examples we're using Befallen, or zone ID 36.

Loottable Level:

UPDATE loottable_entries RIGHT JOIN npc_types USING(loottable_id) SET multiplier = multiplier + 1, droplimit = droplimit + 1 WHERE npc_types.id LIKE '36___'


Item Level:

CREATE TEMPORARY TABLE tmp_ldids (ldid INT(11), PRIMARY KEY (ldid));

REPLACE INTO tmp_ldids
(SELECT DISTINCT(loottable_entries.lootdrop_id) FROM loottable_entries RIGHT JOIN npc_types USING(loottable_id) WHERE npc_types.id LIKE '36___');

UPDATE lootdrop_entries SET chance = chance * 2 WHERE lootdrop_id IN (SELECT ldid FROM tmp_ldids);

UPDATE lootdrop_entries SET chance = 100 WHERE chance > 100;


The last set of queries have to be ran together from the same connection because of the temporary table. I tried to avoid using one but it was really really slow.