-
-
Save RaphPH/0cb1e661a9a3e217ed17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init start | |
local function getsecs(msg) | |
local times, temp = {m = 60, h = 3600, s = 1}, 0 | |
for n, t in msg:gmatch('(%d+)%s(%a)') do | |
temp = temp + (tonumber(n) * times[t] or 0) | |
end | |
return temp | |
end | |
-- SCRIPT VERSION: 1.1.0 | |
init end | |
auto(1000) -- do not change it! | |
if not softTime then | |
if $feet.id == 3549 then | |
contextmenu("Look", $feet.id, "feet") waitping() | |
end | |
foreach newmessage m do | |
if m.type == MSG_INFO then | |
local name, duration = m.content:match(REGEX_ITEM_DURATION) | |
if duration then | |
softTime = getsecs(duration) | |
end | |
end | |
end | |
end | |
if $feet.id ~= 3549 then | |
softTime = false | |
end | |
if softTime then | |
softTime = softTime - 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment