-
Notifications
You must be signed in to change notification settings - Fork 0
API messagebox en
ClassicUO / Basic IDE
A built-in Basic function without UO. Takes exactly one string. Here messagebox does not open a dialog, wait for a button or return a user response; both functions use local game output.
messagebox(text:String) -> Unit
-
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 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.
- A built-in Basic function without UO. Takes exactly one string. Here messagebox does not open a dialog, wait for a button or return a user response; both functions use local game output.
- 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.
A built-in Basic function without UO. Takes exactly one string. Here messagebox does not open a dialog, wait for a button or return a user response; both functions use local game output.
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: external/InjectionScript/src/InjectionScript/Runtime/InjectionApi.cs; function Message.
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
#
# A built-in Basic function without UO. Takes exactly one string. Here messagebox does not open
# a dialog, wait for a button or return a user response; both functions use local game output.
#
# 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
messagebox("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
#
# A built-in Basic function without UO. Takes exactly one string. Here messagebox does not open
# a dialog, wait for a button or return a user response; both functions use local game output.
#
# 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
messagebox("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
#
# A built-in Basic function without UO. Takes exactly one string. Here messagebox does not open
# a dialog, wait for a button or return a user response; both functions use local game output.
#
# 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
messagebox("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
Найти в справочнике
Клиент и скрипты
Каталоги значений
Разработка и помощь