ScriptUO

Official ScriptUO EasyUO Scripts => Script Library => Misc. Scripts => Topic started by: TrailMyx on June 18, 2013, 03:22:36 AM

Title: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on June 18, 2013, 03:22:36 AM
Code: [Select]
;=================================================================
; Script Name: TrailMyx's Drag(and Drop) Queen
; Author: TrailMyx
; Version: 0.7
; Shard OSI / FS: OSI / FS OK
; Revision Date: 9/29/2007
; Purpose: Simplify the act of moving items from container to container
; Globals:
; Special Thanks:
;   Cerveza the UO master!
;
;=================================================================

(http://scriptuo.com/Pictures/drag_drop_queen.png)

This is one of those helper scripts I've had laying around for a while.  I posted another version of this, but there was no UI so I slapped one on.  I use this contantly as I'm clearing my bank box of MIBs, special nets and tmaps.

Now you can control what gets transferred and what doesn't.   You can manage your transfer lists and the script will give you status about how many items are left to transfer.

This script basically monitors what you are doing, and notes the source and destination containers for items you are dragging around.  Instead of having to do each item by hand, the item will ask to take over the dragging process for the remaining items.  This particular item will be remembered in the "Keep" list so you won't be queried to drag/drop again - the script will just do it for you.  For items that you don't want the script to handle, these will go in the "Ignore" list.  You will not be asked again to drag/drop, and these items will be ignored for future queries.

The script isn't perfect and will sometimes miss sampling the source or destination container.  If this happens, you may have to pause/unpause the script using the Enable/Disable button.

This script doesn't save anything; each time you run it the script will learn from your drag requests.

Note on stackables
I haven't figured out a way to get the stackable sampling for it's source container yet.  So this script will only handle single items automatically.

Note on Ignore Text
Checking this checkmark will filter each item that you are dragging looking for text separated by "_".  Please note that this text string MUST end with a "_".  So if you are looking to ignore items with 2 different text values, the string must be like this "string1_string2_"

Ex.  Don't drag expert or ingenious maps:  expert_ingenious_

Title: Re: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on June 18, 2013, 03:26:47 AM
(for Q/A)
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: Bookwyrm on June 18, 2013, 05:23:40 AM
This sounds FABULOUS.  ;D
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: Crisis on June 18, 2013, 06:45:34 AM
Nice!! I will try this out with my miner. I save the blackrock chunks to sell at auctions. They usually sell well for people wanting to make keys for Exodus. This should make unloading my backpack a lot easier!
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on June 18, 2013, 06:48:15 AM
Nice!! I will try this out with my miner. I save the blackrock chunks to sell at auctions. They usually sell well for people wanting to make keys for Exodus. This should make unloading my backpack a lot easier!

Hopefully soon I'll figure out how to make the stackables detect correctly.  Feedback and additional ideas always welcome!
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on June 28, 2013, 01:51:13 PM
Anyone play with this?  Or I it just useful to me?  Heh
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: The Ghost on June 28, 2013, 02:05:00 PM
I have used it 3 times, I felt in love with it.   So simple to use and fast too. I haven't play with it yet.

 
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: Bookwyrm on June 28, 2013, 02:37:39 PM
I use it regularly. :)
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on June 28, 2013, 02:45:11 PM
Well awesome guys.  I couldn't imagine that I'd be the only customer for a script like this one.
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: Bookwyrm on June 28, 2013, 02:55:40 PM
It's much quicker and cleaner to use than the other "move/sort" scripts. Does the job it was intended for flawlessly.
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on June 28, 2013, 03:05:21 PM
That's always my problem; I just never really try other scripts so I'm unsure what's out there to compare against.
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: The Ghost on June 28, 2013, 04:35:47 PM
what our their is not as fast as this.

I'm intrigue to see if I can get those stack items to move.   Here my work so far.  Lot of fog ahead  I tell you  Not sure if I'm the right track.   

add this
Code: [Select]
sub TM_DragCheck
    set %type #LLIFTEDTYPE
    set %findid #LLIFTEDID
    set %findstack #findstack  ; add this to locate stack.

gosub TM_AddToList IgnoreList #RESULT %type %findstack   ;  add %findstack

gosub TM_AddToList KeepList #RESULT %type %findstack    ; add %findstack

 gosub DragAll %type %last_cont %dest_cont All  ; add All


Code: [Select]
sub DragAll
  set !item %1
  set !source %2
  set !dest %3
  Set !ItemCount %4     ;   ************    Add this to drag all     *************
  finditem !item C_ , !source

  set !drag_cnt 0
  set !ignore_cnt 0
; ---------------------------------------------    Add this to drag all
   G_Drag:
        Set !DragTimeout #sCnt + 5
               Wait 5
        If !ItemCount = ALL
           Exevent Drag #findid #findstack
        Wait 5
         If #sCnt > !DragTimeout
        goto G_Drag
  ; -----------------------------------------------
  if #FINDCNT > 0
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on June 28, 2013, 06:40:33 PM
Ya, I'm testing something similar.  Just working on reliability now.  Should have something this weekend.
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on June 29, 2013, 11:47:30 AM
Ok, I posted version 8.  It was just a timing thing to get the source/destination values sampled correctly.  Seems to work ok now with stacked items.
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: Crisis on June 29, 2013, 04:36:55 PM
Very nice, it worked well for me. I will be trying out the new version that moves stacks.
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on June 29, 2013, 05:14:28 PM
Awesome.  I almost had it before.  I just had to add a wait for the stack gump to transfer to the drag gump.
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: The Ghost on June 29, 2013, 08:21:08 PM
Work great so far.   You fix was better then mine :)   

I have notice that it fail to drop item on vendor and  close bag/chest.   This Drag queen on drop item into open container correct.
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on June 29, 2013, 08:34:58 PM
I guess this script can evolve.  I would have been surprised if it could drop into a closed container.  I'd have to think about that one because  I don't want to break the "magic" that makes it automagic.  Heh
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: The Ghost on July 06, 2013, 09:27:23 AM
TM,  
Just found a little problem with it.  Seen some item have the same ID ( ie. Blackrock, Diamand) it will drag all of them. Care full, I just trash all my diamond ( 400)  from the bank  while cleaning my Blackrock :(  
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on July 06, 2013, 09:34:52 AM
I guess I can put in a property check as well as an ID check.  I have a new version to post that has the ability to drag only a certain number of items and also drag items into closed containers.
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on July 06, 2013, 10:38:12 AM
Version 11 posted!

Title: Re: TrailMyx's Drag(and drop) Queen
Post by: The Ghost on July 06, 2013, 09:41:19 PM
Thx TM,  glad I  can help.  Just happy it something I can replace.  BTW  I love it,
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: The Ghost on July 13, 2013, 08:08:54 PM
Good day TM
     Was using Ver 11 and notice that the Snake Charmer Flute are not moving, but with ver 8 their were.  Not sure what happen. 

Just FYI :)
Title: Re: TrailMyx's Drag(and drop) Queen
Post by: TrailMyx on July 13, 2013, 09:55:56 PM
No idea why that wouldn't move.  Probably has to do with the differences with the property.  Those have uses don't they?  If one is used or has a different number of max uses, it won't match the previous one that you requested a move for.  Maybe instead of looking at the whole property, I should just look at the 1st or 2nd line of the property and not all the other number that might be different from item to item.