MapleRoyals Accuracy- and Defense Calculator

Discussion in 'Help & Advice' started by Zerato, Feb 27, 2016.

  1. Zerato
    Offline

    Zerato Well-Known Member

    Joined:
    Feb 10, 2016
    Messages:
    1,375
    Likes Received:
    867
    Gender:
    Male
    Country Flag:
    IGN:
    EclipseDK
    Level:
    182
    Guild:
    Valhalla
    Now, this is both an Accuracy and a Defense Calculator that I made a while ago. Now when I recently joined MapleRoyals, I figured it would be a good idea to publish it here for you all to enjoy!

    The main feature is the accuracy calculator, which is an invaluable tool for any warrior or perhaps Brawler or Bandit who needs to know which monsters can be trained on, and how much accuracy is necessary.

    I've been wondering why monsters sometimes hit more when you reach a higher level. I did some research and found out that the formulas for defense in Maple Story are quite interesting. With this feature you can, for example, check whether or not you can survive a hit from Zakum.

    WINDOWS
    You can download the program here:http://olkensway.se/downloads/windows/mscalculator.zip
    (you can also download the latest version directly from the program itself.
    Click "Help"->"About")

    ANDROID
    https://royals.ms/forum/threads/accuracy-calculator-app-for-android.114585/

    Ideas, bug reports and advice is highly appreciated!



    Some features:

    When downloaded, needs no internet connection to function

    Easy-to-use user interface

    Only pre-Big Bang monsters included

    Monsters up to level 140 included

    No need to remember your character’s stats or having to check them in-game. This program will save your character’s stats (Level, accuracy and defense) for you

    Genuine Maple-themed design

    Shows not only basic monster data but also EXP/HP ratio. Save monsters to a list for easy comparison

    Link to hidden-street for easy access to drop information and more

    ss_accCalc.png ss_defCalc.png
    //Weapon Damage:
    //PADamage^2 * rand(0.0085) - WDEF*A - (WDEF-StandardPDD)*B
    //where:
    //A = C + 0.28
    //if WDEF >= StandardPDD, then B = (C*28/45 + (CharacterLevel)*7/13000 + 0.196)
    //if WDEF < StandardPDD, then B = D * (C + (CharacterLevel)/550 + 0.28)
    //C (warriors) = STR/2800 + DEX/3200 + INT/7200 + LUK/3200
    //C (everyone else) = STR/2000 + DEX/2800 + INT/7200 + LUK/3200
    //if Character Level >= Mob Level, then D = 13/(13 + CharacterLevel - MobLevel)
    //if Character Level < Mob Level, then D = 1.3
    //For StandardPDD, see the C# code below.
    //Magic Damage:
    //MADamage^2 * rand(0.0075, 0.008) - (MDEF/4 + STR/28 + DEX/24 + LUK/20) * K
    //where K = 1.2 for magicians and 1 otherwise.
    Code:
    private int GetStandardPDD(int playerLevel,string playerJob)
            {
                int standardPDD = 0;
    
                #region For Beginner
                if (playerJob == "Beginner")
                {
                    if (playerLevel >= 1)
                        standardPDD = 7;
                    if (playerLevel >= 5)
                        standardPDD = 17;
                    if (playerLevel >= 8)
                        standardPDD = 19;
                }
                #endregion
    
                #region For Warrior
                if (playerJob == "Warrior")
                {
                    if (playerLevel >= 10)
                        standardPDD = 54;
                    if (playerLevel >= 12)
                        standardPDD = 57;
                    if (playerLevel >= 15)
                        standardPDD = 83;
                    if (playerLevel >= 20)
                        standardPDD = 106;
                    if (playerLevel >= 22)
                        standardPDD = 109;
                    if (playerLevel >= 25)
                        standardPDD = 129;
                    if (playerLevel >= 30)
                        standardPDD = 154;
                    if (playerLevel >= 35)
                        standardPDD = 179;
                    if (playerLevel >= 40)
                        standardPDD = 203;
                    if (playerLevel >= 47)
                        standardPDD = 208;
                    if (playerLevel >= 50)
                        standardPDD = 261;
                    if (playerLevel >= 55)
                        standardPDD = 267;
                    if (playerLevel >= 60)
                        standardPDD = 305;
                    if (playerLevel >= 65)
                        standardPDD = 308;
                    if (playerLevel >= 70)
                        standardPDD = 359;
                    if (playerLevel >= 75)
                        standardPDD = 356;
                    if (playerLevel >= 80)
                        standardPDD = 382;
                    if (playerLevel >= 85)
                        standardPDD = 388;
                    if (playerLevel >= 90)
                        standardPDD = 440;
                    if (playerLevel >= 95)
                        standardPDD = 446;
                    if (playerLevel >= 100)
                        standardPDD = 494;
                }
                #endregion
    
                #region For Magician
                if (playerJob == "Magician")
                {
                    if (playerLevel >= 8)
                        standardPDD = 25;
                    if (playerLevel >= 10)
                        standardPDD = 31;
                    if (playerLevel >= 13)
                        standardPDD = 40;
                    if (playerLevel >= 15)
                        standardPDD = 49;
                    if (playerLevel >= 18)
                        standardPDD = 54;
                    if (playerLevel >= 20)
                        standardPDD = 56;
                    if (playerLevel >= 25)
                        standardPDD = 60;
                    if (playerLevel >= 28)
                        standardPDD = 64;
                    if (playerLevel >= 30)
                        standardPDD = 75;
                    if (playerLevel >= 33)
                        standardPDD = 91;
                    if (playerLevel >= 35)
                        standardPDD = 98;
                    if (playerLevel >= 40)
                        standardPDD = 99;
                    if (playerLevel >= 48)
                        standardPDD = 107;
                    if (playerLevel >= 50)
                        standardPDD = 131;
                    if (playerLevel >= 55)
                        standardPDD = 134;
                    if (playerLevel >= 58)
                        standardPDD = 142;
                    if (playerLevel >= 60)
                        standardPDD = 159;
                    if (playerLevel >= 65)
                        standardPDD = 162;
                    if (playerLevel >= 68)
                        standardPDD = 170;
                    if (playerLevel >= 70)
                        standardPDD = 184;
                    if (playerLevel >= 75)
                        standardPDD = 190;
                    if (playerLevel >= 78)
                        standardPDD = 198;
                    if (playerLevel >= 80)
                        standardPDD = 212;
                    if (playerLevel >= 85)
                        standardPDD = 218;
                    if (playerLevel >= 88)
                        standardPDD = 226;
                    if (playerLevel >= 90)
                        standardPDD = 240;
                    if (playerLevel >= 95)
                        standardPDD = 246;
                    if (playerLevel >= 98)
                        standardPDD = 254;
                    if (playerLevel >= 100)
                        standardPDD = 266;
                }
                #endregion
    
                #region For Bowman
                if (playerJob == "Bowman")
                {
                    if (playerLevel >= 10)
                        standardPDD = 32;
                    if (playerLevel >= 15)
                        standardPDD = 49;
                    if (playerLevel >= 20)
                        standardPDD = 65;
                    if (playerLevel >= 25)
                        standardPDD = 80;
                    if (playerLevel >= 30)
                        standardPDD = 95;
                    if (playerLevel >= 35)
                        standardPDD = 110;
                    if (playerLevel >= 40)
                        standardPDD = 125;
                    if (playerLevel >= 50)
                        standardPDD = 145;
                    if (playerLevel >= 55)
                        standardPDD = 148;
                    if (playerLevel >= 60)
                        standardPDD = 177;
                    if (playerLevel >= 65)
                        standardPDD = 180;
                    if (playerLevel >= 70)
                        standardPDD = 206;
                    if (playerLevel >= 75)
                        standardPDD = 212;
                    if (playerLevel >= 80)
                        standardPDD = 238;
                    if (playerLevel >= 85)
                        standardPDD = 244;
                    if (playerLevel >= 90)
                        standardPDD = 270;
                    if (playerLevel >= 95)
                        standardPDD = 276;
                    if (playerLevel >= 100)
                        standardPDD = 298;
                }
                #endregion
    
                #region For Thief
                if (playerJob == "Thief")
                {
                    if (playerLevel >= 10)
                        standardPDD = 42;
                    if (playerLevel >= 15)
                        standardPDD = 60;
                    if (playerLevel >= 20)
                        standardPDD = 76;
                    if (playerLevel >= 22)
                        standardPDD = 85;
                    if (playerLevel >= 25)
                        standardPDD = 100;
                    if (playerLevel >= 30)
                        standardPDD = 115;
                    if (playerLevel >= 32)
                        standardPDD = 116;
                    if (playerLevel >= 35)
                        standardPDD = 131;
                    if (playerLevel >= 37)
                        standardPDD = 132;
                    if (playerLevel >= 40)
                        standardPDD = 147;
                    if (playerLevel >= 50)
                        standardPDD = 184;
                    if (playerLevel >= 55)
                        standardPDD = 187;
                    if (playerLevel >= 60)
                        standardPDD = 220;
                    if (playerLevel >= 65)
                        standardPDD = 223;
                    if (playerLevel >= 70)
                        standardPDD = 257;
                    if (playerLevel >= 75)
                        standardPDD = 263;
                    if (playerLevel >= 80)
                        standardPDD = 291;
                    if (playerLevel >= 85)
                        standardPDD = 297;
                    if (playerLevel >= 90)
                        standardPDD = 325;
                    if (playerLevel >= 95)
                        standardPDD = 331;
                }
                #endregion
                return standardPDD;
            }
    
            private double CalculateDefense(double mobLevel, double mobAttack, double playerLevel, double playerDefense, double standardPDD, double stat_str, double stat_dex, double stat_int, double stat_luk)
            {           
                double variableC =stat_str / 2800 + stat_dex / 3200 + stat_int / 7200 + stat_luk / 3200;
    
                double variableD = 1.3;
                if (playerLevel >= mobLevel)
                    variableD = 13 / (13 + playerLevel - mobLevel);
    
                double variableB = variableD*(variableC+playerLevel/550+0.28);
                if (playerDefense >= standardPDD)
                    variableB = variableC * 28 / 45 + playerLevel * 7 / 13000 + 0.196;
    
                double damageTaken = mobAttack * mobAttack * 0.0085 - playerDefense * (variableC + 0.28) - (playerDefense - standardPDD) * variableB;
                return Math.Round(damageTaken, frmOptions.decimals);
            }
    [/SPOLIER]
     
    Last edited: Nov 15, 2020
  2. Zynzer
    Offline

    Zynzer Donator

    Joined:
    Mar 19, 2015
    Messages:
    1,713
    Likes Received:
    2,572
    Gender:
    Male
    Country Flag:
    IGN:
    Zynzer
    Level:
    200
    Guild:
    Oblivion
    Perhaps you're able to multiply the EXP by 4 since we're in a 4x server? :p
     
    Dimitri likes this.
  3. Zerato
    Offline

    Zerato Well-Known Member

    Joined:
    Feb 10, 2016
    Messages:
    1,375
    Likes Received:
    867
    Gender:
    Male
    Country Flag:
    IGN:
    EclipseDK
    Level:
    182
    Guild:
    Valhalla
    Good idea Zynzer! I've now changed the EXP to being 4x, but it's still possible to change to 1x or whatever ratio you want.
     
    Zynzer and Dimitri like this.
  4. VitaLemonade
    Offline

    VitaLemonade Donator

    Joined:
    Aug 15, 2015
    Messages:
    1,051
    Likes Received:
    3,229
    Gender:
    Male
    Country Flag:
    Guild:
    Oblivion
    Is that an option for Horntail because I just entered Level=160 and Attack=1750 (The Weapon attack for Horntail's Tail according to bbb hiddenstreet) and it said the damage was 25k which I know isn't right because I've been hit for up for 31k before from Horntail Tail.
     
    Zerato likes this.
  5. Zerato
    Offline

    Zerato Well-Known Member

    Joined:
    Feb 10, 2016
    Messages:
    1,375
    Likes Received:
    867
    Gender:
    Male
    Country Flag:
    IGN:
    EclipseDK
    Level:
    182
    Guild:
    Valhalla
    Hm...There is no option for Horntail right now, but the program uses the same data as you entered. Lv.160 and Attack:1750 is correct, but maybe Horntail boosts himself and actually has around 1900 Attack or more? I don't know about this because I've never battled Horntail myself.
    It's good that you let me know about this, since I haven't tested the Defense Calculator as much as the Accuracy Calculator
     
  6. VitaLemonade
    Offline

    VitaLemonade Donator

    Joined:
    Aug 15, 2015
    Messages:
    1,051
    Likes Received:
    3,229
    Gender:
    Male
    Country Flag:
    Guild:
    Oblivion
    That actually might be the reason...
     
  7. Zerato
    Offline

    Zerato Well-Known Member

    Joined:
    Feb 10, 2016
    Messages:
    1,375
    Likes Received:
    867
    Gender:
    Male
    Country Flag:
    IGN:
    EclipseDK
    Level:
    182
    Guild:
    Valhalla
    Make sure to not miss a thing! Now, a new version of this program is available (2.0.4).
    - Monster EXP is now 3.2x by default.
    - Added Horntail and monsters from Ninja Castle and Haunted House

    You can download the newest version simply by starting up the program normally (if you already downloaded it) - it will search for updates. Otherwise, follow the normal download link. Enjoy :)
     
  8. Zerato
    Offline

    Zerato Well-Known Member

    Joined:
    Feb 10, 2016
    Messages:
    1,375
    Likes Received:
    867
    Gender:
    Male
    Country Flag:
    IGN:
    EclipseDK
    Level:
    182
    Guild:
    Valhalla
    I fixed a bug that I found. I'm not sure if anyone had suffered from it though. You can download version 2.0.4.1 now
     
  9. Zerato
    Offline

    Zerato Well-Known Member

    Joined:
    Feb 10, 2016
    Messages:
    1,375
    Likes Received:
    867
    Gender:
    Male
    Country Flag:
    IGN:
    EclipseDK
    Level:
    182
    Guild:
    Valhalla
  10. Section
    Offline

    Section Well-Known Member

    Joined:
    Jan 13, 2016
    Messages:
    116
    Likes Received:
    42
    Gender:
    Male
    Country Flag:
    IGN:
    Section
    Level:
    182
    should pirates use the warrior option?
     
  11. Evan
    Offline

    Evan Donator

    Joined:
    May 29, 2015
    Messages:
    2,361
    Likes Received:
    7,147
    Gender:
    Male
    Guild:
    Resignation
    Can I move this out of screenshots and artwork? lol
     
  12. Zerato
    Offline

    Zerato Well-Known Member

    Joined:
    Feb 10, 2016
    Messages:
    1,375
    Likes Received:
    867
    Gender:
    Male
    Country Flag:
    IGN:
    EclipseDK
    Level:
    182
    Guild:
    Valhalla
    Choosing Warrior will give you a damage taken that is a bit higher than you will actually take so it can be a good idea when checking if you can survive Zakum for example.
    When I made this, I didn't know about MapleRoyals and I played a PS which was like v. 0.55 so it had no Pirates and therefore I didn't include it. Later, when I uploaded it here in Royals forum, I wanted to add Pirates but couldn't find the formulas for it. I think I have an idea what they'll look like, and I believe it's quite similar with Bowman

    Um, move it wherever you want but... It's in Royal's Random Creativity now. Did you move it already?
     
  13. Evan
    Offline

    Evan Donator

    Joined:
    May 29, 2015
    Messages:
    2,361
    Likes Received:
    7,147
    Gender:
    Male
    Guild:
    Resignation
    No haha. There's a few calcs here and I'm not sure why.
     
  14. Zerato
    Offline

    Zerato Well-Known Member

    Joined:
    Feb 10, 2016
    Messages:
    1,375
    Likes Received:
    867
    Gender:
    Male
    Country Flag:
    IGN:
    EclipseDK
    Level:
    182
    Guild:
    Valhalla
    To me, programming is a form of art, and there are sections here to share art but none specifically for coding-stuff. Maybe it's time to add one? :p
     
  15. cascadaepic
    Offline

    cascadaepic Donator

    Joined:
    Dec 15, 2015
    Messages:
    435
    Likes Received:
    258
    Gender:
    Male
    Country Flag:
    IGN:
    SubaruWRXSTi
    Level:
    199
    Guild:
    Ascend
    your first class should always be a bishop or arch mage and lvl 81 hs mule. trust me, i tried making a hero first because i hated mages, but after 2 years of playing it unfunded and feeling like crap i made one. there is very limited money making methods exceeding 100m an hour consistently with non-mage classes- archmages make 200m an hour selling petri leech, and 130m an hour selling ulu2 leech (ulu2 1shot is possible with ulti lvl 20 and an elewand 5/7 and literally no other equips).
     
  16. Zerato
    Offline

    Zerato Well-Known Member

    Joined:
    Feb 10, 2016
    Messages:
    1,375
    Likes Received:
    867
    Gender:
    Male
    Country Flag:
    IGN:
    EclipseDK
    Level:
    182
    Guild:
    Valhalla
    Interesting!
    But wrong thread.
    @Evan can you clean up, please? :)
     
  17. AmitPwnz
    Offline

    AmitPwnz Well-Known Member

    Joined:
    Mar 30, 2020
    Messages:
    106
    Likes Received:
    14
    Gender:
    Male
    Location:
    Israel
    Country Flag:
    IGN:
    FudgePacker
    Level:
    141
    Guild:
    GuestList
    Started using this, it's a really nice tool!
    There's some really useful improvements that could be made:
    1. refactor the way you're storing your data because updating an existing character just makes it displayed twice.
    2. adding a search bar (because looking up monsters can be a pain)
    3. adding some missing monsters such as Scarlion & Targa
     
    Zerato likes this.
  18. Zerato
    Offline

    Zerato Well-Known Member

    Joined:
    Feb 10, 2016
    Messages:
    1,375
    Likes Received:
    867
    Gender:
    Male
    Country Flag:
    IGN:
    EclipseDK
    Level:
    182
    Guild:
    Valhalla
    Nice to hear that you're finding it useful!

    Those are some good points you're coming with. I want to update this and also the one for Android, but I'm afraid I won't put time on that in the near future. However, I still appreciate feedback.
    1. You might have discovered a bug here, which I haven't noticed before.
    2. A good idea. For now, a workaround is to type the first letter in the monster you're searching. For example, if you want to lookup "Stone Golem", keep pressing "S" until you find it. Ugly, I know, but it's the best way for now.
    3. It is less likely that I'll add monsters to the PC version than to the Android version. I was a noob when I created the PC version (still am) and the way data is stored is really cumbersome to work with, hehe. What you can do is type in the level and avoidability values of a monster, and the calculation will be made for you.

    I am open to sharing the code of this tool (it is written in C#) if you or anyone else would like to try update the program on your own. Send me an inbox message in that case.

    Happy Mapling ~
     
    AmitPwnz likes this.
  19. AmitPwnz
    Offline

    AmitPwnz Well-Known Member

    Joined:
    Mar 30, 2020
    Messages:
    106
    Likes Received:
    14
    Gender:
    Male
    Location:
    Israel
    Country Flag:
    IGN:
    FudgePacker
    Level:
    141
    Guild:
    GuestList
    I'd love to see the code. If you'd like I can also port it to a more modern framework such as Electron to be able to run it on any platform.
     
  20. Wonderstruck
    Offline

    Wonderstruck Donator

    Joined:
    Apr 10, 2020
    Messages:
    1,512
    Likes Received:
    631
    Did you happen to do some updates?
     

Share This Page