Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Guide]AutoDeletion of Inactive Account And Character

Status
Not open for further replies.
Experienced Elementalist
Joined
Dec 16, 2007
Messages
227
Reaction score
0
Hope this guide will help a lot of our co-ragezoner.

1. make a back up of your database.

2. open your RanUser>Tables>UserInfo.dbo>Triggers

Rightclick Triggers and Select New Triggers.

3. Copy and Paste this Script and Press Execute:

For DELETING INACTIVE ACCOUNT:
Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [dbo].[inactive] ON [dbo].[UserInfo]
after update
as
 
BEGIN
DELETE FROM [UserInfo] WHERE DATEDIFF(day,[UserInfo].LastLoginDate, GETDATE()) >= 1
 
END

Note: change CREATE to ALTER if you have existing TRIGGERS.
1 = how many days before it delete from database.

for DELETING INACTIVE CHARACTER:

1. open your RanGame1>Tables>ChaInfo.dbo

rightclick ChaInfo.dbo and click Design

2. scroll down at the buttom of the list,

make a new COLUMN and name it "ChaLastLoginDate"

DATATYPE = DATETIME
UNCHECK "ALLOW NULL"

3. Set the Default Value or Binding = (getdate())

4. Press Execute!

5. open your Rangame1>tables>chainfo.dbo>trigger

rightclick trigger and click new trigger.

6. copy and paste this script:

Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [dbo].[chardeletion] ON [dbo].[ChaInfo]
after update
as
 
BEGIN
DELETE FROM [ChaInfo] WHERE DATEDIFF(day,[ChaInfo].ChaLastLoginDate, GETDATE()) >= 1
 
END

Note: change CREATE to ALTER if you have existing TRIGGERS.

make sure that the day before deleting the inactive character

is same as inactive account.

CREDIT TO: Sir Skyblue for his DELETING INACTIVE ACCOUNT.
 
Last edited:
Junior Spellweaver
Joined
Nov 27, 2007
Messages
181
Reaction score
0
hahahaha panget na ng mukha COPY PASTE pa tae mo tanda...
 
ThuGie.NL - Webmaster
Joined
Apr 16, 2006
Messages
607
Reaction score
55
Being quite honest normaly when you use somebody else his code even if its for a guide,
Your suppose to give credits to the person for the code you used,

As you havent done this you can expect comments like the one above from truclan,
Its still nice you made a guide but without credits its going to be seen more as stealing then a guide,
So you might wanna edit your post and add the credits for the users that you used the code from.

Hope you follow my advise and post more guide's with credits ;).

edit:
a quick edit,
the post made by KimFox_12 is clearly rude and not even in english,
To something like that its normal to think of it of rude since it clearly is.
 
Experienced Elementalist
Joined
Dec 16, 2007
Messages
227
Reaction score
0
Being quite honest normaly when you use somebody else his code even if its for a guide,
Your suppose to give credits to the person for the code you used,

As you havent done this you can expect comments like the one above from truclan,
Its still nice you made a guide but without credits its going to be seen more as stealing then a guide,
So you might wanna edit your post and add the credits for the users that you used the code from.

Hope you follow my advise and post more guide's with credits ;).

edit:
a quick edit,
the post made by KimFox_12 is clearly rude and not even in english,
To something like that its normal to think of it of rude since it clearly is.

ok paps..i'll follow your guide thanks.

@kim_fox12

how would you know i copy paste the DELETING INACTIVE CHARACTER?

i thought it was DELETING INACTIVE ACCOUNT not CHARACTER.

but i follow sir thugie what he said, i put on credit to it.
 
Experienced Elementalist
Joined
Dec 16, 2007
Messages
227
Reaction score
0
ehehe kainis kasi eh magnanakaw para tinggalain at makilala ang kanyang panget na mukha

^T^ PEACE.............

@kim_fox12

i know your a talented person.....(PERO INGAT KA KILALA KITA).

even if you're not displaying your true picture.

(WAG KANG BASTA MAGYAYABANG KUNG MARAMI KANG ALAM).
 
Junior Spellweaver
Joined
Apr 2, 2008
Messages
119
Reaction score
0
You Know Guyz.. Be Good To Other's Respect What They Post Here Except Bad Words..

@kimfox

Bro, Nothing Change With You, You Are Still Bad, You Know What Im Saying
 
Junior Spellweaver
Joined
Apr 12, 2004
Messages
197
Reaction score
0
hey guys, grow up, the TS is trying to help here, maybe the codes are not originally from him, the fact is newbies are very lazy to search from forum (yea, me also), imagine of having a thousands of post.. damn it is pain in d-butt..lolz.

anyway, MSSQL scripts have common functions (e.g. DATEDIFF(day,[ChaInfo]), would you consider I'm copying "his/author's" code if I'm going to use that function? I guess not, It is a universal function and can be used by anyone on his code.

anyway, I agree of to all of you to put credits on whom you got the code, but be nice and no personal attack when saying it.

again, grow up guys.

-cruzades
 
Newbie Spellweaver
Joined
Oct 26, 2006
Messages
92
Reaction score
3
i want script that if the [ChaInfo].ChaDeleted become 1.. it will delete the char. from database...
 
Newbie Spellweaver
Joined
Jan 21, 2007
Messages
19
Reaction score
0
Question:
will the unused char del even if the account is active? =DELETING INACTIVE CHARACTER
 
Experienced Elementalist
Joined
Dec 16, 2007
Messages
227
Reaction score
0
i want script that if the [ChaInfo].ChaDeleted become 1.. it will delete the char. from database...

it is shared before try to search....

my guide is DELETING INACTIVE ACCOUNT AND INACTIVE CHARACTER.

@arjaie

no, only inactive character not deleted. if you want try this one:

Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[Cha_deleted] ON [dbo].[ChaInfo]
after update
as
BEGIN

DELETE FROM [RanGame1].[dbo].[ChaInfo]
WHERE Chadeleted = 1

END
 
Junior Spellweaver
Joined
Sep 3, 2005
Messages
179
Reaction score
3
@TS bro your script

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [dbo].[chardeletion] ON [dbo].[ChaInfo]
after update
as

BEGIN
DELETE FROM [ChaInfo] WHERE DATEDIFF(day,[ChaInfo].ChaCreateDate, GETDATE()) >= 1

END

gives me major problem...1st i login then i enter ingame..when i change my character,half of my characters created in database are all gone...whats the prob...
 
Experienced Elementalist
Joined
Dec 16, 2007
Messages
227
Reaction score
0
@TS bro your script

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [dbo].[chardeletion] ON [dbo].[ChaInfo]
after update
as

BEGIN
DELETE FROM [ChaInfo] WHERE DATEDIFF(day,[ChaInfo].ChaCreateDate, GETDATE()) >= 1

END

gives me major problem...1st i login then i enter ingame..when i change my character,half of my characters created in database are all gone...whats the prob...

first post updated.
 
Last edited:
Junior Spellweaver
Joined
Sep 3, 2005
Messages
179
Reaction score
3
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[chardeletion] ON [dbo].[ChaInfo]
after update
as

BEGIN
DELETE FROM [ChaInfo] WHERE DATEDIFF(day,[ChaInfo].ChaCreateDate, GETDATE()) >= 15

END

i see it to 15 same as inactive accounts
 
Status
Not open for further replies.
Back
Top