Page 4 of 4

Re: Deleting 10000 lv. 20 or lower chars

Posted: Sun May 10, 2015 1:55 pm
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

Re: Deleting 10000 lv. 20 or lower chars

Posted: Fri Aug 14, 2015 7:23 pm
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.

Re: Deleting 10000 lv. 20 or lower chars

Posted: Sat Aug 15, 2015 8:53 pm
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

Re: Deleting 10000 lv. 20 or lower chars

Posted: Sat Aug 15, 2015 11:51 pm
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

Re: Deleting 10000 lv. 20 or lower chars

Posted: Sun Aug 16, 2015 12:45 am
by UnAfraid
I'd delete them right away and let server cleanup the rest

Code: Select all

DELETE FROM characters WHERE level < 20;