Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-27-2009, 09:07 AM
robert19's Avatar
robert19
Fire Beetle
 
Join Date: Feb 2005
Posts: 21
Default x2 item stats with mysql??

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
Reply With Quote
  #2  
Old 12-27-2009, 10:06 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

The stats have an 'a' in front of them. Without testing, it will be something like:

Code:
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
Reply With Quote
  #3  
Old 12-27-2009, 12:51 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

Quote:
Originally Posted by joligario View Post
The stats have an 'a' in front of them. Without testing, it will be something like:

Code:
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:

Quote:
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:

Quote:
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:

Quote:
sint16 Client::GetMaxStat() const {
return(2000);
}
Happy statting!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:22 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3