Jump to content
  • 0

Annieruru Custom BG


Yoona

Question


  • Group:  Members
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  567
  • Reputation:   18
  • Joined:  04/15/13
  • Last Seen:  

Hello, I hope Annie can read this post :) since it's her script.

 

All i want to do is, Every game has 3 Rounds. 

 

So if the Player Died they will be teleported but can't move and cannot be hit by other team. until the round is done. then with a timer after they can start fighting. and change the place into bat_b01. thanks!

-	script	custom_bg#control	-1,{
OnInit:
	set .minplayer2start, 7; // minimum player to start ... please do not set to 1
	setarray .rewarditem,
		22001, 200, // reward to the winning team
		22001, 50; // reward to the losing team
	set .startingscore, 30; // score at start
	set .eventlasting, 20*60; // event last 20 minutes or the system abort itself
	set .red_cloth, 1; // color value from red clothing
	set .blue_cloth, 2; // color value from blue clothing
	set .grey_cloth, 3; // color value from grey clothing
	end;
OnStart:
	if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) {
		announce " [ Battle Ground DeathMatch System ]  Blue Team : "+ getwaitingroomstate( 0, .bluenpcname$ ) + "/" + .minplayer2start + ". Red Team : "+ getwaitingroomstate( 0, .rednpcname$ ) + "/" + .minplayer2start,bc_all,0x00CED1;
		end;
	}
	.red = waitingroom2bg( "guild_vs3", 13,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead", .rednpcname$ );
	copyarray .team1aid, $@arenamembers, $@arenamembersnum;
	.team1count = .minplayer2start;
	.blue = waitingroom2bg( "guild_vs3", 86,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead", .bluenpcname$ );
	copyarray .team2aid, $@arenamembers, $@arenamembersnum;
	.team2count = .minplayer2start;
	delwaitingroom .rednpcname$;
	delwaitingroom .bluenpcname$;
	bg_warp .red, "guild_vs3", 13,50;
	bg_warp .blue, "guild_vs3", 86,50;
	.score[1] = .score[2] =.startingscore;
	bg_updatescore "guild_vs3", .score[1], .score[2];
	callsub L_setleader, 1;
	callsub L_setleader, 2;
	for ( .@i = 0; .@i < .minplayer2start; .@i++ ) {
		attachrid .team1aid[.@i];
		@clotes_color = getlook( look_clothes_color );
		setlook look_clothes_color, ( .leader_aid[1] == getcharid(3) )? .grey_cloth : .red_cloth;
	}
	for ( .@i = 0; .@i < .minplayer2start; .@i++ ) {
		attachrid .team2aid[.@i];
		@clotes_color = getlook( look_clothes_color );
		setlook look_clothes_color, ( .leader_aid[2] == getcharid(3) )? .grey_cloth : .blue_cloth;
	}
	sleep .eventlasting * 1000;
	if ( .score[1] > .score[2] ) {
		mapannounce "guild_vs3", "red side wins !", 0;
		callsub L_reward, 1, 0;
		callsub L_reward, 2, 2;
	}
	else if ( .score[1] < .score[2] ) {
		mapannounce "guild_vs3", "blue side wins !", 0;
		callsub L_reward, 2, 0;
		callsub L_reward, 1, 2;
	}
	else {
		mapannounce "guild_vs3", "Draw !", 0;
		callsub L_reward, 1, 2;
		callsub L_reward, 2, 2;
	}
	bg_warp .red, "prontera",152,178;
	bg_warp .blue, "prontera",154,178;
	bg_destroy .red;
	bg_destroy .blue;
	donpcevent .rednpcname$ +"::OnStart";
	donpcevent .bluenpcname$ +"::OnStart";
	.leader_aid[1] = .leader_aid[2] = 0;
	for ( .@i = 0; .@i < .team1count; .@i++ ) {
		attachrid .team1aid[.@i];
		setlook look_clothes_color, @clotes_color;
		@clotes_color = 0;
	}
	for ( .@i = 0; .@i < .team2count; .@i++ ) {
		attachrid .team2aid[.@i];
		setlook look_clothes_color, @clotes_color;
		@clotes_color = 0;
	}
	end;
L_reward:
	for ( .@i = 0; .@i < getd(".team"+ getarg(0) +"count"); .@i++ )
		getitem .rewarditem[ getarg(1) ], .rewarditem[ getarg(1) +1 ], getd(".team"+ getarg(0) +"aid["+ .@i +"]" );
	return;
OnredDead: callsub L_dead, 1;
OnblueDead: callsub L_dead, 2;
L_dead:
	if ( .leader_aid[ getarg(0) ] != getcharid(3) )
		.score[ getarg(0) ]--;
	else {
		callsub L_setleader, getarg(0);
		.score[ getarg(0) ] -= 2;
	}
	bg_updatescore "guild_vs3", .score[1], .score[2];
	if ( .score[ getarg(0) ] <= 0 )
		awake strnpcinfo(0);
	sleep2 1250;
	percentheal 100,100;
	end;
OnredQuit: callsub L_quit, 1, .red;
OnblueQuit: callsub L_quit, 2, .blue;
L_quit:
	percentheal 100, 100;
	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 ( .leader_aid[ getarg(0) ] == getcharid(3) )
		callsub L_setleader, getarg(0);
	setlook look_clothes_color, @clotes_color;
	@clotes_color = 0;
	if ( bg_get_data( getarg(1), 0 ) > 1 ) end;
	.score[ getarg(0) ] = 0;
	awake strnpcinfo(0);
	end;
L_setleader:
	while ( ( .@tmp = getd( ".team"+ getarg(0) +"aid["+ rand( getd(".team"+ getarg(0) +"count") ) +"]" ) ) == playerattached() );
	.leader_aid[ getarg(0) ] = .@tmp;
	.@origin = playerattached();
	attachrid .leader_aid[ getarg(0) ];
	addtimer 1, strnpcinfo(0) +"::Onteam"+ getarg(0) +"leader";
	attachrid .@origin;
	return;
Onteam1leader: callsub L_lead, 1, 548;
Onteam2leader: callsub L_lead, 2, 549;
L_lead:
	while ( .leader_aid[ getarg(0) ] == getcharid(3) ) {
		specialeffect2 getarg(1);
		sleep2 1000;
	}
	end;
}

turbo_room,106,117,3	script	Red Team	733,{
	end;
OnInit:
	sleep 50;
	set getvariableofnpc( .rednpcname$, "custom_bg#control" ), strnpcinfo(0);
OnStart:
	waitingroom "Red Team", getvariableofnpc( .minplayer2start, "custom_bg#control" ) +1, "custom_bg#control::OnStart", 1;
	end;
}
turbo_room,93,117,5	script	Blue Team	734,{
	end;
OnInit:
	sleep 50;
	set getvariableofnpc( .bluenpcname$, "custom_bg#control" ), strnpcinfo(0);
OnStart:
	waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "custom_bg#control" ) +1, "custom_bg#control::OnStart", 1;
	end;
}
guild_vs3	mapflag	battleground	2
guild_vs3	mapflag	nosave	SavePoint
guild_vs3	mapflag	nowarp
guild_vs3	mapflag	nowarpto
guild_vs3	mapflag	noteleport
guild_vs3	mapflag	nomemo
guild_vs3	mapflag	nopenalty
guild_vs3	mapflag	nobranch
guild_vs3	mapflag	noicewall
Edited by Yoona
Link to comment
Share on other sites

18 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

ahhh ...

I forgotten that you have modification on that script

because I copy pasted from my old script =/

[paste=me3ys2ndhgc]

Edited by AnnieRuru
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  200
  • Reputation:   1
  • Joined:  09/25/13
  • Last Seen:  

Hi Yoona can i ask how this CUSTOM BG works? and is it working on latest rAthena revisions?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

@Yoona
I think you posted in wrong section, this is support =/
I doubt you can make a battleground script even if I explain to you, so this topic should be in request section
bg_pvp_round.txt
I removed the leader option ... killing a leader in a round doesn't feel like doing anything good





@Budots-RO
you should've search the forum abit
the description is based on
http://rathena.org/board/topic/60906-battle-ground/?hl=battleground#entry145720
but after some time members requested some modification, which is
http://rathena.org/board/topic/75477-custom-bg/?p=176806
the script in post#1 comes from there


just you know I also made another bg_emp, description is
http://rathena.org/board/topic/72372-bg-type-emperium-breaking/?p=145813
and the latest modification
http://rathena.org/board/topic/78291-modification-of-bg-emp/?p=177511

Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  567
  • Reputation:   18
  • Joined:  04/15/13
  • Last Seen:  

@Annieruru sorry i didn't noticed that i posted it on request section. my bad. but thanks for the reply. by the way Annie how can add Announce each whoever enter the pub and how many players need to play the game. so other players will be informed. :)

Edited by Yoona
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  567
  • Reputation:   18
  • Joined:  04/15/13
  • Last Seen:  

@Annieruru Thank you so much Annie! your the best!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  76
  • Reputation:   2
  • Joined:  06/07/12
  • Last Seen:  

Hi Miss AnnieRuru how to make this one automated?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  41
  • Reputation:   0
  • Joined:  08/26/13
  • Last Seen:  

 

 

AnnieRuru

ahhh ...

I forgotten that you have modification on that script

because I copy pasted from my old script =/

txt.gif  bg_pvp_round_0.1.txt   6.6KB   12 downloads 

 

 

hi Annie How can I add more item prize ???

 

 

setarray .rewarditem,

7179, 5, // reward to the winning team
7227, 5; // reward to the losing team
Edited by erby
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

@dhaisuke

as far as I know, battleground script are suppose to on all the time around the clock

it only off when the match is in progress

so no such things as "make this automated"

unless you want to use disablenpc/enablenpc around with it

@erby

maybe I should've make the configuration in an array instead =/

[paste=5zppjqzhmatk]

Edited by AnnieRuru
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  41
  • Reputation:   0
  • Joined:  08/26/13
  • Last Seen:  

by the way @annieRuru

 

where can i enable the skill of body relocation at battle grounds..??? 

thank u very much. god bless

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  


//----------------------------------------------------------------------------
// Battlegrounds
//----------------------------------------------------------------------------
....
264,8    //MO_BODYRELOCATION

comment this line
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  41
  • Reputation:   0
  • Joined:  08/26/13
  • Last Seen:  

AnnieRuru

 

hmm, mam why if the player is dead.. she/he able to use skills during invisible..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

WTF !!!

all my event scripts which blocks players from moving has been doing pcblockmove and setoption 0x40

and I have been doing this since 3 years ago !

why until today only I hear about this bug

can you try change

setoption 0x40

into

setoption Option_Invisible | Option_Xmas

and see what's the result ?

0x40000 ( summer suit ) + 0x40 ( gm hide ) = 0x40040

use option_xmas or option_summer ?

if this doesn't work, probably need something like pcblockattack already

Edited by AnnieRuru
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  41
  • Reputation:   0
  • Joined:  08/26/13
  • Last Seen:  

Thx @annieruru, can be an automatic party if you are in a Red team or Blue team??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   0
  • Joined:  10/18/12
  • Last Seen:  

when i reloadscript the waiting room didn't work...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

when i reloadscript the waiting room didn't work...

cannot reproduce your problem

since I actually use @reloadscript to actually test the script

how about you show me some screens shots

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  323
  • Reputation:   9
  • Joined:  11/19/11
  • Last Seen:  

This is awsome annieruru! anyway it is posible to random map match?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  567
  • Reputation:   18
  • Joined:  04/15/13
  • Last Seen:  

@AnnieRuru Hi Annie! it is possible to detect same IP? when entering the pub? and autokick the 2nd same IP character?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  567
  • Reputation:   18
  • Joined:  04/15/13
  • Last Seen:  

@Bump :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...