Jump to content
  • 0

Dynamically change the Level Share Range


eKoh

Question


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   13
  • Joined:  01/07/12
  • Last Seen:  

Hello there, I want to make a script or what ever has to be needed to make this:

From Level 1 - 79 make the Level Share Range of 30 Levels

 

And from 80 - 99, the Level Share Range of 10 Levels

 

Why do I want to make this?

 

Well, the answer is simple, and it is because the parties on lower levels ( 1 - 79 ) are really low and by increasing the share level range, we are making a more party oriented server.

 

But also if we leave the 30 level range, for 80+, we are going to make a Leeching oriented server, since the main goal for every player would be to reach 80 ASAP to finally get a friend or somebody to leech them till getting 99.

 

And the purpose is to have more parties = more fun.

 

If you have any idea of how to make this possible, please tell me, I can do the research and the hardwork, but the thing is that I have no clue of how to do this haha.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   1
  • Joined:  04/26/12
  • Last Seen:  

Hi

I was looking at your profile and saw this. :)

 

the basic setting would be here, but that doesn't help.

./conf/inter_athena.conf/
// Level range for sharing within a party
party_share_level: 10

 

If you need some more modifications like the one you say, or there is a level limit on the server that produces a gap between lvl 99 who cannot lvlup anymore, and higher lvl, well that needs some source modification in int_party at

 

( the one mentioned is something like this in the if statement I guess:

- if( p->min_lv > lv ) p->min_lv=lv;

+ if ( (((party.member.class_ < 4054) && (lv != 99)) || (party.member.class_ >= 4054)) && (lv < p->min_lv) ) p->min_lv = lv;

but just made this up. )

 

//Updates party's level range and unsets even share if broken.

and

//Calculates the state of a party.

and

// Returns whether this party can keep having exp share or not.

 

in your case only the third one.

 

int party_check_exp_share(struct party_data *p)

{

if (p->min_lvl < 80) //or max_lv

    {

     return (p->party.count < 2 || p->max_lv - p->min_lv <= party_share_level*3);

    }

else

    {

     return (p->party.count < 2 || p->max_lv - p->min_lv <= party_share_level);

    }

}

or if you want 2 party_share_levels -> create party_share_level in inter_athena.conf

in src duplicate and modify lines

unsigned int party_share_level = 10;

extern unsigned int party_share_level;

 

if you rly want it to be dynamic, guess put it into sql instead of text, and read from there dinamically when checking.

 

If you want to add exceptions, you can do it at

 

//Updates party's level range and unsets even share if broken.

and

//Calculates the state of a party.

 

by adding to if statement (like the one mentioned) at the correct place.

 

 

I tested none of these, I don't even have a compiler currently...

Edited by sugo
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  806
  • Reputation:   233
  • Joined:  01/30/13
  • Last Seen:  

Shouldn't modifying party_check_exp_share be enough?

 

But if should be:

if (p->max_lvl < 80)

Because otherwise you can always share with a level 90+ as long as there is one member below 80.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   1
  • Joined:  04/26/12
  • Last Seen:  

Guess I have to check what I wrote... I wrote it between 3 and 6 AM and was half asleep :)
Wat matters is that the modification can be don there in a manner similar to that.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   13
  • Joined:  01/07/12
  • Last Seen:  

Shouldn't modifying party_check_exp_share be enough?

 

But if should be:

if (p->max_lvl < 80)

Because otherwise you can always share with a level 90+ as long as there is one member below 80.

 

 

hello there, I've been reading a lot of c++ stuff and writing some minor codes, I feel that I can start doing this thing I want.

 

But I wonder, where is party_check_exp_share thing, I've looked on party.c and party.h files but I had not luck.

 

by the way, what does sd-> means? I've been looking the source files and I find it is used very often.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  317
  • Reputation:   63
  • Joined:  11/13/11
  • Last Seen:  

Variable       Full Name              Description
--------       ---------              -----------
sd             session data           represents the session of a client into a serv (login, char, or map)

You can find some interesting stuff regarding source from /doc/source_doc.txt

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  806
  • Reputation:   233
  • Joined:  01/30/13
  • Last Seen:  

Looks like exp sharing is part of the char server, that's why you find the source here:

 

https://github.com/rathena/rathena/blob/master/src/char/int_party.c

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