ScriptUO

General => Off Topic => Topic started by: Greenie on February 28, 2021, 09:50:51 AM

Title: Book Copier?
Post by: Greenie on February 28, 2021, 09:50:51 AM
Hey Everyone!

I am sorry to ask this here, I dunno what more to search. I am looking for a script that will copy text from one book to another. Not a runebook or spellbook, but the plain NPC purchasable books.

Thanks in advance for any direction or links.
Title: Re: Book Copier?
Post by: Gaderian on February 28, 2021, 10:39:57 AM
I do not know if there is one, but the code itself to copy from one book to another is simple.

set the ID of the book you want to copy from as %SourceBook.
buy a bunch of the books from an NPC (provisioner???)
you may have to adjust the types set in the variable %books...
Code: easyuo
  1. set %books XYF_AZF
  2. set %SourceBook XXXXXX ; set this to the id of the book you want to copy from
  3. ignoreitem %SourceBook
  4. finditem %books C_ , #backpackid
  5. if #findcnt > 0
  6.  {
  7.  for #findindex 1 #findcnt
  8.  {
  9.   event macro 13 23
  10.   wait 40
  11.   set #LTARGETID %SourceBook
  12.   set #LTARGETKIND 1
  13.   event macro 22 0
  14.   wat 40
  15.   set #LTARGETID #findid
  16.   set #LTARGETKIND 1
  17.   event macro 22 0
  18.   }
  19.  }
  20. halt
  21.  

That will copy your source book to all the various books you bought in your backpack.