Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 Server Modifications ONLY! (https://postpacific.mmorpg-game.online/forumdisplay.php?f=28)
-   -   [small share]Script for clear database (https://postpacific.mmorpg-game.online/showthread.php?t=3466)

nucer 25.02.2006 01:39

[small share]Script for clear database
 
This stored procedure will clear unused characters with their items, skills and quests.
Code:

CREATE PROCEDURE [DBO].[lin_DeleteOldChars] 
@days INT
AS 
SET NOCOUNT ON 
 
DECLARE @ToDeleteCharacter CURSOR 
DECLARE @char_id INT 
SET @ToDeleteCharacter = CURSOR FAST_FORWARD FOR
 
SELECT char_id  FROM user_data  WHERE account_id <= 0  OR ( logout>login AND logout<GETDATE()-@days)
OPEN @ToDeleteCharacter 
FETCH FROM @ToDeleteCharacter INTO @char_id 
 
WHILE @@FETCH_STATUS = 0 
BEGIN 
 DELETE FROM user_item WHERE char_id=@char_id
 DELETE FROM user_skill WHERE char_id=@char_id
 DELETE FROM Quest WHERE char_id=@char_id

 FETCH NEXT FROM @ToDeleteCharacter INTO @char_id 
END 
 
CLOSE @ToDeleteCharacter 
DEALLOCATE @ToDeleteCharacter

DELETE  FROM user_data  WHERE account_id <= 0  OR ( logout>login AND logout<GETDATE()-@days)
GO


sct 25.02.2006 01:41

I would never do something like that... heh.

drzoom 25.02.2006 01:42

ВАЙП-ВАЙП-ВАЙП!!! :)))))

nucer 25.02.2006 01:47

If you have 1000+ online you may need do this clear every several months...

kgptzac 25.02.2006 04:34

Quote:

Originally Posted by nucer
If you have 1000+ online you may need do this clear every several months...

can you give me some names of the private servers that has 1000+ online average?

Megatronpt 25.02.2006 04:37

THere are quite a few ;)

And this script can come in handy.. with a change here and there.. ;)

Thanks Nucer!

nucer 25.02.2006 19:08

Quote:

can you give me some names of the private servers that has 1000+ online average?
Ggg lol

http://l2online.ru/
http://la2.ru/
http://lineageii.ru/
http://lineage2.su/
http://la2.raid.ru/
http://splendor.ru/
http://warsmith.ru/
http://line2.ru/
http://elmore.ru/
http://l2server.ru/
http://la2world.ru/
http://www.lineage2.kiev.ua/
http://www.lineage2.wnet.ua/
http://lineage.trifle.net/

This is not full list of russian servers :D

OnlyOne 25.02.2006 19:31

LT servers:
http://reborn.bfd.lt about 1k-1.1k
beyondc3 (pvp server) 1.5-2.8k

archy 25.02.2006 21:06

Quote:

Originally Posted by kgptzac
Quote:

Originally Posted by nucer
If you have 1000+ online you may need do this clear every several months...

can you give me some names of the private servers that has 1000+ online average?

I would have to say.... you just got owned....

kgptzac 26.02.2006 00:22

not really.... i just wonder why those sites didn't make it to top200

Megatronpt 26.02.2006 01:50

Top200 isn't everything.. but don't make me talk, otherwise someone wouldn't like it. ^^

;)

2Rain 26.02.2006 03:35

Anybody can apply these SQL at PHP-body (with input account_id or char_id form)? Be amazing!

Co0L 26.02.2006 06:04

Quote:

Originally Posted by nucer

В десятке 8) :lol:

demon 27.02.2006 09:02

there is ALREADY proc for delete such things in SERVER

lin_deleteghostdata or something

i guess you never looked ? huh ?

srh 27.02.2006 13:27

lin_CleanUpGhostData
exec in lin_DeleteNotOwnedItem ;)

but nucer delete "expired" users, as i see chars that not used N days from now. i'm right?

Tear 09.03.2006 11:15

also must delete from
Code:

DELETE FROM user_friend WHERE char_id=@char_id
 DELETE FROM user_history WHERE char_id=@char_id
 DELETE FROM user_deleted WHERE char_id=@char_id
 DELETE FROM user_log WHERE char_id=@char_id
 DELETE FROM user_punish WHERE char_id=@char_id
 DELETE FROM user_surrender WHERE char_id=@char_id
 DELETE FROM user_blocklist WHERE char_id=@char_id
 DELETE FROM user_ban WHERE char_id=@char_id
 DELETE FROM user_ActiveSkill WHERE char_id=@char_id
 DELETE FROM shortcut_data WHERE char_id=@char_id


vandalheart 12.04.2006 17:24

Quote:

Originally Posted by OnlyOne
LT servers:
http://reborn.bfd.lt about 1k-1.1k
beyondc3 (pvp server) 1.5-2.8k

LOL , PVP server beyondc3 ? :D with rates x6 ?


All times are GMT. The time now is 21:47.