Skip to content

EN Runtime Helpers E

Codex edited this page Oct 12, 2026 · 1 revision

uk · ru · en · de · fr · it · es · zh-tw · ja · ko

Helper functions E

Internal implementation code; this is not a standalone script.

ClassicUO.CSharp.CSharpCallbacks.ReadState

Returns the value of the expression below.

Parameters: name

Source: Project_Full/src/ClassicUO.CSharp/CSharpCallbacks.cs:318.

private int ReadState(string name)

Result: int.

Calls: Convert.ToInt32, native, name.ToLowerInvariant.

Internal implementation code; this is not a standalone script.

private int ReadState(string name) => Convert.ToInt32(native(name.ToLowerInvariant() switch
    {
        "death" => "Dead", "changehitpoints" => "GetHP", "changemana" => "Mana", "changestamina" => "Stamina",
        _ => throw new ArgumentException("Unsupported state event: " + name)
    }, []));

ClassicUO.CSharp.CSharpScriptGlobals.Verify

Performs the displayed calls and state updates.

Parameters: No parameters.

Source: Project_Full/src/ClassicUO.CSharp/CSharpScriptGlobals.cs:97.

private void Verify()

Result: void.

Calls: nameof, CSharpExecutionScope.VerifyActive, cancellation.ThrowIfCancellationRequested, Callbacks.Verify, checkpoint.

Conditions: disposed.

Calls:

Internal implementation code; this is not a standalone script.

private void Verify()
    {
        if (disposed) throw new ObjectDisposedException(nameof(CSharpScriptGlobals));
        CSharpExecutionScope.VerifyActive(); cancellation.ThrowIfCancellationRequested();
        Callbacks.Verify(); checkpoint(); Callbacks.Verify();
        cancellation.ThrowIfCancellationRequested(); CSharpExecutionScope.VerifyActive();
    }

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CloseHandle

Performs the displayed calls and state updates.

Parameters: No parameters.

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1389.

public void CloseHandle()

Result: void.

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public void CloseHandle() => Invoke(() => Client.Game?.Exit());

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CreateFakeItem

Returns the value of the expression below.

Parameters: graphic, serial, amount, hue, x, y

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2278.

public int CreateFakeItem(int graphic, int serial, int amount, int hue, int x, int y)

Result: int.

Calls: Invoke.

Calls:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { if (_world.Player == null || graphic <= 0 || graphic > ushort.MaxValue) return 0; uint requestedSerial = unchecked((uint)serial); uint fakeSerial; if (serial != 0) { if (!SerialHelper.IsItem(requestedSerial)) return 0; fakeSerial = requestedSerial; } else { do { if (_nextYokoFakeItemSerial < 0x7F000000) _nextYokoFakeItemSerial = 0x7FFEFFFF; fakeSerial = _nextYokoFakeItemSerial--; } while (_world.Get(fakeSerial) != null); } Item item = _world.GetOrCreateItem(fakeSerial); if (item == null) return 0; if (SerialHelper.IsValid(item.Container)) _world.RemoveItemFromContainer(item); item.Container = 0xFFFF_FFFF; item.Graphic = (ushort)graphic; item.CheckGraphicChange(); item.Amount = (ushort)Math.Clamp(amount <= 0 ? 1 : amount, 1, ushort.MaxValue); item.FixHue((ushort)Math.Clamp(hue, 0, ushort.MaxValue)); item.X = (ushort)Math.Clamp(x < 0 ? _world.Player.X : x, 0, ushort.MaxValue); item.Y = (ushort)Math.Clamp(y < 0 ? _world.Player.Y : y, 0, ushort.MaxValue); item.Z = _world.Player.Z; item.Layer = Layer.Invalid; item.AllowedToDraw = true; item.IsDamageable = false; item.IsMulti = false; return unchecked((int)fakeSerial); }). Overload candidates: the source does not establish which candidate is selected.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { if (_world.Player == null || graphic <= 0 || graphic > ushort.MaxValue) return 0; uint requestedSerial = unchecked((uint)serial); uint fakeSerial; if (serial != 0) { if (!SerialHelper.IsItem(requestedSerial)) return 0; fakeSerial = requestedSerial; } else { do { if (_nextYokoFakeItemSerial < 0x7F000000) _nextYokoFakeItemSerial = 0x7FFEFFFF; fakeSerial = _nextYokoFakeItemSerial--; } while (_world.Get(fakeSerial) != null); } Item item = _world.GetOrCreateItem(fakeSerial); if (item == null) return 0; if (SerialHelper.IsValid(item.Container)) _world.RemoveItemFromContainer(item); item.Container = 0xFFFF_FFFF; item.Graphic = (ushort)graphic; item.CheckGraphicChange(); item.Amount = (ushort)Math.Clamp(amount <= 0 ? 1 : amount, 1, ushort.MaxValue); item.FixHue((ushort)Math.Clamp(hue, 0, ushort.MaxValue)); item.X = (ushort)Math.Clamp(x < 0 ? _world.Player.X : x, 0, ushort.MaxValue); item.Y = (ushort)Math.Clamp(y < 0 ? _world.Player.Y : y, 0, ushort.MaxValue); item.Z = _world.Player.Z; item.Layer = Layer.Invalid; item.AllowedToDraw = true; item.IsDamageable = false; item.IsMulti = false; return unchecked((int)fakeSerial); }). Overload candidates: the source does not establish which candidate is selected.
  • ClassicUO.Game.SerialHelper.IsItem: SerialHelper.IsItem(requestedSerial).
  • ClassicUO.Game.World.Get: _world.Get(fakeSerial).
  • ClassicUO.Game.World.GetOrCreateItem: _world.GetOrCreateItem(fakeSerial).
  • ClassicUO.Game.SerialHelper.IsValid: SerialHelper.IsValid(item.Container).
  • ClassicUO.Game.World.RemoveItemFromContainer: _world.RemoveItemFromContainer(item). Overload candidates: the source does not establish which candidate is selected.
  • ClassicUO.Game.World.RemoveItemFromContainer: _world.RemoveItemFromContainer(item). Overload candidates: the source does not establish which candidate is selected.

Internal implementation code; this is not a standalone script.

public int CreateFakeItem(int graphic, int serial, int amount, int hue, int x, int y) => Invoke(() =>

        {

            if (_world.Player == null || graphic <= 0 || graphic > ushort.MaxValue)

                return 0;



            uint requestedSerial = unchecked((uint)serial);

            uint fakeSerial;

            if (serial != 0)

            {

                if (!SerialHelper.IsItem(requestedSerial))

                    return 0;

                fakeSerial = requestedSerial;

            }

            else

            {

                do

                {

                    if (_nextYokoFakeItemSerial < 0x7F000000)

                        _nextYokoFakeItemSerial = 0x7FFEFFFF;

                    fakeSerial = _nextYokoFakeItemSerial--;

                }

                while (_world.Get(fakeSerial) != null);

            }



            Item item = _world.GetOrCreateItem(fakeSerial);

            if (item == null)

                return 0;



            if (SerialHelper.IsValid(item.Container))

                _world.RemoveItemFromContainer(item);



            item.Container = 0xFFFF_FFFF;

            item.Graphic = (ushort)graphic;

            item.CheckGraphicChange();

            item.Amount = (ushort)Math.Clamp(amount <= 0 ? 1 : amount, 1, ushort.MaxValue);

            item.FixHue((ushort)Math.Clamp(hue, 0, ushort.MaxValue));

            item.X = (ushort)Math.Clamp(x < 0 ? _world.Player.X : x, 0, ushort.MaxValue);

            item.Y = (ushort)Math.Clamp(y < 0 ? _world.Player.Y : y, 0, ushort.MaxValue);

            item.Z = _world.Player.Z;

            item.Layer = Layer.Invalid;

            item.AllowedToDraw = true;

            item.IsDamageable = false;

            item.IsMulti = false;



            return unchecked((int)fakeSerial);

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.EnergyResistance

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:164.

public int EnergyResistance

Result: int.

Result: Invoke(() => CurrentPlayer?.EnergyResistance ?? 0).

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public int EnergyResistance => Invoke(() => CurrentPlayer?.EnergyResistance ?? 0);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindFullQuantity

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2267.

public int FindFullQuantity()

Result: int.

Result: _findFullQuantity.

Internal implementation code; this is not a standalone script.

public int FindFullQuantity() => _findFullQuantity;

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Flying

Returns the value of the expression below.

Parameters: id

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:599.

public int Flying(int id)

Result: int.

Result: Invoke(() => (_world.Get(unchecked((uint)id)) as Mobile)?.IsFlying == true ? 1 : 0).

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public int Flying(int id) => Invoke(() => (_world.Get(unchecked((uint)id)) as Mobile)?.IsFlying == true ? 1 : 0);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Followers

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:166.

public int Followers

Result: int.

Result: Invoke(() => CurrentPlayer?.Followers ?? 0).

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public int Followers => Invoke(() => CurrentPlayer?.Followers ?? 0);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetLastMenuItems

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:692.

public string[] GetLastMenuItems()

Result: string[].

Result: Invoke(() => _world.ServerMenus.Snapshot().LastOrDefault()?.GetYokoItems() ?? Array.Empty<string>()).

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public string[] GetLastMenuItems() => Invoke(() => _world.ServerMenus.Snapshot().LastOrDefault()?.GetYokoItems() ?? Array.Empty<string>());

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetPrice

Returns the value of the expression below.

Parameters: objectId

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2466.

public int GetPrice(int objectId)

Result: int.

Result: Invoke(() => unchecked((int)(_world.Items.Get(unchecked((uint)objectId))?.Price ?? 0u))).

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public int GetPrice(int objectId) => Invoke(() => unchecked((int)(_world.Items.Get(unchecked((uint)objectId))?.Price ?? 0u)));

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetTileFlags

Returns the value of the expression below.

Parameters: group, tileId

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3509.

public long GetTileFlags(int group, int tileId)

Result: long.

Calls: Invoke.

Calls:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { if (group == 0 && tileId >= 0 && tileId < Client.UO.FileManager.TileData.LandData.Length) return unchecked((long)(ulong)Client.UO.FileManager.TileData.LandData[tileId].Flags); if (group != 0 && tileId >= 0 && tileId < Client.UO.FileManager.TileData.StaticData.Length) return unchecked((long)(ulong)Client.UO.FileManager.TileData.StaticData[tileId].Flags); return 0L; }). Overload candidates: the source does not establish which candidate is selected.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { if (group == 0 && tileId >= 0 && tileId < Client.UO.FileManager.TileData.LandData.Length) return unchecked((long)(ulong)Client.UO.FileManager.TileData.LandData[tileId].Flags); if (group != 0 && tileId >= 0 && tileId < Client.UO.FileManager.TileData.StaticData.Length) return unchecked((long)(ulong)Client.UO.FileManager.TileData.StaticData[tileId].Flags); return 0L; }). Overload candidates: the source does not establish which candidate is selected.

Internal implementation code; this is not a standalone script.

public long GetTileFlags(int group, int tileId) => Invoke(() =>

        {

            if (group == 0 && tileId >= 0 && tileId < Client.UO.FileManager.TileData.LandData.Length)

                return unchecked((long)(ulong)Client.UO.FileManager.TileData.LandData[tileId].Flags);

            if (group != 0 && tileId >= 0 && tileId < Client.UO.FileManager.TileData.StaticData.Length)

                return unchecked((long)(ulong)Client.UO.FileManager.TileData.StaticData[tileId].Flags);

            return 0L;

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GumpExists

Returns the value of the expression below.

Parameters: firstId, secondId

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2906.

public int GumpExists(int firstId, int secondId)

Result: int.

Calls: Invoke.

Calls:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { List<Gump> gumps = ServerGumpsUnsafe(); if (secondId != -1) { return gumps.Any(g => g.LocalSerial == (uint)firstId && g.ServerSerial == (uint)secondId) ? 1 : 0; } return gumps.Any(g => g.LocalSerial == (uint)firstId || g.ServerSerial == (uint)firstId) || firstId >= 0 && firstId < gumps.Count ? 1 : 0; }). Overload candidates: the source does not establish which candidate is selected.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { List<Gump> gumps = ServerGumpsUnsafe(); if (secondId != -1) { return gumps.Any(g => g.LocalSerial == (uint)firstId && g.ServerSerial == (uint)secondId) ? 1 : 0; } return gumps.Any(g => g.LocalSerial == (uint)firstId || g.ServerSerial == (uint)firstId) || firstId >= 0 && firstId < gumps.Count ? 1 : 0; }). Overload candidates: the source does not establish which candidate is selected.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ServerGumpsUnsafe: ServerGumpsUnsafe().

Internal implementation code; this is not a standalone script.

public int GumpExists(int firstId, int secondId) => Invoke(() =>

        {

            List<Gump> gumps = ServerGumpsUnsafe();

            if (secondId != -1)

            {

                return gumps.Any(g => g.LocalSerial == (uint)firstId && g.ServerSerial == (uint)secondId) ? 1 : 0;

            }

            return gumps.Any(g => g.LocalSerial == (uint)firstId || g.ServerSerial == (uint)firstId)

                || firstId >= 0 && firstId < gumps.Count ? 1 : 0;

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.InvokeStepCallback

Checks the conditions below and returns the displayed result.

Parameters: callbackName, x, y, z

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1519.

public int InvokeStepCallback(string callbackName, int x, int y, int z)

Result: int.

Result: 1.

Calls: string.IsNullOrWhiteSpace, `(_csharpGlobals ?? throw new InvalidOperationException("Register movement callbacks in the current C# script context."))

            .InvokeStepCallback`.

Conditions: string.IsNullOrWhiteSpace(callbackName).

Internal implementation code; this is not a standalone script.

public int InvokeStepCallback(string callbackName, int x, int y, int z)

        {

            if (string.IsNullOrWhiteSpace(callbackName))

                return 1;

            return (_csharpGlobals ?? throw new InvalidOperationException("Register movement callbacks in the current C# script context."))

                .InvokeStepCallback(callbackName, x, y, z);

        }

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsFemale

Returns the value of the expression below.

Parameters: id

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:237.

public int IsFemale(int id)

Result: int.

Result: Invoke(() => (_world.Get(unchecked((uint)id)) as Mobile)?.IsFemale == true ? 1 : 0).

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public int IsFemale(int id) => Invoke(() => (_world.Get(unchecked((uint)id)) as Mobile)?.IsFemale == true ? 1 : 0);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsTrade

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:248.

public int IsTrade()

Result: int.

Result: Invoke(() => FindTrade(0) != null ? 1 : 0).

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public int IsTrade() => Invoke(() => FindTrade(0) != null ? 1 : 0);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.JournalFont

Returns the value of the expression below.

Parameters: index

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1969.

public int JournalFont(int index)

Result: int.

Result: GetJournalEntry(index)?.Font ?? 0.

Calls: GetJournalEntry.

Calls:

Internal implementation code; this is not a standalone script.

public int JournalFont(int index) => GetJournalEntry(index)?.Font ?? 0;

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.LClick

Performs the displayed calls and state updates.

Parameters: x, y

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1359.

public void LClick(int x, int y)

Result: void.

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public void LClick(int x, int y) => Invoke(() =>

        {

            WarpMouse(x, y);

            MouseButton(0x0002, 0x0004);

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Luck

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:165.

public int Luck

Result: int.

Result: Invoke(() => CurrentPlayer?.Luck ?? 0).

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public int Luck => Invoke(() => CurrentPlayer?.Luck ?? 0);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MatchesFindIdentity

Returns the value of the expression below.

Parameters: gameObject, type, color, ignoredTypes

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3764.

private bool MatchesFindIdentity(Entity gameObject, int type, int color, IgnoreTypeFilter ignoredTypes)

Result: bool.

Calls: State.IgnoredSerials.Contains, ignoredTypes.Matches.

Calls:

Internal implementation code; this is not a standalone script.

private bool MatchesFindIdentity(Entity gameObject, int type, int color, IgnoreTypeFilter ignoredTypes)

        {

            return gameObject != null

                && !gameObject.IsDestroyed

                && !State.IgnoredSerials.Contains(unchecked((int)gameObject.Serial))

                && !ignoredTypes.Matches(gameObject.Graphic, gameObject.Hue)

                && (type < 0 || type == 0xFFFF || gameObject.Graphic == (ushort)type)

                && (color < 0 || color == 0xFFFF || gameObject.Hue == (ushort)color);

        }

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PartyInvite

Performs the displayed calls and state updates.

Parameters: serial

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1535.

public void PartyInvite(int serial)

Result: void.

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public void PartyInvite(int serial) => Invoke(() =>

        {

            _manager.QueueTarget((uint)serial);

            GameActions.RequestPartyInviteByTarget();

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PartyLeave

Performs the displayed calls and state updates.

Parameters: No parameters.

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1541.

public void PartyLeave()

Result: void.

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public void PartyLeave() => Invoke(() => { if (_world.Player != null) GameActions.RequestPartyQuit(_world.Player); });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PartyMembersList

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1532.

public int[] PartyMembersList()

Result: int[].

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public int[] PartyMembersList() => Invoke(() => _world.Party.Members

            .Where(member => member != null && member.Serial != 0).Select(member => (int)member.Serial).ToArray());

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PauseResumeScript

Performs the displayed calls and state updates.

Parameters: index

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:321.

public void PauseResumeScript(int index)

Result: void.

Calls: _manager.PauseResumeScript.

Calls:

Internal implementation code; this is not a standalone script.

public void PauseResumeScript(int index) => _manager.PauseResumeScript(index);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.QueueStep

Returns the value of the expression below.

Parameters: direction, running, forcePacket

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3167.

private (int Result, int ConfirmGeneration, int DenyGeneration, WalkerManager Walker) QueueStep(int direction, bool running, bool forcePacket)

Result: (int Result, int ConfirmGeneration, int DenyGeneration, WalkerManager Walker).

Calls: Invoke.

Calls:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { PlayerMobile player = _world.Player; if (player == null || !_world.InGame || !NetClient.Socket.IsConnected || direction < 0 || direction > 7) return (STEP_QUEUE_GENERAL_ERROR, 0, 0, (WalkerManager)null); _manager.StopFollowing(); WalkerManager walker = player.Walker; if (walker.StepsCount >= Constants.MAX_STEP_COUNT) return (STEP_QUEUE_OVERFLOW, 0, 0, walker); if (walker.WalkingFailed || walker.LastStepRequestTime > Time.Ticks || Client.UO.Version >= ClientVersion.CV_60142 && player.IsParalyzed) return (STEP_QUEUE_GENERAL_ERROR, 0, 0, walker); int beforeSteps = walker.StepsCount; byte requestSequence = walker.WalkSequence; int confirmGeneration = walker.GetConfirmGeneration(requestSequence); int denyGeneration = walker.GetDenyGeneration(requestSequence); if (!player.Walk((Direction)direction, running, forcePacket)) return (STEP_QUEUE_CLIENT_BLOCKED, confirmGeneration, denyGeneration, walker); if (walker.StepsCount <= beforeSteps) return (STEP_QUEUE_TURN_ONLY, confirmGeneration, denyGeneration, walker); return ((int)walker.StepInfos[beforeSteps].Sequence, confirmGeneration, denyGeneration, walker); }). Overload candidates: the source does not establish which candidate is selected.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { PlayerMobile player = _world.Player; if (player == null || !_world.InGame || !NetClient.Socket.IsConnected || direction < 0 || direction > 7) return (STEP_QUEUE_GENERAL_ERROR, 0, 0, (WalkerManager)null); _manager.StopFollowing(); WalkerManager walker = player.Walker; if (walker.StepsCount >= Constants.MAX_STEP_COUNT) return (STEP_QUEUE_OVERFLOW, 0, 0, walker); if (walker.WalkingFailed || walker.LastStepRequestTime > Time.Ticks || Client.UO.Version >= ClientVersion.CV_60142 && player.IsParalyzed) return (STEP_QUEUE_GENERAL_ERROR, 0, 0, walker); int beforeSteps = walker.StepsCount; byte requestSequence = walker.WalkSequence; int confirmGeneration = walker.GetConfirmGeneration(requestSequence); int denyGeneration = walker.GetDenyGeneration(requestSequence); if (!player.Walk((Direction)direction, running, forcePacket)) return (STEP_QUEUE_CLIENT_BLOCKED, confirmGeneration, denyGeneration, walker); if (walker.StepsCount <= beforeSteps) return (STEP_QUEUE_TURN_ONLY, confirmGeneration, denyGeneration, walker); return ((int)walker.StepInfos[beforeSteps].Sequence, confirmGeneration, denyGeneration, walker); }). Overload candidates: the source does not establish which candidate is selected.
  • ClassicUO.Game.Managers.YokoInjectionManager.StopFollowing: _manager.StopFollowing().

Internal implementation code; this is not a standalone script.

private (int Result, int ConfirmGeneration, int DenyGeneration, WalkerManager Walker) QueueStep(int direction, bool running, bool forcePacket) => Invoke(() =>

        {

            PlayerMobile player = _world.Player;

            if (player == null || !_world.InGame || !NetClient.Socket.IsConnected || direction < 0 || direction > 7)

                return (STEP_QUEUE_GENERAL_ERROR, 0, 0, (WalkerManager)null);



            _manager.StopFollowing();



            WalkerManager walker = player.Walker;

            if (walker.StepsCount >= Constants.MAX_STEP_COUNT)

                return (STEP_QUEUE_OVERFLOW, 0, 0, walker);

            if (walker.WalkingFailed || walker.LastStepRequestTime > Time.Ticks

                || Client.UO.Version >= ClientVersion.CV_60142 && player.IsParalyzed)

                return (STEP_QUEUE_GENERAL_ERROR, 0, 0, walker);



            int beforeSteps = walker.StepsCount;

            byte requestSequence = walker.WalkSequence;

            int confirmGeneration = walker.GetConfirmGeneration(requestSequence);

            int denyGeneration = walker.GetDenyGeneration(requestSequence);



            if (!player.Walk((Direction)direction, running, forcePacket))

                return (STEP_QUEUE_CLIENT_BLOCKED, confirmGeneration, denyGeneration, walker);



            if (walker.StepsCount <= beforeSteps)

                return (STEP_QUEUE_TURN_ONLY, confirmGeneration, denyGeneration, walker);



            return ((int)walker.StepInfos[beforeSteps].Sequence, confirmGeneration, denyGeneration, walker);

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RDblClick

Performs the displayed calls and state updates.

Parameters: x, y

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1375.

public void RDblClick(int x, int y)

Result: void.

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public void RDblClick(int x, int y) => Invoke(() =>

        {

            WarpMouse(x, y);

            MouseButton(0x0008, 0x0010);

            MouseButton(0x0008, 0x0010);

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetGumpValue

Performs the displayed calls and state updates.

Parameters: gumpId, identifier, key, state

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2944.

public void SetGumpValue(int gumpId, string identifier, int key, string state)

Result: void.

Calls: TrySetGumpValue, Error.

Conditions: TrySetGumpValue(gumpId, identifier, key, state) == 0.

Calls:

Internal implementation code; this is not a standalone script.

public void SetGumpValue(int gumpId, string identifier, int key, string state)

        {

            if (TrySetGumpValue(gumpId, identifier, key, state) == 0)

                Error($"UO.SetGump: no matching {identifier} control in gump {gumpId}");

        }

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetSkillLockState

Performs the displayed calls and state updates.

Parameters: name, state

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2102.

public void SetSkillLockState(string name, int state)

Result: void.

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public void SetSkillLockState(string name, int state) => Invoke(() =>

        {

            Skill skill = FindSkillUnsafe(name);

            if (skill == null || state < 0 || state > 2) return;

            GameActions.ChangeSkillLockStatus((ushort)skill.Index, (byte)state);

            skill.Lock = (Lock)state;

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Stamina

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:153.

public int Stamina

Result: int.

Result: Invoke(() => CurrentPlayer?.Stamina ?? 0).

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public int Stamina => Invoke(() => CurrentPlayer?.Stamina ?? 0);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.TargetLast

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:782.

public int TargetLast()

Result: int.

Calls: Invoke.

Calls:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { TargetManager target = _world.TargetManager; LastTargetInfo last = target.LastTargetInfo; if (!target.IsTargeting) return 0; if (last.IsEntity) { target.Target(last.Serial); return 1; } if (last.IsStatic || last.IsLand) { target.Target(last.Graphic, last.X, last.Y, last.Z); return 1; } return 0; }). Overload candidates: the source does not establish which candidate is selected.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { TargetManager target = _world.TargetManager; LastTargetInfo last = target.LastTargetInfo; if (!target.IsTargeting) return 0; if (last.IsEntity) { target.Target(last.Serial); return 1; } if (last.IsStatic || last.IsLand) { target.Target(last.Graphic, last.X, last.Y, last.Z); return 1; } return 0; }). Overload candidates: the source does not establish which candidate is selected.

Internal implementation code; this is not a standalone script.

public int TargetLast() => Invoke(() =>

        {

            TargetManager target = _world.TargetManager;

            LastTargetInfo last = target.LastTargetInfo;

            if (!target.IsTargeting)

                return 0;



            if (last.IsEntity)

            {

                target.Target(last.Serial);

                return 1;

            }



            if (last.IsStatic || last.IsLand)

            {

                target.Target(last.Graphic, last.X, last.Y, last.Z);

                return 1;

            }



            return 0;

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.UnequipExpected

Checks the conditions below and returns the displayed result.

Parameters: layer, expectedSerial

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2023.

private int UnequipExpected(int layer, int? expectedSerial)

Result: int.

Result: moved ? 1 : 0.

Calls: Invoke, Wait.

Conditions: moved && State.GrabDelay > 0.

Calls:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { if (!_world.InGame || !NetClient.Socket.IsConnected || !ReferenceEquals(Client.UO?.World, _world)) return false; if (expectedSerial.HasValue) { Item expected = _world.Items.Get((uint)expectedSerial.Value); if (expected == null || expected.IsDestroyed || expected.Container != _world.Player.Serial) return false; layer = (int)expected.Layer; } if (layer <= (int)Layer.Invalid || layer > (int)Layer.Bank) return false; Item item = _world.Player.FindItemByLayer((Layer)layer); Item backpack = _world.Player.FindItemByLayer(Layer.Backpack); if (item == null || item.IsDestroyed || backpack == null || backpack.IsDestroyed || expectedSerial.HasValue && item.Serial != (uint)expectedSerial.Value) return false; if (!TryMoveItemRequest((int)item.Serial, 0, (int)backpack.Serial, -1, -1, 0)) return false; if (layer == (int)Layer.OneHanded) _lastRightHand = (int)item.Serial; if (layer == (int)Layer.TwoHanded) _lastLeftHand = (int)item.Serial; return true; }). Overload candidates: the source does not establish which candidate is selected.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { if (!_world.InGame || !NetClient.Socket.IsConnected || !ReferenceEquals(Client.UO?.World, _world)) return false; if (expectedSerial.HasValue) { Item expected = _world.Items.Get((uint)expectedSerial.Value); if (expected == null || expected.IsDestroyed || expected.Container != _world.Player.Serial) return false; layer = (int)expected.Layer; } if (layer <= (int)Layer.Invalid || layer > (int)Layer.Bank) return false; Item item = _world.Player.FindItemByLayer((Layer)layer); Item backpack = _world.Player.FindItemByLayer(Layer.Backpack); if (item == null || item.IsDestroyed || backpack == null || backpack.IsDestroyed || expectedSerial.HasValue && item.Serial != (uint)expectedSerial.Value) return false; if (!TryMoveItemRequest((int)item.Serial, 0, (int)backpack.Serial, -1, -1, 0)) return false; if (layer == (int)Layer.OneHanded) _lastRightHand = (int)item.Serial; if (layer == (int)Layer.TwoHanded) _lastLeftHand = (int)item.Serial; return true; }). Overload candidates: the source does not establish which candidate is selected.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.TryMoveItemRequest: TryMoveItemRequest((int)item.Serial, 0, (int)backpack.Serial, -1, -1, 0).
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Wait: Wait(State.GrabDelay).

Internal implementation code; this is not a standalone script.

private int UnequipExpected(int layer, int? expectedSerial)

        {

            bool moved = Invoke(() =>

            {

                if (!_world.InGame || !NetClient.Socket.IsConnected || !ReferenceEquals(Client.UO?.World, _world)) return false;

                if (expectedSerial.HasValue)

                {

                    Item expected = _world.Items.Get((uint)expectedSerial.Value);

                    if (expected == null || expected.IsDestroyed || expected.Container != _world.Player.Serial) return false;

                    layer = (int)expected.Layer;

                }

                if (layer <= (int)Layer.Invalid || layer > (int)Layer.Bank) return false;

                Item item = _world.Player.FindItemByLayer((Layer)layer);

                Item backpack = _world.Player.FindItemByLayer(Layer.Backpack);

                if (item == null || item.IsDestroyed || backpack == null || backpack.IsDestroyed

                    || expectedSerial.HasValue && item.Serial != (uint)expectedSerial.Value) return false;

                if (!TryMoveItemRequest((int)item.Serial, 0, (int)backpack.Serial, -1, -1, 0)) return false;

                if (layer == (int)Layer.OneHanded) _lastRightHand = (int)item.Serial;

                if (layer == (int)Layer.TwoHanded) _lastLeftHand = (int)item.Serial;

                return true;

            });

            if (moved && State.GrabDelay > 0) Wait(State.GrabDelay);

            return moved ? 1 : 0;

        }

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.WarMode

Performs the displayed calls and state updates.

Parameters: mode

Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2056.

public void WarMode(int mode)

Result: void.

Calls: Invoke.

Calls:

Internal implementation code; this is not a standalone script.

public void WarMode(int mode) => Invoke(() =>

        {

            if (_world.Player != null && _world.Player.InWarMode != (mode != 0))

            {

                GameActions.ToggleWarMode(_world.Player);

            }

        });

ClassicUO.Game.Managers.YokoInjectionManager.StopScript

Performs the displayed calls and state updates.

Parameters: index

Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:2869.

internal void StopScript(int index)

Result: void.

Calls: ElementAt, RunningScripts, script.TryStop.

Conditions: script != null.

Calls:

Internal implementation code; this is not a standalone script.

internal void StopScript(int index)
        {
            YokoRunningScript script = ElementAt(RunningScripts(), index);
            if (script != null)
            {
                script.TryStop();
            }
        }

ClassicUO.Game.SerialHelper.IsItem

Returns the value of the expression below.

Parameters: serial

Source: Project_Full/src/ClassicUO.Client/Game/SerialHelper.cs:22.

public static bool IsItem(uint serial)

Result: bool.

Result: serial >= 0x40000000 && serial < 0x80000000.

Internal implementation code; this is not a standalone script.

[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static bool IsItem(uint serial)
        {
            return serial >= 0x40000000 && serial < 0x80000000;
        }

ClassicUO.Game.UI.Gumps.WorldMapGump.SetYokoMapFigure

Checks the conditions below and returns the displayed result.

Parameters: figureId, kind, coord, x1, y1, x2, y2, brushColor, brushStyle, color, worldNum, text

Source: Project_Full/src/ClassicUO.Client/Game/UI/Gumps/WorldMapGump.cs:72.

internal static int SetYokoMapFigure(int figureId, int kind, int coord, int x1, int y1, int x2, int y2, int brushColor, int brushStyle, int color, int worldNum, string text)

Result: int.

Result: 0; 1.

Conditions: figureId <= 0 || kind < 0 || kind > 4 || coord < 0 || coord > 1.

Internal implementation code; this is not a standalone script.

internal static int SetYokoMapFigure(int figureId, int kind, int coord, int x1, int y1, int x2, int y2, int brushColor, int brushStyle, int color, int worldNum, string text)

        {

            if (figureId <= 0 || kind < 0 || kind > 4 || coord < 0 || coord > 1)

                return 0;



            _yokoMapFigures[figureId] = new YokoMapFigure

            {

                Id = figureId,

                Kind = kind,

                Coord = coord,

                X1 = x1,

                Y1 = y1,

                X2 = x2,

                Y2 = y2,

                BrushColor = brushColor,

                BrushStyle = brushStyle,

                Color = color,

                WorldNum = worldNum,

                Text = text ?? string.Empty

            };

            return 1;

        }

ClassicUO.Game.World.RemoveItemFromContainer

Performs the displayed calls and state updates.

Parameters: serial

Source: Project_Full/src/ClassicUO.Client/Game/World.cs:594.

public void RemoveItemFromContainer(uint serial)

Result: void.

Calls: Items.Get, RemoveItemFromContainer.

Conditions: it != null.

Calls:

Internal implementation code; this is not a standalone script.

public void RemoveItemFromContainer(uint serial)

        {

            Item it = Items.Get(serial);



            if (it != null)

            {

                RemoveItemFromContainer(it);

            }

        }

InjectionScript.Runtime.InjectionApiUO.CanChangeName

Returns the value of the expression below.

Parameters: id

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3783.

public int CanChangeName(InjectionValue id)

Result: int.

Result: bridge.CanChangeName(GetObject(id)).

Calls: bridge.CanChangeName, GetObject.

Calls:

Internal implementation code; this is not a standalone script.

public int CanChangeName(InjectionValue id) => bridge.CanChangeName(GetObject(id));

InjectionScript.Runtime.InjectionApiUO.CharPrint

Performs the displayed calls and state updates.

Parameters: color, msg

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5338.

public void CharPrint(string color, string msg)

Result: void.

Calls: CharPrint, NumberConversions.ToInt.

Calls:

Internal implementation code; this is not a standalone script.

public void CharPrint(string color, string msg) => CharPrint(bridge.Self, NumberConversions.ToInt(color), msg);

InjectionScript.Runtime.InjectionApiUO.CircleTrans

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3784.

public int CircleTrans()

Result: int.

Result: bridge.CircleTrans().

Calls: bridge.CircleTrans.

Calls:

Internal implementation code; this is not a standalone script.

public int CircleTrans() => bridge.CircleTrans();

InjectionScript.Runtime.InjectionApiUO.ConvertContainer

Returns the value of the expression below.

Parameters: containerId

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6345.

private int ConvertContainer(InjectionValue containerId)

Result: int.

Result: ConvertContainer(containerId.String); containerId.Integer == 0 ? 1 : containerId.Integer.

Calls: ConvertContainer.

Calls:

Internal implementation code; this is not a standalone script.

private int ConvertContainer(InjectionValue containerId)

        {

            switch (containerId.Kind)

            {

                case InjectionValueKind.String:

                    return ConvertContainer(containerId.String);

                case InjectionValueKind.Integer:

                    // The public Ground() token is zero; bridge searches use 1.

                    // Keep the compact API's -1 inventory/default selector.

                    return containerId.Integer == 0 ? 1 : containerId.Integer;

                default:

                    throw new NativeSubrutineException(

                        $"A container must be an object name or serial ID, not {containerId.Kind}.");

            }

        }

InjectionScript.Runtime.InjectionApiUO.CountGround

Returns the value of the expression below.

Parameters: type

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5216.

public int CountGround(InjectionValue type)

Result: int.

Result: CountGround(type, new InjectionValue(-1)).

Calls: CountGround.

Calls:

Internal implementation code; this is not a standalone script.

public int CountGround(InjectionValue type)

            => CountGround(type, new InjectionValue(-1));

InjectionScript.Runtime.InjectionApiUO.CountGround

Returns the value of the expression below.

Parameters: type, color

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5218.

public int CountGround(InjectionValue type, InjectionValue color)

Result: int.

Result: bridge.Count(ResolveType(type), NumberConversions.ToInt(color), 1).

Calls: bridge.Count, ResolveType, NumberConversions.ToInt.

Calls:

Internal implementation code; this is not a standalone script.

public int CountGround(InjectionValue type, InjectionValue color)

            => bridge.Count(ResolveType(type), NumberConversions.ToInt(color), 1);

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::ArrayArg

Checks the conditions below and returns the displayed result.

Parameters: index

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1145.

int[] ArrayArg(int index)

Result: int[].

Result: Array.Empty<int>().

Calls: Array.Empty<int>, arguments[index].Array.Select(NumberConversions.ToInt).ToArray, arguments[index].Array.Select, Arg.

Conditions: index >= arguments.Length.

Calls:

Internal implementation code; this is not a standalone script.

int[] ArrayArg(int index)

            {

                if (index >= arguments.Length) return Array.Empty<int>();

                return arguments[index].Kind == InjectionValueKind.Array

                    ? arguments[index].Array.Select(NumberConversions.ToInt).ToArray()

                    : new[] { Arg(index) };

            }

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1231.

Result: InjectionValue.Unit.

Calls:

Internal implementation code; this is not a standalone script.

case "addtojournal":

                case "addtosystemjournal":

                case "clientprint":

                    SystemMessage(Text(0)); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1243.

Result: InjectionValue.Unit.

Calls:

Internal implementation code; this is not a standalone script.

case "alarm":

                    SystemMessage(arguments.Length > 0 ? Text(0) : "Alarm"); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1780.

Result: InjectionValue.Unit.

Calls:

Internal implementation code; this is not a standalone script.

case "bookcleartext":

                    state.BookPages.Clear();

                    bridge.BookClearText();

                    return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2028.

Result: InjectionValue.Unit.

Calls:

Internal implementation code; this is not a standalone script.

case "clearsystemjournal": bridge.DeleteSystemJournal(); SelectJournalEntry(null); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1613.

Result: InjectionValue.Unit.

Calls:

Internal implementation code; this is not a standalone script.

case "clickonobject": Click(Arg(0)); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1299.

Result: new InjectionValue(bridge.IsOnline()).

Calls:

Internal implementation code; this is not a standalone script.

case "connected": return new InjectionValue(bridge.IsOnline());

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1500.

Result: new InjectionValue(bridge.EnergyResistance).

Calls:

Internal implementation code; this is not a standalone script.

case "energyresist": return new InjectionValue(bridge.EnergyResistance);

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1484.

Result: new InjectionValue(bridge.FindAtCoord(Arg(0), Arg(1))).

Calls:

Internal implementation code; this is not a standalone script.

case "findatcoord": return new InjectionValue(bridge.FindAtCoord(Arg(0), Arg(1)));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1542.

Result: new InjectionValue(foundedTextId >= 0 ? foundedTextId : 0).

Internal implementation code; this is not a standalone script.

case "foundedparamid":

                    return new InjectionValue(foundedTextId >= 0 ? foundedTextId : 0);

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1317.

Result: new InjectionValue(bridge.GetAutoBuyDelay()).

Calls:

Internal implementation code; this is not a standalone script.

case "getautobuydelay":

                    return new InjectionValue(bridge.GetAutoBuyDelay());

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1606.

Result: GumpLinesResult(bridge.GetGumpButtonsDescription(Arg(0))).

Calls:

Internal implementation code; this is not a standalone script.

case "getgumpbuttonsdescription": return GumpLinesResult(bridge.GetGumpButtonsDescription(Arg(0)));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1604.

Result: GumpLinesResult(bridge.GetGumpShortLines(Arg(0))).

Calls:

Internal implementation code; this is not a standalone script.

case "getgumpshortlines": return GumpLinesResult(bridge.GetGumpShortLines(Arg(0)));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1603.

Result: StringArray(bridge.GetGumpTextLines(Arg(0))).

Calls:

Internal implementation code; this is not a standalone script.

case "getgumptextlines": return StringArray(bridge.GetGumpTextLines(Arg(0)));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1854.

Result: FindPortableTiles(Arg(0), Arg(1), Arg(2), Arg(3), Arg(4), ArrayArg(5), false).

Calls:

Internal implementation code; this is not a standalone script.

case "getlandtilesarrayex":

                    return FindPortableTiles(Arg(0), Arg(1), Arg(2), Arg(3), Arg(4), ArrayArg(5), false);

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1573.

Result: new InjectionValue(bridge.GetNotoriety(Arg(0))).

Calls:

Internal implementation code; this is not a standalone script.

case "getnotoriety": return new InjectionValue(bridge.GetNotoriety(Arg(0)));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1437.

Result: new InjectionValue(bridge.GetPrice(Arg(0))).

Calls:

Internal implementation code; this is not a standalone script.

case "getprice":

                    return new InjectionValue(bridge.GetPrice(Arg(0)));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1580.

Result: new InjectionValue(bridge.GetSkillLockState(Text(0))).

Calls:

Internal implementation code; this is not a standalone script.

case "getskilllockstate": return new InjectionValue(bridge.GetSkillLockState(Text(0)));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1856.

new []

Result: [].

Calls:

Internal implementation code; this is not a standalone script.

case "getstatictilesarray":

                    return FindPortableTiles(Arg(0), Arg(1), Arg(2), Arg(3), Arg(4), new[] { Arg(5) }, true);

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1491.

Result: new InjectionValue(bridge.Intelligence).

Calls:

Internal implementation code; this is not a standalone script.

case "int": return new InjectionValue(bridge.Intelligence);

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1362.

Result: new InjectionValue(bridge.Hidden(Arg(0, bridge.Self))).

Calls:

Internal implementation code; this is not a standalone script.

case "ishidden": return new InjectionValue(bridge.Hidden(Arg(0, bridge.Self)));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1329.

Result: new InjectionValue(state.LosOptions).

Conditions: arguments.Length > 0.

Calls:

Internal implementation code; this is not a standalone script.

case "losoptions": if (arguments.Length > 0) state.LosOptions = Arg(0); return new InjectionValue(state.LosOptions);

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1530.

Result: new InjectionValue(bridge.GetLastObject()).

Calls:

Internal implementation code; this is not a standalone script.

case "lastobject": return new InjectionValue(bridge.GetLastObject());

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2038.

Result: new InjectionValue(GetFoundedTextIndex()).

Calls:

Internal implementation code; this is not a standalone script.

case "lineindex": return new InjectionValue(GetFoundedTextIndex());

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1559.

Result: new InjectionValue(bridge.GetMaxHP(bridge.Self)).

Calls:

Internal implementation code; this is not a standalone script.

case "maxlife": return new InjectionValue(bridge.GetMaxHP(bridge.Self));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1529.

Result: InjectionValue.Unit.

Calls:

Internal implementation code; this is not a standalone script.

case "pauseresumescript": bridge.PauseResumeScript(Arg(0)); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1502.

Result: new InjectionValue(bridge.Followers).

Calls:

Internal implementation code; this is not a standalone script.

case "petscurrent": return new InjectionValue(bridge.Followers);

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1325.

Result: InjectionValue.Unit.

Calls:

Internal implementation code; this is not a standalone script.

case "setautoselldelay":

                    state.AutoSellDelay = Math.Max(0, Arg(0));

                    bridge.SetAutoSellDelay(state.AutoSellDelay);

                    return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1280.

Result: InjectionValue.Unit.

Conditions: arguments.Length > 1.

Calls:

Internal implementation code; this is not a standalone script.

case "setjournalline":

                    if (arguments.Length > 1) bridge.SetJournalLine(Arg(0), Text(1));

                    else bridge.SetJournalLine(Arg(0));

                    return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1958.

Result: InjectionValue.Unit.

Calls:

Internal implementation code; this is not a standalone script.

case "stopboat": bridge.StopBoat(); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1677.

Result: InjectionValue.Unit.

Calls:

Internal implementation code; this is not a standalone script.

case "useotherpaperdollscroll": bridge.UseObject(Arg(0)); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2048.

Result: WaitJournalLine(arguments, true).

Calls:

Internal implementation code; this is not a standalone script.

case "waitjournallinesystem": return WaitJournalLine(arguments, true);

InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias

Checks the conditions below and returns the displayed result.

Parameters: name, arguments

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2814.

private InjectionValue ExecuteLegacyManualAlias(string name, params InjectionValue[] arguments)

Result: InjectionValue.

Result: new InjectionValue(MoveItem(arguments[0], arguments.Length > 1 ? arguments[1] : InjectionValue.Zero, new InjectionValue("ground"), new InjectionValue(GetX()), new InjectionValue(GetY()), new InjectionValue(GetZ()))); InjectionValue.False; new InjectionValue(MoveItem(arguments[0], arguments.Length > 1 ? arguments[1] : InjectionValue.Zero, arguments.Length > 2 ? arguments[2] : new InjectionValue("ground"))); ExecuteEmptyContainer(arguments); InjectionValue.Unit.

Calls: (name ?? string.Empty).Trim, normalizedName.Equals, SerializeRecordedLegacyAction, name.ToLowerInvariant, LegacyList(name).Add, LegacyList, string.Join, arguments.Select.

Conditions: `recordNextLegacyAction && !replayingLegacyAction

            && !normalizedName.Equals("SetRec", StringComparison.OrdinalIgnoreCase)

            && !normalizedName.Equals("UseRec", StringComparison.OrdinalIgnoreCase)`; `arguments.Length == 0`; `arguments.Length >= 2`; `arguments.Length > 0`.

Calls:

Internal implementation code; this is not a standalone script.

private InjectionValue ExecuteLegacyManualAlias(string name, params InjectionValue[] arguments)
        {
            string normalizedName = (name ?? string.Empty).Trim();
            if (recordNextLegacyAction && !replayingLegacyAction
                && !normalizedName.Equals("SetRec", StringComparison.OrdinalIgnoreCase)
                && !normalizedName.Equals("UseRec", StringComparison.OrdinalIgnoreCase))
            {
                state.RecordedAction = SerializeRecordedLegacyAction(normalizedName, arguments);
                recordNextLegacyAction = false;
            }
// …
                if (index >= arguments.Length) return fallback;
                if (arguments[index].Kind == InjectionValueKind.String && TryGetObject(arguments[index], out int serial)) return serial;
                return NumberConversions.ToInt(arguments[index]);
// …
                if (!state.LegacyLists.TryGetValue(key, out List<string> list))
// …
                return list;
// …
                    if (arguments.Length == 0) LegacyList("AddFindList").Clear();
// …
                    if (arguments.Length >= 2) bridge.AddMenuHook(arguments[0].ToString(), arguments[1].ToString(), true);
// …
                    if (arguments.Length == 0)
// …
                    if (arguments.Length > 0)
                        return new InjectionValue(MoveItem(arguments[0], arguments.Length > 1 ? arguments[1] : InjectionValue.Zero, new InjectionValue("ground"), new InjectionValue(GetX()), new InjectionValue(GetY()), new InjectionValue(GetZ())));
                    return InjectionValue.False;
// …
                    if (arguments.Length > 0)
                        return new InjectionValue(MoveItem(arguments[0], arguments.Length > 1 ? arguments[1] : InjectionValue.Zero, arguments.Length > 2 ? arguments[2] : new InjectionValue("ground")));
                    return InjectionValue.False;
// …
                    if (arguments.Length >= 2) bridge.AddMenuHook(Text(0), Text(1), true);
// …
                    if (arguments.Length == 0 && bridge.RequestInteractiveObjectInfoTarget() != 0)
// …
                    if (arguments.Length > 0)
// …
                    if (arguments.Length == 0 && bridge.RequestInteractiveTileInfoTarget() != 0)
// …
                    if (arguments.Length > 1) bridge.WaitTargetObject(Arg(1));
// …
                    if (arguments.Length > 1) state.Objects.Set(Text(0), Arg(1));
                    else if (arguments.Length > 0) state.Objects.Set(Text(0), bridge.GetLastObject());
// …
                case "forget": if (arguments.Length > 0) state.Objects.Remove(Text(0)); break;
// …
                case "emptycontainer": return ExecuteEmptyContainer(arguments);
// …
                    if (mobile != 0) state.Objects.Set(arguments.Length > 0 ? Text(0) : "findman", mobile);
// …
                    if (arguments.Length == 0)
// …
                    return InjectionValue.Unit;
// …
                    if (arguments.Length > 0) UseSkillAtTarget(new InjectionValue("Poisoning"), arguments[0]);
// …
                    if (createdSerial == 0)
// …
                    if (arguments.Length == 0) bridge.MassMove(-1, 0, 0, -1, -1, -1, 0);
// …

The source file contains the complete code; exact excerpts follow.

InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2889.

Calls:

Internal implementation code; this is not a standalone script.

case "dismount": bridge.Dismount(); break;

InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2952.

Result: ExecuteEmptyContainer(arguments).

Calls:

Internal implementation code; this is not a standalone script.

case "emptycontainer": return ExecuteEmptyContainer(arguments);

InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias

This branch handles only the specified command name.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2953.

Calls:

Internal implementation code; this is not a standalone script.

case "filterspeech": state.SpeechFilter = arguments.Length == 0 || Arg(0) != 0 ? 1 : 0; bridge.SetSpeechFilter(state.SpeechFilter); break;

InjectionScript.Runtime.InjectionApiUO.ExpandMobileFilters

Performs the displayed calls and state updates.

Parameters: filters

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3716.

private static IEnumerable<string> ExpandMobileFilters(IEnumerable<string> filters)

Result: IEnumerable<string>.

Calls: Array.Empty<string>, (filter ?? string.Empty).Split.

Conditions: values.Length == 0.

Internal implementation code; this is not a standalone script.

private static IEnumerable<string> ExpandMobileFilters(IEnumerable<string> filters)

        {

            foreach (string filter in filters ?? Array.Empty<string>())

            {

                string[] values = (filter ?? string.Empty).Split(

                    new[] { ' ', '\t', ',', ';', '|', '+' },

                    StringSplitOptions.RemoveEmptyEntries);

                if (values.Length == 0)

                    yield return "all";

                else

                    foreach (string value in values)

                        yield return value;

            }

        }

InjectionScript.Runtime.InjectionApiUO.Flying

Returns the value of the expression below.

Parameters: id

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3778.

public int Flying(InjectionValue id)

Result: int.

Result: bridge.Flying(GetObject(id)).

Calls: bridge.Flying, GetObject.

Calls:

Internal implementation code; this is not a standalone script.

public int Flying(InjectionValue id) => bridge.Flying(GetObject(id));

InjectionScript.Runtime.InjectionApiUO.FunRunning

Returns the value of the expression below.

Parameters: subrutineName

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5914.

public int FunRunning(string subrutineName)

Result: int.

Result: bridge.FunRunning(subrutineName) ? 1 : 0.

Calls: bridge.FunRunning.

Calls:

Internal implementation code; this is not a standalone script.

public int FunRunning(string subrutineName) => bridge.FunRunning(subrutineName) ? 1 : 0;

InjectionScript.Runtime.InjectionApiUO.GetMaxHP

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3595.

public int GetMaxHP()

Result: int.

Result: GetMaxHP("self").

Calls: GetMaxHP.

Calls:

Internal implementation code; this is not a standalone script.

public int GetMaxHP() => GetMaxHP("self");

InjectionScript.Runtime.InjectionApiUO.GetTileLayer

Returns the value of the expression below.

Parameters: group, tileId

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6260.

public int GetTileLayer(InjectionValue group, InjectionValue tileId)

Result: int.

Result: tileGroup == 0 || properties.Length < 2 ? 0 : properties[1].

Calls: NumberConversions.ToInt, bridge.GetTileDataProperties, Array.Empty<int>.

Calls:

Internal implementation code; this is not a standalone script.

public int GetTileLayer(InjectionValue group, InjectionValue tileId)

        {

            int tileGroup = NumberConversions.ToInt(group);

            int[] properties = bridge.GetTileDataProperties(tileGroup, NumberConversions.ToInt(tileId)) ?? Array.Empty<int>();

            return tileGroup == 0 || properties.Length < 2 ? 0 : properties[1];

        }

InjectionScript.Runtime.InjectionApiUO.GetTileXYM

Returns the value of the expression below.

Parameters: x, y, map, tileStart, tileEnd, uoPath

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6179.

public InjectionValue GetTileXYM(InjectionValue x, InjectionValue y, InjectionValue map, InjectionValue tileStart, InjectionValue tileEnd, InjectionValue uoPath)

Result: InjectionValue.

Result: ToArray(bridge.GetTileXYM(NumberConversions.ToInt(x), NumberConversions.ToInt(y), NumberConversions.ToInt(map), NumberConversions.ToInt(tileStart), NumberConversions.ToInt(tileEnd), uoPath.ToString())).

Calls: ToArray, bridge.GetTileXYM, NumberConversions.ToInt, uoPath.ToString.

Calls:

Internal implementation code; this is not a standalone script.

public InjectionValue GetTileXYM(InjectionValue x, InjectionValue y, InjectionValue map, InjectionValue tileStart, InjectionValue tileEnd, InjectionValue uoPath)

            => ToArray(bridge.GetTileXYM(NumberConversions.ToInt(x), NumberConversions.ToInt(y), NumberConversions.ToInt(map), NumberConversions.ToInt(tileStart), NumberConversions.ToInt(tileEnd), uoPath.ToString()));

InjectionScript.Runtime.InjectionApiUO.GetY

Returns the value of the expression below.

Parameters: id

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3565.

public int GetY(int id)

Result: int.

Result: bridge.GetY(id).

Calls: bridge.GetY.

Calls:

Internal implementation code; this is not a standalone script.

public int GetY(int id) => bridge.GetY(id);

InjectionScript.Runtime.InjectionApiUO.InfoGumps

Performs the displayed calls and state updates.

Parameters: gump

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3213.

public void InfoGumps(InjectionValue gump)

Result: void.

Calls: InfoGump.

Calls:

Internal implementation code; this is not a standalone script.

public void InfoGumps(InjectionValue gump)

        {

            InfoGump(gump);

        }

InjectionScript.Runtime.InjectionApiUO.IsOnline

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3743.

public int IsOnline()

Result: int.

Result: bridge.IsOnline().

Calls: bridge.IsOnline.

Calls:

Internal implementation code; this is not a standalone script.

public int IsOnline() => bridge.IsOnline();

InjectionScript.Runtime.InjectionApiUO.JournalTimestampToAge

Checks the conditions below and returns the displayed result.

Parameters: timestamp, now

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5503.

private static int JournalTimestampToAge(int timestamp, int now)

Result: int.

Result: now; 0; now - timestamp.

Conditions: timestamp <= 0; timestamp >= now.

Internal implementation code; this is not a standalone script.

private static int JournalTimestampToAge(int timestamp, int now)

        {

            if (timestamp <= 0)

                return now;

            if (timestamp >= now)

                return 0;

            return now - timestamp;

        }

InjectionScript.Runtime.InjectionApiUO.KeyPress

Performs the displayed calls and state updates.

Parameters: key, count

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5277.

public void KeyPress(int key, int count)

Result: void.

Calls: KeyPress.

Calls:

Internal implementation code; this is not a standalone script.

public void KeyPress(int key, int count) => KeyPress(key, count, 105);

InjectionScript.Runtime.InjectionApiUO.LastTile

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4321.

public string LastTile()

Result: string.

Result: $"{tileInfo[0]} {tileInfo[1]} {tileInfo[2]} {tileInfo[3]}".

Calls: NormalizeLastTile, bridge.LastTile.

Calls:

Internal implementation code; this is not a standalone script.

public string LastTile()

        {

            int[] tileInfo = NormalizeLastTile(bridge.LastTile());



            return $"{tileInfo[0]} {tileInfo[1]} {tileInfo[2]} {tileInfo[3]}";

        }

InjectionScript.Runtime.InjectionApiUO.MoveOff

Performs the displayed calls and state updates.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3528.

public void MoveOff()

Result: void.

Calls: bridge.EnableMove.

Calls:

Internal implementation code; this is not a standalone script.

public void MoveOff() => bridge.EnableMove(false);

InjectionScript.Runtime.InjectionApiUO.ObjAtLayer

Checks the conditions below and returns the displayed result.

Parameters: layer

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5741.

public InjectionValue ObjAtLayer(string layer)

Result: InjectionValue.

Result: InjectionValue.Zero; new InjectionValue("0x" + id.ToString("X8")).

Calls: bridge.ObjAtLayer, ConvertLayer, id.ToString.

Conditions: id == 0.

Calls:

Internal implementation code; this is not a standalone script.

public InjectionValue ObjAtLayer(string layer)

        {

            var id = bridge.ObjAtLayer(ConvertLayer(layer));

            if (id == 0)

                return InjectionValue.Zero;



            return new InjectionValue("0x" + id.ToString("X8"));

        }

InjectionScript.Runtime.InjectionApiUO.ObjectChecked

Performs the displayed calls and state updates.

Parameters: name, actionOnObject

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3820.

private void ObjectChecked(InjectionValue name, Action<int> actionOnObject)

Result: void.

Calls: TryGetObject, actionOnObject, SystemMessage.

Conditions: TryGetObject(name, out int id).

Calls:

Internal implementation code; this is not a standalone script.

private void ObjectChecked(InjectionValue name, Action<int> actionOnObject)

        {

            if (TryGetObject(name, out int id))

                actionOnObject(id);

            else

                SystemMessage($"invalid object: {name}");

        }

InjectionScript.Runtime.InjectionApiUO.RClick

Performs the displayed calls and state updates.

Parameters: x, y

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5240.

public void RClick(int x, int y)

Result: void.

Calls: bridge.RClick.

Calls:

Internal implementation code; this is not a standalone script.

public void RClick(int x, int y) => bridge.RClick(x, y);

InjectionScript.Runtime.InjectionApiUO.ReadEquipmentGroup

Checks the conditions below and returns the displayed result.

Parameters: value, allowEmpty

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.ClassMasks.cs:62.

private static HashSet<int> ReadEquipmentGroup(InjectionValue value, bool allowEmpty)

Result: HashSet<int>.

Result: result.

Calls: values.Select.

Conditions: !allowEmpty && result.Count == 0.

Internal implementation code; this is not a standalone script.

private static HashSet<int> ReadEquipmentGroup(InjectionValue value, bool allowEmpty)
        {
            InjectionValue[] values = value.Kind == InjectionValueKind.Array ? value.Array : new[] { value };
            var result = new HashSet<int>(values.Select(ReadEquipmentType));
            if (!allowEmpty && result.Count == 0)
                throw new StatementFailedException("ClassMask: a required equipment group cannot be empty.");
            return result;
        }

InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases::AddState

These functions register the API. They do not run again for every command call.

Parameters: getter, names

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1005.

void AddState(Func<int, int> getter, params string[] names)

Result: void.

Calls: AddInteger, metadata.NativeSubrutineExists, metadata.Add.

Conditions: !metadata.NativeSubrutineExists(name, 1).

Calls:

Internal implementation code; this is not a standalone script.

void AddState(Func<int, int> getter, params string[] names)

            {

                AddInteger(() => getter(bridge.Self), names);

                foreach (string shortName in names)

                {

                    string name = "UO." + shortName;

                    if (!metadata.NativeSubrutineExists(name, 1))

                        metadata.Add(new NativeSubrutineDefinition(name,

                            (Func<InjectionValue, int>)(value => getter(GetObject(value)))));

                }

            }

InjectionScript.Runtime.InjectionApiUO.ResolveTransferObject

Parses or resolves the argument using the rules shown in the code.

Parameters: value, allowGround

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4462.

private int ResolveTransferObject(InjectionValue value, bool allowGround = false)

Result: int.

Result: 0; bridge.Backpack; serial.

Calls: value.String.Equals, TryGetObject.

Conditions: `allowGround && value.Kind == InjectionValueKind.String

            && value.String.Equals("ground", StringComparison.OrdinalIgnoreCase)`; `value.Kind == InjectionValueKind.String

            && value.String.Equals("my", StringComparison.OrdinalIgnoreCase)`; `TryGetObject(value, out int serial) && serial >= 0`.

Calls:

Internal implementation code; this is not a standalone script.

private int ResolveTransferObject(InjectionValue value, bool allowGround = false)

        {

            if (allowGround && value.Kind == InjectionValueKind.String

                && value.String.Equals("ground", StringComparison.OrdinalIgnoreCase)) return 0;

            if (value.Kind == InjectionValueKind.String

                && value.String.Equals("my", StringComparison.OrdinalIgnoreCase)) return bridge.Backpack;

            if (TryGetObject(value, out int serial) && serial >= 0) return serial;

            throw new NativeSubrutineException("Unknown transfer object: " + value);

        }

InjectionScript.Runtime.InjectionApiUO.SelectClassCandidate

Checks the conditions below and returns the displayed result.

Parameters: mobiles, rules, nearest

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.ClassMasks.cs:139.

private int SelectClassCandidate(IEnumerable<int> mobiles, EquipmentClassRule[] rules, bool nearest)

Result: int.

Result: selected.

Calls: ReadWornTypes, rules[priority].Matches, bridge.GetDistance.

Conditions: rules != null; priority == rules.Length; priority < bestPriority || priority == bestPriority && nearest && (distance < bestDistance || distance == bestDistance && mobile < selected); !nearest && bestPriority == 0.

Calls:

Internal implementation code; this is not a standalone script.

private int SelectClassCandidate(IEnumerable<int> mobiles, EquipmentClassRule[] rules, bool nearest)
        {
            int selected = 0, bestPriority = int.MaxValue, bestDistance = int.MaxValue;
            foreach (int mobile in mobiles)
            {
                int priority = 0;
                if (rules != null)
                {
                    HashSet<int> worn = ReadWornTypes(mobile);
                    while (priority < rules.Length && !rules[priority].Matches(worn)) priority++;
                    if (priority == rules.Length) continue;
                }
                int distance = nearest ? bridge.GetDistance(mobile) : 0;
                if (priority < bestPriority || priority == bestPriority && nearest
                    && (distance < bestDistance || distance == bestDistance && mobile < selected))
                { selected = mobile; bestPriority = priority; bestDistance = distance; }
                // With stable enumeration order, the first highest-priority match wins.
                if (!nearest && bestPriority == 0) break;
            }
            return selected;
        }

InjectionScript.Runtime.InjectionApiUO.SendGumpSelect

Returns the value of the expression below.

Parameters: triggerId

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3183.

public int SendGumpSelect(string triggerId)

Result: int.

Result: SendGumpSelect(NumberConversions.ToInt(triggerId)).

Calls: SendGumpSelect, NumberConversions.ToInt.

Calls:

Internal implementation code; this is not a standalone script.

public int SendGumpSelect(string triggerId) => SendGumpSelect(NumberConversions.ToInt(triggerId));

InjectionScript.Runtime.InjectionApiUO.SetJournalLine

Performs the displayed calls and state updates.

Parameters: index, text

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5415.

public void SetJournalLine(int index, string text)

Result: void.

Calls: bridge.SetJournalLine.

Calls:

Internal implementation code; this is not a standalone script.

public void SetJournalLine(int index, string text) => bridge.SetJournalLine(index, text);

InjectionScript.Runtime.InjectionApiUO.TradeOpponent

Returns the value of the expression below.

Parameters: windowIndex

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3290.

public string TradeOpponent(InjectionValue windowIndex)

Result: string.

Result: NumberConversions.ToHex(bridge.TradeOpponent(NumberConversions.ToInt(windowIndex))).

Calls: NumberConversions.ToHex, bridge.TradeOpponent, NumberConversions.ToInt.

Calls:

Internal implementation code; this is not a standalone script.

public string TradeOpponent(InjectionValue windowIndex) => NumberConversions.ToHex(bridge.TradeOpponent(NumberConversions.ToInt(windowIndex)));

InjectionScript.Runtime.InjectionApiUO.UnsetArm

Performs the displayed calls and state updates.

Parameters: name

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5589.

public void UnsetArm(string name)

Result: void.

Calls: armSets.Remove, SystemMessage.

Calls:

Internal implementation code; this is not a standalone script.

public void UnsetArm(string name)

        {

            armSets.Remove(name);

            SystemMessage("Arm set removed.");

        }

InjectionScript.Runtime.InjectionApiUO.UseFromGround

Checks the conditions below and returns the displayed result.

Parameters: type, color

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4082.

public int UseFromGround(InjectionValue type, InjectionValue color)

Result: int.

Result: id.

Calls: bridge.FindType, ResolveType, NumberConversions.ToInt, UseObject, SystemMessage.

Conditions: id != 0.

Calls:

Internal implementation code; this is not a standalone script.

public int UseFromGround(InjectionValue type, InjectionValue color)

        {

            int id = bridge.FindType(ResolveType(type), NumberConversions.ToInt(color), 1, -1, false);

            if (id != 0)

                UseObject(id);

            else

                SystemMessage("No matching item found on ground.");

            return id;

        }

InjectionScript.Runtime.InjectionApiUO.UserStaticExists

Returns the value of the expression below.

Parameters: id

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6282.

public int UserStaticExists(InjectionValue id)

Result: int.

Result: state.UserStatics.ContainsKey(NumberConversions.ToInt(id)) ? 1 : 0.

Calls: state.UserStatics.ContainsKey, NumberConversions.ToInt.

Calls:

Internal implementation code; this is not a standalone script.

public int UserStaticExists(InjectionValue id)

            => state.UserStatics.ContainsKey(NumberConversions.ToInt(id)) ? 1 : 0;

InjectionScript.Runtime.InjectionApiUO.Waiting

Returns the value of the expression below.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3788.

public int Waiting()

Result: int.

Result: bridge.GetWaitTargetQueue().Length > 0 ? 1 : 0.

Calls: bridge.GetWaitTargetQueue.

Calls:

Internal implementation code; this is not a standalone script.

public int Waiting() => bridge.GetWaitTargetQueue().Length > 0 ? 1 : 0;

InjectionScript.Runtime.InjectionApiUO.RegisterCompactSearchApi [AttackNearest]

The call executes the stored handler delegate. The registration method creates this delegate while building the API.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4676.

values

Result: values.

Result: new InjectionValue(CompactAttackNearest(values)).

Calls: CompactAttackNearest.

Calls:

Internal implementation code; this is not a standalone script.

values => new InjectionValue(CompactAttackNearest(values))

InjectionScript.Runtime.InjectionApiUO.Register [Follow]

The call executes the stored handler delegate. The registration method creates this delegate while building the API.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:878.

values

Result: values.

Result: ``.

Calls:

Internal implementation code; this is not a standalone script.

values =>

                    {

                        FollowStopCondition[] conditions = count == 6

                            ? FollowStopCondition.Parse(values[5], coordinateGoal: true) : Array.Empty<FollowStopCondition>();

                        return new InjectionValue(bridge is IApiCoordinateFollowBridge follow

                            ? follow.FollowPoint(NumberConversions.ToInt(values[0]), NumberConversions.ToInt(values[1]),

                                NumberConversions.ToInt(values[2]), NumberConversions.ToInt(values[3]), ToBoolean(values[4]), conditions) : 0);

                    }

InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases [GetDirection]

The call executes the stored handler delegate. The registration method creates this delegate while building the API.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1056.

Result: bridge.GetDir(bridge.Self).

Calls:

Internal implementation code; this is not a standalone script.

() => bridge.GetDir(bridge.Self)

InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases [GetResistFire]

The call executes the stored handler delegate. The registration method creates this delegate while building the API.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1043.

Result: bridge.FireResistance.

Calls:

Internal implementation code; this is not a standalone script.

() => bridge.FireResistance

InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases [GetResistPoison]

The call executes the stored handler delegate. The registration method creates this delegate while building the API.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1045.

Result: bridge.PoisonResistance.

Calls:

Internal implementation code; this is not a standalone script.

() => bridge.PoisonResistance

InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases [IsFlying]

The call executes the stored handler delegate. The registration method creates this delegate while building the API.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1067.

serial

Result: serial.

Result: bridge.Flying(serial).

Calls: bridge.Flying.

Calls:

Internal implementation code; this is not a standalone script.

serial => bridge.Flying(serial)

InjectionScript.Runtime.InjectionApiUO.Register [Launch]

The call executes the stored handler delegate. The registration method creates this delegate while building the API.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:599.

values

Result: values.

Result: new InjectionValue(CompactLaunch(values)).

Calls: CompactLaunch.

Calls:

Internal implementation code; this is not a standalone script.

values => new InjectionValue(CompactLaunch(values))

InjectionScript.Runtime.InjectionApiUO.Register [UseType]

The call executes the stored handler delegate. The registration method creates this delegate while building the API.

Parameters: No parameters.

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:466.

values

Result: values.

Result: new InjectionValue(CompactUseType(values)).

Calls: CompactUseType.

Calls:

Internal implementation code; this is not a standalone script.

values => new InjectionValue(CompactUseType(values))

InjectionScript.Runtime.InjectionRuntime.CreateMessenger

Returns the value of the expression below.

Parameters: provider

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionRuntime.cs:36.

private InjectionObject CreateMessenger(string provider)

Result: InjectionObject.

Result: resource.

Calls: owner.Checkpoint, MessengerFactory, owner.Track.

Internal implementation code; this is not a standalone script.

private InjectionObject CreateMessenger(string provider)
        {
            var owner=NativeScriptResourceScope.Current??throw new StatementFailedException("Create messenger objects inside an active C# script execution.");owner.Checkpoint();
            var client=MessengerFactory!=null?MessengerFactory(provider,()=>owner.Cancellation,owner.Checkpoint):new Messaging.MessengerClient(provider,()=>owner.Cancellation,owner.Checkpoint);
            var resource=new MessengerObject(client,owner.Forget,file=>Path.GetFullPath(Path.Combine(paths.ScriptPath??string.Empty,file)));owner.Track(resource);return resource;
        }

InjectionScript.Runtime.InternalSubrutines.GetArrayLength

Returns the value of the expression below.

Parameters: arg

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/NativeArrays.cs:6.

public static InjectionValue GetArrayLength(InjectionValue arg)

Result: InjectionValue.

Result: arg.Kind==InjectionValueKind.Array?new InjectionValue(arg.Array.Length):InjectionValue.Zero.

Internal implementation code; this is not a standalone script.

public static InjectionValue GetArrayLength(InjectionValue arg) => arg.Kind==InjectionValueKind.Array?new InjectionValue(arg.Array.Length):InjectionValue.Zero;

InjectionScript.Runtime.State.Globals.SetGlobal

Performs the displayed calls and state updates.

Parameters: name, value

Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/State/Globals.cs:14.

public void SetGlobal(string name, string value)

Result: void.

Internal implementation code; this is not a standalone script.

public void SetGlobal(string name, string value)
        {
            lock (globalsLock)
                globals[name] = value;
        }

Clone this wiki locally