From ff712cedfc79ae835672f1e26e229e5fa60d0aae Mon Sep 17 00:00:00 2001 From: ubq323 Date: Tue, 2 Apr 2024 02:48:42 +0100 Subject: launch beescroll --- beescroll.lua | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'beescroll.lua') diff --git a/beescroll.lua b/beescroll.lua index 3384c58..fe0ac86 100644 --- a/beescroll.lua +++ b/beescroll.lua @@ -2,6 +2,14 @@ local m = peripheral.find"monitor" local W,H = m.getSize() +local cities = {} +local fp = assert(fs.open("/cities.txt","r")) +repeat + local line = fp.readLine() + table.isert(cities,line) +until not line +fp.close() + local verbs = { "recovered", "extinguished", @@ -30,14 +38,36 @@ local verbs = { "redeployed", "shaken", "stirred", + "discovered", + "defeated", + "thwarted", + "confounded", + "separated", + "dissected", + "submerged", + "extracted", + "zereod", + "reset", + "hidden", + "concealed", + "remade", + "detected", + "skolemized", + "reinterpreted", + "unfazed", } - + +local function choice(list) + return list[math.random(#list)] +end while true do - local x = math.random(0,999999) + local x = math.random(0,99999) m.scroll(1) m.setCursorPos(1,H) - m.write(string.format("%6d",x)) + m.write(("%5d bees have been %s in %s."):format( + x, choice(verbs), choice(cities) + ) os.sleep(1) end -- cgit v1.2.3