local lines = {
legendary = {
"me: drinking milk... someone: it's not milk... me: drinking NOT milk... someone: it's my... me: *quickened up...* ๐ฅ ๐ฅ ๐ฅ ๐ ",
"uhmmm... it's kind of my milk... do you like it? ๐ฅ ๐ณ ",
"\"i'm literally 'not milk'\" ๐ฅ Emotionless ",
"average 'not milk' enjoyer ๐ฅ GIGACHAD ",
"we are not 'born to die', does a cup of 'not milk' poured to finish immediately? ๐ฅ FeelsStrongMan ",
"the cold cruelty of the universe when the indomitable 'not milk' spirit walks into the room: ๐ฅ WAITWAITWAIT " },
epic = {
"you drank the milk and it tastes like the milk from your childhood ๐ฅ ๐ฉ ",
"your lunch is here, commander... oh no, i forgot the milk! don't worry ๐ฅ ๐คจ ",
"for every kill you get i'll give you a 'not milk' ... Alright bet ๐ฅ ๐ณ ",
"i may not show it but a cup of 'not milk' really be giving me renewed purpose in life ๐ฅ ๐ฏ ",
"'why should i even keep drinking??' mfs when they look back at where they started to drink ๐ฅ ๐ฅน",
"when i am in a 'restoring faith in humanity' competition and my opponent is 'not milk' ๐ฅ OMAYGOT "
},
common = {
"you are completely clueless of the contents of your drink ๐ฅ Clueless ",
"linus milk tips ๐ฅ ๐ค ",
"bitches be like 'i am poly'... ok, do you want a 'not milk'? ๐ฅ ๐ ",
"he has 97 mental illnesses and is banned from most public spaces but he's your milk producer ๐ฅ BrorStirrer ",
"'your gender is what's in your pants' ๐ค alright, my gender is 'milk' ๐ฅ ๐ฅ ",
"be the reason why someone continues to produce 'not milk' as the main purpose of their life",
"it's alright - when i'm wearing a skirt... i'm a 'not milk' consumer ๐ฅ ๐ณ ๐ ๐ "
},
poor = {
"you really got milk. real milk ๐ฅ ๐ ",
"haha!!! you just drank SULFURIC ACID!!! ๐ฅ โ ",
"average milk enjoyer ๐ฅ ๐ ๐ค "
}
}
local points_max = 10
local delay_sec = 150
function get_line(points)
if points < 0 then
return lines.poor[math.random(1, #lines.poor)]
end
local percent = (points / points_max) * 100;
local category = {}
if percent > 75 then
category = lines.legendary
elseif 45 <= percent and percent <= 75 then
category = lines.epic
else
category = lines.common
end
return category[math.random(1, #category)]
end
-- !luaimport pastes:milkE --command !milk --global
-- !cmd new !milk !luaimport pastes:milkE
return function(request)
local storage = storage_get()
local now = time_current()
local new = false
if storage == "" then
new = true
storage = "{\"points\": 0, \"last_time\": " .. now .. "}"
end
local storage_contents = json_parse(storage)
local difference_since_last_time = now - storage_contents.last_time
if difference_since_last_time < delay_sec and not new then
return request.sender.alias_name ..
": i am sorry, Master... but you have to wait " ..
time_humanize(delay_sec - difference_since_last_time) .. " for me to pour you a milk ๐ฅ โ"
end
storage_contents.last_time = now
local points = 0
local message = ""
local fun = math.random(0, 100)
if fun == 0 then
points = -99
message = "you were cursed with an intolerance to my milk ๐ฅ ๐ญ"
elseif 0 < fun and fun <= 49 then
points = points + math.random(1, points_max)
message = get_line(points)
elseif 49 < fun and fun <= 79 then
points = points - math.random(1, points_max)
message = get_line(points)
else
points = 0
message = "nothing found pls dont yell at me ๐ฅบ ๐ฅบ "
end
storage_contents.points = storage_contents.points + points
storage_put(json_stringify(storage_contents))
if points == 0 then
return request.sender.alias_name .. ": " .. message .. " ..."
end
local points_formatted = ""
if points > 0 then
points_formatted = "+" .. points
else
points_formatted = tostring(points)
end
return request.sender.alias_name ..
": " .. message .. " ... anyways you got " .. points_formatted .. " | total: " .. storage_contents.points .. " ๐ฅ"
end
4.35 KB
text/x-lua (lua)
120 lines