• 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!

OTClient High Ping

KOLISAO

Member
Joined
Apr 26, 2019
Messages
8
Reaction score
7
37126

When I show Ping in OTClient, it looks like this. Hosted at my home.
In code, decreasing to refresh in less time, nothing is changed.

Lua:
local stime = 4
local time = os.clock()
function updatePing(ping)
  local text = 'Ping: '
  local color
  local ping = math.ceil(ping/2)
 
  if (time + stime) <= os.clock() then
    time = os.clock()
    if ping < 0 then
      text = text .. "??"
      color = 'yellow'
    else
      text = text .. ping .. ' ms'
      if ping >= 290 then
        color = 'red'
      elseif ping >= 150 then
        color = 'yellow'
      else
        color = 'green'
      end
    end
    pingLabel:setColor(color)
    pingLabel:setText(text)
  end
end
 
Back
Top