Register for your free account! | Forgot your password?

Go Back   elitepvpers > Conquer Online 2 > CO2 Main - Discussions / Questions > CO2 Programming
You last visited: Today at 06:53

  • Please register to post and access all features, it's quick, easy and FREE!


[IdiotRelease]1st RB StatPoints formula

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 88
[IdiotRelease]1st RB StatPoints formula

well, a friend was doing the 1st rb in a source, and i began to try to get the formula for the stat points that u get after the rb (i like the maths ^^) and i got this.

Code:
        public static byte StatPoints(double level, byte job)
        {
            if(level > 130)
                level = 130;
            if (job == 135)
            {
                if (level % 2 != 0)
                    level -= 1;
                level = ((130 - level) / 2) + level;
            }
            return (byte)((level - 120) * ((level - 119) / 2) + 42);
        }
there is no big reason to using this instead the one u should have with checks, but i just want to share what i got ^^



U2_Caparzo is offline  
Old 04/29/2012, 04:10   #2
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,877
Why is level defined as a 'double' (instead of an int)?
Why is job defined as a 'byte' (instead of an int or an enumeration)?
Why is the return value defined as a 'byte' (instead of an int)?


InfamousNoone is offline  
Old 04/29/2012, 04:23   #3
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 88
Quote:
Originally Posted by InfamousNoone View Post
Why is level defined as a 'double' (instead of an int)?
Why is job defined as a 'byte' (instead of an int or an enumeration)?
Why is the return value defined as a 'byte' (instead of an int)?
1.- if u change the level to an int, the return value changes too.
2.- i don't see the difference between make it byte or an integer (i wish u can let me know why) and isn't an enum because i see it more "global" to use since no every source have the same jobs enum name.
3.- same than 2 :s.
U2_Caparzo is offline  
Old 04/29/2012, 05:15   #4
 
elite*gold: 0
Join Date: Jun 2005
Posts: 686
Received Thanks: 338
What I got from the TQ binaries:
Code:
public int GetRebirthAddPoint(int oldProf, int oldLevel, int newProf, int metempsychosis)
{
    if (metempsychosis == 1)
    {
        if (oldLevel > 130)
        {
            oldLevel = 130;
        }

        return oldProf == 135
                    ? 72 + (1 + (oldLevel - 110) / 2) * ((oldLevel - 110) / 2) / 2
                    : 72 + (1 + (oldLevel - 120)) * (oldLevel - 120) / 2;
    }

    var attrib = Strength + Agility + Vitality + Spirit + AddPoint;
    var add = Math.Max(attrib, 397 - oldLevel * 3 - 7);

    return oldProf == 135
                ? add + BaseFunc.GetRebirthAddPointBonus((oldLevel - 110) / 2 - 1) + oldLevel * 3 - 3
                : add + BaseFunc.GetRebirthAddPointBonus(oldLevel - 120 - 1) + oldLevel * 3 - 3;
}


nTL3fTy is offline  
Thanks
4 Users
Old 04/29/2012, 05:59   #5
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 88
Quote:
Originally Posted by nTL3fTy View Post
What I got from the TQ binaries:
Code:
public int GetRebirthAddPoint(int oldProf, int oldLevel, int newProf, int metempsychosis)
{
    if (metempsychosis == 1)
    {
        if (oldLevel > 130)
        {
            oldLevel = 130;
        }

        return oldProf == 135
                    ? 72 + (1 + (oldLevel - 110) / 2) * ((oldLevel - 110) / 2) / 2
                    : 72 + (1 + (oldLevel - 120)) * (oldLevel - 120) / 2;
    }

    var attrib = Strength + Agility + Vitality + Spirit + AddPoint;
    var add = Math.Max(attrib, 397 - oldLevel * 3 - 7);

    return oldProf == 135
                ? add + BaseFunc.GetRebirthAddPointBonus((oldLevel - 110) / 2 - 1) + oldLevel * 3 - 3
                : add + BaseFunc.GetRebirthAddPointBonus(oldLevel - 120 - 1) + oldLevel * 3 - 3;
}
that made the mine looks incomplete

but i lost the step of it at
Strength + Agility + Vitality + Spirit + AddPoint;
and
BaseFunc.GetRebirthAddPointBonus
U2_Caparzo is offline  
Old 04/29/2012, 06:18   #6
 
elite*gold: 0
Join Date: Jun 2005
Posts: 686
Received Thanks: 338
Quote:
Originally Posted by U2_Caparzo View Post
that made the mine looks incomplete

but i lost the step of it at
Strength + Agility + Vitality + Spirit + AddPoint;
and
BaseFunc.GetRebirthAddPointBonus
The first bit is so you don't lose stats from being over 130.
The second bit (GetRebirthAddPointBonus) simply accesses an array of the points given based on your level:
Code:
{ 1, 3, 6, 10, 15, 21, 28, 36, 45, 55 }
nTL3fTy is offline  
Thanks
1 User
Old 04/29/2012, 06:38   #7
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 88
Quote:
Originally Posted by nTL3fTy View Post
The first bit is so you don't lose stats from being over 130.
The second bit (GetRebirthAddPointBonus) simply accesses an array of the points given based on your level:
Code:
{ 1, 3, 6, 10, 15, 21, 28, 36, 45, 55 }
i see, so what i posted is like GetRebirthAddPointBonus but i added 14 * 3 for each level from 1 to 15... the way that i saw in most of the public sources.

thanks

#EDIT
Another question :$
when u define
var attrib = Strength + Agility + Vitality + Spirit + AddPoint;
for example, what mean Strenght? the Strength points before reborn, asigned after reborn for the level or what? srry to keep asking u about this, but i'm a bit interested in it
U2_Caparzo is offline  
Old 04/29/2012, 06:52   #8
 
elite*gold: 0
Join Date: Jun 2005
Posts: 686
Received Thanks: 338
Quote:
Originally Posted by U2_Caparzo View Post
i see, so what i posted is like GetRebirthAddPointBonus but i added 14 * 3 for each level from 1 to 15... the way that i saw in most of the public sources.

thanks

#EDIT
Another question :$
when u define
var attrib = Strength + Agility + Vitality + Spirit + AddPoint;
for example, what mean Strenght? the Strength points before reborn, asigned after reborn for the level or what? srry to keep asking u about this, but i'm a bit interested in it
This method is located in my main User class, thus they refer to the actual user's strength, agility, etc. values.
nTL3fTy is offline  
Old 04/29/2012, 07:00   #9
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,311
Quote:
Originally Posted by nTL3fTy View Post
What I got from the TQ binaries:
Code:
public int GetRebirthAddPoint(int oldProf, int oldLevel, int newProf, int metempsychosis)
{
    if (metempsychosis == 1)
    {
        if (oldLevel > 130)
        {
            oldLevel = 130;
        }

        return oldProf == 135
                    ? 72 + (1 + (oldLevel - 110) / 2) * ((oldLevel - 110) / 2) / 2
                    : 72 + (1 + (oldLevel - 120)) * (oldLevel - 120) / 2;
    }

    var attrib = Strength + Agility + Vitality + Spirit + AddPoint;
    var add = Math.Max(attrib, 397 - oldLevel * 3 - 7);

    return oldProf == 135
                ? add + BaseFunc.GetRebirthAddPointBonus((oldLevel - 110) / 2 - 1) + oldLevel * 3 - 3
                : add + BaseFunc.GetRebirthAddPointBonus(oldLevel - 120 - 1) + oldLevel * 3 - 3;
}
I do love it when you post your proper way of doing things (proper in that it's how tq handles it) and make people's code look like trash.

I'm a horrible person like that.
pro4never is offline  
Thanks
1 User
Old 04/29/2012, 07:16   #10
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 88
Quote:
Originally Posted by nTL3fTy View Post
This method is located in my main User class, thus they refer to the actual user's strength, agility, etc. values.
really thanks
Quote:
Originally Posted by pro4never View Post
I do love it when you post your proper way of doing things (proper in that it's how tq handles it) and make people's code look like trash.

I'm a horrible person like that.
that went to my heart ^^
U2_Caparzo is offline  
Old 04/29/2012, 07:17   #11
 
elite*gold: 0
Join Date: Apr 2012
Posts: 134
Received Thanks: 30
umm i got a code source for calculator , the exp bar is bugged (wasn't coded correctly)
here's the link of the tool :
here is the code source :
wish that was helpful , be kind that was my second educational project on c# ^^
P.S ignore the exp ball / level rate , just have a look about how it calculate the att. points when reborn , second reborn
DyjgK64J451Jhv0 is offline  
Thanks
1 User
Old 04/29/2012, 07:32   #12
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 88
Quote:
Originally Posted by DyjgK64J451Jhv0 View Post
umm i got a code source for calculator , the exp bar is bugged (wasn't coded correctly)
here's the link of the tool :
here is the code source :
wish that was helpful , be kind that was my second educational project on c# ^^
P.S ignore the exp ball / level rate , just have a look about how it calculate the att. points when reborn , second reborn
i'll check it right now, thanks, a word says more than 1000 thanks button but anyways there u go ^^
U2_Caparzo is offline  
Old 04/30/2012, 05:07   #13
 
elite*gold: 0
Join Date: Jun 2010
Posts: 2,200
Received Thanks: 849
Quote:
Originally Posted by nTL3fTy View Post
The first bit is so you don't lose stats from being over 130.
The second bit (GetRebirthAddPointBonus) simply accesses an array of the points given based on your level:
Code:
{ 1, 3, 6, 10, 15, 21, 28, 36, 45, 55 }
Is that the complete array? If not could you share it? This could come in handy. I always love official formulas.
_DreadNought_ is offline  
Old 04/30/2012, 05:27   #14
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,311
Quote:
Originally Posted by _DreadNought_ View Post
Is that the complete array? If not could you share it? This could come in handy. I always love official formulas.
It's 10 elements long so it should be representing the bonuses from reborning between 120-130. Water taos balance out their bonus point for getting 110-120 iirc and then add the same bonuses for 121-130 which this array covers.

Keep in mind I'm operating off very casual memory of how the system works here but should be correct.


pro4never is offline  
Thanks
1 User
Reply



« Reader with code source | C++ - Pointers Question »

Similar Threads
[Q] Zu Verteilende Statpoints? (DB!)
02/13/2012 - Flyff Main - Discussions / Questions - 0 Replies
Heyho liebe Com :'D Habe eine einfache und denke auch relativ leichte Frage. Und zwa wo wird in der Datenbank der Wert eines Characters angegeben, den er noch zum verteilen übrig hat? Character_tbl: m_nStr > Gibt die Grund Str an m_nSta > Gibt die Grund Sta an m_nDex > Gibt die Grund Dex an
Statpoints pro Level Up ändern?
09/18/2011 - Flyff PServer - Discussions / Questions - 5 Replies
Hallo, Wo ist denn die Anzahl der Statpoints die man bekommt definiert?
Set StatPoints
04/06/2010 - CO2 PServer Guides & Releases - 9 Replies
Ex: /str 45 /vit 45 /spi 45 /agi 45 if (Cmd == "/str") { if (GC.MyChar.StatPoints >= ushort.Parse(Cmd)) { GC.MyChar.Str += ushort.Parse(Cmd);
StatPoints to reborn
10/15/2008 - CO2 PServer - Discussions / Questions - 2 Replies
How can I make to you will be reborn added +3 points StatPoints to climb each level?:confused:
[Help]StatPoints!!
09/30/2008 - CO2 PServer - Discussions / Questions - 7 Replies
Hello. My str and vit and agi and spi not saving.. Help me,tranks a all!!:handsdown:



All times are GMT +1. The time now is 06:53.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.