Moving on and implementing above.. script starting to grow..
-------------------------------------------------------
-- Functions (subs) - Ive ripped from others per credits
-------------------------------------------------------
function msgbox(default, prompt, title, button, icon)
-- Function By Traegon's, Link: http://www.easyuo.com/forum/viewtopic.php?p=376784#376784
if icon == nil then icon = 2 end
if default == true then default = 1 else default = 0 end
ConfirmDialog = Obj.Create("TMessageBox")
ConfirmDialog.Title = title
ConfirmDialog.Button = button
ConfirmDialog.Icon = icon
ConfirmDialog.Default = default
return ConfirmDialog.Show(prompt)
endend
-----------------------------
-- My Defined Functions (subs)
-----------------------------
function MessageBox(sPrompt, sTitle, sType)
if sType == 'OK' then return msgbox(true, sPrompt, sTitle, 0,4) end
if sType == 'YESNO' then return msgbox(true, sPrompt, sTitle, 4,3) end
end
function TargetOpenBag(sMessage)
UO.LTargetKind = 1 -- object
MessageBox(sMessage, 'Bag Selection:', 'OK' )
UO.TargCurs = true -- make a target cursor
while UO.TargCurs == true do wait(10) end -- wait until something is clicked (ie notarget cursor)
UO.LObjectID = UO.LTargetID -- set last object to the object clicked
UO.Macro(17,0) -- openbag ( invoke macro use last object which hopefully is a bag inwhich case opens bag )
return UO.LTargetID -- set the return value .. the bagid clicked
end
-----------------------------
-- Script Starts Below
-----------------------------
local nSourceBag = TargetOpenBag('Please Target The Source Bag:') -- step 1
local nDestinationBag = TargetOpenBag('Please Target The Destination Bag:') -- step 2