maneco Posted August 12, 2024 Posted August 12, 2024 Have any script for delete account if not have character created? in l2off. Quote
0 SkyLord Posted August 13, 2024 Posted August 13, 2024 (edited) -- Delete records where there is no corresponding name user_data USE lin2db; DELETE FROM ssn WHERE NOT EXISTS ( SELECT 1 FROM [lin2world].[dbo].[user_data] AS world_data WHERE world_data.account_name = ssn.name ); DELETE FROM user_auth WHERE NOT EXISTS ( SELECT 1 FROM [lin2world].[dbo].[user_data] AS world_data WHERE world_data.account_name = user_auth.account ); DELETE FROM user_info WHERE NOT EXISTS ( SELECT 1 FROM [lin2world].[dbo].[user_data] AS world_data WHERE world_data.account_name = user_info.account ); DELETE FROM user_account WHERE NOT EXISTS ( SELECT 1 FROM [lin2world].[dbo].[user_data] AS world_data WHERE world_data.account_name = user_account.account ); -- Check Existing account with character name USE lin2world; DECLARE @char_name NVARCHAR(50); SELECT @char_name = char_name FROM [dbo].[user_data] WHERE account_name = 'root'; IF @char_name IS NOT NULL BEGIN PRINT 'Existing account with character name: ' + @char_name; END ELSE BEGIN PRINT 'No account with character name root found.'; END Edited August 13, 2024 by SkyLord Quote
Question
maneco
Have any script for delete account if not have character created? in l2off.
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.