Refine Code

Breezer

Mr Mañana
Legendary
Jul 16, 2004
3,370
539
315
Has anyone looked at this on any source ? I'd like to know the mathmatics of it all... Like , max count of BIO and Jewels etc.
 

Celsius

LOMCN Veteran
Veteran
Dec 31, 2008
1,155
17
124
Was looked at in the days of euro.

There was even a refine calculator that would work out the probability of your refine working.
 

IceMan

Hero's Act Mir 2
Legendary
Apr 17, 2003
8,544
2
370
350
Best place to see the closest rwfine code would be in phili codes, Sure lcd would tell us about it.
 

Breezer

Mr Mañana
Legendary
Jul 16, 2004
3,370
539
315
Be nice to see Nicks refine calculator back in action , i cant see that they've changed refine much since 2.3 ...


Anyways i pulled out the calc code from Heroes... I know a few bits n bobs ....

Code for DC calc
Code:
if (UpgradeInfo.btDc = UpgradeInfo.btMc) and (UpgradeInfo.btMc = UpgradeInfo.btSc) then begin
      n1C := Random(3);
    end else begin
      n1C := -1;
    end;
    if ((UpgradeInfo.btDc >= UpgradeInfo.btMc) and (UpgradeInfo.btDc >= UpgradeInfo.btSc)) or
      (n1C = 0) then begin
      n90 := _MIN(11, UpgradeInfo.btDc);
      n10 := _MIN(85, n90 shl 3 - n90 + 10 + UpgradeInfo.UserItem.btValue[3] - UpgradeInfo.UserItem.btValue[4] + User.m_nBodyLuckLevel);
      //      n10:=_MIN(85,n90 * 8 - n90 + 10 + UpgradeInfo.UserItem.btValue[3] - UpgradeInfo.UserItem.btValue[4] + User.m_nBodyLuckLevel);

      if Random(g_Config.nUpgradeWeaponDCRate) < n10 then begin //if Random(100) < n10 then begin
        UpgradeInfo.UserItem.btValue[10] := 10;

        if (n10 > 63) and (Random(g_Config.nUpgradeWeaponDCTwoPointRate) = 0) then //if (n10 > 63) and (Random(30) = 0) then
          UpgradeInfo.UserItem.btValue[10] := 11;

        if (n10 > 79) and (Random(g_Config.nUpgradeWeaponDCThreePointRate) = 0) then //if (n10 > 79) and (Random(200) = 0) then
          UpgradeInfo.UserItem.btValue[10] := 12;
      end else UpgradeInfo.UserItem.btValue[10] := 1; //004A0F89
    end;

btValue[4]= Luck +
btValue[3]= Curse +

Might be other way round , iono
 
Last edited:

JoeS

Dedicated Member
Dedicated Member
Sep 15, 2009
40
5
34
wouldn't it make more sense if btvalue3 was the original stat value and btvalue4 was the current value thus making it less likely each subsequent refine?

I am not a coder so sadly I can't make out anything useful from it besides that bodyluck is involved. Everything within the brackets after n10:= _MIN I would assume make the equation but I have no idea how to figure out upgradeinfo.btdc so I can figure out the value of n90 or how to apply the shiftleftbits.

Also I believe theres another set of code for when you hit something that must be important for this.
 

Breezer

Mr Mañana
Legendary
Jul 16, 2004
3,370
539
315
I worked out the luck / curse values by looking at a chinese explaination (translated BADLY) ... Anyone that can shed more light on this would be awesome. Like for instance , even when you get Bodyluck 5/25k , how comes leveling up after that helps (experience on gamepot shows that even after you hit max DURING ur login , it goes past it...Then when u log out , it resets it back to the DB saved value of 5/25k)

All i know at the moment is (and this is roughly what i think)

Bodyluck

Death from mob = -500 BodyLuck
Death from Human = -500 or more (cant remember for sure)
Killing Human = same as death from human
Brown pk = 0 points

Experience = 200k EXP = 200 BodyLuck (i think)

Max level of BodyLuck = 5/25k (25,000 BodyLuck points per level)

My theory, Even tho its maxed out at 5/25k. Once maxed, you are able to exceed this number during ur time ingame, Once you log...You reset back to 5/25k.

Other rates

Luck+ on weapon = 1% for each luck ( so its minimal )
Curse+ on weapon = Same but reversed effects

Item values = Adds the total value (Life Necklace = 1-5 so thats 6)
Max of 2 Items ? not sure on this (looks like it only counts 2)

Anyways, this could all be jibberish lol!!
 
Last edited:

AssasinKing

Dedicated Member
Dedicated Member
Sep 2, 2009
29
0
27
Was wondering does any1 actually have this dc/mc/sc calculator? or is it possible to make?

Breezer, can you explain that dc calc u posted?