Tuesday, April 16, 2024
HomeSample Page

Sample Page Title


Been enjoying Anime Fighers Simulator lots currently and needed to make a calculator to work out the fee for in a single day afk opening.

That is what I’ve made 

 

The Sport “Anime Fighters Simulator” is a roblox sport just like a clicker sport like cookie clicker however primarily based on Anime and has some additional playability as it isn’t purely primarily based on clicking. I’ve performed this sport for over 6000 hours thus far and the competative streak in me has me enjoying far more than I ought to. One of many factor that I noticed folks asking regularily in streams was how a lot would it not value to AFK open in world x. This gave the impression of a enjoyable factor to work on so I began making it as an online web page utilizing jquery and css bootstrap.

 

The very first thing I did was create all of the inputs wanted to work out what number of stars(fighters) you’ll be able to open. This consists of the quantity of stars you’ll be able to open directly, the sport passes you personal and the sport badges you might have for a world. Since totally different gamers can open totally different quantity this must be editable.

 

Subsequent I wanted to have the ability to set how a lot it prices to open so I added the inputs for prices. As with most clicker sort video games the quantity go up exponentially and are denoted by characters equivalent to B for billion and Q for quadrillion. To deal with this I created an array with all of the denoted characters

modLetters = " KMBTQEZYXWVU"  // modifiers for foreign money

With the inputs set for teh stars and the prices i wanted a method for customers to set the world they need to open. I then created the next desk with every world and their prices for stars:

World Identify Star Value Token Value
Tremendous Island 80 21
Ninja Village 300 53
Loopy City 2.5k 227
Fruits Island 10k 593
Hero College 50k 1.8k
Walled Metropolis 250k 5.51k
Slayer Military 800k 12.3k
Ghoul City 3m 30.8k
Chimera Jungle 10m 71.1k
Digital Fortress 40m 185k
Empty Dimension 150m 464k
Cursed Excessive 500m 1.07m
XYZ Metropolis 1.5b 2.29m
9 Crimes island 5b 5.28m
Future Island 20b 13.8m
Fortunate Kingdom 80b 36m
Land Of Alchemy 250b 79.5m
Slimey Island 780b 174m
Flame Metropolis 2t 336m
Divine Colosseum 7t 800m
Kingdom Of 4 20t 1.65b
Icy Wastes 65t 3.75b
The Underworld 200t 8.17b
Psychic Metropolis 650t 18.5b
The Gap 2q 40.3b
Ninja Metropolis 6q 86.4b
Time Journey Tokyo 20q 199b
Orca Street Jail 66q 455b
World Of Video games 220q 1.04t
30 TBC 0 0

The max open tokens are added right here in addition to the max open shall be utilized in our outcomes too.

With all this set I created some code to work out the prices for the values enterd within the enter fields:

defaultOpenPerHour = 1200   // what number of opens an be accomplished in an hour
        defaultMaxOpensPerHour = 40 // what number of max opens might be accomplished in a hour
        defaultSellRate = 0.25      // worth returned for promote (avg)
        timeEventMod = 1            // shops modifier for time occasion
        modLetters = " KMBTQEZYXWVU"  // modifiers for foreign money

        // helpful features

        perform getCostOfSingleOpen(cps, opens) {
            return cps * opens;
        }

        perform getCostOfSingleMaxOpen(cps, invSpace) {
            return cps * invSpace * 0.5;
        }

        perform getCostOfHourOpens(cps, opens, gpass, fiftyk, fuseSell, vip) {
            if (vip == 2) {
                cps = cps * 0.75 // 25% low cost for VIP
            }

            fc = cps * opens * defaultOpenPerHour * gpass * fiftyk
            if (fuseSell == 2) {
                fc = fc * (1 - defaultSellRate)
            }
            return fc
        }

        perform getCostOfHourMaxOpen(cps, invSpace, fuseSell, vip) {

            if (vip == 2) {
                cps = cps * 0.75 // 25% low cost for VIP
            }

            fc = cps * (defaultMaxOpensPerHour * timeEventMod) * invSpace
            sellprice = 0
            if (fuseSell == 2) {
                sellprice = fc * defaultSellRate
            }
            return (fc * 0.5) - sellprice
        }

        perform convertToFormatted(worth, mod) {
            cmodpos = modLetters.indexOf(mod.toUpperCase())
            whereas (Math.ceil(Math.log10(worth + 1)) > 3) {
                cmodpos += 1 // transfer to subsequent modifier
                worth = worth * 0.001// divide val by 1000 to mve 3 locations down
            }

            return parseFloat(worth.toFixed(2)) + modLetters[cmodpos]
            //return worth.toPrecision(3) + modLetters[cmodpos];
        }

        perform populateCost(stringVal, maxStringVal) {
            value = costModConvert(stringVal)
            maxcost = costModConvert(maxStringVal)

            $("#inpcost").val(value[0])
            $("#inpmod").val(value[1])

            $("#inpMaxcost").val(maxcost[0])
            $("#maxmod").val(maxcost[1])

        }

        perform costModConvert(stringVal) {
            lastChar = stringVal.slice(stringVal.size - 1)
            if ($.isNumeric(lastChar)) {
                return [stringVal, ""]
            } else {
                return [stringVal.slice(0, stringVal.length - 1), lastChar]
            }
        }

        perform getOneHourMaxToken(cpmo) {
            return cpmo * 40
        }



        // reply to Clicks
        $("#getres").click on(perform (e) {
            value = $("#inpcost").val()
            mod = $("#inpmod").val()
            mcost = $("#inpMaxcost").val()
            mmod = $("#maxmod").val()
            openCount = $("#opensCount").val()
            invSpace = $("#invSpace").val()
            fuseSell = $("#inputGroupSelect01").val()   // 1 = fuse | 2 = Promote
            gPass = $("#inputGroupSelect02").val()      // 1 = None | 2 = Owned
            fiftyk = $("#inputGroupSelect03").val()     // 1 = None | 2 = Owned
            doMax = $("#inputGroupSelect04").val()      // 1 = Sure  | 2 = No
            vip = $("#inputGroupSelect05").val()        // 1 = No   | 2 = Sure

            res = getCostOfHourOpens(value, openCount, gPass, fiftyk, fuseSell, vip)
            mres = 0
            if (doMax == 1) {
                res += getCostOfHourMaxOpen(value, invSpace, fuseSell)
                mres = getOneHourMaxToken(mcost)
            }


            hour1 = convertToFormatted(res, mod)
            hour2 = convertToFormatted(res * 2, mod)
            hour3 = convertToFormatted(res * 3, mod)
            hour4 = convertToFormatted(res * 4, mod)
            hour5 = convertToFormatted(res * 5, mod)
            hour6 = convertToFormatted(res * 6, mod)
            hour7 = convertToFormatted(res * 7, mod)
            hour8 = convertToFormatted(res * 8, mod)
            hour24 = convertToFormatted(res * 24, mod)

            hourM1 = convertToFormatted(mres, mmod)
            hourM2 = convertToFormatted(mres * 2, mmod)
            hourM3 = convertToFormatted(mres * 3, mmod)
            hourM4 = convertToFormatted(mres * 4, mmod)
            hourM5 = convertToFormatted(mres * 5, mmod)
            hourM6 = convertToFormatted(mres * 6, mmod)
            hourM7 = convertToFormatted(mres * 7, mmod)
            hourM8 = convertToFormatted(mres * 8, mmod)
            hourM24 = convertToFormatted(mres * 24, mod)

            $("#resdisplay").html(hour1 + " for 1 hour  (" + hourM1 + " tokens)")
            $("#res2display").html(hour2 + " for two hours (" + hourM2 + " tokens)")
            $("#res3display").html(hour3 + " for 3 hours (" + hourM3 + " tokens)")
            $("#res4display").html(hour4 + " for 4 hours (" + hourM4 + " tokens)")
            $("#resd5isplay").html(hour5 + " for five hours (" + hourM5 + " tokens)")
            $("#res6display").html(hour6 + " for six hours (" + hourM6 + " tokens)")
            $("#res7display").html(hour7 + " for 7 hours (" + hourM7 + " tokens)")
            $("#res8display").html(hour8 + " for 8 hours (" + hourM8 + " tokens)")
            $("#res24display").html(hour24 + " for twenty-four hours (" + hourM24 + " tokens)")
        });

        $(".trworld").click on(perform () {
            ffs = $(this)
            costtd = ffs.discover("td.costtd").html()
            costMaxtd = ffs.discover("td.costMaxtd").html()
            worldName = ffs.discover("td.worldName").html()
            $("#information").html(worldName)
            populateCost(costtd, costMaxtd)
        });

        $(".badgeBut").click on(perform () {
            change ($(this).attr("information")) {
                case "test1":
                    if ($("#inputGroupSelect05").val() == "1") {
                        $("#inputGroupSelect05").val("2")
                    } else {
                        $("#inputGroupSelect05").val("1")
                    }

                    break;
                case "test2":

                    if ($("#inputGroupSelect02").val() == "1") {
                        $("#inputGroupSelect02").val("2")
                    } else {
                        $("#inputGroupSelect02").val("1")
                    }

                    break;
                case "test3": break;
                case "test4": break;
                case "test5": break;
                case "test6": break;
                case "test7":
                    turnOffAllTimeEventHighlights($(this))
                    if (timeEventMod == 2) {
                        timeEventMod = 1
                        $(this).discover(".clh").toggle()
                    } else {
                        timeEventMod = 2
                    }
                    break;
                case "test8":
                    turnOffAllTimeEventHighlights($(this))
                    if (timeEventMod == 3) {
                        timeEventMod = 1
                        $(this).discover(".clh").toggle()
                    } else {
                        timeEventMod = 3
                    }
                    break;
                case "test9":
                    turnOffAllTimeEventHighlights($(this))
                    if (timeEventMod == 4) {
                        timeEventMod = 1
                        $(this).discover(".clh").toggle()
                    } else {
                        timeEventMod = 4
                    }
                    break;
                case "test10":
                    turnOffAllTimeEventHighlights($(this))
                    if (timeEventMod == 5) {
                        timeEventMod = 1
                        $(this).discover(".clh").toggle()
                    } else {
                        timeEventMod = 5
                    }
                    break;
            }



            $(this).discover(".clh").toggle()
        });

        perform turnOffAllTimeEventHighlights(object) {
            badgebar = object.closest(".badgebar")
            badgebar.discover(".timeMod").toggle(false)
        }

This code is obtainable on github right here incase you need to make this your self in your server. Credit score is appreciated however not required 🙂

 

 

The publish Making an AFK Calculator for Anime Fighters Simulator – Roblox Sport appeared first on Sport Improvement.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments