Jump to content
  • 0
Sign in to follow this  
Akushin

"Floating" party-share-range

Question

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?

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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:
return (p->party.count < 2
replace the whole line with:
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:
unsigned int party_share_level = 10;
replace with:
//unsigned int party_share_level = 10;unsigned int party_share_range = 20; // 20% as default value
search:
		else if(!strcmpi(w1,"party_share_level"))			party_share_level = atoi(w2);
replace with:
		/*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:
// Level range for sharing within a partyparty_share_level: 15
Replace it with:
// 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:

 

Edited by pan

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.