Where is Account cleaner ?

This is where you can post about tools related specifically to the POL Server itself
Post Reply
CrazyMan
Expert Poster
Posts: 71
Joined: Wed Apr 05, 2006 8:08 am

Where is Account cleaner ?

Post by CrazyMan »

How i now pol cant delete account from the scripts.
Where i can find perl or some like that script for clean my accounts.txt - delete all baned accounts ?
Shinigami
Former Developer
Posts: 308
Joined: Mon Jan 30, 2006 9:28 am

Re: Where is Account cleaner ?

Post by Shinigami »

CrazyMan wrote:How i now pol cant delete account from the scripts.
...in Pol096

Shinigami
Last edited by Shinigami on Tue Apr 18, 2006 12:50 am, edited 2 times in total.
CrazyMan
Expert Poster
Posts: 71
Joined: Wed Apr 05, 2006 8:08 am

Post by CrazyMan »

my bad english....
How i can delete all banned accounts?
CrazyMan
Expert Poster
Posts: 71
Joined: Wed Apr 05, 2006 8:08 am

Post by CrazyMan »

*Stupid CrazyMan...*


05-25 Shinigami
Added : Account.delete() - delete this empty account
Added : Account.split( newacctname : string, index : 1..5 )
create a new account and move character to it
Added : Account.move_char( destacctname : string, index : 1..5 )
move character from this account to destination account.
you can use it to flip chars on same account too - it's not a bug, it's a feature ;oP

Sorry...
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

I am sorry, as I still noob in scripting, you could not show me how this script looks. Thanks.
CrazyMan
Expert Poster
Posts: 71
Joined: Wed Apr 05, 2006 8:08 am

Post by CrazyMan »

Code: Select all

use uo;
program newbie_acccleaner()

var acc_list := ListAccounts();
var account;
foreach acc_name in acc_list
    account := FindAccount(acc_name);
    account.Delete();
endforeach

endprogram
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

very interesting, but! How it work? .acccleaner [acc] and nothing has occured! Tell please, how it work. Thanks.
FreeSoul
Master Poster
Posts: 90
Joined: Sat Feb 04, 2006 9:14 am

Post by FreeSoul »

Account.delete() - delete this empty account
EMPTY account

Code: Select all

use uo; 
include "util/bank";
program acccleaner(who, name)
    var account; 
    account := FindAccount(name);
    if (account)
       var char,cnt;
       for(cnt :=1; cnt <=5; cnt :=cnt+1)
          char := account.getcharacter(cnt);
          if (char)
               SendSysMessage(who, "character at slot "+cnt);
               if (WipeBankBox( char ))
                  SendSysMessage(who, "Bankbox wiped!");
               else
                  SendSysMessage(who, "no bankbox to wipe!");
               endif
               foreach thing in listequippeditems(char)
                  Destroyitem(thing);
              endforeach
              SendSysMessage(who, "equippment destroyed!");
                    account.deletecharacter(cnt);
          endif
       endfor
       account.Delete(); 
    else
       SendSysMessage(who,"no account with that name");
    endif
endprogram
Post Reply