-
Notifications
You must be signed in to change notification settings - Fork 0
API UO BookSetHeader en
ClassicUO / Basic IDE
Sets the title and author of the open editable book.
UO.BookSetHeader(Title:Any, Author:Any) -> Unit
-
Title— Title: the command and graphical editor retain the first 47 characters. -
Author— Author: the first 29 characters are retained.
Unit: no returned value. This requests a write; it is neither TRUE/FALSE nor server confirmation. The server may refuse editing.
- First open the intended book through a game action. These commands select the most recently opened book; they do not accept its ID. With several books, check which one is current. Get reads loaded data and does not request a missing page.
- The manager stores book content in the session, including without graphics. Closing and reopening the game view retains the book and draft. Closing the book itself removes it from open books; disconnecting clears server books.
- Only editable books accept writes. Invalid pages and excessive text are rejected. BookSetText validates every page before sending any, so an invalid later page causes no partial write.
The server sends header/page count and then page content. SessionBooks validates each entire packet, retains data and updates its view. Basic selects the last book through the bridge; SessionBook reads local lines or validates a write and sends the book packet. ModernBookGump displays the same data and preserves drafts when graphics detach.
First open the intended book through a game action. These commands select the most recently opened book; they do not accept its ID. With several books, check which one is current. Get reads loaded data and does not request a missing page.
The manager stores book content in the session, including without graphics. Closing and reopening the game view retains the book and draft. Closing the book itself removes it from open books; disconnecting clears server books.
Project source: src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs; function GetOpenBook.
Only editable books accept writes. Invalid pages and excessive text are rejected. BookSetText validates every page before sending any, so an invalid later page causes no partial write.
Unit: no returned value. This requests a write; it is neither TRUE/FALSE nor server confirmation. The server may refuse editing.
Project source: src/ClassicUO.Client/Game/Managers/SessionBooks.cs; function SessionBooks.ReceiveHeader/ReceivePages; SessionBook.Yoko*.
The helper is fully included. Its TRUE only reports that its local check and call ran; it does not confirm server storage.
# Direct use
#
# Sets the title and author of the open editable book.
#
# Unit: no returned value. This requests a write; it is neither TRUE/FALSE nor server
# confirmation. The server may refuse editing.
SUB Main()
# All examples assume the intended book is open, required pages are loaded, and writes use an
# editable book. Numbers 1, 2 and 3 are page numbers; verify those pages exist. Names and text
# are illustrative.
UO.BookSetHeader("Mining route", "Alice")
END SUBParameter and execution notes:
- All examples assume the intended book is open, required pages are loaded, and writes use an editable book. Numbers 1, 2 and 3 are page numbers; verify those pages exist. Names and text are illustrative.
# Practical scenario
#
# Sets the title and author of the open editable book.
#
# Unit: no returned value. This requests a write; it is neither TRUE/FALSE nor server
# confirmation. The server may refuse editing.
SUB Main()
# All examples assume the intended book is open, required pages are loaded, and writes use an
# editable book. Numbers 1, 2 and 3 are page numbers; verify those pages exist. Names and text
# are illustrative.
VAR route = "Northern mine"
VAR author = "Alice"
UO.BookSetHeader("Route: " + route, author)
END SUBParameter and execution notes:
- All examples assume the intended book is open, required pages are loaded, and writes use an editable book. Numbers 1, 2 and 3 are page numbers; verify those pages exist. Names and text are illustrative.
# Complete helper function
#
# Sets the title and author of the open editable book.
#
# Unit: no returned value. This requests a write; it is neither TRUE/FALSE nor server
# confirmation. The server may refuse editing.
SUB Main()
# All examples assume the intended book is open, required pages are loaded, and writes use an
# editable book. Numbers 1, 2 and 3 are page numbers; verify those pages exist. Names and text
# are illustrative.
# The helper is fully included. Its TRUE only reports that its local check and call ran; it does
# not confirm server storage.
VAR requested = SetNotebookHeader("Supply list", "Alice")
END SUB
FUNCTION SetNotebookHeader(title, author)
IF Len(title) > 47 OR Len(author) > 29 THEN
RETURN FALSE
END IF
UO.BookSetHeader(title, author)
RETURN TRUE
END FUNCTIONParameter and execution notes:
- All examples assume the intended book is open, required pages are loaded, and writes use an editable book. Numbers 1, 2 and 3 are page numbers; verify those pages exist. Names and text are illustrative.
- The helper is fully included. Its TRUE only reports that its local check and call ran; it does not confirm server storage.
Русский · English · Українська · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
ClassicUO
Bad Newbie & Basic IDE
Найти в справочнике
Клиент и скрипты
Каталоги значений
Разработка и помощь