-
Notifications
You must be signed in to change notification settings - Fork 0
API UO ServerPrint en
ClassicUO / Basic IDE
Shows a local progress message or stop condition. You see it; other players do not.
UO.ServerPrint(message:String) -> Unit
-
message— 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 line appears at the lower left of the game view and in the local journal. A copy is available in IDE output; the manager exposes local entries in the session system journal even without a game window. No speech packet is sent. This is not overhead text; use UO.CharPrint for that.
- Printing itself appends to the journal. Save a search result or the last line before printing diagnostics. Avoid printing on every fast-loop iteration; report changes instead.
- Without a color the hue is 0x03B2. UO.Print(text, color) takes text first; UO.ColorPrint(color, text) takes color first.
- Despite Server in the name or its similarity to an incoming message, this only prints local text. Use UO.Say to speak in the world.
- UO.Print · UO.CharPrint · UO.Say · UO.ConColor
The line appears at the lower left of the game view and in the local journal. A copy is available in IDE output; the manager exposes local entries in the session system journal even without a game window. No speech packet is sent. This is not overhead text; use UO.CharPrint for that.
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.
Without a color the hue is 0x03B2. UO.Print(text, color) takes text first; UO.ColorPrint(color, text) takes color first.
Project source: external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs; function ServerPrint.
Shows a local progress message or stop condition. You see it; other players do not.
The line appears at the lower left of the game view and in the local journal. A copy is available in IDE output; the manager exposes local entries in the session system journal even without a game window. No speech packet is sent. This is not overhead text; use UO.CharPrint for that.
Project source: src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs; function PrintClientMessage.
Printing itself appends to the journal. Save a search result or the last line before printing diagnostics. Avoid printing on every fast-loop iteration; report changes instead.
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.
Project source: src/ClassicUO.Client/Game/GameActions.cs; function Print.
# Progress summary
#
# Shows a local progress message or stop condition. You see it; other players do not.
#
# 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()
# processed=12 is a demonstration count of already processed items. CStr converts it to text.
# The example only reports this count; it does not move items.
VAR processed = 12
UO.ServerPrint("Processed item entries: " + CStr(processed))
END SUBParameter and execution notes:
- processed=12 is a demonstration count of already processed items. CStr converts it to text. The example only reports this count; it does not move items.
# Overweight warning
#
# Shows a local progress message or stop condition. You see it; other players do not.
#
# 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()
# Reads character weight and maximum weight. A zero or unknown maximum does not count as
# overweight. When weight >= maximum, one line is printed and Main returns; nothing is dropped.
VAR weight = UO.Weight()
VAR maximum = UO.MaxWeight()
IF maximum > 0 AND weight >= maximum THEN
UO.ServerPrint("Too heavy: " + CStr(weight) + "/" + CStr(maximum))
RETURN
END IF
END SUBParameter and execution notes:
- Reads character weight and maximum weight. A zero or unknown maximum does not count as overweight. When weight >= maximum, one line is printed and Main returns; nothing is dropped.
# Report only a weight change
#
# Shows a local progress message or stop condition. You see it; other players do not.
#
# 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()
# Main saves the weight, waits 1000 milliseconds and calls the fully declared ReportWeight
# helper. The helper prints only when weight changed, then returns the new weight for the next
# check. It does not create an endless loop.
VAR previous = UO.Weight()
UO.Wait(1000)
previous = ReportWeight(previous, UO.Weight())
END SUB
SUB ReportWeight(previous, current)
IF previous <> current THEN
UO.ServerPrint("Weight changed: " + CStr(current))
END IF
RETURN current
END SUBParameter and execution notes:
- Main saves the weight, waits 1000 milliseconds and calls the fully declared ReportWeight helper. The helper prints only when weight changed, then returns the new weight for the next check. It does not create an endless loop.
Русский · English · Українська · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
ClassicUO
Bad Newbie & Basic IDE
Найти в справочнике
Клиент и скрипты
Каталоги значений
Разработка и помощь