The right math of Mentor extra BattlePower

05/21/2015 19:08 GameHackerPM#1
Hi, i just wanna to know what is the right math for the mentor extra BP gain!
My Math is :

Code:
        public uint CalcExtraBP(Player mentor)//mentor bp
        {
            if (mentor.NMBattlePower < client.NMBattlePower) return 0;
            uint bp = (uint)((mentor.NMBattlePower - client.NMBattlePower) / 3.3F);
            if (client.Level >= 125) bp = (uint)((bp * (135 - client.Level)) / 10);
            if (bp < 0) bp = 0;
            return bp;
        }
I don't know if is this right! ^_^
also if a prince got mentor from a king, should he gain 1 BP or 2 ?! Or nothing? ^_^ Thanks!
05/22/2015 02:53 nTL3fTy#2
It's quite simple. TQ has two tables in their database which define the effects and limits of shared battle power.

cq_tutor_type:
idUser_lev_minUser_lev_maxStudent_numBattle_lev_share
170109210
2110119315
3120129525
4130133735
51341401050

The cq_tutor_type table controls the percentage of battle power the mentor can share with an apprentice.

cq_tutor_battle_limit_type:
idBattle_lev_limit
1100
1098
2096
3093
4091
5088
6086
7083
8080
9077
10072
11067
12062
13057
14052
15050
16047
17044
18040
19037
20034
21030
22027

The second table, cq_tutor_battle_limit_type controls the maximum shared battle power the apprentice can receive. It it much too large to post here, but I have provided a part of it. It is keyed by the apprentice's battle power (the id column) and its only other column is the limit.

Calculating the shared battle is quite easy - you need only know the battle power of the mentor, the battle power of the apprentice, and the level of the mentor.

For this example, I'll use a level 130 mentor with 142 battle power and an apprentice with 50 battle power.

Pseudocode:
Code:
mentor_lev = 130
mentor_bp = 142
appr_bp = 50

battle_lev_share = lookup_share(mentor_lev) // battle_lev_share = 35
share = (mentor_bp - appr_bp) * battle_lev_share / 100 // share = 32
share_limit = lookup_limit(appr_bp) // share_limit = 88

result = min(share, share_limit) // result = 32
05/22/2015 14:49 angel12345#3
Quote:
Originally Posted by nTL3fTy View Post
It's quite simple. TQ has two tables in their database which define the effects and limits of shared battle power.

cq_tutor_type:
idUser_lev_minUser_lev_maxStudent_numBattle_lev_share
170109210
2110119315
3120129525
4130133735
51341401050

The cq_tutor_type table controls the percentage of battle power the mentor can share with an apprentice.

cq_tutor_battle_limit_type:
idBattle_lev_limit
1100
1098
2096
3093
4091
5088
6086
7083
8080
9077
10072
11067
12062
13057
14052
15050
16047
17044
18040
19037
20034
21030
22027

The second table, cq_tutor_battle_limit_type controls the maximum shared battle power the apprentice can receive. It it much too large to post here, but I have provided a part of it. It is keyed by the apprentice's battle power (the id column) and its only other column is the limit.

Calculating the shared battle is quite easy - you need only know the battle power of the mentor, the battle power of the apprentice, and the level of the mentor.

For this example, I'll use a level 130 mentor with 142 battle power and an apprentice with 50 battle power.

Pseudocode:
Code:
mentor_lev = 130
mentor_bp = 142
appr_bp = 50

battle_lev_share = lookup_share(mentor_lev) // battle_lev_share = 35
share = (mentor_bp - appr_bp) * battle_lev_share / 100 // share = 32
share_limit = lookup_limit(appr_bp) // share_limit = 88

result = min(share, share_limit) // result = 32
pretty much everything you need to know about the mention in a nutshell, wish when i was running a server this information became public, i had to actually trial/error to understand how to mess with it.
05/23/2015 19:18 GameHackerPM#4
Really, thanks bro! ^_^ SO nice explaining you gave me!
It's really easy now to do it!

Thanks again!

But i just wonder, how can i find these tables?! :*
05/23/2015 21:19 turk55#5
Quote:
Originally Posted by GameHackerPM View Post
Really, thanks bro! ^_^ SO nice explaining you gave me!
It's really easy now to do it!

Thanks again!

But i just wonder, how can i find these tables?! :*
TQ bins db.
05/24/2015 02:40 GameHackerPM#6
Quote:
Originally Posted by turk55 View Post
TQ bins db.
Well, i know, but i don't have one, also i don't know how to deal with this bins!
So old, didn't use it before! So if anybody that easily can just DUMP them for me as a sql! That will be awesome and thanks!

:rolleyes::rolleyes:

If i knew how i can do it, i wouldn't ask anybody to do something i could do!
05/24/2015 02:59 nTL3fTy#7
Quote:
Originally Posted by GameHackerPM View Post
Well, i know, but i don't have one, also i don't know how to deal with this bins!
So old, didn't use it before! So if anybody that easily can just DUMP them for me as a sql! That will be awesome and thanks!

:rolleyes::rolleyes:

If i knew how i can do it, i wouldn't ask anybody to do something i could do!
[Only registered and activated users can see links. Click Here To Register...]
05/27/2015 00:09 GameHackerPM#8
Quote:
Originally Posted by nTL3fTy View Post
[Only registered and activated users can see links. Click Here To Register...]
Thanks again! ^_^