ScriptUO

Official ScriptUO EasyUO Scripts => Script Library => Misc. Scripts => Topic started by: slyone on September 22, 2011, 04:45:07 AM

Title: Scroll Binder
Post by: slyone on September 22, 2011, 04:45:07 AM
So I love my power scrolls.  I keep every 110 I get.  I always just did the scroll binding by hand.  I've been meaning to tackle a scroll binding script for a long while now and here it is.

I did my best to describe the setup you need at top of the script.

Code: [Select]
;==========================================================
; Script Name: Scroll Binder
; Author: slyone
; Version: 1.3
; Public Release: 09-22-2011
; Revision Data:  02-18-2012
; Purpose:  Scroll bind a bag of scrolls
; Instructions: -Bag up a bunch of power scrolls to bind
;                (note: You can have a mix of 10s, 15s,
;                       and 20s in your scroll bag; even
;                       if you plan on just binding 10s.
;                       If you have a mix in your scroll
;                       bag and want to bind the 10s
;                       then do not select a bag for 15s
;                       or 20s)
;               -This script will ask for another bag
;                of scrolls when the first is done
;               -Set up a resource container with EMPTY
;                scroll binders
;               -This script does not currently support
;                crafting your own scroll binders
;               -Be close enough to all of your secures
;                to drag and drop the scrolls on them
;               -Start the script
;               -Use the menu to target each of your
;                containers
;               -The minimum containers you need are:
;                1) resource, 2) scroll, and
;                3) 10s, 15s or 20s bag
;               -The script currently does not support:
;                1) SOT scroll binding
;                2) Scroll binding other scroll binders
;
; Acknowledgements:  Thanks to TM for the split screen
;                      option in the ScriptUO!
;                    Thanks to C2 for the menu tutorial!
;                    Thanks to Cerveza and EN for testing!
;                    Thanks to Neo for the dragndrop sub!
;                    Thanks to TM for the GumpWait sub!
;                    Thanks to Thimotty for his  strreplace
;                      sub!
;                    Thanks to TM and manwinc for help with
;                      my variables!
;==========================================================
; Version 1.3  - Made the script a whole lot FASTER
;              - Reduced number of finditem calls
;              - Reduced the number of loops
;              - Overhauled the entire script
;              - Added a %lagwait in a couple spots
; Version 1.2  - Added Neo's drag and drop sub to help
;                with ghosting problems
;              - Added a version of TM's GumpWait sub
;              - Added initiallization of binding flags
;              - Now ignores 105s in scroll bag
; Version 1.1  - Fixed bug to move completed binder
;              - Increased LPC to 3000
;              - Added status GUI
;              - Fixed name of Twenty's Bag
;              - Changed dragndropwait time from 20 to 10
; Version 1.01 - added "Fishing" to list of scrolls
; Version 1.00 - Initial Release
;==========================================================

Things to note:
1)  This script currently does not craft new scroll binders
2)  I put an SOT button on the menu because I hope to tackle binding SOTs but this feature is not written yet.
3)  I had trouble with the wait times.  So I put in pretty long wait times.  So currently the script is not optimized for speed.  I'd love to get this thing going fast.  So if anyone has some feedback on making it faster please let me know.
4)  Version 1.3 was written to address bullet point 3.  Let me know what you think.

Please let me know what you think, reply with any comments or questions.

Edit:  Uploaded version 1.3, overhauled the whole script!  From my testing it runs 2x faster than v1.2!!
        Uploaded version 1.2, added Neo's dragndrop sub to help with ghosting items, code cleanup
        Uploaded version 1.1, added a status menu and fixed a couple bugs
        Added for version 1.01 I added "Fishing" to the scroll list.
Title: Re: Scroll Binder
Post by: Cerveza on September 22, 2011, 04:54:35 AM
Doesn't fishing have powerscrolls?
Title: Re: Scroll Binder
Post by: slyone on September 22, 2011, 08:58:12 AM
Doesn't fishing have powerscrolls?
I forgot about fishing!  Thanks for the find Cerveza.

I added Fishing to the scroll list and uploaded the new version. 
Title: Re: Scroll Binder
Post by: Endless Night on November 01, 2011, 09:18:45 AM
works but is very slow and had the issue below.

I tried binding 25 115imbuing scrolls... it successfully pulled a blank binder scroll from resource bag and bound the first 10 scrolls.  It failed to move the second empty bind scroll and failed from that point forward in the binding process. It kept moving scrolls to be bound to my backpack but didnt bind them.

To make faster... you could do 2 things
(1) increase the lpc so processing text is faster   set Lpc ??? default is 10. setting to 3000 will make it process text 300x faster.
(2) reduce the number of finditems performed.

It would also be nice to have a status menu while it is doing actions .. at first i wasnt sure if the script was running or not. The initial menu was very nice.


Nice script, I'll check it again after when you update.



Title: Re: Scroll Binder
Post by: slyone on November 01, 2011, 01:43:34 PM
Thanks for the feedback.  I'll work on incorporating your recommendations.
Title: Re: Scroll Binder
Post by: TrailMyx on November 01, 2011, 05:37:59 PM
Thanks for the feedback.  I'll work on incorporating your recommendations.

EN wouldn't steer you wrong.  He is a master.  :)
Title: Re: Scroll Binder
Post by: slyone on November 04, 2011, 07:17:45 PM
works but is very slow and had the issue below.

I tried binding 25 115imbuing scrolls... it successfully pulled a blank binder scroll from resource bag and bound the first 10 scrolls.  It failed to move the second empty bind scroll and failed from that point forward in the binding process. It kept moving scrolls to be bound to my backpack but didnt bind them.

To make faster... you could do 2 things
(1) increase the lpc so processing text is faster   set Lpc ??? default is 10. setting to 3000 will make it process text 300x faster.
(2) reduce the number of finditems performed.

It would also be nice to have a status menu while it is doing actions .. at first i wasnt sure if the script was running or not. The initial menu was very nice.

Thanks for the feedback EN.  I uploaded v1.1.  I bumped up the LPC to 3000 and added a status menu.  This time I only used 115 power scrolls to test it and I couldn't reproduce the problem you described.  I did find a couple bugs that I fixed.

As for reducing the number of finditems...I've been thinking of a couple ways to get around calling finditem over and over again.  I think I will go with creating an array for power scrolls and an array for scroll binders and go from there.  I'm not ready to tackle that yet though.

Anyways, hopefully you all find v1.1 stable and a bit faster.
Title: Re: Scroll Binder
Post by: Canuker on November 05, 2011, 10:04:48 AM
I have a bunch of sot's and 115's that I have to bind so I'll give this a try and comment.  Might I ask why you haven't combined it with this other one you wrote a while back http://www.scriptuo.com/index.php?topic=3111.0;highlight=sorter ?  Seems like a perfect fit.
Title: Re: Scroll Binder
Post by: slyone on November 05, 2011, 03:22:36 PM
I have a bunch of sot's and 115's that I have to bind so I'll give this a try and comment.  Might I ask why you haven't combined it with this other one you wrote a while back http://www.scriptuo.com/index.php?topic=3111.0;highlight=sorter ?  Seems like a perfect fit.

Thanks for the comment.  Currently, this script does not scroll bind SOTs.  I put the button in the menu for a future version. 

Initially, I was thinking of adding the sorter to this, but I didn't want to bog the set up down with setting the targets for all the bags.  At some point, it will be nice to combine this and the Sorter and make it so that the script scribes new scroll binders. 

Thanks again!
Title: Re: Scroll Binder
Post by: slyone on November 07, 2011, 01:45:07 PM
I tested it with 125 110s and it seems that there is a problem with ghosting items.  It seems to have problems when it moves new scroll binders.
Title: Re: Scroll Binder
Post by: Cerveza on November 08, 2011, 02:28:47 AM
Neo has a solid drag/drop sub that would ensure no ghosting.
Title: Re: Scroll Binder
Post by: slyone on November 27, 2011, 05:44:08 PM
Updated to version 1.2...

The new version uses Neo's dragndrop sub to ensure no ghosting.  I also addressed a couple minor bugs.  I updated the code description in the 1st post.
Title: Re: Scroll Binder
Post by: slyone on February 18, 2012, 05:50:03 PM
Updated to version 1.3...

The new version has a lot less for loops and finditem calls.  I tested this on 250 scrolls and I'd say it ran about 2x faster than the previous version.  I ran out of scrolls to test this on so let me know if you have any issues. 

I updated the code description in the 1st post.  Thanks to TM and manwinc for the help with dynamic variables, I needed it for this script!
Title: Re: Scroll Binder
Post by: Crome969 on February 19, 2012, 09:43:18 PM
thank you for your Contribution. I will give it a test as fast i can. Looking forward to what you bring up for future:)
Title: Re: Scroll Binder
Post by: Endless Night on October 07, 2013, 05:27:47 PM

Congratulations your Script has been moved to Script library
(If you feel the script is in the wrong section please send me a pm.)

Thank you for your submission.
Title: Re: Scroll Binder
Post by: Masscre on November 24, 2013, 05:16:58 PM
Tested works great. It made a few duplicates binders but maybe lag had something to do with that? Other than that it works smooth. I stopped and it and started again and again it starts over and works very smooth.
Title: Re: Scroll Binder
Post by: slyone on November 24, 2013, 07:07:44 PM
Tested works great. It made a few duplicates binders but maybe lag had something to do with that? Other than that it works smooth. I stopped and it and started again and again it starts over and works very smooth.

Good to hear that it worked smooth for you.  Enjoy.

-S
Title: Re: Scroll Binder
Post by: Ketchup on January 25, 2015, 08:30:09 AM
could we possibly get this to work with the new powerscroll books?
Title: Re: Scroll Binder
Post by: slyone on January 26, 2015, 05:33:09 PM
could we possibly get this to work with the new powerscroll books?

Good question, what kinds of features do you have in mind? 
Title: Re: Scroll Binder
Post by: jlirsh on January 29, 2015, 04:51:17 PM
Nice script man Congrats, works great! Any plans for an SOT binder? I've got like 4k lmao and never doin that manually :P
Title: Re: Scroll Binder
Post by: slyone on January 30, 2015, 04:11:05 PM
Nice script man Congrats, works great! Any plans for an SOT binder? I've got like 4k lmao and never doin that manually :P

Implementing the SOT binder part is definitely on the TODO list.  I will definitely upload an update when I have it working but it probably won't be for a while.

-S
Title: Re: Scroll Binder
Post by: jlirsh on February 02, 2015, 07:01:23 AM
Ok man thanks! I'll look out for it :)
Title: Re: Scroll Binder
Post by: Ketchup on February 02, 2015, 03:08:48 PM
could we possibly get this to work with the new powerscroll books?

Good question, what kinds of features do you have in mind? 
A "select books" feature that then just scroll binds all powerscrolls in all books up to their max level, a SOT script with the same features would be super!
Title: Re: Scroll Binder
Post by: tehmt on July 23, 2016, 12:40:31 PM
could we possibly get this to work with the new powerscroll books?

Good question, what kinds of features do you have in mind? 
A "select books" feature that then just scroll binds all powerscrolls in all books up to their max level, a SOT script with the same features would be super!

+1 !  :D
Title: Re: Scroll Binder
Post by: pixijayne on November 16, 2017, 05:22:34 PM
Could someone please show me how to set the script to run from my pack, as when I take the scrolls from the power scroll book they drop into my pack. Im running a UOS sort to get them to a bag, which seems silly to me.

Also can someone show me where I add the bag IDs so I dont have to reset each time I run the script.
Title: Re: Scroll Binder
Post by: pixijayne on January 22, 2018, 07:47:45 PM
Would someone please have the patience to teach me how to set this script to remember the secures - please.
Title: Re: Scroll Binder
Post by: The Ghost on January 23, 2018, 04:07:57 AM
on top of the script you have all setup.   this one set %resourcebag XXXXX   is where all your scroll are.  Replace the XXXX with the ID of your chest/bag.   

Where to find that number,  right side menu under  container info #CONTID, u need to open bag and look at the value or use  TM tool.http://www.scriptuo.com/index.php?topic=188.msg838#msg838
Title: Re: Scroll Binder
Post by: pixijayne on January 23, 2018, 01:25:35 PM
Thanks, Ghost .....

But I'm still having probs ....

This is what I have:

set %resourcebag SRDWXMD
set %tensbag FVSXXMD
set %fifteensbag WUSXXMD
set %twentiesbag MVSXXMD
set %sotbag HUSXXMD
set %scrollbag LYHPUND

But when I run the script with these values added it is like it cant see the scrollbag.

When I run the script without these values, it runs fine; at the end of the script, it asks - if you have another bag to sort, and it asks you to target the new bag.

Running the script with the values; it goes straight to that (end) point and askes if you have another bag to sort, offering a target. I target the bag but it just loops back asking if I have another bag to sort.
Title: Re: Scroll Binder
Post by: Crisis on January 23, 2018, 01:33:00 PM
Is the scroll bag open when running the script? It may need to be open first.
Title: Re: Scroll Binder
Post by: pixijayne on January 23, 2018, 01:34:04 PM
Not sure  :)

I'll try it open .. now
Title: Re: Scroll Binder
Post by: The Ghost on January 23, 2018, 01:34:33 PM
Is the scroll bag open when running the script? It may need to be open first.
Thx Crisis  that was my question Hehe
Title: Re: Scroll Binder
Post by: pixijayne on January 23, 2018, 01:37:30 PM
Yep - Nope !!

Yep I have the bag open, and nope its not working ... with the values.

 :(
Title: Re: Scroll Binder
Post by: pixijayne on October 27, 2018, 03:16:41 PM
I absolutely love this script  ...

I have had a few problems and have managed to fix or live with them ...

But this one issue is above my ability to solve and is a right pain ...

For most of the time its fine, it just every now and then doesn't see a binder that has say 5/10 Healing and starts a new one, so I can end up with a number of half-filled duplicate skill binders.

Can anyone help ?
Title: Re: Scroll Binder
Post by: kuokuo168 on November 05, 2018, 09:49:46 PM
thank you for your Contribution, great :laugh: