viewing paste Unknown #10551 | Text

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
prontera,147,190,5  script  Last Man Standing   100,{
    if ( !.start ) {
        mes "You can register later after i announce.";
        mes "Thanks :)";
        close;
    }
    if ( .start == 2 ) {
        mes "event is running";
        close;
    }
    if ( .register_count >= .register_limit ) {
        mes "this event has reach the maximum player participations";
        close;
    }
    percentheal 100,100;
    warp "pvp_n_1-3", 0,0;
    .register_aid[ .register_count ] = getcharid(3);
    .register_count+++;
    end;
OnWhisperGlobal:
    if ( getgmlevel() < 60 ) end;
OnMinute00:
OnMinute60:
    if ( .start == 2 )
        callsub L_resetmap;
    else if ( .start == 1 )
        end;
    announce "LMS event registration start", 0;
    .start = 1;
    sleep 10000; // registration timer here
    announce "LMS event registration close", 0;
    .start = 2;
    sleep 3000;
    mapannounce "pvp_n_1-3", "THIS IS SPARTA !!!!!", 0;
    if ( .register_count < .register_min ) {
        announce "not enough participants for LMS event", 0;
        mapwarp "pvp_n_1-3", .map$, .x, .y;
        callsub L_resetmap;
        end;
    }
    pvpon "pvp_n_1-3";
    end;
OnPCDieEvent:
OnPCLogoutEvent:
    if ( .start != 2 || strcharinfo(3) != "pvp_n_1-3" ) end;
    while ( .register_aid != getcharid(3) && .@i < .register_count ) .@i++;
    deletearray .register_aid[.@i], 1;
    .register_count--;
    warp "SavePoint", 0,0;
    if ( .register_count > 1 ) end;
    killmonsterall "pvp_n_1-3";
    announce "congratulations ~ the winner of LMS event is "+ rid2name( .register_aid ), 0;
    getitem .reward_item_id, .reward_item_amount, .register_aid; // winner prize
    warpchar "SavePoint", 0,0, getcharid( 0, rid2name( .register_aid ) );
    callsub L_reset;
    end;
L_resetmap:
    mapwarp "pvp_n_1-3", .map$, .x, .y;
L_reset:
    .start = 0;
    deletearray .register_aid;
    .register_count = 0;
    pvpoff "pvp_n_1-3";
    return;
OnInit:
    getmapxy .map$, .x, .y, 1;
    .register_min = 2; // minimum amount of players to start this event, or else it auto-abort
    .register_limit = 100; // maximum amount of players able to participate in this event
    .reward_item_id = 7248;
    .reward_item_amount = 30;
    end;
}
pvp_n_1-3   mapflag nosave  SavePoint
pvp_n_1-3   mapflag nowarp
pvp_n_1-3   mapflag nowarpto
pvp_n_1-3   mapflag noteleport
pvp_n_1-3   mapflag nomemo
pvp_n_1-3   mapflag nopenalty
//pvp_n_1-3 mapflag nobranch
pvp_n_1-3   mapflag noicewall
pvp_n_1-3   mapflag pvp_noparty
pvp_n_1-3   mapflag pvp_noguild
Viewed 938 times, submitted by Guest.