viewing paste Unknown #21792 | 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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
prontera,148,172,5  script  Run Or Die  100,{
    set .@size, getarraysize( getvariableofnpc( .aid, "runordie" ) );
    if ( .@size >= 100 ) {
        mes "I'm sorry, the room is full";
        close;
    }
    percentheal 100, 100;
    warp "guild_vs5", 0, 0;
    set getvariableofnpc( .aid[ .@size ], "runordie" ), getcharid(3);
    end;
}
-   script  runordie    -1,{
OnInit:
    disablenpc "Run Or Die";
    end;
 
OnWhisperGlobal:
    if ( getgmlevel() < 99 ) end;
    else if ( compare( @whispervar0$ , "debug" ) ) {
        dispbottom "Player left: "+ getarraysize(.aid);
        end;
    }
    else if ( compare( @whispervar0$, "on" ) == 0 ) end;
OnClock0145: // these are time to start event
OnClock0445:
OnClock0745:
OnClock1045:
OnClock1345:
OnClock1645:
OnClock1945:
OnClock2245:
    enablenpc "Run Or Die";
    deletearray .aid;
    mapwarp "guild_vs5", "prontera", 148,172;
    killmonsterall "guild_vs5";
    set .stop, 1;
    announce "Run Or Die!!!: Are you ready to join Run Or Die event???", 0;
    sleep 4000;
    announce "Run Or Die: For Those who dare to join please '@warp prontera 148 172' to participate", 0;
    sleep 6000;
    announce "Run Or Die: Register time will be closing after 1 minute", 0;
    sleep 20000;
    announce "Run Or Die: Last 30 second", 0;
    sleep 10000;
    announce "Run Or Die: Rush type in '@warp prontera 148 172' to join", 0;
    sleep 10000;
    announce "Run Or Die: Last 10 second to register", 0;
    sleep 5000;
    announce "Run Or Die: 5", 0;
    sleep 1000;
    announce "Run Or Die: 4", 0;
    sleep 1000;
    announce "Run Or Die: 3", 0;
    sleep 1000;
    announce "Run Or Die: 2", 0;
    sleep 1000;
    announce "Run Or Die: 1", 0;
    sleep 1000;
    announce "Run Or Die: Time is up...I will come again 3 hour later..", 0;
    disablenpc "Run Or Die";
    mapannounce "guild_vs5", "Welcome to Run Or Die event", 0;
    sleep 3000;
    mapannounce "guild_vs5", "This is an easy event", 0;
    sleep 3000;
    mapannounce "guild_vs5", "Just stay AWAY from anything that you think its DANGEROUS!!", 0;
    sleep 3000;
    mapannounce "guild_vs5", "Stay alive as long as YOU CAN!!!!", 0;
    sleep 3000;
    mapannounce "guild_vs5", "The LAST SURVIVOR will be the WINNER", 0;
    sleep 3000;
    mapannounce "guild_vs5", "event will start in 3", 0;
    sleep 1000;
    mapannounce "guild_vs5", "2...", 0;
    sleep 1000;
    mapannounce "guild_vs5", "1...", 0;
    sleep 1000;
    mapannounce "guild_vs5", "Its time to run !!", 0;
    donpcevent "runordie::Onstart";
    set .stop, 0;
    while ( .stop == 0 ) {
        set .@extra, .@extra + rand(1,2);
        set .@round, .@round +1;
        monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 2 + .@extra, 0;
        monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 2 + .@extra, 2;
        monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 2 + .@extra, 4;
        sleep 5000;
    }
    end;
Onstart:
    while ( getarraysize(.aid) > 1 ) {
        sleep 500;
        for ( set .@i, 0; .@i < getarraysize(.aid); set .@i, .@i +1 ) {
            if ( isloggedin(.aid[.@i]) == 0 ) {
                deletearray .aid[.@i], 1;
                set .@i, .@i -1;
            }
            else {
                attachrid .aid[.@i];
                if ( strcharinfo(3) != "guild_vs5" || hp == 0 ) {
                    deletearray .aid[.@i], 1;
                    set .@i, .@i -1;
                }
            }
        }
    }
    detachrid;
    set .stop, 1;
    killmonsterall "guild_vs5";
    if ( getarraysize(.aid) == 1 ) {
        announce "congratulations ~ the winner is "+ rid2name(.aid), 0;
        sleep 5000;
        announce rid2name(.aid) +" Win 5 Ancient Box Of Bloody", 0;
        attachrid .aid;
        getitem 30000, 5; // winner prize
        warp "prontera", 148,172;
        deletearray .aid;
    }
    else {
        announce "nobody is a winner, too bad", 0;
    }
    end;
}
guild_vs5   mapflag nowarp
guild_vs5   mapflag nowarpto
guild_vs5   mapflag noteleport
guild_vs5   mapflag nosave  SavePoint
guild_vs5   mapflag noskill
guild_vs5   mapflag nomemo
Viewed 1072 times, submitted by Guest.