Hi Blacklisted! I wrote the script down for you, to do the stuff you wanted it to do, with comments, in the form of a tutorial. This script should be fully functional, and also, it's an easy to read tutorial so that you can understand everything that each line of code does. I hope you can find this useful to help give you a push in the right direction to start learning how to script.
So, here it is:
;----------------------------------------------------
; First off, we should start the script by setting the
; variables we're going to use. As you know, standard
; variables always start with '%'. So let's set the ones
; we're going to use!
;----------------------------------------------------
set %gems HVF_UVF_FVF_EVF_OVF_VUF_GVF_RVF_BVF_VVF_NVF_ZVF_
set %reagents KUF_JUF_KZF_JZF_MZF_WZF_RZF_SZF_DUF_TZF_UZF_YZF_IUF_
;-------------------------------------------------------------
; I just copied the gems and reagents types from the code you
; posted on SUO. Saved me some time! :)
; Now, even though we're going to use the menu to define
; the bags' id's, we should start the script off by setting
; the vars we're going to use to N/A. This has two basic
; purposes:
; First one is so that the user sees the bags N/A in the menu,
; making it easier for him to realize he has to set the bags.
; You should always think on ways to make the script more
; intuitive for people who will be using it.
; Remember, not every person who is going to use your script
; is gonna be a rocket scientist! :))
; Second purpose is so that we can put a check to see if the bag
; has been set or not in the menu, before the script starts
; doing it's job of moving items.
; So let's get those N/A's going!
; (actually, if you don't specify the vars, they will be 'set'
; automatically to N/A, but I've wrote it like this
; to ilustrate better what I'm trying to show you!) :)
;-------------------------------------------------------------
set %lootbag N/A
set %gemsbag N/A
set %regsbag N/A
;--------------------------------------------------
; Next, the most basic yet very important thing you should
; know is how subs work. You always use 'gosub subname'
; to go to a sub, however, you should only get out
; of a sub using 'return'. This will take you
; back to where the sub was called in the
; first place (the gosub line).
;
; The example we're gonna see now shows this
; clearly. We're gonna generate the menu for the
; user. We'll use a sub for that!
; So first things first.
;-----------------------------------------------------
gosub menu ; This line here will take you to the sub called
; 'menu'. If you scroll down you can find this sub, and
; you'll notice the last line of it being 'return'.
; So that return will take us back exactly here, where
; we used the 'gosub' command.
;----------------------------------------------------
; Ok, so now our pretty little menu should be built, and the
; user should be seeing it right now! YAY! \0/
; Now, we have to make the script wait here until the
; user clicks something to do whatever the hell he wants
; to have the script do for him. We're going to write
; a little loop to do this. Read this loop carefully
; to see how it works.
;----------------------------------------------------
repeat
if #menubutton = setloot_button
{
gosub setloot
set #menubutton N/A
}
if #menubutton = setgems_button
{
gosub setgems
set #menubutton N/A
}
if #menubutton = setregs_button
{
gosub setregs
set #menubutton N/A
}
if #menubutton = moveregs_button
{
if %regsbag <> N/A && %lootbag <> N/A
{
gosub moveregs
set #menubutton N/A
}
else
{
Display You must set up each bag first
set #menubutton N/A
}
}
if #menubutton = movegems_button
{
if %gemsbag <> N/A && %lootbag <> N/A
{
gosub movegems
set #menubutton N/A
}
else
{
Display You must set up each bag first
set #menubutton N/A
}
}
until #false ; thank you cerveza! :)
;--------------------------------------------------
; Ok, our main loop is done. When the user clicks
; a button, we can see that in the #menubutton
; var. Things you should notice here:
; 1) If a button is pressed, you will go to a sub
; which will perform what the button suggests.
; Also, you will set the #menubutton var back to
; N/A so that you don't keep looping like crazy
; the same sub over and over.
; 2) If the person tries to use the move subs
; without having set the ID's of the bags first,
; the script will warn them about it, and go back
; to the loop to wait for the bag id's to be set.
;----------------------------------------------------
; I guess now that this is done, we can start building the
; rest of our subs! Let's start with the sub to set
; our loot bag!
;------------------------------------------------------
;======= Set Loot Bag Sub =======
sub setloot
event SysMessage Target your loot bag ; event SysMessage will display a msg inside you client for you
set #targcurs 1 ;sets the little target cursor on
while #targcurs = 1 ; while #targcurs = 1, so while the target cursor is on, it will wait
wait
set %lootbag #ltargetid ; once the bag is clicked, we will set it's id
set #lobjectid #ltargetid ; here we will set the last object to the id of the last target, in this case, our loot bag
event macro 17 ; event macro 17 is 'Use Last Object', so this will open our loot bag
menu Edit EUOEdit1 84 44 57 %lootbag
wait 20
return
;======= End Sub =======
;--------------------------------------------------------
; Noticed the line 'menu Edit EUOEdit1 84 44 57 %lootbag' there?
; This will update the Edit Box for the lootbag in the menu,
; which will now show the id of our dear lootbag!
; Great stuff! Now we're gonna do almost the same thing for
; our other two bags. The difference is, we're not gonna want to open them.
; Why, do you ask? Simply because it would make this more complicated.
; So it's best to leave bags we're going to put stuff IN closed, while
; the bags we're going to get stuff FROM should remain open.
; So, let's do this now!
;---------------------------------------------------------
;======= Set Gems Bag Sub =======
sub setgems
event SysMessage Target your gems bag
set #targcurs 1
while #targcurs = 1
wait
set %gemsbag #ltargetid
set #lobjectid #ltargetid
menu Edit EUOEdit2 84 72 57 %gemsbag
return
;======= End Sub =======
;======= Set Regs Bag Sub =======
sub setregs
event SysMessage Target your regs bag
set #targcurs 1
while #targcurs = 1
wait
set %regsbag #ltargetid
set #lobjectid #ltargetid
menu Edit EUOEdit3 84 104 57 %regsbag
return
;======= End Sub =======
;--------------------------------------
; Piece of cake right? Now, we should write up
; the move subs. So lets get it done!
;----------------------------------------
;======= Move Regs Sub =======
sub moveregs
repeat ; it will repeat whatever is written here, until the condition on the 'until' line is met
finditem %reagents C_ , %lootbag ; this will look for the reagents inside you're lootbag
exevent drag #findid #findstack ; #findstack will hold the amount of reagents in each stack
wait 10
exevent dropc %regsbag ; this line will drop the regs inside your regs bag
wait 10
until #findcnt < 1 ; if you can't find any more items, it will stop repeating!
Display All Done!
return
;======= End Sub =======
;======= Move Gems Sub =======
sub movegems
repeat
finditem %gems C_ , %lootbag
exevent drag #findid #findstack
wait 10
exevent dropc %gemsbag
wait 10
until #findcnt < 1
Display All Done!
return
;======= End Sub =======
;--------------------------------------
; Ok, we should be set now! If no mistake was
; made while writing, this little script
; should do what we expect from it!
; Let's hit play and find out! :))
;--------------------------------------
; Below you can check out the menu sub.
;--------------------------------------
;======= Menu Sub =======
sub menu
menu Clear
menu Window Title Blacklisted's MoveLoot
menu Window Color BtnFace
menu Window Size 221 225
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font Transparent #false
menu Font Align Left
menu Text EUOLabel1 12 44 Loot Bag ID:
menu Text EUOLabel2 12 72 Gems Bag ID:
menu Text EUOLabel3 12 104 Regs Bag ID:
menu Text EUOLabel4 12 144 Move regs to bag:
menu Text EUOLabel5 12 172 Move gems to bag:
menu Button setloot_button 148 44 43 25 Set
menu Font BGColor Window
menu Edit EUOEdit1 84 44 57 %lootbag
menu Font BGColor BtnFace
menu Button setgems_button 148 72 43 25 Set
menu Font BGColor Window
menu Edit EUOEdit2 84 72 57 %gemsbag
menu Font BGColor BtnFace
menu Button setregs_button 148 104 43 25 Set
menu Font BGColor Window
menu Edit EUOEdit3 84 104 57 %regsbag
menu Font BGColor BtnFace
menu Button moveregs_button 124 144 43 25 Go
menu Button movegems_button 124 172 43 25 Go
menu Show 421 270
return
;======= End Sub =======
;----------------------------------------------
; Well, I hope this could point you in the right
; direction to start writing your own scripts!
; I know we can get overwhelmed sometimes, when
; we try to read huge pages of things we
; still don't understand very well. So I hope
; this has made things a little simpler for you!
; Cheers,
;
; frneo
;------------------------------------------------
; End Script
;------------------------------------------------
Just copy this to your EUO. You will find detailed explanations on (almost) everything the code is meant for, and I tried to keep it as simple as possible.
I gave you a few explanations on the use of the menu too.

If you have any questions, just ask and I'll get back to you as soon as possible.
Hope this helps!

Cheers!