-
Notifications
You must be signed in to change notification settings - Fork 0
API UO ClientPrintEx en
ClassicUO / Basic IDE
Draws a label visible only to you above a loaded object, for example a selected-target marker or a warning above your character. It is neither character speech nor a lower-left viewport message.
UO.ClientPrintEx(SenderID:Any, Color:Any, Font:Any, Text:Any) -> Unit
-
SenderID— Object serial, not graphic/type or coordinates. Three-argument UO.CharPrint also resolves self, lasttarget and saved object names. UO.ClientPrintEx SenderID needs a number such as UO.Hex2Int(UO.GetSerial("self")); it does not resolve string object aliases. -
Color— UO hue, not RGB. The low 16 bits are used; 0x0044 is an example. -1 becomes 0xFFFF, not an any-color filter. ConColor is not used here. -
Font— UO font index, not a point size or Windows font name. Clamped to 0..255; available fonts depend on game files. The examples use font index 3. -
Text— Message text. Join numbers explicitly with CStr; names and coordinates are not substituted automatically. Quotes delimit the string and are not sent as part of it.
Unit: no return value. Call on its own line; do not test its result as True/False, a serial or a count. Returning from the call does not confirm a server response.
- The object must exist in the loaded world and not be destroyed; empty text and missing targets are not drawn. The command does not fetch objects from the server. Other players and the server do not receive this label. Without a graphical window there is no world label to see; use the manager system journal for diagnostics.
- UO.CharPrint(color, msg) selects your character. UO.CharPrint(id, color, msg) selects the given object. Both use font 3. UO.ClientPrintEx requires all four arguments in SenderID, Color, Font, Text order.
- UO font index, not a point size or Windows font name. Clamped to 0..255; available fonts depend on game files. The examples use font index 3.
- GetSerial returns hexadecimal text. Hex2Int converts it to Integer before comparison with numeric 0; do not compare the string "0x00000000" directly to integer 0.
- UO.Print · UO.CharPrint · UO.ClientPrintEx · UO.AddToSystemJournalEx
Draws a label visible only to you above a loaded object, for example a selected-target marker or a warning above your character. It is neither character speech nor a lower-left viewport message.
Object serial, not graphic/type or coordinates. Three-argument UO.CharPrint also resolves self, lasttarget and saved object names. UO.ClientPrintEx SenderID needs a number such as UO.Hex2Int(UO.GetSerial("self")); it does not resolve string object aliases.
UO.CharPrint(color, msg) selects your character. UO.CharPrint(id, color, msg) selects the given object. Both use font 3. UO.ClientPrintEx requires all four arguments in SenderID, Color, Font, Text order.
Project source: external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs; function ExecuteClientApiCompatibility.
UO hue, not RGB. The low 16 bits are used; 0x0044 is an example. -1 becomes 0xFFFF, not an any-color filter. ConColor is not used here. UO font index, not a point size or Windows font name. Clamped to 0..255; available fonts depend on game files. The examples use font index 3.
The object must exist in the loaded world and not be destroyed; empty text and missing targets are not drawn. The command does not fetch objects from the server. Other players and the server do not receive this label. Without a graphical window there is no world label to see; use the manager system journal for diagnostics.
Project source: src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs; function CharPrintEx.
Message text. Join numbers explicitly with CStr; names and coordinates are not substituted automatically. Quotes delimit the string and are not sent as part of it.
Draws a label visible only to you above a loaded object, for example a selected-target marker or a warning above your character. It is neither character speech nor a lower-left viewport message.
Project source: src/ClassicUO.Client/Game/GameActions.cs; function Print.
# UO.ClientPrintEx — 1
#
# Draws a label visible only to you above a loaded object, for example a selected-target marker
# or a warning above your character. It is neither character speech nor a lower-left viewport
# message.
#
# Unit: no return value. Call on its own line; do not test its result as True/False, a serial or
# a count. Returning from the call does not confirm a server response.
SUB Main()
# The short CharPrint form places Ready above your character. ClientPrintEx obtains its serial
# with UO.Hex2Int(UO.GetSerial("self")) and passes font 3 explicitly. This label does not enable
# a game mode.
# GetSerial returns hexadecimal text. Hex2Int converts it to Integer before comparison with
# numeric 0; do not compare the string "0x00000000" directly to integer 0.
UO.ClientPrintEx(UO.Hex2Int(UO.GetSerial("self")), 0x0044, 3, "Ready")
END SUBParameter and execution notes:
- The short CharPrint form places Ready above your character. ClientPrintEx obtains its serial with UO.Hex2Int(UO.GetSerial("self")) and passes font 3 explicitly. This label does not enable a game mode.
- GetSerial returns hexadecimal text. Hex2Int converts it to Integer before comparison with numeric 0; do not compare the string "0x00000000" directly to integer 0.
# UO.ClientPrintEx — 2
#
# Draws a label visible only to you above a loaded object, for example a selected-target marker
# or a warning above your character. It is neither character speech nor a lower-left viewport
# message.
#
# Unit: no return value. Call on its own line; do not test its result as True/False, a serial or
# a count. Returning from the call does not confirm a server response.
SUB Main()
# target is the last target serial. Zero means this example has no target to label. Selected
# target is only a local caption: it neither attacks nor fills an active server target.
# GetSerial returns hexadecimal text. Hex2Int converts it to Integer before comparison with
# numeric 0; do not compare the string "0x00000000" directly to integer 0.
VAR target = UO.Hex2Int(UO.GetSerial("lasttarget"))
IF target <> 0 THEN
UO.ClientPrintEx(target, 0x0044, 3, "Selected target")
END IF
END SUBParameter and execution notes:
- target is the last target serial. Zero means this example has no target to label. Selected target is only a local caption: it neither attacks nor fills an active server target.
- GetSerial returns hexadecimal text. Hex2Int converts it to Integer before comparison with numeric 0; do not compare the string "0x00000000" directly to integer 0.
# UO.ClientPrintEx — 3
#
# Draws a label visible only to you above a loaded object, for example a selected-target marker
# or a warning above your character. It is neither character speech nor a lower-left viewport
# message.
#
# Unit: no return value. Call on its own line; do not test its result as True/False, a serial or
# a count. Returning from the call does not confirm a server response.
SUB Main()
# ShowWeightWarning is fully declared below. It compares weight with a known positive limit and
# labels your character only when overloaded; it drops nothing. CStr converts weight to text.
# GetSerial returns hexadecimal text. Hex2Int converts it to Integer before comparison with
# numeric 0; do not compare the string "0x00000000" directly to integer 0.
ShowWeightWarning(UO.Weight(), UO.MaxWeight())
END SUB
SUB ShowWeightWarning(weight, maximum)
IF maximum > 0 AND weight >= maximum THEN
UO.ClientPrintEx(UO.Hex2Int(UO.GetSerial("self")), 0x0044, 3, "Too heavy: " + CStr(weight))
END IF
END SUBParameter and execution notes:
- ShowWeightWarning is fully declared below. It compares weight with a known positive limit and labels your character only when overloaded; it drops nothing. CStr converts weight to text.
- GetSerial returns hexadecimal text. Hex2Int converts it to Integer before comparison with numeric 0; do not compare the string "0x00000000" directly to integer 0.
ClassicUO
Bad Newbie & Basic IDE
Найти в справочнике
Клиент и скрипты
Каталоги значений
Разработка и помощь