Sounds like you already have a rough, and are going in the right direction...
Get some stuff so you can do it by hand. Then do EACH step and document what you are doing. Write it down and look at it, understand how it flows....
Then start breaking it into sections, and start writing your script.
Yeah that seems like a jump, but it's a good way to learn. To help you on your way, find a script that does THAT SECTION similar to what your doing. If you want to drag 10 items from your secure container to your backpack, find a script that does that (maybe not 10 items, but you get the idea) then use that as an example.
Then move on to the next part.
Before long you'll see that you're scripting. You can move items, use some, target others... etc....