Thread: Project Revive
View Single Post
  #11  
Old 02-14-2008, 07:16 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

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.
__________________
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