on init
declare $drums :=1
make_persistent($drums)
end on
on note
disallow_group($ALL_GROUPS)
select($drums)
case 1
allow_group(find_group("drums 1"))
play_note($EVENT_NOTE,$EVENT_VELOCITY,0,1)
inc($drums)
$drums:=1
end select
end on
Case section is that where you declare placement on round robin, so you can make 10 cases that use same groups over and over in different order.
I'm no scripting wizard, but I have good analyzing skills, so I analyzed some kontakt instruments that I bought and understood things that were consistent over all of them.
And still I have many cases where my instruments fail and I have to start making them from ground up and test/ troubleshoot on each step to know where it failed.