Deleting 10000 lv. 20 or lower chars

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
shippou
Posts: 74
Joined: Thu Jun 25, 2009 9:27 pm

Re: Deleting 10000 lv. 20 or lower chars

Post by shippou »

Hy!

Looking for a script wich can clear all char related data from db.
Not just the char it self.
Clan, Char items, etc where one data is stored.

I have a this script

" $query = ("DELETE FROM characters WHERE characters.accesslevel = 0 AND DATEDIFF(CURRENT_DATE( ) , FROM_UNIXTIME(`lastAccess`/1000)) > 180");
$result = mysql_query($query) or die(mysql_error());
break;
"

But the GS did not clean up the db is the char it self deleted.
So if chance the charId is readded by a char creation the new char have the deleted ones items to.
The new char is even rejoin the clan if the deleted char was in clan so it mess up things.

thx Fowardly
User avatar
AntV
Posts: 177
Joined: Mon May 10, 2010 10:46 pm

Re: Deleting 10000 lv. 20 or lower chars

Post by AntV »

The best workaround is instead of deleting those chars, moving them to your admin account and setting delete time to 1, then logging in to your account and letting the server do all the magic.
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7005
Joined: Tue Aug 11, 2009 3:36 am

Re: Deleting 10000 lv. 20 or lower chars

Post by Zoey76 »

AntV wrote:The best workaround is instead of deleting those chars, moving them to your admin account and setting delete time to 1, then logging in to your account and letting the server do all the magic.
LOL, Interesting way of doing it. :D
Powered by Eclipse 4.30 ๐ŸŒŒ | Eclipse Temurin 21 โ˜• | MariaDB 11.2.2 ๐Ÿ—ƒ๏ธ | L2J Server 2.6.3.0 - High Five ๐Ÿš€

๐Ÿ”— Join our Discord! ๐ŸŽฎ๐Ÿ’ฌ
User avatar
AntV
Posts: 177
Joined: Mon May 10, 2010 10:46 pm

Re: Deleting 10000 lv. 20 or lower chars

Post by AntV »

denser wrote:

Code: Select all

UPDATE characters SET deletion_time=1 WHERE level<=20,UPDATE characters SET accaunt=momo61 WHERE deletion_time=1;
and where you log in game by momo61 acc - game will freeze a little - depend on number of characters. server will delete all of them correctly.
Nobody reads the first page of posts anymore, huh :P
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Deleting 10000 lv. 20 or lower chars

Post by UnAfraid »

I'd delete them right away and let server cleanup the rest

Code: Select all

DELETE FROM characters WHERE level < 20;
Image
Post Reply