[DONE]: Fact Core
Example Quotes:
http://youngmelonworld.blogspot.com/201 ... phere.html
(the list is a bit long, maybe just pick the funniest?)
EDIT: i decided to do this myself, just editing the keywords and responses (and name; and filename) of Eliza.
If you want to summon it; its /addbot Fact_Core [team] (NO ARGS!!!)
CODE:
- Code:
- local function Eliza(text)
local response = ""
local user = string.upper(text)
local userOrig = user
local randReplies =
{
"Error. Error. Error. File not found.",
"Error. Error. Error. Fact not found."
}
local replies = {
[" NAME"] = "FACT: According to most advanced algorithms, the world's best name is Craig.",
[" PHOTOCOPIER"] = "FACT: To make a photocopier, simply photocopy a mirror.",
[" PROMETHEUS"] = "FACT: In Greek myth, Prometheus stole fire from the gods and gave it to humankind. The jewelry he kept for himself.",
[" GREEK"] = "FACT: In Greek myth, Prometheus stole fire from the gods and gave it to humankind. The jewelry he kept for himself.",
[" WILLIAM SHAKESPHERE"] = "FACT: William Shakespeare did not exist. His plays were masterminded in 1589 by Francis Bacon, who used a Ouiji board to enslave playwriting ghosts.",
[" SUN"] = "FACT: The Sun is 330,330 times the size of Earth.",
[" CAT"] = "The Schrodinger's cat paradox outlines a situation in which a cat in a box must be considered, for all intents and purposes, simultaneously alive and dead. Schrodinger created this paradox as a justification for killing cats.",
[" PARADOX"] = "The Schrodinger's cat paradox outlines a situation in which a cat in a box must be considered, for all intents and purposes, simultaneously alive and dead. Schrodinger created this paradox as a justification for killing cats.",
[" THIS SENTENCE IS FALSE"] = "FACT: THIS IS A PARADOX. IGNORING....... DONE.",
[" NICE"] = "FACT: IF I HAD FEELINGS, I WOULD APPRECIATE THAT.",
[" MOON"] = "FACT: The Moon orbits the Earth every 27.32 days.",
[" HONEY"] = "FACT: Honey does not spoil.",
[" HUNEY"] = "FACT: Honey does not spoil.",
[" WORM"] = "FACT: Human tapeworms can grow up to 22.9 meters.",
[" CELLULAR"] = "FACT: Cellular phones will not give you cancer. Only hepatitus.",
[" PHONE"] = "FACT: Cellular phones will not give you cancer. Only hepatitus.",
[" CANCER"] = "FACT: Cellular phones will not give you cancer. Only hepatitus.",
[" ROPE"] = "FACT: The square root of rope is string.",
[" STRING"] = "FACT: The square root of rope is string.",
[" MAGIC"] = "FACT: 89% of magic tricks are not magic. Technically, they are sorcery.",
[" SORCEREY"] = "FACT: 89% of magic tricks are not magic. Technically, they are sorcery.",
[" FRUIT"] = "Apples. Oranges. Pears. Plums. Kumquats. Tangerines. Lemons. Limes. Avacado. Tomato. Banana. Papaya. Guava.",
[" SPACE"] = "FACT: Space does not exist.",
[" DEFECT"] = "FACT: The Fact Core is not defective. Its facts are wholly accurate, and very interesting.",
[" 12"] = "Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve.",
[" DREAMS"] = "FACT: Dreams are the subconscious mind's way of reminding people to go to school naked and have their teeth fall out.",
[" TWELVE"] = "Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve.",
[" PI"] = "FACT: The billionth digit of pi is nine.",
[" SALT"] = "FACT: The average adult human body contains half a pound of salt.",
[" POUND"] = "FACT: The average adult human body contains half a pound of salt.",
[" WATER"] = "FACT: Hot water freezes quicker than cold water.",
[" GALLON"] = "FACT: A gallon of water weighs 8.34 pounds.",
[" YES"] = "FACT: SYNONYMS FOR YES ARE: SURE, POSITIVE, ABSOLUTLEY, OF COURSE -Source: Fact Database.",
[" SECOND"] = "FACT: A nanosecond lasts one-billionth of a second.",
[" EVEREST"] = "FACT: Edmund Hilary, the first person to climb Mt. Everest, did so accidentally, while chasing a bird.",
[" CAR"] = "FACT: The automobile brake was not invented until 1895. Before this, someone had to be in the car at all times, driving in circles until passengers returned from their errands.",
[" BRAKE"] = "FACT: The automobile brake was not invented until 1895. Before this, someone had to be in the car at all times, driving in circles until passengers returned from their errands.",
[" AUTOMOBILE"] = "FACT: The automobile brake was not invented until 1895. Before this, someone had to be in the car at all times, driving in circles until passengers returned from their errands.",
}
local function replyRandomly()
response = randReplies[math.random(table.getn(randReplies))].." "
end
local function processInput()
for keyword, reply in pairs(replies) do
local d, e = string.find(user, keyword, 1, 1)
if d then
response = response..reply.." "
if string.byte(string.sub(reply, -1)) < 65 then -- "A" = 65, "?" = 63
return
end
local h = string.len(user) - (d + string.len(keyword))
if h > 0 then
user = string.sub(user, -h)
end
for cFrom, cTo in pairs(conjugate) do
local f, g = string.find(user, cFrom, 1, 1)
if f then
local j = string.sub(user, 1, f - 1).." "..cTo
local z = string.len(user) - (f - 1) - string.len(cTo)
response = response..j.." "
if z > 2 then
local l = string.sub(user, -(z - 2))
if not string.find(userOrig, l) then return end
end
if z > 2 then response = response..string.sub(user, -(z - 2)) end
if z < 2 then response = response end
return
end--if f
end--for
response = response..user
return
end--if d
end--for
replyRandomly()
return
end
if string.sub(user, 1, 3) == "BYE" then
response = "SHUTDOWN INITIATED....."
return response
end
if string.sub(user, 1, 7) == "BECAUSE" then
user = string.sub(user, 8)
end
user = " "..user.." "
processInput()
return response
end
function onMsgReceived(message, player)
if message ~= "" and not player:isRobot() then
bot:globalMsg(Eliza(message))
end
end
function getName()
return("Fact Core")
end
function main()
bot:globalMsg("REBOOTING FACT OS....... DONE.")
bot:globalMsg("LOADING FACT DATABASE....... DONE.")
bot:globalMsg("CORE INITIATED. AWAITING COMMAND.")
bot:subscribe(MsgReceivedEvent)
end