• 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
 
yep i wasnt born with luabrains either

Code:
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

Actually the code opentibia gave me works I just had a common error but it only deals dmg when you got magic level and if you got 0 then you aint dealing nothing after I realize I did it too quick and spoke too soon.
 
Code:
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

Actually the code opentibia gave me works I just had a common error but it only deals dmg when you got magic level and if you got 0 then you aint dealing nothing after I realize I did it too quick and spoke too soon.

Lol... ofc it wont work if any of the values is 0..
Any value * 0 = 0, no damage..
give yourself at least 1 magic lvl and try again
 
4k dmg lol with 1 magic level I lower the lvl also.
you should use atk*skill*mlvl.. that will create fucked up damages.. weapon with 50 atk, with 100 skill, and 10 mlvl = 50,000 damage..
how the damage should be, is for you to calculate, I only made the example script for you to use :)
 
PHP:
function onGetFormulaValues(player, skill, attack, parmeter, factor)
  local skillTotal = skill * attack
  local levelTotal = player:getLevel() / 5
   local maglevelTotal = player:getMagicLevel()
   damage_base = (skillTotal+levelTotal+maglevelTotal)
  
   local min = -(damage_base*0.9)
   local max = -(damage_base*1.1)
  
  return min, max
end
 
Back
Top