Author Topic: Scroll Binder  (Read 36161 times)

0 Members and 2 Guests are viewing this topic.

Offline slyoneTopic starter

  • Full Member
  • ***
  • Posts: 135
  • Activity:
    0%
  • Reputation Power: 2
  • slyone has no influence.
  • Gender: Male
  • Respect: +87
  • Referrals: 1
    • View Profile
Scroll Binder
« on: September 22, 2011, 04:45:07 AM »
+1
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.

There are 2 attachment(s) in this post. You must register and post an acceptable introduction to download
Scroll Binderv1.2.txt
Scroll Binderv1.3.txt
« Last Edit: February 18, 2012, 05:45:10 PM by slyone »
Started playing back at the Second Age

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +861
  • Referrals: 11
    • View Profile
Re: Scroll Binder
« Reply #1 on: September 22, 2011, 04:54:35 AM »
+1
Doesn't fishing have powerscrolls?
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline slyoneTopic starter

  • Full Member
  • ***
  • Posts: 135
  • Activity:
    0%
  • Reputation Power: 2
  • slyone has no influence.
  • Gender: Male
  • Respect: +87
  • Referrals: 1
    • View Profile
Re: Scroll Binder
« Reply #2 on: September 22, 2011, 08:58:12 AM »
+1
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. 
Started playing back at the Second Age

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +786
  • Referrals: 1
    • View Profile
Re: Scroll Binder
« Reply #3 on: November 01, 2011, 09:18:45 AM »
+1
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.



« Last Edit: November 01, 2011, 09:21:00 AM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline slyoneTopic starter

  • Full Member
  • ***
  • Posts: 135
  • Activity:
    0%
  • Reputation Power: 2
  • slyone has no influence.
  • Gender: Male
  • Respect: +87
  • Referrals: 1
    • View Profile
Re: Scroll Binder
« Reply #4 on: November 01, 2011, 01:43:34 PM »
+1
Thanks for the feedback.  I'll work on incorporating your recommendations.
Started playing back at the Second Age

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13310
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +3089
  • Referrals: 34
    • View Profile
    • ScriptUO
Re: Scroll Binder
« Reply #5 on: November 01, 2011, 05:37:59 PM »
+1
Thanks for the feedback.  I'll work on incorporating your recommendations.

EN wouldn't steer you wrong.  He is a master.  :)
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline slyoneTopic starter

  • Full Member
  • ***
  • Posts: 135
  • Activity:
    0%
  • Reputation Power: 2
  • slyone has no influence.
  • Gender: Male
  • Respect: +87
  • Referrals: 1
    • View Profile
Re: Scroll Binder
« Reply #6 on: November 04, 2011, 07:17:45 PM »
+1
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.
Started playing back at the Second Age

Offline Canuker

  • Sr. Member
  • *
  • Posts: 479
  • Activity:
    0%
  • Reputation Power: 7
  • Canuker has no influence.
  • Respect: +70
  • Referrals: 2
    • View Profile
Re: Scroll Binder
« Reply #7 on: November 05, 2011, 10:04:48 AM »
+1
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.
« Last Edit: November 05, 2011, 10:08:45 AM by Canuker »
Nope!  I'm doing what all the real PvPers do:  Scripting everything except the running away part!  I'm real good at that already...

Offline slyoneTopic starter

  • Full Member
  • ***
  • Posts: 135
  • Activity:
    0%
  • Reputation Power: 2
  • slyone has no influence.
  • Gender: Male
  • Respect: +87
  • Referrals: 1
    • View Profile
Re: Scroll Binder
« Reply #8 on: November 05, 2011, 03:22:36 PM »
+1
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!
Started playing back at the Second Age

Offline slyoneTopic starter

  • Full Member
  • ***
  • Posts: 135
  • Activity:
    0%
  • Reputation Power: 2
  • slyone has no influence.
  • Gender: Male
  • Respect: +87
  • Referrals: 1
    • View Profile
Re: Scroll Binder
« Reply #9 on: November 07, 2011, 01:45:07 PM »
+1
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.
Started playing back at the Second Age

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +861
  • Referrals: 11
    • View Profile
Re: Scroll Binder
« Reply #10 on: November 08, 2011, 02:28:47 AM »
+1
Neo has a solid drag/drop sub that would ensure no ghosting.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline slyoneTopic starter

  • Full Member
  • ***
  • Posts: 135
  • Activity:
    0%
  • Reputation Power: 2
  • slyone has no influence.
  • Gender: Male
  • Respect: +87
  • Referrals: 1
    • View Profile
Re: Scroll Binder
« Reply #11 on: November 27, 2011, 05:44:08 PM »
+1
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.
Started playing back at the Second Age

Offline slyoneTopic starter

  • Full Member
  • ***
  • Posts: 135
  • Activity:
    0%
  • Reputation Power: 2
  • slyone has no influence.
  • Gender: Male
  • Respect: +87
  • Referrals: 1
    • View Profile
Re: Scroll Binder
« Reply #12 on: February 18, 2012, 05:50:03 PM »
+1
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!
Started playing back at the Second Age

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +559
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Scroll Binder
« Reply #13 on: February 19, 2012, 09:43:18 PM »
+1
thank you for your Contribution. I will give it a test as fast i can. Looking forward to what you bring up for future:)

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +786
  • Referrals: 1
    • View Profile
Re: Scroll Binder
« Reply #14 on: October 07, 2013, 05:27:47 PM »
+1

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.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."