msgs = {"A pile of dirt", "Barry_hhh after exhausting mining trip.", "Amaranthin and his katar.", "Cyanox, tuning his ice reactor.", "A fat, short on her breath girl.", "Some incomprehensive useless ores.", "A weird-voiced deer.", "Complaining caveman.", "Lots of useless plants.", "Dirt bee hive.", "Cobble house.", "baseballgaines.", "Lottery queue.", "Bedrock castle.", "Random torch.", "Half-cut tree.", "A lava lake.", "Burning Man statue.", "Aboneel mall.", "Interdiction torch.", "Kitten. Mo' Creatures one.", "Unicorn.", "Cobblium ore.", "Tungsten ore.", "Alchemical bucket.", "Ender pouch full of hax.", "Lighting glitch.", "Invisible moderator.", "xD.", "Wolf.", "Cave entry.", "Kitten. Pam's Kittens one.", "Canned strawberry.", "Drunken russians.", "EE alarm going off.", "A burning hotel.", "Repeating stream.", "Our Lady of Industry.", "A rubber tree." } dots = {} maxx, maxy = term.getSize() dotsSize = 20 rx, ry = 1, 1 maxchar = 125 minchar = 33 for i = 1,dotsSize do dots[i] = {msg = msgs[math.random(#msgs)], x = math.random(maxx), y = math.random(maxy), kitten = false, tile = string.char(minchar + math.random(maxchar - minchar)) } end dots[math.random(#dots) + 1].kitten = true term.clear() term.setCursorPos(1, 1) term.write("Robot Finds Kitten") term.setCursorPos(1, 2) term.write("You are @. There are things that are not kitten.") term.setCursorPos(1, 3) term.write("Find the kitten! Use WASD to move.") term.setCursorPos(1, 4) term.write("Press any key...") local event = os.pullEvent() found_kitten = false while found_kitten == false do term.clear() for i = 1, dotsSize do term.setCursorPos(dots[i].x, dots[i].y) term.write(dots[i].tile) end for i = 1, dotsSize do if rx == dots[i].x and ry == dots[i].y then if dots[i].kitten == true then term.setCursorPos(1, 1) term.write("You have found kitten!") term.setCursorPos(1, 2) found_kitten = true else term.setCursorPos(1, 1) term.write(dots[i].msg) end end end if not found_kitten then term.setCursorPos(rx, ry) term.write("@") end local event,ch = os.pullEvent("char") if ch == "q" then term.setCursorPos(1, 1) term.clear() found_kitten = true elseif ch == "w" and ry > 1 then ry = ry - 1 elseif ch == "s" and ry < maxy then ry = ry + 1 elseif ch == "a" and rx > 1 then rx = rx - 1 elseif ch == "d" and rx < maxx then rx = rx + 1 end end