-- -- Lua functions for Lotje's personal use--
p =
-- randimg returns a random item from a list of image filenames-- use it like this:-- ---- The list of images uses standard wiki-syntax-- but it has to enclosed in straight double-quote marks " ... "-- unless there are double-quote marks in the filename-- then you enclose it in single quote marks ' ... '-- if the filename contains both single- and double-quotes-- then pick another file (or rename it)-- because it's a list, you put a comma after each item except the last one-- if you add more files, don't forget to put the comma in as well
p.randimg = function(frame) math.randomseed (os.time) local images = -- you don't need a comma after the last item ^^^^^ local numberofimages = #images local index = math.random(numberofimages) return images[index]end
return p