-- random.lua
-- Joint state randomiser
local function joint_random()
for b = 0,1 do
for k,v in pairs(JOINTS) do
set_joint_state(b, v, math.random(1,4))
end
set_grip_info(b, BODYPARTS.L_HAND, math.random(0,2))
set_grip_info(b, BODYPARTS.R_HAND, math.random(0,2))
end
end
local function start()
run_cmd("echo random.lua")
joint_random()
end
start()
add_hook("new_game", "random_lua", start)
add_hook("enter_freeze", "random_lua", joint_random)
copy and paste that into a notepad and save as random_both.lua or something like that :P