= moved plugins and localization

This commit is contained in:
Matthew Cech
2019-06-19 23:00:21 -07:00
parent 29972ff2fc
commit 091e06e4ff
11 changed files with 28 additions and 25 deletions
+19
View File
@@ -0,0 +1,19 @@
local time = os.time();
function plugin(message, user)
if(string.match(string.lower(message), "purple"))then
local timedif = os.time() - time;
time = os.time();
days = (timedif / (60*60*24));
hours = ((timedif / (60*60)) % 24);
mins = ((timedif / (60)) % 60);
secs = timedif % 60;
return "*GASP!!!* \n" .. user.name .. " said **THE** word! It's been " .. round(days) .. " days, " .. round(hours) .. " hours, " .. round(mins) .. " minutes, and " .. round(secs) .. " seconds since the last time!";
end
return nil;
end
function round(num)
return math.floor(num + 0.5)
end