Skip to content

API UO GetProfile en

Codex edited this page Sep 23, 2026 · 1 revision

UO.GetProfile

ClassicUO / Basic IDE

Home · API · Commands

Reads the public character description sent by the server for the Profile window. Useful for notes or text matching; this is not a manager configuration profile.

Exact syntax

UO.GetProfile(serial:Any) -> String

Parameters

  • serial — Character serial: number, 0x ID string or object selector such as "self" or "lasttarget". Not a body type, filename or manager profile.

Returns

String: description body, without header/footer. Empty is a valid description and also the result after no response for 3 seconds. Not Boolean. Every call sends a request; an already retained description returns immediately, including an open-window draft. It does not guarantee a fresh server reply.

Behavior

  • The description/draft belongs to the session. Closing graphics retains it without publishing; reopening restores Profile. Explicitly closing your own Profile submits changed text once; other characters are never updated. A new server reply replaces retained data; disconnect clears it. GetProfile never edits text.

Internal functions: from call to result

SessionCharacterPanels validates complete profile/arrow packets and stores records on the session thread. The bridge reads them without graphics. GetProfile sends 0xB8 and waits up to 3 seconds in 25 ms intervals for available text. Track updates its separate local marker. ProfileGump and QuestArrowGump display the same records. Arrows are excluded from GetGumpsCount server dialogs.

1. GetProfile

Reads the public character description sent by the server for the Profile window. Useful for notes or text matching; this is not a manager configuration profile.

String: description body, without header/footer. Empty is a valid description and also the result after no response for 3 seconds. Not Boolean. Every call sends a request; an already retained description returns immediately, including an open-window draft. It does not guarantee a fresh server reply.

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

2. SessionCharacterPanels

The description/draft belongs to the session. Closing graphics retains it without publishing; reopening restores Profile. Explicitly closing your own Profile submits changed text once; other characters are never updated. A new server reply replaces retained data; disconnect clears it. GetProfile never edits text.

SessionCharacterPanels validates complete profile/arrow packets and stores records on the session thread. The bridge reads them without graphics. GetProfile sends 0xB8 and waits up to 3 seconds in 25 ms intervals for available text. Track updates its separate local marker. ProfileGump and QuestArrowGump display the same records. Arrows are excluded from GetGumpsCount server dialogs.

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

String: description body, without header/footer. Empty is a valid description and also the result after no response for 3 seconds. Not Boolean. Every call sends a request; an already retained description returns immediately, including an open-window draft. It does not guarantee a fresh server reply.

Examples

Direct use

# Direct use
#
# Reads the public character description sent by the server for the Profile window. Useful for
# notes or text matching; this is not a manager configuration profile.
#
# String: description body, without header/footer. Empty is a valid description and also the
# result after no response for 3 seconds. Not Boolean. Every call sends a request; an already
# retained description returns immediately, including an open-window draft. It does not
# guarantee a fresh server reply.

SUB Main()
    # "self" means your public description, not account configuration. Prints server text or an
    # already retained session copy.

    VAR note = UO.GetProfile("self")
    IF note <> "" THEN
        UO.Print(note)
    END IF
END SUB

Parameter and execution notes:

  • "self" means your public description, not account configuration. Prints server text or an already retained session copy.

Game condition

# Game condition
#
# Reads the public character description sent by the server for the Profile window. Useful for
# notes or text matching; this is not a manager configuration profile.
#
# String: description body, without header/footer. Empty is a valid description and also the
# result after no response for 3 seconds. Not Boolean. Every call sends a request; an already
# retained description returns immediately, including an open-window draft. It does not
# guarantee a fresh server reply.

SUB Main()
    # Requires a valid lasttarget. InStr looks for case-sensitive "Healer" in free text. AddObject
    # saves that serial as healerNote on a match. This is user text, not proof of NPC profession.

    IF NOT UO.Exists("lasttarget") THEN
        RETURN
    END IF
    VAR note = UO.GetProfile("lasttarget")
    IF InStr(note, "Healer") > 0 THEN
        UO.AddObject("healerNote", "lasttarget")
    END IF
END SUB

Parameter and execution notes:

  • Requires a valid lasttarget. InStr looks for case-sensitive "Healer" in free text. AddObject saves that serial as healerNote on a match. This is user text, not proof of NPC profession.

Complete helper function

# Complete helper function
#
# Reads the public character description sent by the server for the Profile window. Useful for
# notes or text matching; this is not a manager configuration profile.
#
# String: description body, without header/footer. Empty is a valid description and also the
# result after no response for 3 seconds. Not Boolean. Every call sends a request; an already
# retained description returns immediately, including an open-window draft. It does not
# guarantee a fresh server reply.

SUB Main()
    # The complete HasPublicNote helper checks object existence and a substring, returning
    # true/false. "Guild" is sample text; empty does not prove that the server has no such note.

    IF HasPublicNote("lasttarget", "Guild") THEN
        UO.AddObject("guildNote", "lasttarget")
    END IF
END SUB

FUNCTION HasPublicNote(serial, phrase)
    IF NOT UO.Exists(serial) THEN
        RETURN FALSE
    END IF
    RETURN InStr(UO.GetProfile(serial), phrase) > 0
END FUNCTION

Parameter and execution notes:

  • The complete HasPublicNote helper checks object existence and a substring, returning true/false. "Guild" is sample text; empty does not prove that the server has no such note.

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

Clone this wiki locally