Farming progress counter
当前为
// ==UserScript==
// @name florr.io | Farming progress counter
// @namespace Furaken
// @version 1.0.1
// @description Farming progress counter
// @author Furaken
// @match https://florr.io/*
// @grant unsafeWindow
// @license MIT
// ==/UserScript==
var basic = 4155201 - 8,
id = 53,
rarity = 4,
aim = 1_000_000,
petal = "Legendary Relic"
function convertNumber(value) {
return Math.abs(Number(value)) >= 1.0e+9
? (Math.abs(Number(value)) / 1.0e+9).toFixed(2) + "B"
: Math.abs(Number(value)) >= 1.0e+6
? (Math.abs(Number(value)) / 1.0e+6).toFixed(2) + "M"
: Math.abs(Number(value)) >= 1.0e+3
? (Math.abs(Number(value)) / 1.0e+3).toFixed(2) + "K"
: Math.abs(Number(value))
}
var container = document.createElement("div")
container.style = `
padding: 5px;
height: 24px;
width: 300px;
position: absolute;
bottom: 20px;
right: 20px;
background: #333333;
border-radius: 100px;
pointer-events: none;
transition: all 1s ease-in-out;
opacity: 1;
`
document.querySelector('body').appendChild(container)
var petalName = document.createElement("div")
petalName.style = `
top: 50%;
left: 50%;
transform: translate(-50%, -230%);
position: absolute;
width: 100%;
color: white;
font-family: 'Ubuntu';
text-align: center;
transition: all 1s ease-in-out;
text-wrap: nowrap;
text-shadow: rgb(0 0 0) 2px 0px 0px, rgb(0 0 0) 1.75517px 0.958851px 0px, rgb(0 0 0) 1.0806px 1.68294px 0px, rgb(0 0 0) 0.141474px 1.99499px 0px, rgb(0 0 0) -0.832294px 1.81859px 0px, rgb(0 0 0) -1.60229px 1.19694px 0px, rgb(0 0 0) -1.97998px 0.28224px 0px, rgb(0 0 0) -1.87291px -0.701566px 0px, rgb(0 0 0) -1.30729px -1.5136px 0px, rgb(0 0 0) -0.421592px -1.95506px 0px, rgb(0 0 0) 0.567324px -1.91785px 0px, rgb(0 0 0) 1.41734px -1.41108px 0px, rgb(0 0 0) 1.92034px -0.558831px 0px;
`
petalName.innerHTML = petal
container.appendChild(petalName)
var barText = document.createElement("div")
barText.style = `
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
position: absolute;
width: 100%;
color: white;
font-family: 'Ubuntu';
text-align: center;
transition: all 1s ease-in-out;
text-wrap: nowrap;
z-index: 1;
text-shadow: rgb(0 0 0) 2px 0px 0px, rgb(0 0 0) 1.75517px 0.958851px 0px, rgb(0 0 0) 1.0806px 1.68294px 0px, rgb(0 0 0) 0.141474px 1.99499px 0px, rgb(0 0 0) -0.832294px 1.81859px 0px, rgb(0 0 0) -1.60229px 1.19694px 0px, rgb(0 0 0) -1.97998px 0.28224px 0px, rgb(0 0 0) -1.87291px -0.701566px 0px, rgb(0 0 0) -1.30729px -1.5136px 0px, rgb(0 0 0) -0.421592px -1.95506px 0px, rgb(0 0 0) 0.567324px -1.91785px 0px, rgb(0 0 0) 1.41734px -1.41108px 0px, rgb(0 0 0) 1.92034px -0.558831px 0px;
`
container.appendChild(barText)
var barProgress = document.createElement("div")
barProgress.style = `
background: #F5FF65;
border-radius: 100px;
width: 0px;
max-width: 300px;
max-height: 24px;
transition: all 1s ease-in-out;
opacity: 0;
height: 0px;
top: 50%;
position: absolute;
transform: translate(0px, -50%);
`
container.appendChild(barProgress)
barText.innerHTML = `0 / ${convertNumber(aim)} (0.00%)`
setInterval(() => {
var thisPetal = unsafeWindow.Module.HEAPU32[basic+(id*8)-(8-rarity)],
thisWidth = container.style.width.slice(0, -2) * thisPetal / aim
barProgress.style.height = thisWidth + "px"
barProgress.style.width = thisWidth + "px"
barProgress.style.opacity = thisPetal / (aim * 0.08)
barText.innerHTML = `${convertNumber(thisPetal)} / ${convertNumber(aim)} (${(thisPetal * 100 / aim).toFixed(2)}%)`
}, 10000)
document.documentElement.addEventListener("keydown", function (e) {
if (event.keyCode == "187") container.style.opacity = container.style.opacity == '0' ? '1' : '0'
});
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址