Explore ROM internal Lua formulas

1,812 formulas archived

CommonFun.calcAttrCurseTime

Lua
function CommonFun.calcAttrCurseTime(srcUser, targetUser)
  local Str = srcUser:GetProperty("Str")
  local Int = targetUser:GetProperty("Int")
  local StateTimeAtk = srcUser:GetProperty("StateTimeAtk")
  local StateTimeDef2 = targetUser:GetProperty("StateTimeDef")
13 linesView Formula

CommonFun.calcAttrDarkRate

Lua
function CommonFun.calcAttrDarkRate(srcUser, targetUser)
  local Str = srcUser:GetProperty("Str")
  local Int = targetUser:GetProperty("Int")
  local Dex = targetUser:GetProperty("Dex")
  local A = math.min(1, Str * 0.3 / 100)
12 linesView Formula

CommonFun.calcAttrDarkTime

Lua
function CommonFun.calcAttrDarkTime(srcUser, targetUser)
  local Str = srcUser:GetProperty("Str")
  local Int = targetUser:GetProperty("Int")
  local StateTimeAtk = srcUser:GetProperty("StateTimeAtk")
  local StateTimeDef2 = targetUser:GetProperty("StateTimeDef")
13 linesView Formula

CommonFun.calcAttrDizzyRate

Lua
function CommonFun.calcAttrDizzyRate(srcUser, targetUser)
  local Str = srcUser:GetProperty("Str")
  local Vit = targetUser:GetProperty("Vit")
  local Agi = targetUser:GetProperty("Agi")
  local A = math.min(0.6, Str * 0.2 / 100)
12 linesView Formula

CommonFun.calcAttrDizzyTime

Lua
function CommonFun.calcAttrDizzyTime(srcUser, targetUser)
  local Str = srcUser:GetProperty("Str")
  local Vit = targetUser:GetProperty("Vit")
  local StateTimeAtk = srcUser:GetProperty("StateTimeAtk")
  local StateTimeDef2 = targetUser:GetProperty("StateTimeDef")
13 linesView Formula

CommonFun.calcAttrFearRate

Lua
function CommonFun.calcAttrFearRate(srcUser, targetUser)
  local Dex = srcUser:GetProperty("Dex")
  local Int = targetUser:GetProperty("Int")
  local Luk = targetUser:GetProperty("Luk")
  local A = math.min(0.6, Dex * 0.3 / 100)
12 linesView Formula

CommonFun.calcAttrFearTime

Lua
function CommonFun.calcAttrFearTime(srcUser, targetUser)
  local Dex = srcUser:GetProperty("Dex")
  local Int = targetUser:GetProperty("Int")
  local StateTimeAtk = srcUser:GetProperty("StateTimeAtk")
  local StateTimeDef2 = targetUser:GetProperty("StateTimeDef")
13 linesView Formula

CommonFun.calcAttrFreezeRate

Lua
function CommonFun.calcAttrFreezeRate(srcUser, targetUser)
  local Int = srcUser:GetProperty("Int")
  local Int2 = targetUser:GetProperty("Int")
  local Dex = targetUser:GetProperty("Dex")
  local A = math.min(0.6, Int * 0.2 / 100)
12 linesView Formula

CommonFun.calcAttrFreezeTime

Lua
function CommonFun.calcAttrFreezeTime(srcUser, targetUser)
  local Int = srcUser:GetProperty("Int")
  local Int2 = targetUser:GetProperty("Int")
  local StateTimeAtk = srcUser:GetProperty("StateTimeAtk")
  local StateTimeDef2 = targetUser:GetProperty("StateTimeDef")
13 linesView Formula

CommonFun.calcAttrPoisonRate

Lua
function CommonFun.calcAttrPoisonRate(srcUser, targetUser)
  local Luk = srcUser:GetProperty("Luk")
  local Vit = targetUser:GetProperty("Vit")
  local Int = targetUser:GetProperty("Int")
  local A = math.min(0.8, Luk * 0.3 / 100)
12 linesView Formula

CommonFun.calcAttrPoisonTime

Lua
function CommonFun.calcAttrPoisonTime(srcUser, targetUser)
  local Luk = srcUser:GetProperty("Luk")
  local Vit = targetUser:GetProperty("Vit")
  local StateTimeAtk = srcUser:GetProperty("StateTimeAtk")
  local StateTimeDef2 = targetUser:GetProperty("StateTimeDef")
13 linesView Formula

CommonFun.calcAttrSilenceRate

Lua
function CommonFun.calcAttrSilenceRate(srcUser, targetUser)
  local Dex = srcUser:GetProperty("Dex")
  local Vit = targetUser:GetProperty("Vit")
  local Str = targetUser:GetProperty("Str")
  local A = math.min(1, Dex * 0.3 / 100)
12 linesView Formula

CommonFun.calcAttrSilenceTime

Lua
function CommonFun.calcAttrSilenceTime(srcUser, targetUser)
  local Dex = srcUser:GetProperty("Dex")
  local Vit = targetUser:GetProperty("Vit")
  local StateTimeAtk = srcUser:GetProperty("StateTimeAtk")
  local StateTimeDef2 = targetUser:GetProperty("StateTimeDef")
13 linesView Formula

CommonFun.calcAttrSleepRate

Lua
function CommonFun.calcAttrSleepRate(srcUser, targetUser)
  local Dex = srcUser:GetProperty("Dex")
  local Int = targetUser:GetProperty("Int")
  local Luk = targetUser:GetProperty("Luk")
  local A = math.min(0.6, Dex * 0.2 / 100)
12 linesView Formula

CommonFun.calcAttrSleepTime

Lua
function CommonFun.calcAttrSleepTime(srcUser, targetUser)
  local Dex = srcUser:GetProperty("Dex")
  local Int = targetUser:GetProperty("Int")
  local StateTimeAtk = srcUser:GetProperty("StateTimeAtk")
  local StateTimeDef2 = targetUser:GetProperty("StateTimeDef")
13 linesView Formula

CommonFun.calcAttrSlowRate

Lua
function CommonFun.calcAttrSlowRate(srcUser, targetUser)
  local Agi = srcUser:GetProperty("Agi")
  local Vit = targetUser:GetProperty("Vit")
  local Str = targetUser:GetProperty("Str")
  local A = math.min(0.6, Agi * 0.2 / 100)
12 linesView Formula

CommonFun.calcAttrSlowTime

Lua
function CommonFun.calcAttrSlowTime(srcUser, targetUser)
  local Agi = srcUser:GetProperty("Agi")
  local Vit = targetUser:GetProperty("Vit")
  local StateTimeAtk = srcUser:GetProperty("StateTimeAtk")
  local StateTimeDef2 = targetUser:GetProperty("StateTimeDef")
13 linesView Formula

CommonFun.calcAttrStoneRate

Lua
function CommonFun.calcAttrStoneRate(srcUser, targetUser)
  local Int = srcUser:GetProperty("Int")
  local Int2 = targetUser:GetProperty("Int")
  local Dex = targetUser:GetProperty("Dex")
  local A = math.min(0.6, Int * 0.2 / 100)
12 linesView Formula

CommonFun.calcAttrStoneTime

Lua
function CommonFun.calcAttrStoneTime(srcUser, targetUser)
  local Int = srcUser:GetProperty("Int")
  local Int2 = targetUser:GetProperty("Int")
  local StateTimeAtk = srcUser:GetProperty("StateTimeAtk")
  local StateTimeDef2 = targetUser:GetProperty("StateTimeDef")
13 linesView Formula

CommonFun.calcAuctionPrice

Lua
function CommonFun.calcAuctionPrice(basePrice, level)
  if level == 1 then
    return 10
  elseif level == 2 then
    return 100
10 linesView Formula