Population Based GroupMember Count

Share files with other Dawn of Light users

Moderator: Support Team

Population Based GroupMember Count

Postby Hiatus » Sat May 28, 2011 11:15 pm

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.
Attachments
PopulationBasedGrpMemberCoutnHandler.cs
(5.76 KiB) Downloaded 349 times
If you can't see the problem, then this is the problem :mrgreen:
Hiatus
Support Team
 
Posts: 263
Joined: Sat Apr 30, 2011 3:54 pm

Re: Population Based GroupMember Count

Postby Xaves » Sun May 29, 2011 6:02 am

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. ^^
Xaves
DOL Initiate
 
Posts: 17
Joined: Sat Apr 14, 2007 8:39 pm

Re: Population Based GroupMember Count

Postby Graveen » Sun May 29, 2011 7:54 am

Ah i see, this fixes the groupcap dynamically ?

Ty for this contrib !
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Population Based GroupMember Count

Postby volty » Sat Jun 04, 2011 12:09 pm

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.
Attachments
PopBasedDynamicGroupMemberCount.txt
(1.89 KiB) Downloaded 80 times
volty
DOL Guest
 
Posts: 4
Joined: Thu Jun 02, 2011 9:23 pm

Re: Population Based GroupMember Count

Postby Hiatus » Sat Jun 04, 2011 3:08 pm

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.
If you can't see the problem, then this is the problem :mrgreen:
Hiatus
Support Team
 
Posts: 263
Joined: Sat Apr 30, 2011 3:54 pm

Re: Population Based GroupMember Count

Postby volty » Sat Jun 04, 2011 5:20 pm

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).
volty
DOL Guest
 
Posts: 4
Joined: Thu Jun 02, 2011 9:23 pm


Return to “%s” User Files

Who is online

Users browsing this forum: No registered users and 1 guest