-
Notifications
You must be signed in to change notification settings - Fork 0
API UO Say en
ClassicUO / Basic IDE
Sends ordinary character speech to the server, for example a request to a banker or a pet command.
UO.Say(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.
- 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
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.
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.
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.
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.
# 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 SUBParameter 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
#
# 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 SUBParameter 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
#
# 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 SUBParameter 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 · 繁體中文 · 日本語 · 한국어
ClassicUO
Bad Newbie & Basic IDE
Найти в справочнике
Клиент и скрипты
Каталоги значений
Разработка и помощь