Go Back   EQEmulator Home > EQEmulator Forums > General > General::Server Discussion

General::Server Discussion Discussion about emulator servers.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-31-2012, 12:03 PM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default slash play, playing time location in database?

When you type the /play command it tells you how much playing time your character has on the server. Does anyone know where this info is kept in the database?
Reply With Quote
  #2  
Old 12-31-2012, 12:41 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

It's in the profile blob.

This SQL query calculates the 'time entitled on the account' by summing up the time played in minutes across all characters on an account, so you may be able to adapt it for your needs:
Code:
select sum(ascii(substring(profile, 237, 1)) + (ascii(substring(profile, 238, 1)) * 256) +
          (ascii(substring(profile, 239, 1)) * 65536) + (ascii(substring(profile, 240, 1)) * 16777216))
          from character_ where account_id = %i;
Reply With Quote
  #3  
Old 12-31-2012, 01:45 PM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default

Thanks Derision. I was afraid it was going to be in the blob. But you've removed that problem.

It looks like the number that your query yields is in minutes played.

Thanks again, the query is awesome.
Reply With Quote
  #4  
Old 12-31-2012, 02:07 PM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default

The sum function had me stumped for a bit so I am posting my version for posterity.
Code:
select id, account_id, name, zoneid, class, level, 
	ascii(substring(profile, 237, 1)) + (ascii(substring(profile, 238, 1)) * 256) + (ascii(substring(profile, 239, 1)) * 65536) + (ascii(substring(profile, 240, 1)) * 16777216) AS 'Play Time Minutes'
	from character_;
Thanks again Derision.
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:44 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3