Repository navigation
EN Runtime Helpers 5
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
Internal implementation code; this is not a standalone script.
Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.CSharp/CSharpCallbacks.cs:323.
private HashSet<int> ReadMobiles()
Result: HashSet<int>.
Calls:
Convert.ToInt32native((System.Collections.IEnumerable?)native("GetMobiles", []) ?? Array.Empty<object>()) .Cast<object?>().Select(Convert.ToInt32).Where(serial => serial != 0 && serial != self).ToHashSet((System.Collections.IEnumerable?)native("GetMobiles", []) ?? Array.Empty<object>()) .Cast<object?>().Select(Convert.ToInt32).Where((System.Collections.IEnumerable?)native("GetMobiles", []) ?? Array.Empty<object>()) .Cast<object?>().Select((System.Collections.IEnumerable?)native("GetMobiles", []) ?? Array.Empty<object>()) .Cast<object?>Array.Empty<object>
Internal implementation code; this is not a standalone script.
private HashSet<int> ReadMobiles()
{
int self = Convert.ToInt32(native("Self", []));
return ((System.Collections.IEnumerable?)native("GetMobiles", []) ?? Array.Empty<object>())
.Cast<object?>().Select(Convert.ToInt32).Where(serial => serial != 0 && serial != self).ToHashSet();
}Performs the displayed calls and state updates.
Parameters: uint serial, bool accepted
Source: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:871.
public static void AcceptTrade(uint serial, bool accepted)
Result: void.
Calls:
Socket.Send_TradeResponse
Internal implementation code; this is not a standalone script.
public static void AcceptTrade(uint serial, bool accepted)
{
Socket.Send_TradeResponse(serial, 2, accepted);
}Performs the displayed calls and state updates.
Parameters: World world, uint serial
Source: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:302.
public static void DoubleClick(World world, uint serial)
Result: void.
Conditions:
clickedItem != null && clickedItem.ItemData.IsDoorserial != world.Player && SerialHelper.IsMobile(serial) && world.Player.InWarModeSerialHelper.IsItem(serial) || (SerialHelper.IsMobile(serial) && (world.Mobiles.Get(serial)?.IsHuman ?? false))SerialHelper.IsMobile(serial)
Calls:
world.Items.Get.TrackDoorForAutoCloseSerialHelper.IsMobileRequestMobileStatusAttackSocket.Send_DoubleClickSerialHelper.IsItemworld.Mobiles.Get
Internal implementation code; this is not a standalone script.
public static void DoubleClick(World world, uint serial)
{
Item clickedItem = world.Items.Get(serial);
if (clickedItem != null && clickedItem.ItemData.IsDoor)
world.Player?.TrackDoorForAutoClose(clickedItem);
if (serial != world.Player && SerialHelper.IsMobile(serial) && world.Player.InWarMode)
{
RequestMobileStatus(world,serial);
Attack(world, serial);
}
else
{
Socket.Send_DoubleClick(serial);
}
if (SerialHelper.IsItem(serial) || (SerialHelper.IsMobile(serial) && (world.Mobiles.Get(serial)?.IsHuman ?? false)))
{
if (SerialHelper.IsMobile(serial))
{
world.TargetManager.NewTargetSystemSerial = serial;
}
world.LastObject = serial;
}
else
{
world.LastObject = 0;
}
}Performs the displayed calls and state updates.
Parameters: string action
Source: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:905.
public static void EmoteAction(string action)
Result: void.
Calls:
Socket.Send_EmoteAction
Internal implementation code; this is not a standalone script.
public static void EmoteAction(string action)
{
Socket.Send_EmoteAction(action);
}Performs the displayed calls and state updates.
Parameters: uint local, uint server, int button, uint[] switches = null, Tuple<ushort, string>[] entries = null
Source: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:705.
public static void ReplyGump(uint local, uint server, int button, uint[] switches = null, Tuple<ushort, string>[] entries = null)
Result: void.
Calls:
Socket.Send_GumpResponse
Internal implementation code; this is not a standalone script.
public static void ReplyGump(uint local, uint server, int button, uint[] switches = null, Tuple<ushort, string>[] entries = null)
{
Socket.Send_GumpResponse(local,
server,
button,
switches,
entries);
}Performs the displayed calls and state updates.
Parameters: string message, uint serial = 0
Source: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:537.
public static void SayParty(string message, uint serial = 0)
Result: void.
Calls:
Socket.Send_PartyMessage
Internal implementation code; this is not a standalone script.
public static void SayParty(string message, uint serial = 0)
{
Socket.Send_PartyMessage(message, serial);
}Performs the displayed calls and state updates.
Parameters: int price, int type
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1446.
public void AllPrice(int price, int type)
Result: void.
Calls:
Invoke_manager.VendorPricer.Configure
Internal implementation code; this is not a standalone script.
public void AllPrice(int price, int type)
=> Invoke(() => _manager.VendorPricer.Configure(price, type));Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:803.
public void Attack(int id)
Result: void.
Calls:
InvokeGameActions.Attack
Internal implementation code; this is not a standalone script.
public void Attack(int id) => Invoke(() => GameActions.Attack(_world, (uint)id));Performs the displayed calls and state updates.
Parameters: int enabled
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:630.
public void CircleTrans(int enabled)
Result: void.
Conditions:
ProfileManager.CurrentProfile == null
Calls:
InvokeErrorProfileManager.SaveCurrentProfile
Internal implementation code; this is not a standalone script.
public void CircleTrans(int enabled) => Invoke(() =>
{
if (ProfileManager.CurrentProfile == null)
{
Error("UO.CircleTrans: no active profile");
return;
}
ProfileManager.CurrentProfile.UseCircleOfTransparency = enabled != 0;
ProfileManager.SaveCurrentProfile();
});Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2186.
public void ClearJournalIgnore()
Result: void.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public void ClearJournalIgnore() => Invoke(JournalManager.ClearYokoIgnoredText);Performs the displayed calls and state updates.
Parameters: int index
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3117.
public void CloseSimpleGump(int index)
Result: void.
Calls:
InvokeResolveGumpUnsafeCloseGumpUnsafe
Internal implementation code; this is not a standalone script.
public void CloseSimpleGump(int index) => Invoke(() =>
{
Gump gump = ResolveGumpUnsafe(index);
CloseGumpUnsafe(gump);
});Performs the displayed calls and state updates.
Parameters: Control parent
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:4262.
private static IEnumerable<Control> Descendants(Control parent)
Result: IEnumerable<Control>.
Conditions:
child.IsDisposed
Calls:
Descendants
Internal implementation code; this is not a standalone script.
private static IEnumerable<Control> Descendants(Control parent)
{
foreach (Control child in parent.Children)
{
if (child.IsDisposed) continue;
yield return child;
foreach (Control descendant in Descendants(child))
{
yield return descendant;
}
}
}Performs the displayed calls and state updates.
Parameters: string action
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1903.
public void EmoteAction(string action)
Result: void.
Calls:
InvokeGameActions.EmoteAction
Internal implementation code; this is not a standalone script.
public void EmoteAction(string action) => Invoke(() => GameActions.EmoteAction(action ?? string.Empty));Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:335.
public int Exists(int id)
Result: int.
Calls:
Invoke_world.Get
Internal implementation code; this is not a standalone script.
public int Exists(int id) => Invoke(() => _world.Get((uint)id) != null ? 1 : 0);Checks the conditions below and returns the displayed result.
Parameters: entity, priority
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2580.
bool MatchesPair(Entity entity, out int priority)
Result: bool.
Result: false; true.
Calls: IsIgnored.
Conditions: entity == null || entity.IsDestroyed || IsIgnored(entity); typeOk && colorOk.
Internal implementation code; this is not a standalone script.
bool MatchesPair(Entity entity, out int priority)
{
priority = int.MaxValue;
if (entity == null || entity.IsDestroyed || IsIgnored(entity))
return false;
for (int index = 0; index < pairCount; index++)
{
int wantedType = index < requestedTypes.Length ? requestedTypes[index] : -1;
int wantedColor = index < requestedColors.Length ? requestedColors[index] : -1;
bool typeOk = wantedType < 0 || wantedType == 0xFFFF || entity.Graphic == (ushort)wantedType;
bool colorOk = wantedColor < 0 || wantedColor == 0xFFFF || entity.Hue == (ushort)wantedColor;
if (typeOk && colorOk)
{
priority = index;
return true;
}
}
return false;
}Performs the displayed calls and state updates.
Parameters: int number
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:253.
private ISessionTrade FindNumberedTrade(int number)
Result: ISessionTrade.
Calls:
FindTrade
Internal implementation code; this is not a standalone script.
private ISessionTrade FindNumberedTrade(int number) => number > 0 ? FindTrade(number - 1) : null;Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:167.
public int FireResistance
Result: int.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public int FireResistance => Invoke(() => CurrentPlayer?.FireResistance ?? 0);Performs the displayed calls and state updates.
Parameters: string subrutineName
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2958.
public bool FunRunning(string subrutineName)
Result: bool.
Calls:
_manager.FindProcedureByName_manager.IsRunning
Internal implementation code; this is not a standalone script.
public bool FunRunning(string subrutineName)
{
YokoProcedureInfo procedure = _manager.FindProcedureByName(subrutineName);
return procedure != null && _manager.IsRunning(procedure.Key);
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2353.
public string GetActiveAbility()
Result: string.
Conditions:
_world.Player == null
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public string GetActiveAbility() => Invoke(() =>
{
if (_world.Player == null) return "0";
Ability ability = ((byte)_world.Player.PrimaryAbility & 0x80) != 0
? _world.Player.PrimaryAbility
: ((byte)_world.Player.SecondaryAbility & 0x80) != 0 ? _world.Player.SecondaryAbility : Ability.Invalid;
int index = ((byte)ability & 0x7F) - 1;
return index >= 0 && index < AbilityData.Abilities.Length ? AbilityData.Abilities[index].Name : "0";
});Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:707.
public string[] GetContextMenu()
Result: string[].
Calls:
Invoke.GetYokoItemsArray.Empty<string>
Internal implementation code; this is not a standalone script.
public string[] GetContextMenu() => Invoke(() => _world.ServerMenus.Context?.GetYokoItems() ?? Array.Empty<string>());Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2495.
public int[] GetFoundItems()
Result: int[].
Calls:
_foundItems.ToArray
Internal implementation code; this is not a standalone script.
public int[] GetFoundItems() => _foundItems.ToArray();Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1021.
public string GetObjectInfoText(int id)
Result: string.
Conditions:
_world.Get(serial) is not Entity entity || entity.IsDestroyed
Calls:
Invoke_world.GetFormatObjectInfoOpenInteractiveInfoGump
Internal implementation code; this is not a standalone script.
public string GetObjectInfoText(int id) => Invoke(() =>
{
uint serial = unchecked((uint)id);
if (_world.Get(serial) is not Entity entity || entity.IsDestroyed)
return $"UO.Info: object is unavailable: 0x{serial:X8}";
string result = FormatObjectInfo(entity);
OpenInteractiveInfoGump("C# Object Information", result);
return result;
});Performs the displayed calls and state updates.
Parameters: int serial
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:710.
public string GetProfile(int serial)
Result: string.
Conditions:
text != null
Calls:
InvokeGameActions.RequestProfileDateTime.UtcNow.AddSeconds_world.CharacterPanels.ProfileWaitError
Internal implementation code; this is not a standalone script.
public string GetProfile(int serial)
{
Invoke(() => GameActions.RequestProfile((uint)serial));
DateTime deadline = DateTime.UtcNow.AddSeconds(3);
while (DateTime.UtcNow < deadline)
{
string text = Invoke(() => _world.CharacterPanels.Profile((uint)serial)?.CurrentText);
if (text != null)
return text;
Wait(25);
}
Error($"UO.GetProfile: no profile response for 0x{serial:X8}");
return string.Empty;
}Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2943.
public void Ignore(int id)
Result: void.
Calls:
State.IgnoredSerials.Add
Internal implementation code; this is not a standalone script.
public void Ignore(int id) => State.IgnoredSerials.Add(id);Performs the displayed calls and state updates.
Parameters: int containerId
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:4089.
private static bool IsGroundFindContainer(int containerId)
Result: bool.
Calls:
—
Internal implementation code; this is not a standalone script.
private static bool IsGroundFindContainer(int containerId) => containerId == 1;Performs the displayed calls and state updates.
Parameters: int x, int y
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:669.
public int IsMineTile(int x, int y)
Result: int.
Calls:
InvokeAnyTileAtStaticFilters.IsRockTileName(tile).IndexOfTileName
Internal implementation code; this is not a standalone script.
public int IsMineTile(int x, int y) => Invoke(() => AnyTileAt(x, y, tile =>
tile is Static or Multi && (StaticFilters.IsRock(tile.Graphic)
|| TileName(tile).IndexOf("cave", StringComparison.OrdinalIgnoreCase) >= 0
|| TileName(tile).IndexOf("mountain", StringComparison.OrdinalIgnoreCase) >= 0
|| TileName(tile).IndexOf("rock", StringComparison.OrdinalIgnoreCase) >= 0)) ? 1 : 0);Performs the displayed calls and state updates.
Parameters: int index
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2202.
public int JournalTextType(int index)
Result: int.
Calls:
GetJournalEntry
Internal implementation code; this is not a standalone script.
public int JournalTextType(int index) => GetJournalEntry(index) is JournalEntry entry ? (int)entry.TextType : 0;Performs the displayed calls and state updates.
Parameters: int index
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2198.
public double JournalTimestamp(int index)
Result: double.
Calls:
GetJournalEntryentry.Time.ToOADate
Internal implementation code; this is not a standalone script.
public double JournalTimestamp(int index) => GetJournalEntry(index) is JournalEntry entry ? entry.Time.ToOADate() : 0d;Performs the displayed calls and state updates.
Parameters: int x, int y
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1540.
public void LDblClick(int x, int y)
Result: void.
Calls:
InvokeWarpMouseMouseButton
Internal implementation code; this is not a standalone script.
public void LDblClick(int x, int y) => Invoke(() =>
{
WarpMouse(x, y);
MouseButton(0x0002, 0x0004);
MouseButton(0x0002, 0x0004);
});Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:153.
public int LastAttack
Result: int.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public int LastAttack => Invoke(() => (int)_world.TargetManager.LastAttack);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:691.
public int MenuHookPresent()
Result: int.
Calls:
—
Internal implementation code; this is not a standalone script.
public int MenuHookPresent() => _manager.HasMenuHooks ? 1 : 0;Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3556.
public int Move()
Result: int.
Calls:
IsMoving
Internal implementation code; this is not a standalone script.
public int Move() => IsMoving();Performs the displayed calls and state updates.
Parameters: int serial
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1713.
public void PartyRemove(int serial)
Result: void.
Calls:
InvokeGameActions.RequestPartyRemoveMember
Internal implementation code; this is not a standalone script.
public void PartyRemove(int serial) => Invoke(() => GameActions.RequestPartyRemoveMember((uint)serial));Performs the displayed calls and state updates.
Parameters: string message, int serial
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1707.
public void PartySay(string message, int serial)
Result: void.
Calls:
InvokeGameActions.SayParty
Internal implementation code; this is not a standalone script.
public void PartySay(string message, int serial) => Invoke(() => GameActions.SayParty(message ?? string.Empty, (uint)serial));Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:4330.
private static GameController RequireGameInput()
Result: GameController.
Conditions:
(SDL3.SDL.SDL_GetWindowFlags(game.Window.Handle) & SDL3.SDL.SDL_WindowFlags.SDL_WINDOW_INPUT_FOCUS) == 0
Calls:
RequireGameViewSDL3.SDL.SDL_GetWindowFlags
Internal implementation code; this is not a standalone script.
private static GameController RequireGameInput()
{
var game = RequireGameView("Keyboard/mouse input");
if ((SDL3.SDL.SDL_GetWindowFlags(game.Window.Handle) & SDL3.SDL.SDL_WindowFlags.SDL_WINDOW_INPUT_FOCUS) == 0)
throw new InvalidOperationException("Keyboard/mouse input requires the graphical ClassicUO window to have focus.");
return game;
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3997.
public void SaveConfig()
Result: void.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public void SaveConfig() => Invoke(ProfileManager.SaveCurrentProfile);Performs the displayed calls and state updates.
Parameters: int number, string value
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3391.
public void SetEasyUO(int number, string value)
Result: void.
Conditions:
!OperatingSystem.IsWindows()
Calls:
OperatingSystem.IsWindowsErrorRegistry.CurrentUser.CreateSubKeykey.SetValuenumber.ToString
Internal implementation code; this is not a standalone script.
public void SetEasyUO(int number, string value)
{
if (!OperatingSystem.IsWindows())
{
Error("UO.SetEasyUO is available only on Windows");
return;
}
using RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\EasyUO", true);
key.SetValue(number.ToString(CultureInfo.InvariantCulture), value ?? string.Empty, RegistryValueKind.String);
}Performs the displayed calls and state updates.
Parameters: int index
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2203.
public void SetJournalLine(int index)
Result: void.
Calls:
Math.Max
Internal implementation code; this is not a standalone script.
public void SetJournalLine(int index) => _journalLine = Math.Max(0, index);Performs the displayed calls and state updates.
Parameters: int runMount, int runUnmount, int walkMount, int walkUnmount
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:211.
public void SetMovementTimers(int runMount, int runUnmount, int walkMount, int walkUnmount)
Result: void.
Calls:
InvokeMovementSpeed.ConfigureYokoMovementTimers
Internal implementation code; this is not a standalone script.
public void SetMovementTimers(int runMount, int runUnmount, int walkMount, int walkUnmount) => Invoke(() =>
MovementSpeed.ConfigureYokoMovementTimers(runMount, runUnmount, walkMount, walkUnmount));Performs the displayed calls and state updates.
Parameters: string shardName, string characterName, int useAtEveryConnect
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:473.
public void SetReconnectSelection(string shardName, string characterName, int useAtEveryConnect)
Result: void.
Conditions:
_world.SessionControl is { } session!string.IsNullOrWhiteSpace(shardName)!string.IsNullOrWhiteSpace(characterName)
Calls:
Invokesession.SetReconnectSelectionstring.IsNullOrWhiteSpaceshardName.TrimSettings.GlobalSettings.SaveLastCharacterManager.OverrideLastCharactercharacterName.Trim
Internal implementation code; this is not a standalone script.
public void SetReconnectSelection(string shardName, string characterName, int useAtEveryConnect) => Invoke(() =>
{
if (_world.SessionControl is { } session)
{
session.SetReconnectSelection(shardName, characterName, useAtEveryConnect != 0);
return;
}
if (!string.IsNullOrWhiteSpace(shardName))
{
Settings.GlobalSettings.LastServerName = shardName.Trim();
Settings.GlobalSettings.Save();
}
if (!string.IsNullOrWhiteSpace(characterName))
{
LastCharacterManager.OverrideLastCharacter(
characterName.Trim(),
useAtEveryConnect == 0
);
}
});Performs the displayed calls and state updates.
Parameters: int enabled
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3980.
public void SetWeatherFilter(int enabled)
Result: void.
Calls:
Invoke_manager.SetWeatherFilter
Internal implementation code; this is not a standalone script.
public void SetWeatherFilter(int enabled) => Invoke(() => _manager.SetWeatherFilter(enabled != 0));Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:179.
public string ShardName
Result: string.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public string ShardName => Invoke(() => _world.ServerName ?? string.Empty);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3291.
public int ShowGumpListInspector()
Result: int.
Calls:
InvokeBuildGumpListInspectorUnsafeOpenInteractiveInfoGumpInspectableGumpsUnsafe
Internal implementation code; this is not a standalone script.
public int ShowGumpListInspector() => Invoke(() =>
{
string document = BuildGumpListInspectorUnsafe();
OpenInteractiveInfoGump("C# Active Gumps", document);
return InspectableGumpsUnsafe().Count;
});Performs the displayed calls and state updates.
Parameters: int skillId
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2313.
public int SkillLockVal(int skillId)
Result: int.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public int SkillLockVal(int skillId) => Invoke(() =>
{
int index = skillId - 1;
return _world.Player?.Skills != null && index >= 0 && index < _world.Player.Skills.Length
? (int)_world.Player.Skills[index].Lock
: -1;
});Performs the displayed calls and state updates.
Parameters: int layer, int id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2235.
private int TryEquipItem(int layer, int id)
Result: int.
Conditions:
-
`_world.InGame && NetClient.Socket.IsConnected && ReferenceEquals(Client.UO?.World, _world)
&& item != null && !item.IsDestroyed && layer > 0 && layer <= (int)Layer.Bank && item.ItemData.IsWearable && item.ItemData.Layer == layer && GameActions.PickUp(_world, item.Serial, 0, 0, item.Amount)`
Calls:
_world.Items.GetReferenceEqualsGameActions.PickUpGameActions.Equip
Internal implementation code; this is not a standalone script.
private int TryEquipItem(int layer, int id)
{
Item item = _world.Items.Get((uint)id);
if (_world.InGame && NetClient.Socket.IsConnected && ReferenceEquals(Client.UO?.World, _world)
&& item != null && !item.IsDestroyed && layer > 0 && layer <= (int)Layer.Bank
&& item.ItemData.IsWearable && item.ItemData.Layer == layer
&& GameActions.PickUp(_world, item.Serial, 0, 0, item.Amount))
{
GameActions.Equip(_world);
return _world.ItemHold.Dropped ? 1 : 0;
}
return 0;
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:2819.
internal int[] GetScriptsList()
Result: int[].
Calls:
Enumerable.Range(0, GetScriptsCount()).ToArrayEnumerable.RangeGetScriptsCount
Internal implementation code; this is not a standalone script.
internal int[] GetScriptsList() => Enumerable.Range(0, GetScriptsCount()).ToArray();Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:2805.
private YokoRunningScript[] RunningScripts()
Result: YokoRunningScript[].
Calls:
-
`_running.Values
.Where(script => !script.Cancellation.IsCancellationRequested) .OrderBy(script => script.Sequence) .ToArray` -
`_running.Values
.Where(script => !script.Cancellation.IsCancellationRequested) .OrderBy` -
`_running.Values
.Where`
Internal implementation code; this is not a standalone script.
private YokoRunningScript[] RunningScripts() => _running.Values
.Where(script => !script.Cancellation.IsCancellationRequested)
.OrderBy(script => script.Sequence)
.ToArray();Performs the displayed calls and state updates.
Parameters: string name
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5309.
public int ApiParameterExists(string name)
Result: int.
Conditions:
value.Length == 0Metadata.ShortcutVariables.Any(item => item.Equals(value, StringComparison.OrdinalIgnoreCase))
Calls:
(name ?? string.Empty).TrimMetadata.ShortcutVariables.Anyitem.Equalsmetadata.IntrinsicVariableExists
Internal implementation code; this is not a standalone script.
public int ApiParameterExists(string name)
{
string value = (name ?? string.Empty).Trim();
if (value.Length == 0)
return 0;
if (Metadata.ShortcutVariables.Any(item => item.Equals(value, StringComparison.OrdinalIgnoreCase)))
return 1;
return metadata.IntrinsicVariableExists(value) ? 1 : 0;
}Performs the displayed calls and state updates.
Parameters: int[] items, bool equip
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5729.
private int ChangeEquipmentItems(int[] items, bool equip)
Result: int.
Conditions:
bridge is IApiEquipmentActions actionsaccepted != 0 && i + 1 < items.Length && state.DressSpeed > 0
Calls:
actions.EquipItemactions.UnequipItembridge.GetLayerbridge.Equipbridge.ObjAtLayerbridge.UnequipinjectionApi.Wait
Internal implementation code; this is not a standalone script.
private int ChangeEquipmentItems(int[] items, bool equip)
{
bool success = true;
for (int i = 0; i < items.Length; i++)
{
int item = items[i];
int accepted;
if (bridge is IApiEquipmentActions actions)
accepted = equip ? actions.EquipItem(item) : actions.UnequipItem(item);
else
{
int layer = bridge.GetLayer(item);
accepted = layer <= 0 ? 0 : equip ? bridge.Equip(layer, item)
: bridge.ObjAtLayer(layer) == item ? bridge.Unequip(layer) : 0;
}
success &= accepted != 0;
if (accepted != 0 && i + 1 < items.Length && state.DressSpeed > 0)
injectionApi.Wait(state.DressSpeed);
}
return success ? 1 : 0;
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3864.
public int CheckLag()
Result: int.
Calls:
bridge.CheckLag
Internal implementation code; this is not a standalone script.
public int CheckLag() => bridge.CheckLag(10_000);Performs the displayed calls and state updates.
Parameters: InjectionValue color, InjectionValue msg
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5453.
public void ColorPrint(InjectionValue color, InjectionValue msg)
Result: void.
Calls:
bridge.PrintNumberConversions.ToIntmsg.ToString
Internal implementation code; this is not a standalone script.
public void ColorPrint(InjectionValue color, InjectionValue msg) => bridge.Print(NumberConversions.ToInt(color), msg.ToString());Performs the displayed calls and state updates.
Parameters: InjectionValue[] values, int startIndex
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5138.
private static InjectionValue CombineMask(InjectionValue[] values, int startIndex)
Result: InjectionValue.
Conditions:
values == null || startIndex >= values.Lengthvalues.Length == startIndex + 1values[index].Kind == InjectionValueKind.Array
Calls:
combined.AddRangecombined.Addcombined.ToArray
Internal implementation code; this is not a standalone script.
private static InjectionValue CombineMask(InjectionValue[] values, int startIndex)
{
if (values == null || startIndex >= values.Length)
return InjectionValue.MinusOne;
if (values.Length == startIndex + 1)
return values[startIndex];
// Each variadic argument can itself be a flat mask array. Keep its
// entries; wrapping arrays inside another array converted them to 0.
var combined = new List<InjectionValue>();
for (int index = startIndex; index < values.Length; index++)
{
if (values[index].Kind == InjectionValueKind.Array)
combined.AddRange(values[index].Array);
else
combined.Add(values[index]);
}
return new InjectionValue(combined.ToArray());
}Performs the displayed calls and state updates.
Parameters: InjectionValue[] values
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3533.
private string CompactFindList(InjectionValue[] values)
Result: string.
Conditions:
values == null || values.Length < 1 || values.Length > 7list.Kind == InjectionValueKind.Stringstate.LegacyLists.TryGetValue("AddFindList", out List<string> storedEntries)parts.Length < 2 || !parts[0].Equals(listName, StringComparison.OrdinalIgnoreCase)
Calls:
-
types.Add -
ResolveType -
colors.Add -
NumberConversions.ToInt -
list.ToString -
state.LegacyLists.TryGetValue -
stored.Split -
parts[0].Equals -
AddEntry -
`(list.ToString() ?? string.Empty).Split(new[] { '|', ',', ';', ' ' }, StringSplitOptions.RemoveEmptyEntries)
.Select` -
(list.ToString() ?? string.Empty).Split -
ConvertContainer -
ResolveCompactDistance -
bridge.GetFindDistance -
ToBoolean -
ResolveCompactMaxZ -
bridge.GetFindVertical -
ParseIntMask(notorietyValue).ToArray -
ParseIntMask -
bridge.FindList -
types.ToArray -
colors.ToArray -
NumberConversions.ToHex
The source file contains the complete code; exact excerpts follow.
Internal implementation code; this is not a standalone script.
private string CompactFindList(InjectionValue[] values)
{
if (values == null || values.Length < 1 || values.Length > 7)
throw new NativeSubrutineException("UO.FindList expects list[,container[,distance[,notoriety[,nearest[,maxZ[,includeIgnored]]]]]].");
InjectionValue list = values[0];
var types = new List<int>();
var colors = new List<int>();
// …
if (list.Kind == InjectionValueKind.String)
// …
if (state.LegacyLists.TryGetValue("AddFindList", out List<string> storedEntries))
// …
if (parts.Length < 2 || !parts[0].Equals(listName, StringComparison.OrdinalIgnoreCase))
// …
if (!namedListResolved)
// …
if (types.Count == 0)
return string.Empty;
// …
int maxZ = values.Length > 5 ? ResolveCompactMaxZ(values[5]) : bridge.GetFindVertical();
bool includeIgnored = values.Length > 6 && ToBoolean(values[6]);
int[] notorieties = ParseIntMask(notorietyValue).ToArray();
int serial = bridge.FindList(types.ToArray(), colors.ToArray(), container, distance,
notorieties, nearest, maxZ, includeIgnored);
return serial != 0 ? NumberConversions.ToHex(serial) : string.Empty;
}Performs the displayed calls and state updates.
Parameters: InjectionValue[] values
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5052.
private int CompactFindMan(InjectionValue[] values)
Result: int.
Conditions:
nearest
Calls:
ResolveCompactDistancebridge.GetFindDistanceToBooleanResolveCompactMaxZbridge.GetFindVerticalNumberConversions.ToIntFilterMobilesmobiles.OrderBy(id => bridge.GetDistance(id)).ThenBymobiles.OrderBybridge.GetDistancemobiles.FirstOrDefault
Internal implementation code; this is not a standalone script.
private int CompactFindMan(InjectionValue[] values)
{
InjectionValue notoriety = values[0];
int distance = values.Length > 1 ? ResolveCompactDistance(values[1]) : bridge.GetFindDistance();
bool nearest = values.Length <= 2 || ToBoolean(values[2]);
int maxZ = values.Length > 3 ? ResolveCompactMaxZ(values[3]) : bridge.GetFindVertical();
InjectionValue body = values.Length > 4 ? values[4] : InjectionValue.MinusOne;
int color = values.Length > 5 ? NumberConversions.ToInt(values[5]) : -1;
bool includeSelf = values.Length > 6 && ToBoolean(values[6]);
IEnumerable<int> mobiles = FilterMobiles(distance, notoriety, body, maxZ, color, includeSelf);
if (nearest)
mobiles = mobiles.OrderBy(id => bridge.GetDistance(id)).ThenBy(id => id);
return mobiles.FirstOrDefault();
}Performs the displayed calls and state updates.
Parameters: InjectionValue[] values
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5413.
private int CompactLaunch(InjectionValue[] values)
Result: int.
Conditions:
values == null || values.Length == 0 || values.Length > 4fileName.Length == 0workingDirectory.Length == 0
Calls:
values[0].ToString.TrimSystemMessagevalues[1].ToStringvalues[2].ToStringToBooleanbridge.Launch
Internal implementation code; this is not a standalone script.
private int CompactLaunch(InjectionValue[] values)
{
if (values == null || values.Length == 0 || values.Length > 4)
throw new NativeSubrutineException("UO.Launch expects file[, parameters[, workingDirectory[, hidden]]].");
string fileName = values[0].ToString()?.Trim() ?? string.Empty;
if (fileName.Length == 0)
{
SystemMessage("UO.Launch: file is empty.");
return 0;
}
string parameters = values.Length > 1 ? values[1].ToString() ?? string.Empty : string.Empty;
string workingDirectory = values.Length > 2 ? values[2].ToString()?.Trim() ?? string.Empty : string.Empty;
if (workingDirectory.Length == 0)
workingDirectory = paths.ScriptPath;
bool hidden = values.Length > 3 && ToBoolean(values[3]);
return bridge.Launch(fileName, parameters, workingDirectory, hidden);
}Performs the displayed calls and state updates.
Parameters: InjectionValue[] values
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4599.
private int CompactMoveItem(InjectionValue[] values)
Result: int.
Conditions:
values == null || values.Length == 0 || values.Length > 8id == 0useCoordinateRoute!MoveItemChecked(id, amount, targetContainer, x, y, z)
Calls:
GetObjectNumberConversions.ToIntConvertMoveDestinationbridge.GetXbridge.GetYbridge.GetZMath.MaxToBooleanbridge.GetQuantityMath.MinMoveItemCheckedbridge.MoveItemWaitForMoveConfirmationSystemMessage
The source file contains the complete code; exact excerpts follow.
Internal implementation code; this is not a standalone script.
private int CompactMoveItem(InjectionValue[] values)
{
if (values == null || values.Length == 0 || values.Length > 8)
throw new NativeSubrutineException("UO.MoveItem expects 1..8 arguments: item, amount, container, x, y, z, timeout, waitConfirmation.");
int id = GetObject(values[0]);
if (id == 0)
return 0;
// …
if (useCoordinateRoute)
// …
if (!MoveItemChecked(id, amount, targetContainer, x, y, z))
return 0;
// …
if (requestResult == 0)
return 0;
// …
if (!waitConfirmation)
return requestResult;
if (WaitForMoveConfirmation(id, originalQuantity, expectedMoved, targetContainer,
useCoordinateRoute, x, y, z, timeout))
return 1;
SystemMessage($"UO.MoveItem: no server/world confirmation within {timeout} ms.");
return 0;
}Performs the displayed calls and state updates.
Parameters: InjectionValue id, InjectionValue amount
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5362.
public int Drag(InjectionValue id, InjectionValue amount)
Result: int.
Calls:
Drag
Internal implementation code; this is not a standalone script.
public int Drag(InjectionValue id, InjectionValue amount) => Drag(id, amount, InjectionValue.Zero);Performs the displayed calls and state updates.
Parameters: string value
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2851.
private static string EncodeRecordingText(string value)
Result: string.
Calls:
Convert.ToBase64StringEncoding.UTF8.GetBytes
Internal implementation code; this is not a standalone script.
private static string EncodeRecordingText(string value)
=> Convert.ToBase64String(Encoding.UTF8.GetBytes(value ?? string.Empty));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1793.
Result: InjectionValue.Unit.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(1). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.BookSetHeader:bridge.BookSetHeader(state.BookTitle, state.BookAuthor).
Internal implementation code; this is not a standalone script.
case "booksetheader":
state.BookTitle = Text(0);
state.BookAuthor = Text(1);
bridge.BookSetHeader(state.BookTitle, state.BookAuthor);
return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1639.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ClearMenuHooks:bridge.ClearMenuHooks().
Internal implementation code; this is not a standalone script.
case "cancelallmenuhooks": bridge.ClearMenuHooks(); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2032.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ClearChatUserIgnore:bridge.ClearChatUserIgnore().
Internal implementation code; this is not a standalone script.
case "clearchatuserignore": bridge.ClearChatUserIgnore(); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1775.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ClearUserStatics:bridge.ClearUserStatics().
Internal implementation code; this is not a standalone script.
case "clearuserstatics": state.UserStatics.Clear(); bridge.ClearUserStatics(); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1498.
Result: new InjectionValue(bridge.ColdResistance).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ColdResistance:bridge.ColdResistance.
Internal implementation code; this is not a standalone script.
case "coldresist": return new InjectionValue(bridge.ColdResistance);This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1987.
Result: new InjectionValue(Equip("__stealth_saved_set__", dressSets, dressLayers, "Clothing set requests processed.", "No clothing set with setdress.")).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.Equip:Equip("__stealth_saved_set__", dressSets, dressLayers, "Clothing set requests processed.", "No clothing set with setdress.").
Internal implementation code; this is not a standalone script.
case "dresssavedset":
case "equipdressset": return new InjectionValue(Equip("__stealth_saved_set__", dressSets, dressLayers, "Clothing set requests processed.", "No clothing set with setdress."));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1477.
new []
Result: [].
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindTypes:bridge.FindTypes(arguments[0].Kind == InjectionValueKind.Array ? arguments[0].Array.Select(ResolveType).ToArray() : new[] { ResolveType(arguments[0]) }, ArrayArg(1), searchContainers.Select(ConvertClientSearchContainer).ToArray(), Arg(3) != 0). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::ArrayArg:ArrayArg(1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(3).
Internal implementation code; this is not a standalone script.
case "findtypesarrayex":
InjectionValue[] searchContainers = arguments[2].Kind == InjectionValueKind.Array
? arguments[2].Array : new[] { arguments[2] };
return new InjectionValue(bridge.FindTypes(arguments[0].Kind == InjectionValueKind.Array
? arguments[0].Array.Select(ResolveType).ToArray() : new[] { ResolveType(arguments[0]) }, ArrayArg(1),
searchContainers.Select(ConvertClientSearchContainer).ToArray(), Arg(3) != 0));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2014.
Result: StringArray(bridge.GetCharactersForCurrentShard()).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.StringArray:StringArray(bridge.GetCharactersForCurrentShard()). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetCharactersForCurrentShard:bridge.GetCharactersForCurrentShard().
Internal implementation code; this is not a standalone script.
case "getcharslistforshard": return StringArray(bridge.GetCharactersForCurrentShard());This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1595.
Result: StringArray(bridge.GetContextMenu()).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.StringArray:StringArray(bridge.GetContextMenu()). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetContextMenu:bridge.GetContextMenu().
Internal implementation code; this is not a standalone script.
case "getcontextmenu": return StringArray(bridge.GetContextMenu());This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1246.
Result: new InjectionValue(bridge.GetDistance(Arg(0))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetDistance:bridge.GetDistance(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "getdistance": return new InjectionValue(bridge.GetDistance(Arg(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1848.
Result: BuildTileData(0, Arg(0)).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.BuildTileData:BuildTileData(0, Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "getlandtiledata":
return BuildTileData(0, Arg(0));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1454.
Result: new InjectionValue(bridge.GetStaticTiles(Arg(0), Arg(1), Arg(2)).Length / 3).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetStaticTiles:bridge.GetStaticTiles(Arg(0), Arg(1), Arg(2)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(2).
Internal implementation code; this is not a standalone script.
case "getlayercount":
// Stealth's deprecated GetLayerCount(X,Y,WorldNum) is the
// number of static records at a map cell. The portable
// bridge returns each record as Graphic/Z/Hue triples.
return new InjectionValue(bridge.GetStaticTiles(Arg(0), Arg(1), Arg(2)).Length / 3);This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1572.
Result: new InjectionValue(bridge.GetQuantity(Arg(0))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetQuantity:bridge.GetQuantity(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "getquantity": return new InjectionValue(bridge.GetQuantity(Arg(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1452.
Result: new InjectionValue(bridge.GetQuestArrow().Select(value => new InjectionValue(value)).ToArray()).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetQuestArrow:bridge.GetQuestArrow().
Internal implementation code; this is not a standalone script.
case "getquestarrow":
return new InjectionValue(bridge.GetQuestArrow().Select(value => new InjectionValue(value)).ToArray());This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1577.
Result: new InjectionValue(bridge.GetSkillValue(Text(0), false, false)).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetSkillValue:bridge.GetSkillValue(Text(0), false, false). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0).
Internal implementation code; this is not a standalone script.
case "getskillvalue": return new InjectionValue(bridge.GetSkillValue(Text(0), false, false));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1574.
Result: new InjectionValue(bridge.GetGraphics(Arg(0))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetGraphics:bridge.GetGraphics(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "gettype": return new InjectionValue(bridge.GetGraphics(Arg(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1705.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PartyInvite:bridge.PartyInvite(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "invitetoparty": bridge.PartyInvite(Arg(0)); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1366.
Result: new InjectionValue(bridge.GetRun(Arg(0, bridge.Self))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetRun:bridge.GetRun(Arg(0, bridge.Self)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0, bridge.Self). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Self:bridge.Self.
Internal implementation code; this is not a standalone script.
case "isrunning": return new InjectionValue(bridge.GetRun(Arg(0, bridge.Self)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2040.
Result: new InjectionValue(selectedJournalEntry?.Name ?? string.Empty).
Internal implementation code; this is not a standalone script.
case "linename": return new InjectionValue(selectedJournalEntry?.Name ?? string.Empty);This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1908.
Result: SetIndexedGumpValue(Arg(0), "textentry", Arg(1), Text(2)).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.SetIndexedGumpValue:SetIndexedGumpValue(Arg(0), "textentry", Arg(1), Text(2)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(2).
Internal implementation code; this is not a standalone script.
case "numgumptextentry": return SetIndexedGumpValue(Arg(0), "textentry", Arg(1), Text(2));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1532.
Result: new InjectionValue(bridge.GetLocked(bridge.Self)).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetLocked:bridge.GetLocked(bridge.Self). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Self:bridge.Self.
Internal implementation code; this is not a standalone script.
case "paralyzed": return new InjectionValue(bridge.GetLocked(bridge.Self));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1309.
Result: new InjectionValue((bridge as IProxyMetadataBridge)?.ProxyAddress ?? string.Empty).
Internal implementation code; this is not a standalone script.
case "proxyip": return new InjectionValue((bridge as IProxyMetadataBridge)?.ProxyAddress ?? string.Empty);This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1706.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PartyRemove:bridge.PartyRemove(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "removefromparty": bridge.PartyRemove(Arg(0)); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1519.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetPauseScriptOnDisconnectStatus:bridge.SetPauseScriptOnDisconnectStatus(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "setpausescriptondisconnectstatus": bridge.SetPauseScriptOnDisconnectStatus(Arg(0)); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1657.
Result: InjectionValue.Unit.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.Say:Say(Text(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0).
Internal implementation code; this is not a standalone script.
case "uosay": Say(Text(0)); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1263.
Result: new InjectionValue(arguments[0].Kind == InjectionValueKind.String ? Unequip(Text(0)) : bridge.Unequip(Arg(0))).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.Unequip:Unequip(Text(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Unequip:bridge.Unequip(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "unequip":
return new InjectionValue(arguments[0].Kind == InjectionValueKind.String ? Unequip(Text(0)) : bridge.Unequip(Arg(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2854.
Calls:
-
InjectionScript.Runtime.State.NamedIgnoreLists.Add:state.IgnoreTypeLists.Add(Text(0), ResolveType(arguments[1]), arguments.Length > 2 ? NumberConversions.ToInt(arguments[2]) : -1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Text:Text(0). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[1]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[2]).
Internal implementation code; this is not a standalone script.
case "addignorelist":
state.IgnoreTypeLists.Add(Text(0), ResolveType(arguments[1]),
arguments.Length > 2 ? NumberConversions.ToInt(arguments[2]) : -1);
break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2909.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0, bridge.LastTarget). -
InjectionScript.Runtime.InjectionApiUO.SystemMessage:SystemMessage($"0x{id:X8} {bridge.GetName(id)} type=0x{bridge.GetGraphics(id):X4} hue=0x{bridge.GetColor(id):X4} xyz={bridge.GetX(id)},{bridge.GetY(id)},{bridge.GetZ(id)}"). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetName:bridge.GetName(id). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetGraphics:bridge.GetGraphics(id). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetColor:bridge.GetColor(id). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetX:bridge.GetX(id). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetY:bridge.GetY(id). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetZ:bridge.GetZ(id). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.LastTarget:bridge.LastTarget.
Internal implementation code; this is not a standalone script.
case "dump":
{
int id = Arg(0, bridge.LastTarget);
SystemMessage($"0x{id:X8} {bridge.GetName(id)} type=0x{bridge.GetGraphics(id):X4} hue=0x{bridge.GetColor(id):X4} xyz={bridge.GetX(id)},{bridge.GetY(id)},{bridge.GetZ(id)}");
break;
}This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2915.
Conditions: arguments.Length == 0 && bridge.RequestInteractiveObjectInfoTarget() != 0.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RequestInteractiveObjectInfoTarget:bridge.RequestInteractiveObjectInfoTarget(). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0, bridge.LastTarget). -
InjectionScript.Runtime.InjectionApiUO.SystemMessage:SystemMessage(bridge.GetObjectInfoText(id)). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetObjectInfoText:bridge.GetObjectInfoText(id). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.LastTarget:bridge.LastTarget.
Internal implementation code; this is not a standalone script.
case "info":
{
if (arguments.Length == 0 && bridge.RequestInteractiveObjectInfoTarget() != 0)
break;
int id = Arg(0, bridge.LastTarget);
SystemMessage(bridge.GetObjectInfoText(id));
break;
}This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3015.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.SystemMessage:SystemMessage(string.Join(" | ", bridge.GetFoundItems().Select(id => $"0x{id:X8}"))). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetFoundItems:bridge.GetFoundItems().
Internal implementation code; this is not a standalone script.
case "mfgi":
SystemMessage(string.Join(" | ", bridge.GetFoundItems().Select(id => $"0x{id:X8}")));
break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3067.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.SetReceivingContainer:SetReceivingContainer(arguments.Length > 0 ? arguments[0].ToString() : "lastobject"). -
InjectionScript.Runtime.InjectionValue.ToString:arguments[0].ToString().
Internal implementation code; this is not a standalone script.
case "setcatchbag":
SetReceivingContainer(arguments.Length > 0 ? arguments[0].ToString() : "lastobject");
break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3052.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetSeason:bridge.SetSeason(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "setseason": bridge.SetSeason(Arg(0)); break;Returns the value of the expression below.
Parameters: stateFilter, rangeFilter, verticalFilter, directionFilter, kindFilter
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3666.
`public int FindMobile(InjectionValue stateFilter, InjectionValue rangeFilter, InjectionValue verticalFilter,
InjectionValue directionFilter, InjectionValue kindFilter)`
Result: int.
Calls: stateFilter.ToString, rangeFilter.ToString, verticalFilter.ToString, directionFilter.ToString, kindFilter.ToString, bridge.GetX, bridge.GetY, bridge.GetZ.
Calls:
-
InjectionScript.Runtime.InjectionValue.ToString:stateFilter.ToString(). -
InjectionScript.Runtime.InjectionValue.ToString:rangeFilter.ToString(). -
InjectionScript.Runtime.InjectionValue.ToString:verticalFilter.ToString(). -
InjectionScript.Runtime.InjectionValue.ToString:directionFilter.ToString(). -
InjectionScript.Runtime.InjectionValue.ToString:kindFilter.ToString(). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetX:bridge.GetX(bridge.Self). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetY:bridge.GetY(bridge.Self). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetZ:bridge.GetZ(bridge.Self). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetFindDistance:bridge.GetFindDistance(). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetMobiles:bridge.GetMobiles(). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetDistance:bridge.GetDistance(id). -
InjectionScript.Runtime.InjectionApiUO.MatchesMobileFilters:MatchesMobileFilters(id, filters, selfX, selfY, selfZ). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Self:bridge.Self.
Internal implementation code; this is not a standalone script.
public int FindMobile(InjectionValue stateFilter, InjectionValue rangeFilter, InjectionValue verticalFilter,
InjectionValue directionFilter, InjectionValue kindFilter)
{
string[] filters = { stateFilter.ToString(), rangeFilter.ToString(), verticalFilter.ToString(),
directionFilter.ToString(), kindFilter.ToString() };
int selfX = bridge.GetX(bridge.Self);
int selfY = bridge.GetY(bridge.Self);
int selfZ = bridge.GetZ(bridge.Self);
int maximum = Math.Max(1, bridge.GetFindDistance());
return bridge.GetMobiles()
.Where(id => id != bridge.Self && bridge.GetDistance(id) <= maximum)
.Where(id => MatchesMobileFilters(id, filters, selfX, selfY, selfZ))
.OrderBy(id => bridge.GetDistance(id))
.ThenBy(id => id)
.FirstOrDefault();
}Performs the displayed calls and state updates.
Parameters: InjectionValue type, InjectionValue color, InjectionValue container, InjectionValue range, InjectionValue recursive
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4732.
public string FindType(InjectionValue type, InjectionValue color, InjectionValue container, InjectionValue range, InjectionValue recursive)
Result: string.
Calls:
FindTypeResolveTypeNumberConversions.ToIntConvertContainer
Internal implementation code; this is not a standalone script.
public string FindType(InjectionValue type, InjectionValue color, InjectionValue container, InjectionValue range, InjectionValue recursive)
=> FindType(
ResolveType(type),
NumberConversions.ToInt(color),
ConvertContainer(container),
NumberConversions.ToInt(range),
NumberConversions.ToInt(recursive) != 0);Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3757.
public int GetDir(int id)
Result: int.
Calls:
bridge.GetDir
Internal implementation code; this is not a standalone script.
public int GetDir(int id) => bridge.GetDir(id);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5604.
public string GetFoundedText()
Result: string.
Calls:
—
Internal implementation code; this is not a standalone script.
public string GetFoundedText() => selectedJournalEntry?.Text ?? string.Empty;Performs the displayed calls and state updates.
Parameters: string id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3710.
public int GetHP(string id)
Result: int.
Calls:
GetHPGetObject
Internal implementation code; this is not a standalone script.
public int GetHP(string id) => GetHP(GetObject(id));Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3738.
public string GetLayer()
Result: string.
Calls:
GetLayer
Internal implementation code; this is not a standalone script.
public string GetLayer() => GetLayer(new InjectionValue(bridge.Self));Performs the displayed calls and state updates.
Parameters: InjectionValue resistance
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1120.
private int GetResistance(InjectionValue resistance)
Result: int.
Conditions:
resistance.Kind != InjectionValueKind.String
Calls:
NumberConversions.ToInt(resistance.String ?? string.Empty).Trim().ToLowerInvariant(resistance.String ?? string.Empty).Trim
Internal implementation code; this is not a standalone script.
private int GetResistance(InjectionValue resistance)
{
if (resistance.Kind != InjectionValueKind.String)
{
switch (NumberConversions.ToInt(resistance))
{
case 0: return bridge.Armor;
case 1: return bridge.FireResistance;
case 2: return bridge.ColdResistance;
case 3: return bridge.PoisonResistance;
case 4: return bridge.EnergyResistance;
default: return 0;
}
}
switch ((resistance.String ?? string.Empty).Trim().ToLowerInvariant())
{
case "physical":
case "phys":
case "armor": return bridge.Armor;
case "fire": return bridge.FireResistance;
case "cold": return bridge.ColdResistance;
case "poison": return bridge.PoisonResistance;
case "energy": return bridge.EnergyResistance;
default: return 0;
}
}Performs the displayed calls and state updates.
Parameters: InjectionValue group, InjectionValue tileId
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6295.
public InjectionValue GetTileFlags(InjectionValue group, InjectionValue tileId)
Result: InjectionValue.
Calls:
bridge.GetTileFlagsNumberConversions.ToInt
Internal implementation code; this is not a standalone script.
public InjectionValue GetTileFlags(InjectionValue group, InjectionValue tileId)
=> new InjectionValue(unchecked((int)bridge.GetTileFlags(NumberConversions.ToInt(group), NumberConversions.ToInt(tileId))));Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3907.
public int GetUserCodepage()
Result: int.
Calls:
—
Internal implementation code; this is not a standalone script.
public int GetUserCodepage() => Encoding.Default.CodePage;Performs the displayed calls and state updates.
Parameters: InjectionValue minX, InjectionValue minY, InjectionValue maxX, InjectionValue maxY, InjectionValue map
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6337.
public InjectionValue GetWorldTilesArray(InjectionValue minX, InjectionValue minY, InjectionValue maxX, InjectionValue maxY, InjectionValue map)
Result: InjectionValue.
Conditions:
-
`firstX < 0 || firstY < 0 || lastX > ushort.MaxValue || lastY > ushort.MaxValue
|| world < 0 || world > byte.MaxValue` -
((long)lastX - firstX + 1) * ((long)lastY - firstY + 1) > 1_000_000L -
world != bridge.WorldNumber -
cell.Kind == InjectionValueKind.Array
Calls:
Math.MinNumberConversions.ToIntMath.MaxArray.Empty<InjectionValue>BuildWorldCellresult.AddRangebridge.GetWorldItemsArray.Empty<int>bridge.GetXbridge.GetYresult.AddBuildWorldTileRecordbridge.GetGraphicsbridge.GetZbridge.GetColorresult.ToArray
Internal implementation code; this is not a standalone script.
public InjectionValue GetWorldTilesArray(InjectionValue minX, InjectionValue minY, InjectionValue maxX, InjectionValue maxY, InjectionValue map)
{
int firstX = Math.Min(NumberConversions.ToInt(minX), NumberConversions.ToInt(maxX));
int lastX = Math.Max(NumberConversions.ToInt(minX), NumberConversions.ToInt(maxX));
int firstY = Math.Min(NumberConversions.ToInt(minY), NumberConversions.ToInt(maxY));
int lastY = Math.Max(NumberConversions.ToInt(minY), NumberConversions.ToInt(maxY));
int world = NumberConversions.ToInt(map);
if (firstX < 0 || firstY < 0 || lastX > ushort.MaxValue || lastY > ushort.MaxValue
|| world < 0 || world > byte.MaxValue)
throw new NativeSubrutineException("World tile coordinates must be 0..65535 and the map must be 0..255.");
if (((long)lastX - firstX + 1) * ((long)lastY - firstY + 1) > 1_000_000L)
throw new NativeSubrutineException("World tile array is limited to 1,000,000 cells per call.");
// Live world items have no per-result map field. Never combine the
// current world's items with a request for a different map, or scan
// every cell only to report the same unloaded-map failure repeatedly.
if (world != bridge.WorldNumber)
return new InjectionValue(Array.Empty<InjectionValue>());
var result = new List<InjectionValue>();
for (int cellX = firstX; cellX <= lastX; cellX++)
for (int cellY = firstY; cellY <= lastY; cellY++)
{
InjectionValue cell = BuildWorldCell(cellX, cellY, world, false);
if (cell.Kind == InjectionValueKind.Array)
result.AddRange(cell.Array);
}
foreach (int serial in bridge.GetWorldItems() ?? Array.Empty<int>())
{
int objectX = bridge.GetX(serial);
int objectY = bridge.GetY(serial);
if (objectX >= firstX && objectX <= lastX && objectY >= firstY && objectY <= lastY)
result.Add(BuildWorldTileRecord("object", serial, bridge.GetGraphics(serial), objectX, objectY,
bridge.GetZ(serial), bridge.GetColor(serial), 1));
}
return new InjectionValue(result.ToArray());
}Performs the displayed calls and state updates.
Parameters: InjectionValue amount, InjectionValue id, InjectionValue container, InjectionValue timeout
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4494.
public int Grab(InjectionValue amount, InjectionValue id, InjectionValue container, InjectionValue timeout)
Result: int.
Calls:
CompactGrab
Internal implementation code; this is not a standalone script.
public int Grab(InjectionValue amount, InjectionValue id, InjectionValue container, InjectionValue timeout)
=> CompactGrab(new[] { amount, id, container, timeout });Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5355.
public void IgnoreReset()
Result: void.
Calls:
bridge.IgnoreReset
Internal implementation code; this is not a standalone script.
public void IgnoreReset() => bridge.IgnoreReset();Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3911.
public int LastStatusX()
Result: int.
Calls:
bridge.GetX
Internal implementation code; this is not a standalone script.
public int LastStatusX() => bridge is IStatusSnapshotBridge snapshot ? snapshot.LastStatusX : bridge.GetX(bridge.LastStatus);Checks the conditions below and returns the displayed result.
Parameters: entry, expected, valueStartsWithListName
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3089.
`private static bool LegacyListEntryMatches(string entry, IReadOnlyList expected,
bool valueStartsWithListName = true)`
Result: bool.
Result: true; false.
Calls: (entry ?? string.Empty).Split, fields[index + offset].Equals, expected[index].ToString.
Conditions: expected == null || expected.Count == 0; fields.Length < expected.Count + offset; `!fields[index + offset].Equals(expected[index].ToString(),
StringComparison.OrdinalIgnoreCase)`.
Calls:
-
InjectionScript.Runtime.InjectionValue.ToString:expected[index].ToString().
Internal implementation code; this is not a standalone script.
private static bool LegacyListEntryMatches(string entry, IReadOnlyList<InjectionValue> expected,
bool valueStartsWithListName = true)
{
string[] fields = (entry ?? string.Empty).Split('|');
if (expected == null || expected.Count == 0)
return true;
int offset = valueStartsWithListName ? 0 : 1;
if (fields.Length < expected.Count + offset)
return false;
for (int index = 0; index < expected.Count; index++)
if (!fields[index + offset].Equals(expected[index].ToString(),
StringComparison.OrdinalIgnoreCase))
return false;
return true;
}Performs the displayed calls and state updates.
Parameters: int id, IgnoreTypeFilter filter
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5157.
private bool MatchesIgnoredType(int id, IgnoreTypeFilter filter)
Result: bool.
Calls:
filter.Matchesbridge.GetGraphicsbridge.GetColor
Internal implementation code; this is not a standalone script.
private bool MatchesIgnoredType(int id, IgnoreTypeFilter filter) => filter.HasRules
&& filter.Matches(bridge.GetGraphics(id), bridge.GetColor(id));Performs the displayed calls and state updates.
Parameters: string type
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6016.
public void Morph(string type)
Result: void.
Calls:
MorphResolveType
Internal implementation code; this is not a standalone script.
public void Morph(string type) => Morph(ResolveType(type));Performs the displayed calls and state updates.
Parameters: InjectionValue filePath
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5435.
public void OpenIDE(InjectionValue filePath)
Result: void.
Calls:
bridge.OpenIDEfilePath.ToString
Internal implementation code; this is not a standalone script.
public void OpenIDE(InjectionValue filePath) => bridge.OpenIDE(filePath.ToString());Performs the displayed calls and state updates.
Parameters: InjectionValue msg, InjectionValue color
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5448.
public void Print(InjectionValue msg, InjectionValue color)
Result: void.
Calls:
bridge.PrintNumberConversions.ToIntmsg.ToString
Internal implementation code; this is not a standalone script.
public void Print(InjectionValue msg, InjectionValue color)
{
bridge.Print(NumberConversions.ToInt(color), msg.ToString());
}Performs the displayed calls and state updates.
Parameters: int x, int y, int unknown, int minTile, int maxTile
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6036.
public string PrivateGetTile(int x, int y, int unknown, int minTile, int maxTile)
Result: string.
Calls:
bridge.PrivateGetTile
Internal implementation code; this is not a standalone script.
public string PrivateGetTile(int x, int y, int unknown, int minTile, int maxTile)
=> bridge.PrivateGetTile(x, y, unknown, minTile, maxTile);Performs the displayed calls and state updates.
Parameters: int flag, int x, int y
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6111.
public void Track(int flag, int x, int y)
Result: void.
Conditions:
flag != 0
Calls:
bridge.Trackbridge.TrackOff
Internal implementation code; this is not a standalone script.
public void Track(int flag, int x, int y)
{
if (flag != 0)
bridge.Track(x, y);
else
bridge.TrackOff();
}Performs the displayed calls and state updates.
Parameters: InjectionValue serialOrName
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6413.
public void UserObject(InjectionValue serialOrName)
Result: void.
Calls:
UseObjectGetObject
Internal implementation code; this is not a standalone script.
public void UserObject(InjectionValue serialOrName)
=> UseObject(GetObject(serialOrName));Performs the displayed calls and state updates.
Parameters: string prompt1, string choice1, string prompt2, string choice2, string prompt3, string choice3
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3393.
public void WaitMenu(string prompt1, string choice1, string prompt2, string choice2, string prompt3, string choice3)
Result: void.
Calls:
bridge.WaitMenu
Internal implementation code; this is not a standalone script.
public void WaitMenu(string prompt1, string choice1, string prompt2, string choice2, string prompt3, string choice3)
=> bridge.WaitMenu(prompt1, choice1, prompt2, choice2, prompt3, choice3);Performs the displayed calls and state updates.
Parameters: int mode
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5868.
public void WarMode(int mode)
Result: void.
Calls:
bridge.WarMode
Internal implementation code; this is not a standalone script.
public void WarMode(int mode) => bridge.WarMode(mode);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:1029.
Result: bridge.MaxStamina.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MaxStamina:bridge.MaxStamina.
Internal implementation code; this is not a standalone script.
() => bridge.MaxStaminaThe 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:1063.
serial
Result: serial.
Result: bridge.GetLocked(serial).
Calls: bridge.GetLocked.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetLocked:bridge.GetLocked(serial).
Internal implementation code; this is not a standalone script.
serial => bridge.GetLocked(serial)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:1044.
Result: bridge.ColdResistance.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ColdResistance:bridge.ColdResistance.
Internal implementation code; this is not a standalone script.
() => bridge.ColdResistanceThe 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:1031.
Result: bridge.Intelligence.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Intelligence:bridge.Intelligence.
Internal implementation code; this is not a standalone script.
() => bridge.IntelligenceThe 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:1063.
serial
Result: serial.
Result: bridge.GetLocked(serial).
Calls: bridge.GetLocked.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetLocked:bridge.GetLocked(serial).
Internal implementation code; this is not a standalone script.
serial => bridge.GetLocked(serial)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:922.
values
Result: values.
Result: new InjectionValue(CompactStepQ(values)).
Calls: CompactStepQ.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.CompactStepQ:CompactStepQ(values).
Internal implementation code; this is not a standalone script.
values => new InjectionValue(CompactStepQ(values))Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1013.
value
Result: value.
Result: getter(GetObject(value)).
Calls: getter, GetObject.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.GetObject:GetObject(value).
Internal implementation code; this is not a standalone script.
value => getter(GetObject(value))Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1013.
value
Result: value.
Result: getter(GetObject(value)).
Calls: getter, GetObject.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.GetObject:GetObject(value).
Internal implementation code; this is not a standalone script.
value => getter(GetObject(value))Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1007.
Result: getter(bridge.Self).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Self:bridge.Self.
Internal implementation code; this is not a standalone script.
() => getter(bridge.Self)Performs the displayed calls and state updates.
Parameters: string commandLine
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/NativeConsoleDispatch.cs:270.
private static IEnumerable<ConsoleToken> Tokenize(string commandLine)
Result: IEnumerable<ConsoleToken>.
Conditions:
c == '\\' && quote != '\0'index + 1 < commandLine.Length && commandLine[index + 1] == quote(count & 1) != 0quote != '\0'
Calls:
token.Appendchar.IsWhiteSpacetoken.ToStringtoken.Clear
The source file contains the complete code; exact excerpts follow.
Internal implementation code; this is not a standalone script.
private static IEnumerable<ConsoleToken> Tokenize(string commandLine)
{
var token = new StringBuilder();
char quote = '\0';
bool started = false, quoted = false;
commandLine = commandLine ?? string.Empty;
for (int index = 0; index < commandLine.Length; index++)
{
// …
if (c == '\\' && quote != '\0')
// …
if (index + 1 < commandLine.Length && commandLine[index + 1] == quote)
// …
if ((count & 1) != 0) { token.Append(quote); index++; }
// …
if (quote != '\0')
// …
if (c == quote)
// …
if (index + 1 < commandLine.Length && commandLine[index + 1] == quote)
// …
if (c == '\'' || c == '"')
// …
if (char.IsWhiteSpace(c))
// …
if (started)
// …
yield return new ConsoleToken(token.ToString(), quoted);
// …
started = true;
token.Append(c);
}
if (quote != '\0')
throw new NativeSubrutineException("Unterminated quote in UO.Exec command.");
if (started)
yield return new ConsoleToken(token.ToString(), quoted);
}Performs the displayed calls and state updates.
Parameters: InjectionValue[] array, HashSet<InjectionValue[]> ancestors, int depth
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionValue.cs:426.
private static string FormatArray(InjectionValue[] array, HashSet<InjectionValue[]> ancestors, int depth)
Result: string.
Conditions:
array == nulldepth >= 256!ancestors.Add(array)
Calls:
ancestors.Addstring.Joinarray.SelectFormatArrayvalue.ToStringancestors.Remove
Internal implementation code; this is not a standalone script.
private static string FormatArray(InjectionValue[] array, HashSet<InjectionValue[]> ancestors, int depth)
{
if (array == null) return string.Empty;
if (depth >= 256)
throw new NativeSubrutineException("Array text exceeds the maximum nesting depth of 256.");
if (!ancestors.Add(array))
throw new NativeSubrutineException("Cannot convert a cyclic array to text.");
try
{
return string.Join("|", array.Select(value => value.Kind == InjectionValueKind.Array
? FormatArray(value.Array, ancestors, depth + 1) : value.ToString()));
}
finally { ancestors.Remove(array); }
}Performs the displayed calls and state updates.
Parameters: string name, int type, int hue
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/State/NamedIgnoreLists.cs:32.
public void Add(string name, int type, int hue)
Result: void.
Calls:
RequireNameNormalizeFilterFor
Internal implementation code; this is not a standalone script.
public void Add(string name, int type, int hue)
{
name = RequireName(name);
type = Normalize(type);
hue = Normalize(hue);
lock (sync)
{
var rules = new HashSet<(int Type, int Hue)>(FilterFor(name).Rules) { (type, hue) };
lists[name] = new IgnoreTypeFilter(rules);
}
}Performs the displayed calls and state updates.
Parameters: int value
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/State/NamedIgnoreLists.cs:109.
private static int Normalize(int value)
Result: int.
Conditions:
value > ushort.MaxValue
Calls:
nameof
Internal implementation code; this is not a standalone script.
private static int Normalize(int value)
{
if (value > ushort.MaxValue) throw new ArgumentOutOfRangeException(nameof(value), "Ignore type and color must be -1 or 0..65535.");
return value < 0 || value == ushort.MaxValue ? -1 : value;
}ClassicUO — Bad Newbie & C# Scripts IDE