small update
parent
1c046cc92c
commit
0c78018707
|
@ -1,2 +1,2 @@
|
||||||
*.exe
|
*.exe
|
||||||
|
*.dll
|
||||||
|
|
|
@ -1,17 +1,20 @@
|
||||||
-- Teleport Calculator
|
-- Teleport Calculator
|
||||||
|
|
||||||
local function getEUStr(eu)
|
local function getEUStr(eu)
|
||||||
if(eu<1000) then
|
if(eu<1000) then
|
||||||
return string.format(
|
return string.format("%d EU",eu)
|
||||||
elseif(eu<1000*1000) then
|
elseif(eu<1000000) then
|
||||||
return '' .. math.ceil(eu/1000) .. 'K,' .. getEUStr(eu%1000)
|
return string.format("%.2fK EU",eu/1000)
|
||||||
else
|
else
|
||||||
return '' .. math.ceil(eu/1000000) .. 'M,' .. getEUStr(eu%1000000)
|
return string.format("%.2fM EU",eu/1000000)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function teleport_calc(dis,item)
|
local function teleport_calc(dis,item)
|
||||||
if(item==nil) then item=40 end
|
if(item==nil) then item=40 end
|
||||||
local ret=(1000+100*item)*math.pow(dis+10,0.7)
|
local ret=(1000+100*item)*math.pow(dis+10,0.7)
|
||||||
print("Teleport Steve with " .. item .. " items to " .. dis .. "m away needs " .. getEUStr(ret) .. " EU")
|
print("Teleport Steve with " .. item .. " items to " .. dis .. "m away needs " .. getEUStr(ret))
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return teleport_calc
|
Loading…
Reference in New Issue