I need a spell that removes the messages that appear in your server log when you attach an item to a hotkey.
Example: When you add a rope to your hotkeys it will bring up a message when you use it:
09:53 Using the last rope...
09:53 Using the last rope...
09:53 Using the last rope...
I think you have to remove something inside 011-string.lua but im not entierly sure which part to remove because it looks very confusing?:
Example: When you add a rope to your hotkeys it will bring up a message when you use it:
09:53 Using the last rope...
09:53 Using the last rope...
09:53 Using the last rope...
I think you have to remove something inside 011-string.lua but im not entierly sure which part to remove because it looks very confusing?:
Code:
string.split = function (str)
local t = {}
return not str:gsub("%w+", function(s) table.insert(t, s) return "" end):find("%S") and t or {}
end
string.trim = function (str)
return str:gsub("^%s*(.-)%s*$", "%1")
end
string.explode = function (str, sep, limit)
if(type(sep) ~= 'string' or isInArray({tostring(str):len(), sep:len()}, 0)) then
return {}
end
local i, pos, tmp, t = 0, 1, "", {}
for s, e in function() return string.find(str, sep, pos) end do
tmp = str:sub(pos, s - 1):trim()
table.insert(t, tmp)
pos = e + 1
i = i + 1
if(limit ~= nil and i == limit) then
break
end
end
tmp = str:sub(pos):trim()
table.insert(t, tmp)
return t
end
string.expand = function (str)
return string.gsub(str, "$(%w+)", function(n) return _G[n] end)
end
string.timediff = function (diff)
local format = {
{"week", diff / 60 / 60 / 24 / 7},
{"day", diff / 60 / 60 / 24 % 7},
{"hour", diff / 60 / 60 % 24},
{"minute", diff / 60 % 60},
{"second", diff % 60}
}
local t = {}
for k, v in ipairs(format) do
local d, tmp = math.floor(v[2]), ""
if(d > 0) then
tmp = (k < table.maxn(format) and (table.maxn(t) > 0 and ", " or "") or " and ") .. d .. " " .. v[1] .. (d ~= 1 and "s" or "")
table.insert(t, tmp)
end
end
return t
end