How to delete accounts?

Results 1 to 6 of 6
  1. #1
    Newbie hydramu is offline
    MemberRank
    Jun 2010 Join Date
    16Posts

    How to delete accounts?

    How to delete accounts completely with everything like vaults,inventory,acc, char etc etc without leaving any bugs,if people will create new ones with same info or same character names ?

    also how to delete guilds

    i need script...:(

    EDIT: PLEASE SOME ONE HELPP ME!!! :(
    Last edited by hydramu; 20-10-12 at 08:29 PM.


  2. #2
    Sorcerer Supreme leorond is offline
    Member +Rank
    Jul 2012 Join Date
    Czech RepublicLocation
    491Posts

    Re: How to delete accounts?

    Hi try over MuMaker or another editor. And if you want to delete everything again and restore the database

  3. #3
    Newbie hydramu is offline
    MemberRank
    Jun 2010 Join Date
    16Posts

    Re: How to delete accounts?

    i dont whant to restor to lose my settings and more....pfuuu it takes a few hours to delete with mumaker....

  4. #4

    Re: How to delete accounts?

    Quote Originally Posted by hydramu View Post
    i dont whant to restor to lose my settings and more....pfuuu it takes a few hours to delete with mumaker....
    there is no exact program which deletes accounts thats the problem , so we suggest u those

    or u gotta build ur own SQL Script like


    this one

    PHP Code:
    mssql_connect("host","user","pass"); 

    // if your account tables (MEMB_STAT, MEMB_INFO) is in muonline 
    mssql_select_db("muonline"); 
      
    $q mssql_query("select memb___id,DisConnectTM from MEMB_STAT where ConnecStat=0"); 

    for(
    $i=0$i mssql_num_rows($q); $i++) 

    $d mssql_fetch_row($q); 

    // get total seconds of 30 days 
    $days30 60*60*24*30

    // get last disconnect time in seconds 
    $lastdc strtotime($d[1]); 

       
    // check if current time is 30 days greater than last dc 
       
    if((time()-$lastdc) > $days30
       { 
       
    // delete account 
       
    mssql_query("delete from MEMB_INFO where memb___id='".$d[0]."'"); 
       
    // delete characters 
       
    mssql_query("delete from characters where AccountId='".$d[0]."'"); 
       
    // delete list in AccountCharacter table 
       
    mssql_query("delete from AccountCharacter where ID='".$d[0]."'"); 
       
    // delete from MEMB_STAT 
       
    mssql_query("delete from MEMB_STAT where memb___id='".$d[0]."'"); 
       } 

    echo 
    "Done"
    deletes accounts which are inactive for 30 days.
    also this the same
    PHP Code:
    declare @neym nvarchar(10)

    DECLARE 
    my_pointer CURSOR FOR SELECT a.memb___id FROM MEMB_INFO a
    LEFT JOIN 
    (SELECT DISTINCT AccountID FROM [Character]) b
    ON a
    .memb___id b.AccountID
    WHERE b
    .AccountID IS NULL

    open my_pointer
    FETCH NEXT FROM my_pointer INTO 
    @neym WHILE
    @@
    FETCH_STATUS=0

    BEGIN
    delete from accountcharacter where 
    @neym=id
    --delete from extwarehouse where @neym=accountid
    delete from memb_info where 
    @neym=memb___id
    delete from memb_stat where 
    @neym=memb___id
    delete from vi_curr_info where 
    @neym=memb___id
    delete from warehouse where 
    @neym=accountid
    FETCH NEXT FROM my_pointer INTO 
    @neym
    END

    close my_pointer
    deallocate my_pointer

    I think is better add some tables in 
    for deletebecause if u delete the account by a editor or what the hell happens with he... he clean everything, if use the 1.1e u can remove the -- from extwarehouse, or if u wanna see the names of the peoples u are deleting try run just this code:

    Code:

    SELECT a.memb___id FROM MEMB_INFO a
    LEFT JOIN 
    (SELECT DISTINCT AccountID FROM [Character]) b
    ON a
    .memb___id b.AccountID
    WHERE b
    .AccountID IS NULL 
    or this
    delete from memb_info
    where memb___id not in (
    select memb___id from memb_stat)

    delete from accountcharacter
    where id not in (
    select memb___id from memb_stat)

    delete from character
    where accountid not in (
    select memb___id from memb_stat)

    delete from warehouse
    where accountid not in (
    select memb___id from memb_stat)

    so thats ...

  5. #5
    Newbie hydramu is offline
    MemberRank
    Jun 2010 Join Date
    16Posts

    Re: How to delete accounts?

    tnx BRo...:D

  6. #6

    Re: How to delete accounts?

    u welcome ;)



Advertisement