Ascuas Funkeln
Rakkedo Game
- Joined
- Apr 14, 2013
- Messages
- 549
- Solutions
- 32
- Reaction score
- 305
- Location
- Poland
- GitHub
- AscuasFunkeln
Hello, i need help with this script.
What i want is, make this % upgrading every time from basic value, not from actual value.
Example:
Armor Value: 100
Upgrade per hit: 3%
Result from 0% to 3% is 105 instead of 103, cuz they calcuate all 3 level, and take value of actual lvl instead of basic 100.
@Edit
Ok thread to close i make it.
In this function:
Change this line
to this
What i want is, make this % upgrading every time from basic value, not from actual value.
Example:
Armor Value: 100
Upgrade per hit: 3%
Result from 0% to 3% is 105 instead of 103, cuz they calcuate all 3 level, and take value of actual lvl instead of basic 100.
@Edit
Ok thread to close i make it.
In this function:
Lua:
local upgrading = {
upValue = function (value, level, percent)
if value < 0 then return 0 end
if level == 0 then return value end
local nVal = value
for i = 1, level do
nVal = nVal + (math.ceil((value/100*percent)))
end
return nVal > 0 and nVal or value
end,
nVal = nVal + (math.ceil((nVal/100*percent)))
to this
nVal = nVal + (math.ceil((value/100*percent)))
Last edited: