Jump to content
  • 0

Accounts that are no longer used


Question

2 answers to this question

Recommended Posts

Posted

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;
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...