fix for cube line jumping [read info]

Page 1 of 2 12 LastLast
Results 1 to 25 of 26
  1. #1
    Kaotic Owner resinate is offline
    MemberRank
    Oct 2005 Join Date
    no mans landLocation
    2,376Posts

    Proper Cube Fix

    heres the proper code used for cubing.

    replace blocks "resetPotential()" and "renewPotential(int type)" with these

    ill update this code later to add in adjustable mods such as enabling/disabling 4/5 lines.

    type 1 - prem cube
    type 3 - super cube

    Code:
        public void resetPotential() { //equip first one, scroll hidden on it
            final int chance = Randomizer.random(1, 100);
            final int rank = (chance <= 20 ? (chance <= 5 ? (chance <= 1 ? (-20) : -19) : -18) : -17);
            setPotential1(rank);
            setPotential2(Randomizer.nextInt(100) <= 50 ? rank : 0);
            setPotential3(Randomizer.nextInt(100) <= 25 ? rank : 0);
            setPotential4(Randomizer.nextInt(100) <= 10 ? rank : 0);
            setPotential5(Randomizer.nextInt(100) <= 1 ? rank : 0);
        }
    
        public void renewPotential(int type) { // 0 = normal miracle cube, 1 = premium, 2 = epic pot scroll, 3 = super
            final int chance = Randomizer.random(1, 100);
            final int rank = ((getState() == 17 && (type == 2 || chance <= 10)) || (getState() == 18 && chance <= 5) || (getState() == 19 && chance == 1 && type == 3)) ? -(getState() + 1) : -(getState());
            setPotential1(rank);
            setPotential2(getPotential3() > 0 ? rank : (Randomizer.nextInt(100) <= 25 ? rank : 0));
            setPotential3(getPotential4() > 0 ? rank : ((type == 1 || type == 3) && Randomizer.nextInt(100) <= 5 ? rank : 0));//
            setPotential4(getPotential5() > 0 ? rank : ((type == 3) && Randomizer.nextInt(100) <= 1 ? rank : 0));//
            setPotential5(0);
        }
    for the random part add this under randomizer file thingy

    Code:
        public static final int random(int min, int max) {
            return rand.nextInt(max - min + 1) + min;
        }
    Last edited by resinate; 28-08-12 at 05:04 AM.


  2. #2
    Valued Member Disorganize is offline
    MemberRank
    May 2012 Join Date
    101Posts

    Re: fix for cube line jumping [read info]

    Do you know to make it only get to 3L's ONLY?

  3. #3
    Account Upgraded | Title Enabled! avivii12345 is offline
    MemberRank
    Jan 2012 Join Date
    276Posts

    Re: fix for cube line jumping [read info]

    Thnx :)

  4. #4
    Kaotic Owner resinate is offline
    MemberRank
    Oct 2005 Join Date
    no mans landLocation
    2,376Posts

    Re: fix for cube line jumping [read info]

    in my server i use all 5 lines and i just made another update to this code.


    this odd somehow one of my edits in game, broke the shops even tho everything i did was un related to shops....
    Last edited by resinate; 09-08-12 at 12:14 PM.

  5. #5
    Novice KingRadius is offline
    MemberRank
    Aug 2012 Join Date
    2Posts

    Re: fix for cube line jumping [read info]

    Why when I super cube any item , it goes from 3 to 4 lines , then after 1~2 super cubes , it goes back to 3l?

    help please :)

  6. #6
    Kaotic Owner resinate is offline
    MemberRank
    Oct 2005 Join Date
    no mans landLocation
    2,376Posts

    Re: fix for cube line jumping [read info]

    bad copy paste? this system works 100% for me lol ive been using it for 2 weeks cubed 100s of items.

  7. #7
    Novice KingRadius is offline
    MemberRank
    Aug 2012 Join Date
    2Posts

    Re: fix for cube line jumping [read info]

    It works 100% as lines go 4>5 instead 4>3 ?

    answer me please , I will recopy this o.o

  8. #8
    Coder in-training lordpeter is offline
    MemberRank
    Dec 2008 Join Date
    CanadaLocation
    612Posts

    Re: fix for cube line jumping [read info]

    Wow you're on a roll of releasing things today.

  9. #9
    Account Upgraded | Title Enabled! operationcaw is offline
    MemberRank
    Aug 2010 Join Date
    364Posts

    Re: fix for cube line jumping [read info]

    Can i chg the rate to get to legendary or unique?I think is too hard to get to unique....Which 1 should i chg the rate?

  10. #10
    Kaotic Owner resinate is offline
    MemberRank
    Oct 2005 Join Date
    no mans landLocation
    2,376Posts

    Re: fix for cube line jumping [read info]

    2nd code makes adjustable % chance of ranking up

  11. #11
    Account Upgraded | Title Enabled! operationcaw is offline
    MemberRank
    Aug 2010 Join Date
    364Posts

    Re: fix for cube line jumping [read info]

    is the 2nd code same with gms?except for the 5L.The rate of getting rare to legendary?

  12. #12
    Kaotic Owner resinate is offline
    MemberRank
    Oct 2005 Join Date
    no mans landLocation
    2,376Posts

    Re: fix for cube line jumping [read info]

    i dunno, gms is very random, sometime ppl take 200 cubes to rank up, others like got legendary with 1 or 2 cubes.

  13. #13
    Apprentice Drizzt1112 is offline
    MemberRank
    Sep 2008 Join Date
    21Posts

    Re: fix for cube line jumping [read info]

    Dafug?

    Code:
    if (getPotential4() > 0) {
    	setPotential3(rank); 
    	if (getPotential5() > 0) {
    		setPotential4(rank); 
    	} else if (type == 3) { // super
    		setPotential4(Randomizer.nextInt(50) == 1 ? rank : 0); // 2/100 to get 5 lines
    	} else { //DAFUG?
    		setPotential4(0); 
    	}
    	setPotential5(0); /
    }
    So..
    If the item does not have a 5th potential row and the user isn't using a super cube, set the potential back to 3 lines?

  14. #14
    Kaotic Owner resinate is offline
    MemberRank
    Oct 2005 Join Date
    no mans landLocation
    2,376Posts

    Re: fix for cube line jumping [read info]

    i dunno systems works perfect for me lol

    removed 2nd option since it didnt work

  15. #15
    Member jpalasz77 is offline
    MemberRank
    Jun 2012 Join Date
    94Posts

    Re: fix for cube line jumping [read info]

    Hey, is there a way to make the chance of 4/5 lines to be higher? So when you use super cube theres a more chance to get 4/5 and more chance to get unique/legendary?

  16. #16
    Enthusiast GeminiGuy is offline
    MemberRank
    Aug 2012 Join Date
    Kuala Lumpur, MLocation
    44Posts

    Re: fix for cube line jumping [read info]

    I didn't have the method 'setPotential' and 'getPotential' can you made 1 for me? Im using LithiumREV96

  17. #17
    Kaotic Owner resinate is offline
    MemberRank
    Oct 2005 Join Date
    no mans landLocation
    2,376Posts

    Re: fix for cube line jumping [read info]

    this is for lith v111+ only sorry man

  18. #18
    Account Upgraded | Title Enabled! Halcyon is offline
    MemberRank
    Mar 2011 Join Date
    1,103Posts

    Re: fix for cube line jumping [read info]

    Quote Originally Posted by resinate View Post
    this is for lith v111+ only sorry man
    ..LithiumREV96 is Lith v111.

  19. #19
    Novice ancientrein is offline
    MemberRank
    Aug 2012 Join Date
    ThailandLocation
    1Posts

    Re: fix for cube line jumping [read info]

    little-error.png


    err... What about this Error?
    Last edited by ancientrein; 25-08-12 at 10:39 AM.

  20. #20
    Kaotic Owner resinate is offline
    MemberRank
    Oct 2005 Join Date
    no mans landLocation
    2,376Posts

    Re: fix for cube line jumping [read info]

    updated 1st post with the random code part that was missing sorry guys.

    also updated code to prevent going from 3-5 lines. this is prob best version its gonna be.
    Last edited by resinate; 28-08-12 at 05:05 AM.

  21. #21
    Member s4577465464 is offline
    MemberRank
    Apr 2010 Join Date
    84Posts

    Re: fix for cube line jumping [read info]

    how to make it only 3l and have legendary?

  22. #22
    top hat Bizarre is offline
    MemberRank
    Aug 2012 Join Date
    somewhereLocation
    294Posts

    Re: fix for cube line jumping [read info]

    Quote Originally Posted by s4577465464 View Post
    how to make it only 3l and have legendary?
    disable 4/5Ls

  23. #23
    Proficient Member itai5001 is offline
    MemberRank
    Nov 2012 Join Date
    GarbageLocation
    174Posts

    Re: fix for cube line jumping [read info]

    on which file i need to put that?

  24. #24
    Valued Member Disorganize is offline
    MemberRank
    May 2012 Join Date
    101Posts

    Re: fix for cube line jumping [read info]

    Quote Originally Posted by Polygons View Post
    disable 4/5Ls
    How do u disable 4/5l?

  25. #25
    Eternal Slumber Meteorite is offline
    MemberRank
    Jun 2008 Join Date
    875Posts

    Re: fix for cube line jumping [read info]

    remove this part:
    Code:
    setPotential4(Randomizer.nextInt(100) <= 10 ? rank : 0);
            setPotential5(Randomizer.nextInt(100) <= 1 ? rank : 0);



Page 1 of 2 12 LastLast

Advertisement