Scofield Posted March 26, 2013 Posted March 26, 2013 I would like a system or script that deletes accounts and pensonagens who spend more than three months without accessing the account Quote
Emistry Posted March 26, 2013 Posted March 26, 2013 try this.. http://pastebin.com/raw.php?i=UEUbarEq it will check the database everyday..and remove all account that not login for 90 days or longer... please do a backup before use this..just in case anything happened. 1 Quote
Scofield Posted March 26, 2013 Author Posted March 26, 2013 Thank you based on your able to create this, still not tested testo soon and post here. - script RemoveAccs -1,{ OnWhisperGlobal: if(getgmlevel() < 99) end; query_sql "SELECT account_id,DATE(lastlogin) FROM login WHERE account_id >= '2000000' AND level < '99'",.@acc_id,.@data$; for(set .@i,0; .@i < getarraysize(.@acc_id); set .@i,.@i+1){ deletearray .@dias; query_sql "SELECT DATEDIFF(DATE(NOW()),'"+.@data$[.@i]+"')",.@dias; if(.@dias > 60){ deletearray .@char_id; query_sql "SELECT char_id FROM `char` WHERE account_id = '"+.@acc_id[.@i]+"'",.@char_id; for(set .@w,0; .@w < getarraysize(.@char_id); set .@w,.@w+1){ query_sql "DELETE FROM inventory,friends,hotkey,pet,sc_data,skill,cart_inventory,global_reg_value,guild_member WHERE char_id = '"+.@char_id[.@w]+"'"; } query_sql "DELETE FROM storage WHERE account_id = '"+.@acc_id[.@i]+"'"; } } end; } Quote
Question
Scofield
I would like a system or script that deletes accounts and pensonagens who spend more than three months without accessing the account
2 answers 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.