Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script bghappy_1 -1,{
- OnInit:
- bindatcmd "bghappy", strnpcinfo( 3 ) + "::OnBGHappyhour", 40, 99;
- end;
- OnBGHappyhour:
- // ---[ Bonus Rates ]-----------
- .@rate = atoi( .@atcmd_parameters$[ 0 ] );
- .minutes = atoi( .@atcmd_parameters$[ 1 ] );
- setbattleflag "bg_reward_rates", 100 + .@rate;
- if( .@rate ) {
- .@ranked = 1;
- dispbottom "Battlegrounds Happyhour +" + .@rate + "% mode is ON for " + .minutes +" minutes.";
- } else {
- .@ranked = 0;
- dispbottom "Battlegrounds Happyhour mode is OFF.";
- }
- setbattleflag "bg_ranked_mode", .@ranked;
- // ---[ Bonus Minutes ]-----------
- if ( .minutes )
- {
- initnpctimer "" + strnpcinfo(0) + "";
- }
- end;
- OnTimer60000:
- .minutes = .minutes - 1;
- if ( .minutes == 0 )
- {
- .@ranked = 0;
- announce "Battlegrounds Happyhour mode is OFF.",0,0x00FF00;
- setbattleflag "bg_reward_rates", 100;
- setbattleflag "bg_ranked_mode", 0;
- stopnpctimer;
- end;
- }
- announce "" + .minutes + " minutes left to end Battlegrounds Happyhour.",0x00FF00;
- stopnpctimer;
- initnpctimer;
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement