viewing paste @killboss command | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
/*=========================================================
@killboss command
by Mumbles
===========================================================
Description:
Kills all monsters (and bosses) on specified maps. Useful 
after @reloadscript (but why @reloadscript...?).
===========================================================
Compatibility:
Optimised for Hercules emulators.
===========================================================
Changelog:
v1.0 - First version.
=========================================================*/
 
-   script  killboss    -1,{
 
    OnInit:
        // Desired maps to clear
        setarray .map$[0]"abbey02",      // Fallen Bishop Hibram
                            "abbey03",      // Beelzebub
                            "abyss_03",     // Detale
                            "ama_dun03",    // Samurai Specter
                            "anthell02",    // Maya
                            "ayo_dun02",    // Lady Tanee
                            "beach_dun",    // Tao Gunka
                            "ein_dun02",    // RSX-0806
                            "gef_dun01",    // Dracula
                            "gef_dun02",    // Doppelganger
                            "gef_fild02",   // Orc Hero
                            "gef_fild10",   // Orc Lord
                            "gef_fild14",   // Orc Hero
                            "gl_chyard",    // Dark Lord
                            "gld_dun01",    // Eddga
                            "gld_dun02",    // Doppelganger
                            "gld_dun03",    // Maya
                            "gld_dun04",    // Dark Lord
                            "gon_dun03",    // Evil Snake Lord
                            // "ice_dun03",     // Ktullanux
                            "in_sphinx5",   // Pharaoh
                            "jupe_core",    // Vesper
                            "kh_dun02",     // Kiel D-01
                            "lhz_dun02",    // Egnigem Cenia
                            // "lhz_dun03",     // Assassin Cross Eremes, High Priest Margaretha, High Wizard Kathryne, Lord Knight Seyren, Sniper Cecil, Whitesmith Howard
                            "lou_dun03",    // White Lady
                            "mjolnir_04",   // Mistress
                            "moc_fild17",   // Phreeoni
                            "moc_pryd04",   // Osiris
                            "moc_pryd06",   // Amon Ra
                            "mosk_dun03",   // Zmey Gorynych
                            // "niflheim",      // Lord of Death
                            "odin_tem03",   // Valkyrie Randgris
                            "pay_dun04",    // Moonlight Flower
                            "pay_fild11",   // Eddga
                            "prt_maze03",   // Baphomet
                            "prt_sewb4",    // Golden Thief Bug
                            "ra_fild02",    // Atroce
                            "ra_fild03",    // Atroce
                            "ra_fild04",    // Atroce
                            "ra_san05",     // Gloom Under Night
                            "thor_v03",     // Ifrit
                            "treasure02",   // Drake
                            "tur_dun04",    // Turtle General
                            "ve_fild01",    // Atroce
                            "ve_fild02",    // Atroce
                            "xmas_dun02",   // Stormy Knight
                            "xmas_fild01"// Garm
                            
        // Execution offset (in ms) to reduce server load
        .delay = 50;
        
        // Create atcommand @killboss
        bindatcmd "killboss", strnpcinfo(3) +"::OnKillBoss", 99, 99;
        end;
 
    OnKillBoss:
        // Loop through all maps
        for (.@i = 0; .@i < getarraysize(.map$); .@i++) {
            // Kill all monsters on current map
            killmonsterall .map$[.@i];
            
            // Slow down script execution (reduces load)
            sleep .delay;
        }
    
        message strcharinfo(0), .@i +" boss maps have been cleared.";
        end;
    
}
 
Viewed 1383 times, submitted by mumbles.