1. Hello!

    First of all, welcome to MapleLegends! You are currently viewing the forums as a guest, so you can only view the first post of every topic. We highly recommend registering so you can be part of our community.

    By registering to our forums you can introduce yourself and make your first friends, talk in the shoutbox, contribute, and much more!

    This process only takes a few minutes and you can always decide to lurk even after!

    - MapleLegends Administration-
  2. Experiencing disconnecting after inserting your login info? Make sure you are on the latest MapleLegends version. The current latest version is found by clicking here.
    Dismiss Notice

Magician Mage Wash Simulator Script

Discussion in 'Jobs' started by Tarnished, Jun 25, 2024.

Thread Status:
You must be a logged-in, registered member of this site to view further posts in this thread.
  1. Tarnished
    Offline

    Tarnished Slimy

    240
    126
    230
    Jun 13, 2022
    Male
    4:35 AM
    Confessor, Tarnished, Hawthorn
    Hero
    200
    There's already tons of great spreadsheets out there already but I figured I'd share this script now that I have it. I'm not the biggest spreadsheet fan :/

    The script assumes some conditions:
    • You are already a mage (not beginner)
    • You already maxed the MAX MP skill
    • You will always wait for enough NX before leveling
    • You will always fresh wash 5x per lv
    • You will always stale wash MP->HP every level to avoid wasting MP gains
    • You always have average luck on stat gain
    • No weird stuff like fresh washing HP
    • 5 free AP on 3rd and 4th job
    • I've heard MP gain per Fresh wash is 38, not 28 per Nise's formula. Set BASE_MP_PER_FRESH_WASH to whichever number you believe in.
    How to Use:
    • Check if this link to online JavaScript editor still works: https://onecompiler.com/javascript/42hap7geu
    • If that link doesn't work, just copy paste the code below and run it with any Javascript editor
    • Edit your initial values in the "FILL THESE VALUES OUT WITH YOUR CHAR" section
    • Press Run
    • you should be able to see your final HP/MP and NX cost
    Use at your own risk

    Code:
    // ASSUMPTIONS:
    // - you are already a mage (not a beginner)
    // - you already maxed the MAX MP skill (i.e. don't use use this if you're starting from lv.8)
    // - you will never run out of NX
    // - you will fresh wash 5x every level
    // - you will stale wash every level until your MP is under the STALE_WASH_MP_THRESHOLD
    // - always average luck on stat gain
    
    // FILL THESE VALUES OUT WITH YOUR CHAR
    const BEGIN_LV = 65; //the level  you start washing
    const BEGIN_MP = 11320; //mp when you start washing
    const BEGIN_HP = 910; //hp when you start washing
    const BEGIN_BASE_INT = 333; //your current base INT
    const INT_FROM_GEAR = 59; 
    const TARGET_LV = 120; //level you end washing
    
    // Washing Constants for MAGE ==================
    const HP_PER_LV = 12; //avg
    const MP_PER_LV = 43; //avg
    const HP_PER_STALE_WASH = 6;
    const MP_LOSS_PER_WASH = 30;
    const BASE_MP_PER_FRESH_WASH = 38; // this differs from Nise's formula; I heard 38 is the real number, not 28
    const SECOND_JOB_ADV_BONUS_MP = 450; // minimum roll
    const MW_MULTIPLIER = 1.1; // MW20
    const STALE_WASH_MP_THRESHOLD = 29000;
    const APR_COST = 3100;
    
    function CalculateWash()
    {
        let lv = BEGIN_LV;
        let mp = BEGIN_MP;
        let hp = BEGIN_HP;
        let my_int = BEGIN_BASE_INT;
        let washes = 0;
    
        let GetTotalInt = () =>
        {
          return Math.trunc( my_int * MW_MULTIPLIER ) + INT_FROM_GEAR;
        }
    
        let LevelUp = ()=>
        {
          mp += Math.trunc( GetTotalInt() / 10 ) + MP_PER_LV;
          hp += HP_PER_LV;
          lv += 1;
         
          if(lv == 70 || lv == 120)
          {
            DoWashesOnLevel(); // free 5 AP from 3rd and 4th Job
          }
          if(lv == 10) // bonus MP from 1st adv
          {
            // Do nothing because calculator assumes you're already a mage
            // Should already be included in your BEGIN_MP
          }
          if(lv == 30) // bonus MP from mage 2nd job adv
          {
            mp += SECOND_JOB_ADV_BONUS_MP;
          }
        } 
    
        let FreshWash1x = () => 
        {
          mp += BASE_MP_PER_FRESH_WASH + Math.trunc( my_int / 10 );
          mp -= MP_LOSS_PER_WASH;
          my_int += 1;
         
          washes += 1;
        }
       
        let StaleWash1x = () => 
        {
          mp -= MP_LOSS_PER_WASH;
          hp += HP_PER_STALE_WASH;
         
          washes += 1;
        }
       
        let DoWashesOnLevel = () => 
        {
            while(mp > STALE_WASH_MP_THRESHOLD)
            {
              StaleWash1x();
            }
           
            FreshWash1x();
            FreshWash1x();
            FreshWash1x();
            FreshWash1x();
            FreshWash1x();
        }
    
        for(let i = BEGIN_LV; i < TARGET_LV; i++)
        {
            LevelUp();
           
            DoWashesOnLevel();
        }
    
        console.log("HP: ", hp);
        console.log("MP: ", mp);
        console.log("NX Cost: ", washes * APR_COST);
    }
    
    CalculateWash();
    
     
    Last edited: Jun 26, 2024
    • Great Work Great Work x 4
Thread Status:
You must be a logged-in, registered member of this site to view further posts in this thread.

Share This Page