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
User avatar
LaraCroft
Posts: 360
Joined: Sat Aug 08, 2009 1:37 am

Re: Deleting 10000 lv. 20 or lower chars

Post by LaraCroft »

I tested on my live test server...
All characters below lvl 20 are set to delet....
Even if the character was created today...
:?
!!!knowledge and intelligence must be shared!!!
User avatar
Raikkon35
Posts: 178
Joined: Sat Mar 08, 2008 2:54 pm

Re: Deleting 10000 lv. 20 or lower chars

Post by Raikkon35 »

argh, problems with my connection... rewriting
Last edited by Raikkon35 on Sat Jul 10, 2010 1:57 pm, edited 1 time in total.
User avatar
LaraCroft
Posts: 360
Joined: Sat Aug 08, 2009 1:37 am

Re: Deleting 10000 lv. 20 or lower chars

Post by LaraCroft »

Thx janiii
I'll test... and post results here...
:wink:
Other question:
The acc are deleted atomatic by server or only when the player try to log in???
!!!knowledge and intelligence must be shared!!!
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Deleting 10000 lv. 20 or lower chars

Post by denser »

LaraCroft wrote: One Question:
The acc are deleted atomatic by server or only when the player try to log in???
denser wrote:made SQl query when set up delete time to 1 where lvl <= 20, and change owner account to yours - so when you logged in - get a little freeze - then all of account will delete by server w/o conflicts.
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Deleting 10000 lv. 20 or lower chars

Post by janiii »

the problem is in the NOW() function. it returns the date, not the unix timestamp ;) and deletion_time column doesnt exist, it is deletetime.

Code: Select all

UPDATE characters SET deletetime=1 WHERE level<=20 AND (UNIX_TIMESTAMP()*1000-lastAccess) >= 10368000000;
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
LaraCroft
Posts: 360
Joined: Sat Aug 08, 2009 1:37 am

Re: Deleting 10000 lv. 20 or lower chars

Post by LaraCroft »

Yes denser...
But...
so when you logged in
Only for my acc... or for all acc that have been marked for delete??
:? :?:
!!!knowledge and intelligence must be shared!!!
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Deleting 10000 lv. 20 or lower chars

Post by janiii »

LaraCroft wrote:Yes denser...
But...
so when you logged in
Only for my acc... or for all acc that have been marked for delete??
:? :?:

it is not about accounts but about deleting characters. then on server start when idfactory cleans the database, characters with lower deletion time are deleted and after that all data from that deleted characters is cleaned. it has nothing to do with account.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Deleting 10000 lv. 20 or lower chars

Post by denser »

LaraCroft wrote:Yes denser...
But...
so when you logged in
Only for my acc... or for all acc that have been marked for delete??
:? :?:
did you see query where you just move chars with 1 in delettime to your acc? :)
so after this query - it become yours chars and then when you login - they all gone :)
it urgent but works :) i deleted 500+ chars that way long ago :)
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
LaraCroft
Posts: 360
Joined: Sat Aug 08, 2009 1:37 am

Re: Deleting 10000 lv. 20 or lower chars

Post by LaraCroft »

Now I understand...
work right now janiii...
:mrgreen:
Thx a lot guys...
!!!knowledge and intelligence must be shared!!!
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Deleting 10000 lv. 20 or lower chars

Post by denser »

lets get clear what we need to concentrate all of stuff :)
[sql]UPDATE characters SET deletetime=1 WHERE level < min_level_to_survive AND (UNIX_TIMESTAMP()*1000-lastAccess) >= time_diff_in_milliseconds;UPDATE characters SET account = your_account WHERE deletetime=1;[/sql]
nice result :) add another conditions on your own taste 8)
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
Raikkon35
Posts: 178
Joined: Sat Mar 08, 2008 2:54 pm

Re: Deleting 10000 lv. 20 or lower chars

Post by Raikkon35 »

Friends, open "L2_GameServer\java\com\l2jserver\gameserver\idfactory\IdFactory.java".

From line 173 to 195 there are so many thinks that can help you.

I think this is a clean delete, because after that, all the char stuff are deleted by querys send by IdFactory.
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Deleting 10000 lv. 20 or lower chars

Post by denser »

Raikkon35 wrote:Friends, open "L2_GameServer\java\com\l2jserver\gameserver\idfactory\IdFactory.java".

From line 173 to 195 there are so many thinks that can help you.

I think this is a clean delete, because after that, all the char stuff are deleted by querys send by IdFactory.
my method is simple ant ask idfactory too. read thread before reply.
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
Raikkon35
Posts: 178
Joined: Sat Mar 08, 2008 2:54 pm

Re: Deleting 10000 lv. 20 or lower chars

Post by Raikkon35 »

denser wrote:
Raikkon35 wrote:Friends, open "L2_GameServer\java\com\l2jserver\gameserver\idfactory\IdFactory.java".

From line 173 to 195 there are so many thinks that can help you.

I think this is a clean delete, because after that, all the char stuff are deleted by querys send by IdFactory.
my method is simple ant ask idfactory too. read thread before reply.
I have been reading the topic since it starts, and only want to help.

Its more simple and automatic use the commented adds that there are in IdFactory first lines, instead of use a query, having a "delete by days" in the file.
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Deleting 10000 lv. 20 or lower chars

Post by denser »

simple aim and simple solution:) why do patch for such routine?
feel free to use that what you prefer..:)
peace
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
babyjason
Posts: 575
Joined: Wed Dec 02, 2009 7:59 pm

Re: Deleting 10000 lv. 20 or lower chars

Post by babyjason »

JIV wrote:what exactly you expect to happen? on server start is made dp cleanup.
seams for some reason, dp clean up is not happening, i deleted characters from characters.sql but after i started gameserver, the characters items, in items.sql were there, as in owner_id column corresponded to the allready deleted character.

any ideea why? my gs is not modded at all...
Post Reply