Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-11-2009, 12:32 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default Adjusting Server Currency

Does anyone know of a an easy way to update the currency (platinum, silver, gold and copper) for all characters on a server at once? I am guessing there may be some MySQL query that could be ran to adjust it, but I am not exactly sure how to do that since all of that info is stored in the Player Profile Blob and I don't know how to access that.

What I am trying to do is maybe run a query that does something like dividing all player currency by 10. Then, I would also want to run a second simpler query to update all item prices over a certain amount to be divided by 10 as well. I think I can figure out the one for updating item prices, but if anyone knows how to update characters for currency on the character, in their bank and in their shared bank, I would appreciate it.

Thanks
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 03-11-2009, 11:37 AM
Aldest
Sarnak
 
Join Date: Feb 2009
Location: Georgia
Posts: 69
Default

This may be of no help to you since it seems you want to reduce inflation on your server but for just adding money to accounts the "shared bank" is not part of the combined character information. It is set at the account level.

I used that to pull some "Funny Plat" out of the system. It, of course, does no good for the money that wasn't stored there.

I'd be very interested to see an answer on this too.
Reply With Quote
  #3  
Old 03-11-2009, 10:46 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by AndMetal View Post
Quote:
Originally Posted by ChaosSlayer View Post
the one thing i cannot posible edit is the stupid BLOB file, which contains 4 essential things: stats, deyty, race and class - thats why i belive this little thing should be stand alone =)
Not trying to derail the thread, but here is a relatively easy way to change the profile blob using a MySQL query:

Quote:
UPDATE character_ SET profile = INSERT((SELECT profile FROM (SELECT * FROM character_) AS x WHERE id = 748),(4720+1),4,RPAD(CHAR(100),4,CHAR(0))) WHERE id = 748;
This would give a character with an ID of 748 100 platinum.

In theory, you can change 4720 to any field # in the profile blob & the 100 to whatever numeric value you want it set to. You would then need to change the 4's to correspond with however many characters the data takes up (32-bit integers are 4, for example), otherwise the blob will become corrupt (too many/too few characters).

Some might be wondering why there are 2 subqueries. The answer is discussed here, and it's basically a workaround for not being able to query the same table in an update.

I verified it works without any issues on an existing toon.

If anyone has any questions about this, please feel free to ask in another thread.
Hope this helps.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #4  
Old 03-11-2009, 11:33 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Thanks, AndMetal! That sorta makes sense. Though, I imagine it would be pretty confusing for someone who isn't as familiar with the packet structures lol.

The only thing I can't seem to figure out from that is how I would divide the current value by 10. Normally in SQL, I could just tell it to do something like plat = (plat / 10), but since this isn't an actual named field, I am not sure how to do that exactly.

This will definitely take some testing on my test server before I could even think about doing it on the real server lol. Also, a backup of the accounts table will be a good idea before any changes like that.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 07:39 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3