Toribash
Original Post
function for editing multiple joints
So you don't have to repeat "set_joint_state(player, joint , state)" the whole time.

local function newSetJointState(command)
commandList = {}
 temp = command
 forend=0
 for a in temp:gmatch(",") do forend=forend+1 end
 for i=1,forend do
  comma=temp:find(",")-1
  commandList[i]=temp:sub(1,(comma))
  temp=temp:gsub(string.rep(".",comma)..",","",1)
 end
 last=#commandList+1
 commandList[last]=temp
 for i=1,#commandList do set_joint_state(0,commandList[i]:sub(0,-2),commandList[i]:sub(-1)) end
end
how to use:
just pass the joint number and state (not seperate with a space or something) as parameter (within quotes). Different joints are seperated with a comma.
eg:
NewSetJointState("01,53,144")
extends the neck (0: neck, 1: extend neck), holds right shoulder(5: rs, 3: hold) and relaxes right hip (14: rh, 4: relax).
For joints and states look here.
I hope I helps some people.