master
Raw Download raw file
 1// ________                                                _________
 2// \________\--------___       ___         ____----------/_________/
 3//     \_______\----\\\\\\   //_ _ \\    //////-------/________/
 4//         \______\----\\|| (( ~|~ )))  ||//------/________/
 5//             \_____\---\\ ((\ = / ))) //----/_____/
 6//                  \____\--\_)))  \ _)))---/____/
 7//                        \__/  (((     (((_/
 8// ヾღ彡                   |  -)))  -  ))
 9// =================================================================
10// _empty.js
11// -----------------------------------------------------------------
12// author:  @archangel
13// SEC LVL: 1  ==** WARNING **==
14// Chars:   418
15// Descr:   Empties your current balance and unloaded upgrades into
16//          your alt account (or mine if you are not carefull).
17// Syntax:  _empty
18// =================================================================
19 
20function (context, args)
21{
22
23    var ret;                                                        //
24    var log;                                                        //
25    var l = #s.scripts.lib();                                       //
26    var i;                                                          //
27
28    //SEC_LVL 3
29    var balance = #s.accts.balance();                               // Get the current balance of your account.
30    //SEC_LVL 1
31    var upgrades = #s.sys.upgrades();                               // Get the all the upgrades of your account.
32    
33    ret = l.to_gc_str(balance) + " transferred: ";                  //
34
35    //SEC_LVL 2
36    log = #s.accts.xfer_gc_to({to:"loot", amount:balance});         // Tranfer the whole $balance to "loot". Change "loot" to your own name or else you will send all your money to me. You have been warned.
37    ret += "\t" + log.ok + "\t" + log.msg;                          //
38
39    for (i=upgrades.length-1; i>-1; i--)                            //
40    {
41        ret += "\n" + upgrades[i].name + " transferred: ";          //
42        //SEC_LVL 1
43        log = #s.sys.xfer_upgrade_to({i:i, to:"loot"});             // Tranfer all the unloaded upgrades to "loot". Change "loot" to your own name or else you will send all your upgrades to me. You have been warned.
44        ret += "\t" + log.ok + "\t" + log.msg;                      //
45    }
46    
47    return ret;                                                     // Print the log.
48   
49}