• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Formula Value

Doomdice

The N00betarian
Joined
Jul 20, 2009
Messages
659
Reaction score
108
Location
Indiana
I have been trying to figure out how to get this working with magiclevel*skill*level and still cant figure how to get it.
Code:
function onGetFormulaValues(player, skill, attack, parmeter, factor)
    local skillTotal = skill * attack
    local levelTotal = player:getLevel() / 5
    return -(((skillTotal * 0.02) + 4) + (levelTotal)), -(((skillTotal * 0.04) + 9) + (levelTotal) + 2 * skill)
end
 
I have been trying to figure out how to get this working with magiclevel*skill*level and still cant figure how to get it.
Code:
function onGetFormulaValues(player, skill, attack, parmeter, factor)
    local skillTotal = skill * attack
    local levelTotal = player:getLevel() / 5
    return -(((skillTotal * 0.02) + 4) + (levelTotal)), -(((skillTotal * 0.04) + 9) + (levelTotal) + 2 * skill)
end
Are you confused about getting the magiclevel part?
 
PHP:
function onGetFormulaValues(player, skill, attack, parmeter, factor)
  local skillTotal = skill * attack
  local levelTotal = player:getLevel() / 5
   local maglevelTotal = player:getMagicLevel()
   
   local min = -((skillTotal*levelTotal*maglevelTotal)*0.9)
   local max = -((skillTotal*levelTotal*maglevelTotal)*1.1)
   
  return min, max
end

Something like this?
 
PHP:
function onGetFormulaValues(player, skill, attack, parmeter, factor)
  local skillTotal = skill * attack
  local levelTotal = player:getLevel() / 5
   local maglevelTotal = player:getMagicLevel()
 
   local min = -((skillTotal*levelTotal*maglevelTotal)*0.9)
   local max = -((skillTotal*levelTotal*maglevelTotal)*1.1)
 
  return min, max
end

Something like this?

yea but with just skills only not totaling your skills together
 
try
PHP:
function onGetFormulaValues(player, skill, attack, parmeter, factor)
  local skillTotal = skill * attack
  local levelTotal = player:getLevel() / 5
   local maglevelTotal = player:getMagicLevel()
  
   local min = ((skillTotal*levelTotal*maglevelTotal)*0.9)
   local max = ((skillTotal*levelTotal*maglevelTotal)*1.1)
  
  return min, max
end
 
try
PHP:
function onGetFormulaValues(player, skill, attack, parmeter, factor)
  local skillTotal = skill * attack
  local levelTotal = player:getLevel() / 5
   local maglevelTotal = player:getMagicLevel()
 
   local min = ((skillTotal*levelTotal*maglevelTotal)*0.9)
   local max = ((skillTotal*levelTotal*maglevelTotal)*1.1)
 
  return min, max
end

nope
 
local min = -((skillTotal*levelTotal*maglevelTotal)*0.9)
local max = -((skillTotal*levelTotal*maglevelTotal)*1.1)


and it works.
 
local min = -((skillTotal*levelTotal*maglevelTotal)*0.9)
local max = -((skillTotal*levelTotal*maglevelTotal)*1.1)


and it works.
I had that in my first script but he said it didn't work, so I removed the negative values as there's some OTs in the past that doesn't take negative numbers in their calculations, they need to be positive from the script until made negative in C++.

@Topic, What kind of server do you have?
 
PHP:
function onGetFormulaValues(player, skill, attack, parmeter, factor)
  local skillTotal = skill * attack
  local levelTotal = player:getLevel() / 5
   local maglevelTotal = player:getMagicLevel()
 
   local min = -100
   local max = -100
 
  return min, max
end

try that script, if that doesn't work, you're doing something wrong
 
I had that in my first script but he said it didn't work, so I removed the negative values as there's some OTs in the past that doesn't take negative numbers in their calculations, they need to be positive from the script until made negative in C++.

@Topic, What kind of server do you have?
trust me it works
 
Back
Top