"Floating" party-share-range

Akushin

New member
Messages
8
Points
0
hiho there,

i'm GM at some low rates (1/1 - 3/3) highlvl (maxlvl 1000) server, and the admin and me couldn't find a good party-share range.

then we had the idea for a 'floating' sharing range:

the share range is based upon the partyleader's lvl (around 20% of his lvl), but minimum a range of 15.

for example:

partyleader's lvl 1-75: Share Range 15 lvls.

partyleader's lvl 100: range is 20 lvls.

partyleader's lvl 200: range is 40 lvls.

and so on...

something like

int range = partyleaderLvl * 0.2;if(range < 15){range = 15;}

i somehow didn't find the code for "are all people in the party in lvlrange for party-sharing", thought it woulde be somewhere at the line of "party_exp_share" in party.c

anyone a quick idea?

 
I haven't tested this changes in-game but the build was successful without any warnings. And party_share_level was disabled, it would mess with the new configuration.

Open char/inter.h and search for:

extern unsigned int party_share_level;
replace it with:

/*extern unsigned int party_share_level;*/extern unsigned int party_share_range;
Open char/int_party.c and search for:
Code:
return (p->party.count < 2
replace the whole line with:
Code:
return (p->party.count < 2 ||/* p->max_lv - p->min_lv <= party_share_level ||*/ p->max_lv - p->min_lv <= (p->max_lv*(party_share_range/100)) );
Open char/inter.c, search for:
Code:
unsigned int party_share_level = 10;
replace with:
Code:
//unsigned int party_share_level = 10;unsigned int party_share_range = 20; // 20% as default value
search:
Code:
		else if(!strcmpi(w1,"party_share_level"))			party_share_level = atoi(w2);
replace with:
Code:
		/*else if(!strcmpi(w1,"party_share_level"))			party_share_level = atoi(w2);*/		else if(!strcmpi(w1,"party_share_range"))			party_share_range = atoi(w2);
Build your char-server, then open conf/inter-server.conf, search for:
Code:
// Level range for sharing within a partyparty_share_level: 15
Replace it with:
Code:
// Level range for sharing within a party//party_share_level: 15// Floating share rate (0-100) in percentage// default: 20party_share_range: 20
Run your server and check if the changes worked c:
 
Last edited by a moderator:
Back
Top