Skip to content

API UO Say en

Codex edited this page Sep 26, 2026 · 1 revision

UO.Say

ClassicUO / Basic IDE

Home · API · Journal

Sends ordinary character speech to the server, for example a request to a banker or a pet command.

Exact syntax

UO.Say(message:String) -> Unit

Parameters

  • 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.

Returns

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.

Behavior

  • Requires a connected character. Text is sent as ordinary speech without interpreting the Basic command prefix. bank and Shadow follow me are example server phrases: adjust them to your shard and pet name. Range, permissions and NPC reactions are server decisions; the call does not wait for a gump or guarantee an action.
  • Protocol versions 2.0.0 and later use Unicode speech; older versions use ASCII speech. SayU does not force Unicode on an older protocol. Without an explicit color the profile SpeechHue is used; 0xFFFF in UO.UOSayColor selects that color too. The text is sent to the server, not executed as script code.
  • UO.Print · UO.CharPrint · UO.Say · UO.ConColor

Internal functions: from call to result

Requires a connected character. Text is sent as ordinary speech without interpreting the Basic command prefix. bank and Shadow follow me are example server phrases: adjust them to your shard and pet name. Range, permissions and NPC reactions are server decisions; the call does not wait for a gump or guarantee an action.

1. Say

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.

Project source: external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs; function Say.

2. SendServerSpeech

Sends ordinary character speech to the server, for example a request to a banker or a pet command.

Requires a connected character. Text is sent as ordinary speech without interpreting the Basic command prefix. bank and Shadow follow me are example server phrases: adjust them to your shard and pet name. Range, permissions and NPC reactions are server decisions; the call does not wait for a gump or guarantee an action.

Project source: src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs; function SendServerSpeech.

3. Say

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.

Protocol versions 2.0.0 and later use Unicode speech; older versions use ASCII speech. SayU does not force Unicode on an older protocol. Without an explicit color the profile SpeechHue is used; 0xFFFF in UO.UOSayColor selects that color too. The text is sent to the server, not executed as script code.

Project source: src/ClassicUO.Client/Game/GameActions.cs; function Say.

Examples

Ask a banker

# Ask a banker
#
# Sends ordinary character speech to the server, for example a request to a banker or a pet
# command.
#
# 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()
    # Connected is checked before sending. bank is one speech string, not an API name. A suitable
    # nearby NPC is usually required; replace the phrase if your shard uses another one.

    IF UO.Connected() THEN
        UO.Say("bank")
    END IF
END SUB

Parameter and execution notes:

  • Connected is checked before sending. bank is one speech string, not an API name. A suitable nearby NPC is usually required; replace the phrase if your shard uses another one.

Address a pet by name

# Address a pet by name
#
# Sends ordinary character speech to the server, for example a request to a banker or a pet
# command.
#
# 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()
    # petName is your pet’s name, Shadow here. It builds one string: Shadow follow me. This orders
    # the pet to follow you; it is different from UO.Follow, which moves your character.

    VAR petName = "Shadow"
    IF UO.Connected() THEN
        UO.Say(petName + " follow me")
    END IF
END SUB

Parameter and execution notes:

  • petName is your pet’s name, Shadow here. It builds one string: Shadow follow me. This orders the pet to follow you; it is different from UO.Follow, which moves your character.

Request the bank only when overweight

# Request the bank only when overweight
#
# Sends ordinary character speech to the server, for example a request to a banker or a pet
# command.
#
# 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()
    # RequestBankIfHeavy checks connection and a known positive weight limit. Only when overweight
    # does it send bank and return 1 to mean a request was sent. 0 means no request. That result
    # belongs to the helper, not to the speech command.

    RETURN RequestBankIfHeavy()
END SUB

SUB RequestBankIfHeavy()
    IF NOT UO.Connected() THEN
        RETURN 0
    END IF
    VAR maximum = UO.MaxWeight()
    IF maximum <= 0 OR UO.Weight() < maximum THEN
        RETURN 0
    END IF
    UO.Say("bank")
    RETURN 1
END SUB

Parameter and execution notes:

  • RequestBankIfHeavy checks connection and a known positive weight limit. Only when overweight does it send bank and return 1 to mean a request was sent. 0 means no request. That result belongs to the helper, not to the speech command.

Русский · English · Українська · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어

Clone this wiki locally