viewing paste Unknown #53498 | 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
-   script  GM Command  -1,{
OnInit:
    bindatcmd "kvm", strnpcinfo(0)+"::OnCommand",40,40;
OnCommand:
switch(select("Turn ON/OFF Event:Set Players & Rounds")) {
case 1:
        if (.play) {
        mes " The Event is currently ON ";
        } else {
        mes " The Event is currently OFF ";
        mes "Would you like to ON? ";
        }
        if(select("Yes:No")==2) close;
        close2;
        if (.play) {
        set .play,0;
        disablenpc "DeathMatch";
        disablenpc "BG DeathMatch";
        announce " A GM has turn the Event OFF", 0;
        end;
        }
        set .play,1;
        announce " The Event will start in a few moments", 0;
        goto OnStart;
        end;
        }
mes "You can set the number of players and rounds in Deathmatch";
next;
mes "Input Players per Team";
mes "ex: 2 = 2v2";
mes "Min. 2 [ per Team ] Max. 20";
        while(.@players < 2 || .@players > 20) {
            input .@players;
            if(!.@players)
            end;
        }
        next;
mes "Input Event Round/s";
mes "Min. 1 [ per Round ] Max. 5";
        while(.@rounds < 1 || .@rounds > 5) {
            input .@rounds;
            if(!.@rounds)
                end;
        }
        .partysize = .@players;
        .winningscore = .@rounds;
        .active = true;
        end;
    }   
    if(!.active) {
        message strcharinfo(PC_NAME),"The BG is not active.";
        end;
    }   
 
 
 
prontera,157,179,5  script  DeathMatch  1_M_BARD,{
    mes "[DeathMatch]";
    mes "Warping to Registration Room";
    close2;
    warp "bat_room",85,93;
    close;
    }
                        
bat_room,82,97,5    script  BG DeathMatch   1_F_MARIA,{
    goto L_dialog;
    
OnInit:
    RegisterSchedule("*",13,04,"Death Match");
    disablenpc "BG DeathMatch";
    disablenpc "DeathMatch";
    disablenpc "Berry Ticket NPC";
    disablenpc "Gamemaster";
    .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 = 5*60; // each round last 5 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;
    
    
OnStart:
    set .play,1;
    enablenpc "Gamemaster";
    announce "BG Deathmatch: Registration will open in 3 Minutes!!", 0;
    sleep 1000;
    announce "BG Deathmatch: Registration will open in 2 Minutes!!", 0;
    sleep 1000;
    announce "BG Deathmatch: Registration will open in 1 Minute!!", 0;
    sleep 1000;
    announce "BG Deathmatch: Only the first "+ .partysize *2 +" players to register will be able to join", 0;
    sleep 1000;
    announce "BG Deathmatch: First team to get "+ .winningscore +" point/s will win the event", 0;
    sleep 1000;
    announce "BG Deathmatch: Registration will open in 30 seconds!!",0;
    sleep 1000;
    announce "BG Deathmatch: Warper is Located at Prontera 156,132",0;
    sleep 1000;
    announce "BG Deathmatch: Registration is now open", 0;
    enablenpc "DeathMatch";
    sleep 1000;
    enablenpc "BG DeathMatch";
    end;
Viewed 5215 times, submitted by Guest.