Jump to content
  • 0

AnnieRuRu BG_Emp05


celeron0134

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   1
  • Joined:  12/13/16
  • Last Seen:  

-	script	bg_emp#control	-1,{
OnInit:
	.minplayer2start = 1; // minimum player to start
	.winningscore = 2; // final score to win
	.eventlasting = 20 * 60; // abort the system if there's no progress, 20 mins * seconds
	setarray .rewarditem, 673, 5; // reward to the winning team
	end;
OnStart:
	if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end;
	.red = waitingroom2bg( "bat_a01", 171,346, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead", .rednpcname$ );
	copyarray .team1aid, $@arenamembers, $@arenamembersnum;
	.team1count = .minplayer2start;
	.blue = waitingroom2bg( "bat_a01", 162,50, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead", .bluenpcname$ );
	copyarray .team2aid, $@arenamembers, $@arenamembersnum;
	.team2count = .minplayer2start;
	delwaitingroom .rednpcname$;
	delwaitingroom .bluenpcname$;
	disablenpc .rednpcname$;
	disablenpc .bluenpcname$;
	bg_warp .red, "bat_a01", 171,346;
	bg_warp .blue, "bat_a01", 162,50;
	setwall "bat_a01", 154,51, 6, 4, 0, "bg_emp_town_blue";
	setwall "bat_a01", 164,347, 6, 4, 0, "bg_emp_town_red";
	bg_updatescore "bat_a01", 0, 0;
	sleep 6000 * !.skip;
	mapannounce "bat_a01", "Rules are simple. The first one to break the opponent's emperium will get a score.", 0;
	sleep 3000 * !.skip;
	mapannounce "bat_a01", "Score "+ .winningscore +" rounds to win ! ... GET READY", 0;
	sleep 2000 * !.skip;
	while (1) {
		for ( .@i = 5; .@i > 0; .@i-- ) {
			mapannounce "bat_a01", "["+ .@i +"]", 0;
			sleep 1000 * !.skip;
		}
		if ( .score[1] == .winningscore -1 && .score[2] == .winningscore -1 )
			mapannounce "bat_a01", "Final Round start!", 0;
		else
			mapannounce "bat_a01", "Round "+ .round++ +" start!", 0;
		bg_monster .red,"bat_a01",171,346, "--ja--",1915, strnpcinfo(3)+"::OnRedDown";
		bg_monster .blue,"bat_a01",162,50, "--ja--",1914, strnpcinfo(3)+"::OnBlueDown";
		delwall "bg_emp_town_red";
		delwall "bg_emp_town_blue";
		sleep .eventlasting * 1000 * !.skip;
		bg_updatescore "bat_a01", .score[1], .score[2];
		killmonster "bat_a01", strnpcinfo(3)+"::OnRedDown";
		killmonster "bat_a01", strnpcinfo(3)+"::OnBlueDown";
		if ( getstrlen( .empkiller$ ) )
			mapannounce "bat_a01", .empkiller$ +" has Destroy "+( ( .winside == 1 )? "Blue" : "Red" )+"'s side Emperium. "+( ( .winside == 1 )? "Red" : "Blue" )+" team score a point !", 0;
		if ( .score[1] == .winningscore || .score[2] == .winningscore || !.winside ) break;
		sleep 5000 * !.skip;
		bg_warp .red, "bat_a01", 171,346;
		bg_warp .blue, "bat_a01", 162,50;
		setwall "bat_a01", 154,51, 6, 4, 0, "bg_emp_town_blue";
		setwall "bat_a01", 164,347, 6, 4, 0, "bg_emp_town_red";
		sleep 1000 * !.skip;
		.winside = 0;
	}
	if ( .winside ) {
		mapannounce "bat_a01", " "+ ( ( .winside == 1 )? "Red" : "Blue" ) +" side wins !", 0;
		for ( .@i = 0; .@i < getd(".team"+ .winside +"count"); .@i++ )
			getitem .rewarditem[0], .rewarditem[1], getd(".team"+ .winside +"aid["+ .@i +"]" );
	} else
		mapannounce "bat_a01", "Time Out. Aborting the match.", 0;
	sleep 5000;
	bg_warp .red, "prontera", 155,182;
	bg_warp .blue, "prontera", 158,182;
	bg_destroy .red;
	bg_destroy .blue;
	delwall "bg_emp_town_red";
	delwall "bg_emp_town_blue";
	deletearray .team1aid;
	deletearray .team2aid;
	.round = .winside = .skip = .score[1] = .score[2] = .team1count = .team2count = 0;
	enablenpc .rednpcname$;
	enablenpc .bluenpcname$;
	donpcevent .rednpcname$ +"::OnStart";
	donpcevent .bluenpcname$ +"::OnStart";
	end;
OnRedDown: callsub L_EmpDown, 2;
OnBlueDown: callsub L_EmpDown, 1;
L_EmpDown:
	.empkiller$ = strcharinfo(0);
	.winside = getarg(0);
	.score[ .winside ]++;
	awake strnpcinfo(0);
	end;
OnRedDead: callsub L_dead, 2;
OnBlueDead: callsub L_dead, 1;
L_dead:
	for ( .@i = 0; .@i < getd(".team"+ getarg(0) +"count"); .@i++ )
		getitem 608, 1, getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); // give a ygg leaf here
	sleep2 1250;
	percentheal 100,100;
	end;
OnRedQuit: callsub L_quit, 1, "Red", 2;
OnBlueQuit: callsub L_quit, 2, "Blue", 1;
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 ( getd(".team"+ getarg(0) +"count") ) end;
	mapannounce "bat_a01", "All "+ getarg(1) +" team members has Quit !", 0, 0xff3333; // purposely use different color
	.score[ getarg(2) ] = .winningscore;
	.winside = getarg(2);
	.skip = 1;
	awake strnpcinfo(0);
	end;
}

prontera,155,182,5	script	Red side#bg_emp	100,{
	end;
OnInit:
	sleep 1;
	set getvariableofnpc( .rednpcname$, "bg_emp#control" ), strnpcinfo(0);
OnStart:
	waitingroom "Red side", getvariableofnpc( .minplayer2start, "bg_emp#control" ) +1, strnpcinfo(0)+"::OnJoin", 1;
	end;
OnJoin:
	announce "The Red side has ["+ getwaitingroomstate(0) +"/"+ getvariableofnpc( .minplayer2start, "bg_emp#control" ) +"] User", 0;
	donpcevent "bg_emp#control::OnStart";
	end;
}

prontera,158,182,5	script	Blue side#bg_emp	100,{
	end;
OnInit:
	sleep 1;
	set getvariableofnpc( .bluenpcname$, "bg_emp#control" ), strnpcinfo(0);
OnStart:
	waitingroom "Blue side", getvariableofnpc( .minplayer2start, "bg_emp#control" ) +1, strnpcinfo(0)+"::OnJoin", 1;
	end;
OnJoin:
	announce "The Blue side has ["+ getwaitingroomstate(0) +"/"+ getvariableofnpc( .minplayer2start, "bg_emp#control" ) +"] User", 0;
	donpcevent "bg_emp#control::OnStart";
	end;
}

bat_a01	mapflag	battleground	2
bat_a01	mapflag	nosave	SavePoint
bat_a01	mapflag	nowarp
bat_a01	mapflag	nowarpto
bat_a01	mapflag	noteleport
bat_a01	mapflag	nomemo
bat_a01	mapflag	nopenalty
bat_a01	mapflag	nobranch
bat_a01	mapflag	noicewall

hi annie.. can you please help me about this script.. i just want the rednpc and blue npc waiting rooms not to disappear after warping the player on ba_a01.. the purpose is when the BG emp has started.. other players can still join the event until the BG has fisnished .. or is there any other way of doing it? so players can still join the BG emp and also a for the players inside the BG emp that logout should have like a 5min delay to enter again thankyou so much if you have time to spare thanks

 

 

@edit.

also the script is working fine at 1st.. but when i reloadnpc again and i entered the waiting rooms.. at rednpc2/2 and blueNPC 2/2 the npc disappeared but not warping the players on bat_a01

 

Edited by celeron0134
Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

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

Rejoice ~~ I just recently stop playing a MMORPG game called - 斗仙2 - a chinese-made MMOPRG game that is heavily PK focused

of course team PK / guild PK / party PK / Battleground and so on are the main strong points on this game.

 

Previously I don't understand why members want this feature,

as I always told them -> players can always multi-client at the last moment join the winning team to catch the reward

only after I play a battleground for real on a real MMORPG, now I can understand why this is important

 

so, there are actually some/several protection to prevent players to rip the reward at the last minute, well ... from my experience playing that game

 

1. although I can multi-client this game with a sandboxie program so all my 4 in-game characters can party up to finish my daily quest faster,

interestingly, I cannot bring 2 characters at the same time to join a same battleground ID

in other words, I cannot register 2 characters on Battleground A, but I can multi-client to have character A join Battleground A, and character B join Battleground B

 

2. lets say this Battleground is a 10vs10, but Blue team only has 4 players joined, and Red team has 7 players

( this happened frequently ... I heard some people using company computers to register, but only his main character join the battleground)

the Red team registration is stopped, only the Blue team application is still open

at least this is what happened to the game that I just play, cannot have more than 3 players in differences

 

3. there is a "Vote to kick a player" option in the battleground window

I can right-click on a noob player that keep feeding the enemy team -> means always give points to the enemy / probably a spy from the enemy team

and if 1/2 of our total team members select "Yes" to kick, that player is immediately out from the team ... and ...

 

4. there is a 5 minute delay from rejoining the same battleground ID

which usually means, if I am somehow gets kick out (happens to me when I having bad internet connection speed),

I usually just register a new Battleground rather than rejoin an existing one, since people always fill up the existing battleground 1st to rip the reward

 

conclusion, this is not as simple as you might think

I can probably do this, but the modification on this script will be very heavy

especially for case no.1 ... do rathena support MAC address in the 1st place ?

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

  • 0

  • Group:  Developer
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   431
  • Joined:  01/26/16
  • Last Seen:  

1 hour ago, AnnieRuru said:

especially for case no.1 ... do rathena support MAC address in the 1st place ?

Unfortunately, no.

Even if we do have it, it will be prone to spoofing via hooking Winsock and changing the MAC address that was sent from the client.
Actually I was considering doing a proof-of-concept of evading brAthena's MAC ban.

  • Like 1
Link to comment
Share on other sites

  • 0

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

I admit during last year when I play that MMORPG, I didn't know about MAC address spoofing

yeah, although some players might know the way to bypass this system, but it is enough to block most players from abusing it

me included XD

 

... meh .. I wonder why people still using waitingroom version ... should've use Battleground Queue system already ..

anyways ..

....

well the script was progressing smoothly until ...

 

EDIT: nvm stupid me, didn't noticed rathena use another script command *getwaitingroomusers

 

ok I'm necro posting ... forget this ...

 

and the script is still incomplete btw

Edited by AnnieRuru
Link to comment
Share on other sites

  • 0

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

@celeron0134

hola ~ its done ~

report any bug you can find ~

http://upaste.me/7e7849543c8aa9db2

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   1
  • Joined:  12/13/16
  • Last Seen:  

11 hours ago, AnnieRuru said:

@celeron0134

hola ~ its done ~

report any bug you can find ~

http://upaste.me/7e7849543c8aa9db2

Thanks annie.. tested and here's the error

annieer.thumb.png.b95d58629bb1fd1a12971e5cefdec055.png

Walls don't disappear, no Emp/crystal 

 

//    ** New ** Now players can join an ongoing battleground ~

maybe it can be like this?

 

.minplayer2start = 5 // for 5v5

.maxplayer2join = 10 // max players that can join bg_emp .. so if full it will be 10vs10,needs a feature that will make the late commers to alternately join red and blue side

 

everything else look so fantastic ..

Edited by celeron0134
Link to comment
Share on other sites

  • 0

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

wait ...........

your server doesn't support *bg_get_data type 1

https://github.com/rathena/rathena/pull/2179

how old is your emulator ? seriously ....

part of the reason why I dislike rathena ... doesn't have plugin features too

 

and for the 2nd request, yup I can do that ~

but since you also needs some time to update your server, I'll just edit this post when its done

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   1
  • Joined:  12/13/16
  • Last Seen:  

4 hours ago, AnnieRuru said:

wait ...........

your server doesn't support *bg_get_data type 1

https://github.com/rathena/rathena/pull/2179

how old is your emulator ? seriously ....

part of the reason why I dislike rathena ... doesn't have plugin features too

 

and for the 2nd request, yup I can do that ~

but since you also needs some time to update your server, I'll just edit this post when its done

i used @Anacondaqq ragnarok offline server https://rathena.org/board/topic/109823-ragnarok-online-complete-offline-server-client-pack-2018-make-your-ro-server-in-less-then-5-minutes/ on 2017 

ill try to update my server.. or ill just install the latest.. anyways thanks for supporting us.. ill get back to you when its done.. thanks anniee..

*heart heart*

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  1096
  • Reputation:   344
  • Joined:  02/26/12
  • Last Seen:  

1 hour ago, celeron0134 said:

i used @Anacondaqq ragnarok offline server https://rathena.org/board/topic/109823-ragnarok-online-complete-offline-server-client-pack-2018-make-your-ro-server-in-less-then-5-minutes/ on 2017 

ill try to update my server.. or ill just install the latest.. anyways thanks for supporting us.. ill get back to you when its done.. thanks anniee..

*heart heart*

Hi, the package has the server-side files from March 2017, and does not have a command what you are looking for. For solving the problem, you can several ways what you can do: 

  1. Try to follow any of the actual server creation guides for making your own emulator. This is not hard, very short tl;tr you can find at a topic by the link above on the page. If you will find any difficulties, you can always open ready to use package and check settings / and how everything looks like on the working solution, and you can try to implement same ideas/logic to your configuration, this is very simple. This is most recommended way, because you will boost your skills, and will unbind yourself from me and be waiting for updates (because I'm a mega busy person)
  2. Or you can wait for around ~month or two before will be prepared a full updated version with all features, suggestions, and issues what people facing with the page, which will totally unbind you and other users from my side and waiting from static updates. 
Edited by Anacondaqq
Link to comment
Share on other sites

  • 0

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

alrighty ~

yup I've done adjusting this script to suit your needs ~

http://upaste.me/7e7849543c8aa9db2

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   1
  • Joined:  12/13/16
  • Last Seen:  

Just now, Anacondaqq said:

Hi, the server at the package is from March 2017 and does not have the PR included with the command. That means you must manually take and install an emulator. The package is just for education purposes just to show how everything plus-minus should be packed and can look like. But this is not a package for everyday usage, and so on. I strongly recommend you read the guide and take the package as an example of your problems solving while you will build your own server side. What about updates, I plan a little bit later release it, because right now I'm very overwhelmed and overloaded with my work, so I physically don't have a time for updates. 

yup your RO package is fine as it is.. it's a stepping stone for use newbies.. and i'm very thankful for your release i was using eathena before.. bc i kinda find it hard downloading so many kinds of tools for a server .. until you released your package.. i can now move to rathena.. bc eathena is gone ithink because their website is down.. anyways keep it up.. and thankyou for such a wonderful release.. 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   1
  • Joined:  12/13/16
  • Last Seen:  

1 minute ago, AnnieRuru said:

alrighty ~

yup I've done adjusting this script to suit your needs ~

http://upaste.me/7e7849543c8aa9db2

thanks annie.. ill try it out later.. thank you annie for the support.. you made me feel motivated for my server.. lovelots

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  1096
  • Reputation:   344
  • Joined:  02/26/12
  • Last Seen:  

5 minutes ago, AnnieRuru said:

alrighty ~

yup I've done adjusting this script to suit your needs ~

http://upaste.me/7e7849543c8aa9db2

I'm so sorry for such requests, I always trying to say only one thing to users which use the package -> a questions related to the package what I share need to ask on the topic about the package and not disturb anyone else because it can be very annoying for others because of limitations of the package. Anyway, thank you very much for your help.

Link to comment
Share on other sites

  • 0

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

@celeron0134

just diff your server with this

https://patch-diff.githubusercontent.com/raw/rathena/rathena/pull/2179.diff

 

it shouldn't be too hard if you already know how to apply patch and recompile your server

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