View Full Version : x2 item stats with mysql??
robert19
12-27-2009, 09:07 AM
I would like to use mysql to mass edit item stats to like x2, I can't seem to find an example on how to make str,sta,agi.dex, or any of the other stats outside of ac do this.
Thanks in advance
joligario
12-27-2009, 10:06 AM
The stats have an 'a' in front of them. Without testing, it will be something like:
UPDATE items SET astr = astr * 2, asta = asta * 2, aagi = aagi * 2, adex = adex * 2;
Also, most likely mySQL will allow you to use *= if you want. Like: astr *= 2
Secrets
12-27-2009, 12:51 PM
The stats have an 'a' in front of them. Without testing, it will be something like:
UPDATE items SET astr = astr * 2, asta = asta * 2, aagi = aagi * 2, adex = adex * 2;
Also, most likely mySQL will allow you to use *= if you want. Like: astr *= 2
Be careful when you do that, though. If you go over 127 stats on items, it makes them appear as negative. The weird part is augmentations bypass this limit.
Of course, everything is fine and dandy serverside. I would run the stats * 2 query and then update like so:
update items set astr = 127 where astr > 127
Also, you may want to remove the stat caps in source. You can do this in client_mods.cpp. It's this function:
sint16 Client::GetMaxStat() const {
int level = GetLevel();
sint16 base = 0;
if (level < 61) {
base = 255;
}
else if (GetClientVersion() == EQClientSoF) {
base = 255 + 5 * (level - 60);
}
else if (level < 71) {
base = 255 + 5 * (level - 60);
}
else {
base = 330;
}
return(base);
}
Base is the variable for stats. If you wanted to increase the statistics cap to say, 2000, all you would need to do is remove the other code in that function and replace that with:
sint16 Client::GetMaxStat() const {
return(2000);
}
Happy statting!
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.