Page 1 of 1

Population Based GroupMember Count

PostPosted: Sat May 28, 2011 11:15 pm
by Hiatus
A population based group member handler.

Just place the script in your scripts folder and that should do it. You can edit this very easily by just changing some numbers or commenting for population.

Re: Population Based GroupMember Count

PostPosted: Sun May 29, 2011 6:02 am
by Xaves
I like the idea of handling the grp count automaticly, but i have some worries about your code:
1. you simply remove the players from the grp, what if they are in the middle of a fight ?
2. you set the serverproperty each time you go through the foreach loop, putting that and all the other static stuff outside would improve the runtime.
3. the whole code is pretty repetitive, why not use a calculation for the grpcount beforehand and cut the code down to only one if, like:
Code: Select all
int count = ((clients - 10) / 10) + 1;
if (count > 8) count = 8;
Well, i hope you dont think bad of me now :P but many of those custom scripts and some parts of DoL are just plainly repetitive code that is not flexible and unnecessary. ^^

Re: Population Based GroupMember Count

PostPosted: Sun May 29, 2011 7:54 am
by Graveen
Ah i see, this fixes the groupcap dynamically ?

Ty for this contrib !

Re: Population Based GroupMember Count

PostPosted: Sat Jun 04, 2011 12:09 pm
by volty
Hey guys,

I edited this to be more efficient. Since I am on a computer w/ no access to Dawn of Light or Visual Studio, this may be a little sloppy since I did it in 5 minutes and didn't look for errors. This one also lets you set clients per group member more easily.

Re: Population Based GroupMember Count

PostPosted: Sat Jun 04, 2011 3:08 pm
by Hiatus
Hey guys,

I edited this to be more efficient. Since I am on a computer w/ no access to Dawn of Light or Visual Studio, this may be a little sloppy since I did it in 5 minutes and didn't look for errors. This one also lets you set clients per group member more easily.

Haha, thanks! I was just lazy and bored so I made it. It really wasn't supposed to be an "actual" script in a sense but more rather a basis for something like this.

Re: Population Based GroupMember Count

PostPosted: Sat Jun 04, 2011 5:20 pm
by volty
Yeah that's kind of what I thought. It'd probably be better used as a command. I also didn't check extreme values (e.g. group cap > 8).