Jump to content
  • 0

battleground emperium with shuffle team players


Thanna

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  271
  • Reputation:   7
  • Joined:  01/06/12
  • Last Seen:  

source modification

http://rathena.org/b...ut-waitingroom/

global function - shuffling algorithm

function	script	rand__	{
.@range = getarg(0);
.@count = getarg(2, 0);
.@count = ( .@count == 0 || .@count > .@range )? .@range : ( .@count > 128 )? 128 : .@count;
while ( .@i < .@count ) {
	.@r = .@save = rand( .@i, .@range -1 ) ;
	if ( getd(".@tmp1_"+ .@i ) == 0 ) {
		.@r = ( getd(".@tmp1_"+ .@r ) )? getd( ".@tmp2_"+ .@r ) : .@r;
		setd ".@tmp2_"+ .@i, .@r;
		setd ".@tmp2_"+ .@save , .@i;
		setd ".@tmp1_"+ .@save , 1;
		set getelementofarray( getarg(1), .@i ), .@r;
		if ( .@save < .@count )
			set getelementofarray( getarg(1), .@save ), .@i;
	}
	.@i++;
}
return .@count;
}

hi annieruru, can this function be use with your bg-emp that you made? just let them enter the waiting room but they will be shuffle once the BG starts

Link to comment
Share on other sites

4 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:  

I have to split your post out, that topic you quoted is bg_pvp, and what you are asking is bg_emp

please note, a battleground script WITH waitingroom and WITHOUT waitingroom is totally different script

because I used totally different script commands

you will also noticed that script only has 1 npc, but my bg_emp has 3 npcs

ok, if you want my bg_emp without waitingroom, I could squeeze them into just having 1 waitingroom

and use shuffling algorithm to shuffle them out into 2 teams randomly

yes its possible, but you still have to explain how you want the system works

EDIT:

I can make them with only using 1 waitingroom,

or use npc chat dialog box to display who had register, without registering using a waitingroom at all

after all, that source modification is meant to be working that way

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


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  271
  • Reputation:   7
  • Joined:  01/06/12
  • Last Seen:  

I have to split your post out, that topic you quoted is bg_pvp, and what you are asking is bg_emp

please note, a battleground script WITH waitingroom and WITHOUT waitingroom is totally different script

because I used totally different script commands

you will also noticed that script only has 1 npc, but my bg_emp has 3 npcs

ok, if you want my bg_emp without waitingroom, I could squeeze them into just having 1 waitingroom

and use shuffling algorithm to shuffle them out into 2 teams randomly

yes its possible, but you still have to explain how you want the system works

EDIT:

I can make them with only using 1 waitingroom,

or use npc chat dialog box to display who had register, without registering using a waitingroom at all

after all, that source modification is meant to be working that way

this is the script you made and I edited a part of it,

http://pastebin.com/raw.php?i=SzPAxUmn

I just want a 1 waiting room, then when the waiting room is full the BG will start and the players will be shuffle automatically, Thanks in advance AnnieRuru

Edited by Thanna
Make use of URL Tag when come to url stuff.
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:  

LMAO !! your edit there ... even much better than Emistry

bg_emp_0.0.txt

you know ... the more I test the script ... the more bugs I find ....

anyway, if you use the rand__ function, remember to change my portal event script

rand__ into rand__old ... replace all in that script ... that script still using the old ones

the one in this topic is made by keyworld, better shuffling algorithm than mine

perhaps someday I might update that script ... but not now

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  271
  • Reputation:   7
  • Joined:  01/06/12
  • Last Seen:  

thank you very much Ms.AnnieRuru I appreciate the help you've done, btw I edit some part of the script you made but all the credit goes to you, thank you again and more power

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