Jump to content
  • 0
Sign in to follow this  
minx123

Disable BG when Woe Start

Question

hello.. i need some help.. how to disable npc BG when Woe/Koe start?

 

-	script	wow_domi#main	-1,{OnInit:	.eventlasting = 25*60; // how long will the event last or it auto-reset. 25*60 = 25 mins	.minplayer2start = 2; // how many players require to start ? if 3vs3, set to 3	.score2win = 100; // score will start at 0, and end at this value	.time2capture = 3; // when capture a flag, how long does it takes to turn to your side	.distance = 3; // how far does the player allow to capture a flag ? example, if set to 15, will allow archers to capture the flag using bows	.tick[1] = 12000; // when capture 1 flag ...	.point[1] = 1; // 12 seconds to gain 1 point	.tick[2] = 9000; // when capture 2 flags ...	.point[2] = 1; // 9 seconds to gain 1 point	.tick[3] = 6000; // when capture 3 flags ...	.point[3] = 1; // 6 seconds to gain 1 point	.tick[4] = 3000; // when capture 4 flags ...	.point[4] = 1; // 3 seconds to gain 1 point	.tick[5] = 1000; // when capture ALL flags ...	.point[5] = 3; // gain 3 points every second !	.color[0] = 0xFFFFFF; // white color for uncaptured flag	.color[1] = 0x0099FF; // blue color for Alliance	.color[2] = 0xFF0000; // red color for Horde	setarray .rewardwin, 670,2, 7620,2, 7619,2; // reward to winning team	setarray .rewardlose, 670,1, 7620,1, 7619,1; // reward to losing team	.back2map$ = "florian"; // after event ends, they will warp back to this location	.back2x = 111;	.back2y = 150;//	for those who want to translate this script ...	.team1name$ = "Alliance";	.team2name$ = "Horde";	.team1base$ = "Alliance Base";	.team2base$ = "Horde Base";	.flagname$[1] = "Stable";	.flagname$[2] = "Gold Mine";	.flagname$[3] = "Blacksmith";	.flagname$[4] = "Lumber Mill";	.flagname$[5] = "Farm";	.ann$[0] = "[WoW Battleground] Alliance : %d/%d. Horde : %d/%d";	.ann$[1] = "[WoW Battleground] Battleground has started";	.ann$[2] = "[WoW Battleground] %s has captured %s !"; // Alliance has captured Stable !	.ann$[3] = "[WoW Battleground] All %s members has quit !";	.ann$[4] = "[WoW Battleground] %s has won !";	.ann$[5] = "[WoW Battleground] Time out ! Aborting the match.";		.msg$[0] = "Get out"; // not a battleground member	.msg$[1] = "Event has ended";	.msg$[2] = "Your team has captured this flag";	.msg$[3] = "You can't capture a flag while hiding";	.msg$[4] = "You have to stand nearer to the flag";//	---- END of Config ---	.tick = .eventlasting * 1000;	.rewardwinsize = getarraysize( .rewardwin );	.rewardlosesize = getarraysize( .rewardlose );	setnpcdisplay "wow_domi_base#1", .team1base$;	setnpcdisplay "wow_domi_base#2", .team2base$;	mapwarp "guild_vs2", .back2map$, .back2x, .back2y;	for ( .@i = 1; .@i <= 5; .@i++ )		setnpcdisplay "wow_domi_flag#"+ .@i, .flagname$[.@i] +"#"+ .@i;	end;OnStart:	if ( getwaitingroomstate( 0, .alliance$ ) < .minplayer2start || getwaitingroomstate( 0, .horde$ ) < .minplayer2start ) {		announce sprintf( .ann$[0], getwaitingroomstate( 0, .alliance$ ), .minplayer2start, getwaitingroomstate( 0, .horde$ ), .minplayer2start ), bc_all, 0x00CED1;		end;	}	.start = 1;	announce .ann$[1], bc_all, 0x00CED1;	.alliance = waitingroom2bg( "guild_vs2", 49, 91, strnpcinfo(0)+"::OnAllianceQuit", strnpcinfo(0)+"::OnAllianceDied", .alliance$ );	copyarray .team1aid, $@arenamembers, $@arenamembersnum;	.horde = waitingroom2bg( "guild_vs2", 49, 8, strnpcinfo(0)+"::OnHordeQuit", strnpcinfo(0)+"::OnHordeDied", .horde$ );	copyarray .team2aid, $@arenamembers, $@arenamembersnum;	.team1count = .team2count = .minplayer2start;	donpcevent "wow_domi_score_team#1::OnStart";	donpcevent "wow_domi_score_team#2::OnStart";	bg_warp .alliance, "guild_vs2", 50,92;	bg_warp .horde, "guild_vs2", 50,7;	delwaitingroom .alliance$;	delwaitingroom .horde$;	disablenpc .alliance$;	disablenpc .horde$;	donpcevent "wow_domi_viewpoint::OnStart";	sleep .eventlasting * 1000;	.start = 2;	awake "wow_domi_score_team#1";	awake "wow_domi_score_team#2";	if ( .winside ) {		mapannounce "guild_vs2", sprintf( .ann$[4], getd( ".team"+ .winside +"name$" ) ), bc_map, 0x00CED1;		callsub L_reward, .winside, .rewardwin, .rewardwinsize;		callsub L_reward, ( .winside == 1 )? 2:1, .rewardlose, .rewardlosesize;		sleep 5000;	}	else		mapannounce "guild_vs2", .ann$[5], bc_map, 0x00CED1;	donpcevent "wow_domi_viewpoint::OnEnd";	mapwarp "guild_vs2", .back2map$, .back2x, .back2y;	bg_destroy .alliance;	bg_destroy .horde;	enablenpc .alliance$;	enablenpc .horde$;	donpcevent .alliance$ +"::OnStart";	donpcevent .horde$ +"::OnStart";	for ( .@i = 1; .@i <= 5; .@i++ )		setnpcdisplay .flagname$[.@i], 722;	cleararray .flag[1], 0, 5;	deletearray .team1capture;	deletearray .team2capture;	.start = .score[1] = .score[2] = .alliance = .horde = .winside = .team1capturesize = .team2capturesize = 0;	end;L_reward:	for ( .@i = 0; .@i < getd(".team"+ getarg(0) +"count"); .@i++ )		for ( .@j = 0; .@j < getarg(2); .@j += 2 )			getitem getelementofarray( getarg(1), .@j ), getelementofarray( getarg(1), .@j +1 ), getd(".team"+ getarg(0) +"aid["+ .@i +"]" );	return;OnAllianceDied: callsub L_died, 1;OnHordeDied: callsub L_died, 2;L_died:	sleep2 1250;	percentheal 100,100;	if ( getcharid(4) )		for ( .@i = 1; .@i <= 5; .@i++ )			viewpoint 1, .flagx[.@i], .flagy[.@i], .@i, .color[ .flag[.@i] ];	end;OnAllianceQuit: callsub L_quit, 1, 2;OnHordeQuit: callsub L_quit, 2, 1;L_quit:	while ( getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ) != getcharid(3) && .@i < getd(".team"+ getarg(0) +"count") ) .@i++;	deletearray getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ), 1;	setd ".team"+ getarg(0) +"count", getd(".team"+ getarg(0) +"count") -1;	if ( bg_get_data( getarg(0), 0) ) end;	announce sprintf( .ann$[3], getd( ".team"+ getarg(0) +"name$" ) ), bc_map, 0xFF0000;	.winside = getarg(1);	awake strnpcinfo(0);	end;OnDebug:	announce "Alliance", 0;	for ( .@i = 0; .@i < .team1capturesize; .@i++ )		announce ( .@i +1 )+". "+ .flagname$[ .team1capture[.@i] ], 0;	announce "Horde", 0;	for ( .@i = 0; .@i < .team2capturesize; .@i++ )		announce ( .@i +1 )+". "+ .flagname$[ .team2capture[.@i] ], 0;	end;}-	script	wow_domi_viewpoint	-1,{OnStart:	sleep 7000; // long enough I guess ?OnCapture:	callsub L_display, 1;	end;OnEnd:	callsub L_display, 2;	end;L_display:	.@main$ = "wow_domi#main";	for ( .@j = 1; .@j <= 2; .@j++ ) {		for ( .@i = 0; .@i < getvariableofnpc( getd(".team"+ .@j +"count"), .@main$ ); .@i++ ) {			attachrid getvariableofnpc( getd(".team"+ .@j +"aid["+ .@i +"]"), .@main$ );			for ( .@k = 1; .@k <= 5; .@k++ )				viewpoint getarg(0), getvariableofnpc( .flagx[.@k], .@main$ ), getvariableofnpc( .flagy[.@k], .@main$ ), .@k, getvariableofnpc( getelementofarray( .color, getvariableofnpc( .flag[.@k], .@main$ ) ), .@main$ );		}	}	end;}-	script	wow_domi_score_team	-1,{OnStart:	.@team = atoi( strnpcinfo(2) );	.@main$ = "wow_domi#main";	while ( getvariableofnpc( .start, .@main$ ) == 1 ) {		.@catched = getvariableofnpc( getd( ".team"+ .@team +"capturesize" ), .@main$ );		.@tick = getvariableofnpc( .tick[ .@catched ], .@main$ );		set getvariableofnpc( .score[.@team], .@main$ ), getvariableofnpc( .score[.@team], .@main$ ) + getvariableofnpc( .point[ .@catched ], .@main$ );		if ( getvariableofnpc( .score[.@team], .@main$ ) >= getvariableofnpc( .score2win, .@main$ ) ) {			set getvariableofnpc( .winside, .@main$ ), .@team;			awake .@main$;			if ( .@team == 1 )				bg_updatescore "guild_vs2", 100, getvariableofnpc( .score[2], .@main$ );			else				bg_updatescore "guild_vs2", getvariableofnpc( .score[1], .@main$ ), 100;			break;		}		bg_updatescore "guild_vs2", getvariableofnpc( .score[1], .@main$ ), getvariableofnpc( .score[2], .@main$ );		sleep .@tick;	}	end;}-	duplicate(wow_domi_score_team)	wow_domi_score_team#1	-1-	duplicate(wow_domi_score_team)	wow_domi_score_team#2	-1-	script	wow_domi_flag	-1,{	.@id = atoi( strnpcinfo(2) );	.@main$ = "wow_domi#main";	.@alliance = getvariableofnpc( .alliance, .@main$ );	.@horde = getvariableofnpc( .horde, .@main$ );	.@flag = getvariableofnpc( .flag[.@id], .@main$ );	if ( !getcharid(4) || ( getcharid(4) != .@alliance && getcharid(4) != .@horde ) ) {		message strcharinfo(0), getvariableofnpc( .msg$[0], .@main$ );		end;	}	if ( getvariableofnpc( .start, .@main$ ) != 1 ) {		message strcharinfo(0), getvariableofnpc( .msg$[1], .@main$ );		end;	}	if ( getcharid(4) == .@alliance && .@flag == 1 || getcharid(4) == .@horde && .@flag == 2 ) {		message strcharinfo(0), getvariableofnpc( .msg$[2], .@main$ );		end;	}	if ( checkoption(0x4046) ) {		message strcharinfo(0), getvariableofnpc( .msg$[3], .@main$ );		end;	}	getmapxy .@map$, .@x, .@y, 0;	getmapxy .@map$, .@x1, .@y1, 1;	if ( distance( .@x, .@y, .@x1, .@y1 ) > getvariableofnpc( .distance, .@main$ ) ) {		message strcharinfo(0), getvariableofnpc( .msg$[4], .@main$ );		end;	}	progressbar "", getvariableofnpc( .time2capture, .@main$ );	if ( getvariableofnpc( .start, .@main$ ) != 1 ) {		message strcharinfo(0), getvariableofnpc( .msg$[1], .@main$ );		end;	}	.@flag = getvariableofnpc( .flag[.@id], .@main$ );	if ( getcharid(4) == .@alliance && .@flag == 1 || getcharid(4) == .@horde && .@flag == 2 ) {		message strcharinfo(0), getvariableofnpc( .msg$[2], .@main$ );		end;	}	.@team = ( getcharid(4) == .@alliance )? 1 : 2;	set getvariableofnpc( .flag[.@id], .@main$ ), .@team;	setnpcdisplay "wow_domi_flag#"+ .@id, ( .@team == 1 )? 1_FLAG_LION : 1_FLAG_EAGLE;	announce sprintf( getvariableofnpc( .ann$[2], .@main$ ), getvariableofnpc( getd( ".team"+ .@team +"name$" ), .@main$ ), getvariableofnpc( .flagname$[.@id], .@main$ ) ), bc_map, 0x00CED1;	bg_team_setxy getcharid(4), getvariableofnpc( .flagx[.@id], .@main$ ), getvariableofnpc( .flagy[.@id], .@main$ );	set getvariableofnpc( getd( ".team"+ .@team +"capture["+ getvariableofnpc( getd( ".team"+ .@team +"capturesize" ), .@main$ ) +"]" ), .@main$ ), .@id;	set getvariableofnpc( getd( ".team"+ .@team +"capturesize" ), .@main$ ), getvariableofnpc( getd( ".team"+ .@team +"capturesize" ), .@main$ ) +1;	awake "wow_domi_score_team#"+ .@team;	.@team = ( .@team == 1 )? 2 : 1;	while ( getvariableofnpc( getd( ".team"+ .@team +"capture["+ .@i +"]" ), .@main$ ) != .@id && .@i < getvariableofnpc( getd( ".team"+ .@team +"capturesize" ), .@main$ ) ) .@i++;	if ( .@i < getvariableofnpc( getd( ".team"+ .@team +"capturesize" ), .@main$ ) ) {		copyarray getelementofarray( getvariableofnpc( getd( ".team"+ .@team +"capture" ), .@main$ ), .@i ), getelementofarray( getvariableofnpc( getd( ".team"+ .@team +"capture" ), .@main$ ), .@i +1 ), getvariableofnpc( getd( ".team"+ .@team +"capturesize" ), .@main$ );		set getvariableofnpc( getd( ".team"+ .@team +"capturesize" ), .@main$ ), getvariableofnpc( getd( ".team"+ .@team +"capturesize" ), .@main$ ) -1;		.@teamid = ( getcharid(4) == .@alliance )? .@horde : .@alliance;		if ( getvariableofnpc( getd( ".team"+ .@team +"capturesize" ), .@main$ ) ) {			.@id = getelementofarray( getvariableofnpc( getd( ".team"+ .@team +"capture" ), .@main$ ), getvariableofnpc( getd( ".team"+ .@team +"capturesize" ), .@main$ ) -1 );//			announce ".@id = "+ .@id +" means "+ getvariableofnpc( getd(".team"+ .@team +"name$"), .@main$ ) +" last id is "+ getelementofarray( getvariableofnpc( .flagname$, .@main$ ), .@id ) , 0;			bg_team_setxy .@teamid, getvariableofnpc( .flagx[.@id], .@main$ ), getvariableofnpc( .flagy[.@id], .@main$ );		}		else if ( .@teamid == .@alliance )			bg_team_setxy .@teamid, 49, 91;		else			bg_team_setxy .@teamid, 49, 8;	}	donpcevent "wow_domi_viewpoint::OnCapture";//	donpcevent .@main$+"::OnDebug";	end;OnInit:	sleep 1;	.@id = atoi( strnpcinfo(2) );	.@main$ = "wow_domi#main";	getmapxy .@map$, getvariableofnpc( .flagx[.@id], .@main$ ), getvariableofnpc( .flagy[.@id], .@main$ ), 1;	set getvariableofnpc( .flagx[.@id], .@main$ ), getvariableofnpc( .flagx[.@id], .@main$ )+1;	end;}guild_vs2,49,69,4	duplicate(wow_domi_flag)	wow_domi_flag#1	722guild_vs2,72,50,4	duplicate(wow_domi_flag)	wow_domi_flag#2	722guild_vs2,49,49,4	duplicate(wow_domi_flag)	wow_domi_flag#3	722guild_vs2,26,49,4	duplicate(wow_domi_flag)	wow_domi_flag#4	722guild_vs2,49,28,4	duplicate(wow_domi_flag)	wow_domi_flag#5	722-	script	wow_domi_base	-1,{	end;}guild_vs2,50,92,5	duplicate(wow_domi_base)	wow_domi_base#1	973guild_vs2,50,7,5	duplicate(wow_domi_base)	wow_domi_base#2	974florian,142,120,5	script	Alliance	100,{	end;OnInit:	sleep 1;	set getvariableofnpc( .alliance$, "wow_domi#main" ), strnpcinfo(0);OnStart:	waitingroom strnpcinfo(1), getvariableofnpc( .minplayer2start, "wow_domi#main" ) +1, "wow_domi#main::OnStart", 1;	end;}florian,134,120,5	script	Horde	100,{	end;OnInit:	sleep 1;	set getvariableofnpc( .horde$, "wow_domi#main" ), strnpcinfo(0);OnStart:	waitingroom strnpcinfo(1), getvariableofnpc( .minplayer2start, "wow_domi#main" ) +1, "wow_domi#main::OnStart", 1;	end;}guild_vs2	mapflag	battleground	2guild_vs2	mapflag	nosave	SavePointguild_vs2	mapflag	nowarpguild_vs2	mapflag	nowarptoguild_vs2	mapflag	noteleportguild_vs2	mapflag	nomemoguild_vs2	mapflag	nopenaltyguild_vs2	mapflag	nobranchguild_vs2	mapflag	noicewall

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.