![]() |
|
|
#1 |
|
Архивный участник
Join Date: May 2005
Posts: 117
|
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 |
|
|
|
|
#2 |
|
Архивный участник
Join Date: Nov 2005
Posts: 70
|
I would never do something like that... heh.
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Aug 2005
Posts: 428
|
ВАЙП-ВАЙП-ВАЙП!!!
))))
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: May 2005
Posts: 117
|
If you have 1000+ online you may need do this clear every several months...
|
|
|
|
|
#5 | |
|
Архивный участник
Join Date: Jan 2006
Posts: 363
|
Quote:
|
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: Jan 2006
Posts: 584
|
THere are quite a few
![]() And this script can come in handy.. with a change here and there.. ![]() Thanks Nucer! |
|
|
|
|
#7 | |
|
Архивный участник
Join Date: May 2005
Posts: 117
|
Quote:
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
|
|
|
|
|
|
#8 |
|
Архивный участник
Join Date: Apr 2005
Posts: 98
|
|
|
|
|
|
#9 | ||
|
Архивный участник
Join Date: Mar 2005
Posts: 280
|
Quote:
|
||
|
|
|
|
#10 |
|
Архивный участник
Join Date: Jan 2006
Posts: 363
|
not really.... i just wonder why those sites didn't make it to top200
|
|
|
|
|
#11 |
|
Архивный участник
Join Date: Jan 2006
Posts: 584
|
Top200 isn't everything.. but don't make me talk, otherwise someone wouldn't like it. ^^
|
|
|
|
|
#12 |
|
Архивный участник
Join Date: Aug 2005
Posts: 194
|
Anybody can apply these SQL at PHP-body (with input account_id or char_id form)? Be amazing!
|
|
|
|
|
#13 | ||
|
Архивный участник
Join Date: Dec 2005
Posts: 120
|
Quote:
|
||
|
|
|
|
#14 |
|
Архивный участник
Join Date: May 2005
Posts: 367
|
there is ALREADY proc for delete such things in SERVER
lin_deleteghostdata or something i guess you never looked ? huh ? |
|
|
|
|
#15 |
|
Архивный участник
Join Date: Aug 2005
Posts: 145
|
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? |
|
|
|
|
#16 |
|
Архивный участник
Join Date: Feb 2006
Posts: 4
|
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 |
|
|
|
|
#17 | |
|
Архивный участник
Join Date: Feb 2005
Posts: 24
|
Quote:
with rates x6 ?
|
|
|
|
|
|