Whatever you named the cursor?

But good point as there is both active & inactive animations for each cursor. The names have a prefix on the end. cursor_name (active) or cursor_name (inactive)
-- function to be added as a definition script
function setCF(n, f)
if ActiveAnimations[n .." (active)"]:getBool(VAnimationActive) then
ActiveAnimations[n .. " (active)"].AnimationFirstFrame = f
ActiveAnimations[n .. " (active)"].AnimationLastFrame = f
elseif ActiveAnimations[n .." (inactive)"]:getBool(VAnimationActive) then
ActiveAnimations[n .. " (inactive)"].AnimationFirstFrame = f
ActiveAnimations[n .. " (inactive)"].AnimationLastFrame = f
end
end
-- example usage
setCF("default", 1) -- will set frames of currently active animation of cursor "default" to 1
...the function I have just written queries if cursor names animation you just entered is currently the active or inactive animation; if neither then do nothing.
Hopefully you understand what I just did? I would have made it simpler but there's no tables in the data structure for returning currently active game cursor or cursor state, hence why I used the AnimationActive query instead.
Quick note: as soon as the cursor state changes the animation will reset back to normal. So it might be an idea to create a value which will be used to determine which frame should play & then add the ActiveAnimation... first/last frame scripts to the first frame of the animations themselves.