Jump to content
  • 0

battleground red vs blue


Jezu

Question


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  566
  • Reputation:   34
  • Joined:  11/17/11
  • Last Seen:  

Yes I use rAthena but have some modification on my src. Anyway, i'll try what Annie posted. Feedback later.

@Annieruru

Can I change this map to a smaller? The map is a large-scale and its for 10v10 maps. I can't understand some codes, I want to use this script for example on guild_vs maps? But this time, No emperium? Just a normal Red VS Blue, and when a team all killed, it will trigger an announcement of who won and warp back all to their respective save points.

Edited by AnnieRuru
split topic from topic ID: 72372 bg-type-emperium-breaking
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

what i did to be red vs blue,

i copy the party vs party script,

- after the registration team blue will be warp to the location of waiting room A,

and team red will be warp to the location of waiting room B,

and the rest work...

to make it work in other guild_vs map just change the map location


set .red, waitingroom2bg( "bat_a01", 171,346, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead", .rednpcname$ );


set .blue, waitingroom2bg( "bat_a01", 162,50, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead", .bluenpcname$ );

also


bg_warp .red, "bat_a01", 171,346;
bg_warp .blue, "bat_a01", 162,50;

and all the bat_a01 maps..

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:  

you've gone off-topic LMAO

changing the map and changing the system ... its already like requesting a new script already

so ...

topic 1

topic 2

topic 3

pick 1 that closest to your need, then I edit from there

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  566
  • Reputation:   34
  • Joined:  11/17/11
  • Last Seen:  

Hello Annie and sorry for being off-topic.

I picked the first topic 1.

But in my case..

1. GM will put how many players to play like you did to GM Takumirai.

2. The maps will be any to guild_vs

3. Red and Blue team will be warp to the maps when both rooms are full.

4. The goal is to eliminate the opposing team.

5. No Rewards as I will give the rewards manually.

Edited by Jezu
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

if only i know the format on making a BG script i will make one..

anyway i can try ripping the script for you .. [hope annie will not got mad at me]


- script bg_emp#control -1,{
OnInit:
set .eventlasting, 20 * 60; // abort the system if there's no progress, 20 mins * seconds
set .register_lasting, 10 * 60; // 10 minutes to joins, else abort registration, 10 mins * seconds
sleep 1;
disablenpc .rednpcname$;
disablenpc .bluenpcname$;
end;
OnStart:
if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end;
set .red, waitingroom2bg( "guild_vs3", 13,50, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead", .rednpcname$ );
copyarray .team1aid, $@arenamembers, $@arenamembersnum;
set .blue, waitingroom2bg( "guild_vs3", 86,50, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead", .bluenpcname$ );
copyarray .team2aid, $@arenamembers, $@arenamembersnum;
.inprogress = 2;
awake strnpcinfo(0);
bg_warp .red, "guild_vs3", 13,50;
bg_warp .blue, "guild_vs3", 86,50;
bg_updatescore "guild_vs3", 0,0;
sleep .eventlasting * 1000;
if ( .start == 2 ) {
if ( .score[1] == .score[2] )
mapannounce "guild_vs3", "Draw !", 0;
else if ( .score[1] > .score[2] ) {
mapannounce "guild_vs3", " Red side wins !", 0;
callsub L_reward, .red;
}
else if ( .score[1] < .score[2] ) {
mapannounce "guild_vs3", " Blue side wins !", 0;
callsub L_reward, .blue;
}
}
bg_warp .red, "prontera", 155,182;
bg_warp .blue, "prontera", 158,182;
bg_kickall .red;
bg_kickall .blue;
.start = .score[1] = .score[2] = .register_num = 0;
deletearray .register_aid;
end;
L_reward:
getbgusers getarg(0);
for ( .@i = 0; .@i < $@arenamembersnum; .@i++ )
getitem 501, 1, $@arenamembers[.@i]; // item reward
return;
Onredout: callsub L_out, 2;
Onblueout: callsub L_out, 1;
L_out:
announce strcharinfo(0) +" is out from the match !", 1;
bg_leave;
warp "SavePoint", 0,0;
.score[ getarg(0) ]++;
bg_updatescore "guild_vs3", .score[1], .score[2];
if ( .score[ getarg(0) ] == .min2start )
awake strnpcinfo(0);
end;

prontera,156,186,5 script gm_start 100,{
if ( getgmlevel() < 99 ) {
mes "I only talk to gm";
close;
}
if ( getvariableofnpc( .inprogress, "bg_emp#control" ) ) {
mes "abort ?";
next;
if ( select ( "Yes", "No" ) == 2 ) close;
set getvariableofnpc( .inprogress, "bg_emp#control" ), 0;
awake "bg_emp#control";
killmonster "bat_a01", "bg_emp#control::OnRedDown";
killmonster "bat_a01", "bg_emp#control::OnBlueDown";
announce strcharinfo(0) +" has abort the battleground", 0;
close;
}
mes "select how many players to start";
next;
if ( input( .@a, 1, 30 ) ) close;
set getvariableofnpc( .minplayer2start, "bg_emp#control" ), .@a;
announce strcharinfo(0) +" has hosted "+ .@a +"vs"+ .@a +" battleground", 0;
enablenpc getvariableofnpc( .rednpcname$, "bg_emp#control" );
enablenpc getvariableofnpc( .bluenpcname$, "bg_emp#control" );
donpcevent getvariableofnpc( .rednpcname$, "bg_emp#control" ) +"::OnStart";
donpcevent getvariableofnpc( .bluenpcname$, "bg_emp#control" ) +"::OnStart";
set getvariableofnpc( .inprogress, "bg_emp#control" ), 1;
donpcevent "bg_emp#control::OnAutoAbort";
close;
}

prontera,155,182,5 script Red side#bg_emp 100,{
end;
OnStart:
waitingroom "Red side", getvariableofnpc( .minplayer2start, "bg_emp#control" ) +1, "bg_emp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_emp#control" );
end;
OnInit:
set getvariableofnpc( .rednpcname$, "bg_emp#control" ), strnpcinfo(0);
end;
}

prontera,158,182,5 script Blue side#bg_emp 100,{
end;
OnStart:
waitingroom "Blue side", getvariableofnpc( .minplayer2start, "bg_emp#control" ) +1, "bg_emp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_emp#control" );
end;
OnInit:
set getvariableofnpc( .bluenpcname$, "bg_emp#control" ), strnpcinfo(0);
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 GM Takumirai
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  566
  • Reputation:   34
  • Joined:  11/17/11
  • Last Seen:  

if only i know the format on making a BG script i will make one..

anyway i can try ripping the script for you .. [hope annie will not got mad at me]


- script bg_emp#control -1,{
OnInit:
set .eventlasting, 20 * 60; // abort the system if there's no progress, 20 mins * seconds
set .register_lasting, 10 * 60; // 10 minutes to joins, else abort registration, 10 mins * seconds
sleep 1;
disablenpc .rednpcname$;
disablenpc .bluenpcname$;
end;
OnStart:
if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end;
set .red, waitingroom2bg( "guild_vs3", 13,50, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead", .rednpcname$ );
copyarray .team1aid, $@arenamembers, $@arenamembersnum;
set .blue, waitingroom2bg( "guild_vs3", 86,50, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead", .bluenpcname$ );
copyarray .team2aid, $@arenamembers, $@arenamembersnum;
.inprogress = 2;
awake strnpcinfo(0);
bg_warp .red, "guild_vs3", 13,50;
bg_warp .blue, "guild_vs3", 86,50;
bg_updatescore "guild_vs3", 0,0;
sleep .eventlasting * 1000;
if ( .start == 2 ) {
if ( .score[1] == .score[2] )
mapannounce "guild_vs3", "Draw !", 0;
else if ( .score[1] > .score[2] ) {
mapannounce "guild_vs3", " Red side wins !", 0;
callsub L_reward, .red;
}
else if ( .score[1] < .score[2] ) {
mapannounce "guild_vs3", " Blue side wins !", 0;
callsub L_reward, .blue;
}
}
bg_warp .red, "prontera", 155,182;
bg_warp .blue, "prontera", 158,182;
bg_kickall .red;
bg_kickall .blue;
.start = .score[1] = .score[2] = .register_num = 0;
deletearray .register_aid;
end;
L_reward:
getbgusers getarg(0);
for ( .@i = 0; .@i < $@arenamembersnum; .@i++ )
getitem 501, 1, $@arenamembers[.@i]; // item reward
return;
Onredout: callsub L_out, 2;
Onblueout: callsub L_out, 1;
L_out:
announce strcharinfo(0) +" is out from the match !", 1;
bg_leave;
warp "SavePoint", 0,0;
.score[ getarg(0) ]++;
bg_updatescore "guild_vs3", .score[1], .score[2];
if ( .score[ getarg(0) ] == .min2start )
awake strnpcinfo(0);
end;

prontera,156,186,5 script gm_start 100,{
if ( getgmlevel() < 99 ) {
mes "I only talk to gm";
close;
}
if ( getvariableofnpc( .inprogress, "bg_emp#control" ) ) {
mes "abort ?";
next;
if ( select ( "Yes", "No" ) == 2 ) close;
set getvariableofnpc( .inprogress, "bg_emp#control" ), 0;
awake "bg_emp#control";
killmonster "bat_a01", "bg_emp#control::OnRedDown";
killmonster "bat_a01", "bg_emp#control::OnBlueDown";
announce strcharinfo(0) +" has abort the battleground", 0;
close;
}
mes "select how many players to start";
next;
if ( input( .@a, 1, 30 ) ) close;
set getvariableofnpc( .minplayer2start, "bg_emp#control" ), .@a;
announce strcharinfo(0) +" has hosted "+ .@a +"vs"+ .@a +" battleground", 0;
enablenpc getvariableofnpc( .rednpcname$, "bg_emp#control" );
enablenpc getvariableofnpc( .bluenpcname$, "bg_emp#control" );
donpcevent getvariableofnpc( .rednpcname$, "bg_emp#control" ) +"::OnStart";
donpcevent getvariableofnpc( .bluenpcname$, "bg_emp#control" ) +"::OnStart";
set getvariableofnpc( .inprogress, "bg_emp#control" ), 1;
donpcevent "bg_emp#control::OnAutoAbort";
close;
}

prontera,155,182,5 script Red side#bg_emp 100,{
end;
OnStart:
waitingroom "Red side", getvariableofnpc( .minplayer2start, "bg_emp#control" ) +1, "bg_emp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_emp#control" );
end;
OnInit:
set getvariableofnpc( .rednpcname$, "bg_emp#control" ), strnpcinfo(0);
end;
}

prontera,158,182,5 script Blue side#bg_emp 100,{
end;
OnStart:
waitingroom "Blue side", getvariableofnpc( .minplayer2start, "bg_emp#control" ) +1, "bg_emp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_emp#control" );
end;
OnInit:
set getvariableofnpc( .bluenpcname$, "bg_emp#control" ), strnpcinfo(0);
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

Okay thanks, I'll try this now, feedback later on.

EDIT:

This isn't working :(

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:  

try this one

bg_pvp_gm_0.1.txt

since you said you want to give out the prize yourself,

I purposely made L_listteam function to announce the winning team members

EDITing post ... will criticize why previous script doesn't work


1.

    bg_kickall .red;
   bg_kickall .blue;

lol this is not a script command from default SVN

this is my custom battleground script command, sure send an error straight away

2.

donpcevent "bg_emp#control::OnAutoAbort";

there is no OnAutoAbort label at all

well .... too much I guess ... lazy to find the rest @_@

these 2 error is very obvious bug

Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  566
  • Reputation:   34
  • Joined:  11/17/11
  • Last Seen:  

try this one

bg_pvp_gm_0.1.txt

since you said you want to give out the prize yourself,

I purposely made L_listteam function to announce the winning team members

EDITing post ... will criticize why previous script doesn't work


1.

	bg_kickall .red;
bg_kickall .blue;

lol this is not a script command from default SVN

this is my custom battleground script command, sure send an error straight away

2.

donpcevent "bg_emp#control::OnAutoAbort";

there is no OnAutoAbort label at all

well .... too much I guess ... lazy to find the rest @_@

these 2 error is very obvious bug

Yay! /heh

Thank you very much Ms. AnnieRuru. I really appreciate this script! I go test this now and feedback later on.

Thanks a lot ! /ho

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...