RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Pretty ReadBooks

Irian

Page
Pretty Read Books

As someone asked for a possibility to change the book gump, I remembered that I wrote that a whole while ago:

This system allows the use of the pretty spellbook-background gumps for text books. The new gumps are a little smaller than the normal book gump, so the font size had to be reduced a little (this can be choosen by using the "BigBook" parameter - false means, that the font size will be reduced), but you can use HTML in them, if you want.

The ReadBooks are not writeable, but the text from a normal, writable book can be copied into it. At the moment, this is possibly by a Context-Menu entry but it can be easily changed to fit your shards needs (for example by a scribe npc or even with the inscription skill, whatever).

Creating filled ReadBooks works exactly like creating a filled BaseBook (except you don't need a "writeable" parameter), so you can simply change your defined books to ReadBooks by changing the base class ( ": RedBook" becomes ": RedReadBook") and removing the Writeable parameter from the constructor. This also works with the new BookContent method introduced in RunUO 2.0. (The last sentence shows, that the script isn't quite new :)).

Oh, and btw, I almost forgot: The books can also include pictures (gumps or items). Pictures can't be added dynamically at the moment, but you can add them by simply calling AddPicturePage(...); in the constructor of your book.

Attached is one example, the NinjaReadBook (with title page, which can be switched on or off) with the original book (from which the text was copied) below.

The one problem I still found is, that the gump seems to be to big (the gump is bigger than the book, so there's an invisible area around it, in which clicking will mean clicking on the book itself).
 

Attachments

  • NinjaReadBook.jpg
    NinjaReadBook.jpg
    105.4 KB · Views: 88
  • ReadBooks.rar
    9.1 KB · Views: 56
Top