viewing paste Unknown #53351 | 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
bat_room,82,97,5    script  BG DeathMatch   1_F_MARIA,{
    if(getgmlevel() >= 60) {
OnCommand:
        while(.@players < 2 || .@players > 5) {
            message strcharinfo(PC_NAME),"How many players per team?";
            input .@players;
            if(!.@players)
                end;
        }
        while(.@rounds < 2 || .@rounds > 5) {
            message strcharinfo(PC_NAME),"How many rounds?";
            input .@rounds;
            if(!.@rounds)
                end;
        }
        .minplayer2start = .@players;
        .winningscore = .@rounds;
        .active = true;
        end;
    }   
    if(!.active) {
        message strcharinfo(PC_NAME),"The BG is not active.";
        end;
    }
    goto L_dialog;
OnInit:
    RegisterSchedule("*",13,04,"Death Match");
    disablenpc "BG DeathMatch";
    disablenpc "DeathMatch";
    disablenpc "Berry Ticket NPC";
    bindatcmd "battle", strnpcinfo(0)+"::OnCommand" , 99,100;
    .partysize = 1; // minimum number of players on each side needed to start this event. eg: 2vs2 = 2
    .winningscore = 2; // how many rounds to win
    .eventlasting = 20*60; // each round last 20 minutes or the system abort itself
    setarray .rewardwin, 12103,1, 30000,5; // reward to winning team
    setarray .rewardlose, 675,1; // reward to losing team
    .rewardwinsize = getarraysize( .rewardwin );
    .rewardlosesize = getarraysize( .rewardlose );
    setwall "bat_c03", 50,130, 2, DIR_NORTHEAST, false, "bg_pvp_round_red_respawn";
    setwall "bat_c03", 148,52, 2, DIR_NORTHEAST, false, "bg_pvp_round_blue_respawn";
    end;
Viewed 582 times, submitted by Guest.