Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
test3
local health = 55 local maxHP = 100 local hp_diff = (maxHP - health) local reps = math.max(1, math.floor(hp_diff / 10)) local inc_hp = math.ceil(hp_diff / reps) print(reps, inc_hp) for k = 1, reps do if (health > maxHP) then break end health = math.min(maxHP, health + inc_hp) end print(health)
run
|
edit
|
history
|
help
-1
test
dd
personal use
Non-Lua core for new scripting languages (Beta)
Reverse strings function - Lua
Beispiel
Goalless DRAWS
BasicTablePrinterV2
Kegs Scores ... FOOOOOOTBALLLLLL
Newton-Raphson method for the square root