EN Runtime Helpers F - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki
Українська · Русский · 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:109.
private IDisposable BindWorker()
Result: IDisposable.
Calls:
—
Internal implementation code; this is not a standalone script.
private IDisposable BindWorker()
{
var previous = Current.Value;
Current.Value = new Ambient(this, previous);
return new Release(() => Current.Value = previous);
}Performs the displayed calls and state updates.
Parameters: string eventName, Func<object?[], Task> handler
Source: Project_Full/src/ClassicUO.CSharp/CSharpCallbacks.cs:227.
public IDisposable Subscribe(string eventName, Func<object?[], Task> handler)
Result: IDisposable.
Conditions:
events is null
Calls:
ArgumentNullException.ThrowIfNullVerifyevents.Subscribelisteners.Addsource.DisposeRemove
Internal implementation code; this is not a standalone script.
public IDisposable Subscribe(string eventName, Func<object?[], Task> handler)
{
ArgumentNullException.ThrowIfNull(handler);
Verify();
if (events is null) throw new InvalidOperationException("Client events require a connected C# event source.");
var source = events.Subscribe(eventName);
var listener = new Listener(eventName, source, handler);
try { lock (sync) { Verify(); listeners.Add(listener); } }
catch { source.Dispose(); throw; }
return new Release(() => Remove(listener));
}Performs the displayed calls and state updates.
Parameters: StateEvent state
Source: Project_Full/src/ClassicUO.CSharp/CSharpCallbacks.cs:392.
private void Trigger(StateEvent state)
Result: void.
Conditions:
stateEvents.GetValueOrDefault(state.Name) != state!state.Repeatstate.Handler.Length == 0Exists(state.Handler)
Calls:
stateEvents.GetValueOrDefaultRemoveStateExistsStarthost.HasCSharpScripthost.ExecuteCSharpScript
Internal implementation code; this is not a standalone script.
private void Trigger(StateEvent state)
{
lock (sync) if (stateEvents.GetValueOrDefault(state.Name) != state) return;
if (!state.Repeat) RemoveState(state.Name);
if (state.Handler.Length == 0) return;
if (Exists(state.Handler)) Start(state.Handler);
else if (events is ICSharpScriptHost host && host.HasCSharpScript(state.Handler))
host.ExecuteCSharpScript("exec \"" + state.Handler + "\"");
else throw new ArgumentException($"Register the C# routine or load the C# event script '{state.Handler}' before enabling this handler.");
}Performs the displayed calls and state updates.
Parameters: ushort skillindex, byte lockstate
Source: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:729.
public static void ChangeSkillLockStatus(ushort skillindex, byte lockstate)
Result: void.
Calls:
Socket.Send_SkillStatusChangeRequest
Internal implementation code; this is not a standalone script.
public static void ChangeSkillLockStatus(ushort skillindex, byte lockstate)
{
Socket.Send_SkillStatusChangeRequest(skillindex, lockstate);
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:629.
public int CircleTrans()
Result: int.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public int CircleTrans() => Invoke(() => ProfileManager.CurrentProfile?.UseCircleOfTransparency == true ? 1 : 0);Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3079.
public void CloseClientGump(int id)
Result: void.
Calls:
InvokeServerGumpsUnsafe().Where(gump => gump.ServerSerial == (uint)id).ToArrayServerGumpsUnsafe().WhereServerGumpsUnsafegump.Dispose
Internal implementation code; this is not a standalone script.
public void CloseClientGump(int id) => Invoke(() =>
{
foreach (Gump gump in ServerGumpsUnsafe().Where(gump => gump.ServerSerial == (uint)id).ToArray())
gump.Dispose();
});Performs the displayed calls and state updates.
Parameters: Control control
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:4287.
private static int ControlButtonId(Control control)
Result: int.
Calls:
—
Internal implementation code; this is not a standalone script.
private static int ControlButtonId(Control control) => control is Button b ? b.ButtonID : ((SessionGumpControl)control).ButtonId;Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2151.
public void DeleteJournal()
Result: void.
Calls:
InvokeJournalManager.Entries.Clear
Internal implementation code; this is not a standalone script.
public void DeleteJournal() => Invoke(() =>
{
JournalManager.Entries.Clear();
_journalLine = 0;
_journalMatchCount = 0;
_lastJournalMatch = null;
});Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:158.
public int Dexterity
Result: int.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public int Dexterity => Invoke(() => _world.Player is { IsDestroyed: false } player ? player.Dexterity : 0);Performs the displayed calls and state updates.
Parameters: int index
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3054.
public int GetGumpId(int index)
Result: int.
Calls:
InvokeServerGumpsUnsafe().ElementAtOrDefaultServerGumpsUnsafe
Internal implementation code; this is not a standalone script.
public int GetGumpId(int index) => Invoke(() => (int)(ServerGumpsUnsafe().ElementAtOrDefault(index)?.ServerSerial ?? 0));Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2946.
public int[] GetIgnoreList()
Result: int[].
Calls:
State.IgnoredSerials.OrderBy(serial => serial).ToArrayState.IgnoredSerials.OrderBy
Internal implementation code; this is not a standalone script.
public int[] GetIgnoreList() => State.IgnoredSerials.OrderBy(serial => serial).ToArray();Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:242.
public int GetMaxStamina(int id)
Result: int.
Calls:
Invoke_world.Get
Internal implementation code; this is not a standalone script.
public int GetMaxStamina(int id) => Invoke(() => (_world.Get(unchecked((uint)id)) as Mobile)?.StaminaMax ?? 0);Performs the displayed calls and state updates.
Parameters: int timeoutMs
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:345.
public int GetPing(int timeoutMs)
Result: int.
Calls:
TryProbeServerPing
Internal implementation code; this is not a standalone script.
public int GetPing(int timeoutMs)
=> TryProbeServerPing(timeoutMs, out int pingMs) ? pingMs : -1;Performs the displayed calls and state updates.
Parameters: string name, bool current, bool cap
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2320.
public double GetSkillValue(string name, bool current, bool cap)
Result: double.
Conditions:
skill == null
Calls:
InvokeFindSkillUnsafe
Internal implementation code; this is not a standalone script.
public double GetSkillValue(string name, bool current, bool cap) => Invoke(() =>
{
Skill skill = FindSkillUnsafe(name);
if (skill == null) return 0d;
// Convert the protocol's tenths directly to the runtime's Double.
// Widening Skill.Value/Base/Cap first preserves their Single rounding error.
return (cap ? skill.CapFixed : current ? skill.ValueFixed : skill.BaseFixed) / 10d;
});Performs the displayed calls and state updates.
Parameters: int stat
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2336.
public int GetStatLockState(int stat)
Result: int.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public int GetStatLockState(int stat) => Invoke(() => stat switch
{
0 => (int)(_world.Player?.StrLock ?? Lock.Up),
1 => (int)(_world.Player?.DexLock ?? Lock.Up),
2 => (int)(_world.Player?.IntLock ?? Lock.Up),
_ => -1
});Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2387.
string ReadTooltip()
Result: string.
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { if (!_world.OPL.TryGetNameAndData(serial, out string name, out string data)) return null; if (string.IsNullOrWhiteSpace(name)) return data ?? string.Empty; if (string.IsNullOrWhiteSpace(data)) return name; return name + Environment.NewLine + data; }). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { if (!_world.OPL.TryGetNameAndData(serial, out string name, out string data)) return null; if (string.IsNullOrWhiteSpace(name)) return data ?? string.Empty; if (string.IsNullOrWhiteSpace(data)) return name; return name + Environment.NewLine + data; }). Overload candidates: the source does not establish which candidate is selected.
Internal implementation code; this is not a standalone script.
string ReadTooltip() => Invoke(() =>
{
if (!_world.OPL.TryGetNameAndData(serial, out string name, out string data))
return null;
if (string.IsNullOrWhiteSpace(name)) return data ?? string.Empty;
if (string.IsNullOrWhiteSpace(data)) return name;
return name + Environment.NewLine + data;
});Performs the displayed calls and state updates.
Parameters: int objectId
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2664.
public (int ClilocID, string[] Parameters)[] GetTooltipRecords(int objectId)
Result: (int ClilocID, string[] Parameters)[].
Conditions:
serial == 0records.Length != 0Invoke(() => _world.OPL.Contains(serial))
Calls:
Array.Empty<(int, string[])>Invoke_world.OPL.GetRecordsReadRecords_world.OPL.Contains_cancellationToken.ThrowIfCancellationRequested_cancellationToken.WaitHandle.WaitOne
Internal implementation code; this is not a standalone script.
public (int ClilocID, string[] Parameters)[] GetTooltipRecords(int objectId)
{
uint serial = unchecked((uint)objectId);
if (serial == 0)
return Array.Empty<(int, string[])>();
(int ClilocID, string[] Parameters)[] ReadRecords() => Invoke(() => _world.OPL.GetRecords(serial));
var records = ReadRecords();
if (records.Length != 0)
return records;
if (Invoke(() => _world.OPL.Contains(serial)))
return records;
for (int waited = 0; waited < 120; waited += 10)
{
_cancellationToken.ThrowIfCancellationRequested();
_cancellationToken.WaitHandle.WaitOne(10);
records = ReadRecords();
if (records.Length != 0)
return records;
}
_cancellationToken.ThrowIfCancellationRequested();
return Array.Empty<(int, string[])>();
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2449.
public int[] GetWeaponAbilities()
Result: int[].
Calls:
-
Invoke -
`.Abilities
.Select(value => (int)((byte)value & 0x7F)) .Where(value => value > 0) .ToArray` -
`.Abilities
.Select(value => (int)((byte)value & 0x7F)) .Where` -
`.Abilities
.Select` -
Array.Empty<int>
Internal implementation code; this is not a standalone script.
public int[] GetWeaponAbilities() => Invoke(() => _world.Player?.Abilities
.Select(value => (int)((byte)value & 0x7F))
.Where(value => value > 0)
.ToArray() ?? Array.Empty<int>());Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:231.
public int GetY(int id)
Result: int.
Calls:
WithEntity
Internal implementation code; this is not a standalone script.
public int GetY(int id) => WithEntity(id, e => e.Y);Performs the displayed calls and state updates.
Parameters: string message
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1737.
public void GlobalChatSend(string message)
Result: void.
Calls:
InvokeNetClient.Socket.Send_ChatMessageCommand
Internal implementation code; this is not a standalone script.
public void GlobalChatSend(string message) => Invoke(() => NetClient.Socket.Send_ChatMessageCommand(message ?? string.Empty));Performs the displayed calls and state updates.
Parameters: int x, int y, int z, int map
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1590.
public int HasDoorAt(int x, int y, int z, int map)
Result: int.
Conditions:
_world.Map == null || map != _world.MapIndexMath.Abs(tile.Z - z) > 20tile is Static staticTiletile is Multi multiTile
Calls:
Invoke_world.Map.GetTileMath.Abs
Internal implementation code; this is not a standalone script.
public int HasDoorAt(int x, int y, int z, int map) => Invoke(() =>
{
if (_world.Map == null || map != _world.MapIndex)
return 0;
for (GameObject tile = _world.Map.GetTile(x, y); tile != null; tile = tile.TNext)
{
if (Math.Abs(tile.Z - z) > 20)
continue;
bool isDoor = false;
if (tile is Static staticTile)
isDoor = staticTile.ItemData.IsDoor;
else if (tile is Multi multiTile)
isDoor = multiTile.ItemData.IsDoor;
else if (tile is Item itemTile)
isDoor = itemTile.ItemData.IsDoor;
if (isDoor)
return 1;
}
return 0;
});Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1612.
public void HelpRequest()
Result: void.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public void HelpRequest() => Invoke(GameActions.RequestHelp);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1704.
public int InParty()
Result: int.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public int InParty() => Invoke(() => _world.Party.Leader != 0 ? 1 : 0);Performs the displayed calls and state updates.
Parameters: Func<T> callback
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:4349.
private T Invoke<T>(Func<T> callback)
Result: T.
Calls:
_manager.InvokeOnGameThread
Internal implementation code; this is not a standalone script.
private T Invoke<T>(Func<T> callback) => _manager.InvokeOnGameThread(callback, _cancellationToken);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:590.
public int IsMoving()
Result: int.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public int IsMoving() => Invoke(() => _world.Player != null && (_world.Player.Pathfinder.AutoWalking || _world.Player.Steps.Count > 0) ? 1 : 0);Performs the displayed calls and state updates.
Parameters: Mobile mobile
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:4142.
private bool IsSelfMobile(Mobile mobile)
Result: bool.
Calls:
ReferenceEquals
Internal implementation code; this is not a standalone script.
private bool IsSelfMobile(Mobile mobile)
{
PlayerMobile player = _world.Player;
return player != null && (ReferenceEquals(mobile, player) || mobile?.Serial == player.Serial);
}Performs the displayed calls and state updates.
Parameters: int key
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1561.
public void KeyPress(int key)
Result: void.
Calls:
InvokeRequireGameInputkeybd_event
Internal implementation code; this is not a standalone script.
public void KeyPress(int key) => Invoke(() =>
{
RequireGameInput();
keybd_event((byte)key, 0, 0, UIntPtr.Zero);
keybd_event((byte)key, 0, 2, UIntPtr.Zero);
});Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3987.
public void LoadHotkeys()
Result: void.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public void LoadHotkeys() => Invoke(_world.Macros.Load);Performs the displayed calls and state updates.
Parameters: Item item, int containerId, int range, bool recursive, bool checkVertical = true
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:4177.
private bool MatchesFindContainer(Item item, int containerId, int range, bool recursive, bool checkVertical = true)
Result: bool.
Conditions:
containerId == -1 || containerId == 0containerId == 1containerId > 1
Calls:
Math.AbsIsInsideContainer
Internal implementation code; this is not a standalone script.
private bool MatchesFindContainer(Item item, int containerId, int range, bool recursive, bool checkVertical = true)
{
if (containerId == -1 || containerId == 0)
return item.RootContainer == _world.Player?.Serial;
if (containerId == 1)
return item.OnGround && item.Distance <= range
&& (!checkVertical || _world.Player == null || Math.Abs(item.Z - _world.Player.Z) <= State.FindVertical);
if (containerId > 1)
return recursive ? IsInsideContainer(item, (uint)containerId) : item.Container == (uint)containerId;
return true;
}Performs the displayed calls and state updates.
Parameters: int x, int y, int unknown, int minTile, int maxTile
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3557.
public string PrivateGetTile(int x, int y, int unknown, int minTile, int maxTile)
Result: string.
Conditions:
_world.Map is nulltile.Graphic >= minTile && tile.Graphic <= maxTile
Calls:
Invoke_world.Map.GetTile
Internal implementation code; this is not a standalone script.
public string PrivateGetTile(int x, int y, int unknown, int minTile, int maxTile) => Invoke(() =>
{
if (_world.Map is null) return "0x0000";
GameObject tile = _world.Map.GetTile(x, y);
while (tile != null)
{
if (tile.Graphic >= minTile && tile.Graphic <= maxTile)
{
return $"0x{tile.Graphic:X4}";
}
tile = tile.TNext;
}
return "0x0000";
});Performs the displayed calls and state updates.
Parameters: string text
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1580.
public void ReplyServerPrompt(string text)
Result: void.
Calls:
Invoke_world.MessageManager.SendServerPromptResponse
Internal implementation code; this is not a standalone script.
public void ReplyServerPrompt(string text) => Invoke(() => _world.MessageManager.SendServerPromptResponse(text ?? string.Empty));Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:966.
public int RequestInteractiveTileInfoTarget()
Result: int.
Conditions:
!_interactiveCommandsvalid
Calls:
Invoke_world.TargetManager.SetTargetingFormatTileInfoOpenInteractiveInfoGumpPrintInteractiveResult
Internal implementation code; this is not a standalone script.
public int RequestInteractiveTileInfoTarget()
{
if (!_interactiveCommands)
return 0;
return Invoke(() =>
{
_world.TargetManager.SetTargeting(selected =>
{
bool valid = selected != null && selected is not Entity;
string result = valid
? FormatTileInfo(selected, _world.MapIndex)
: "UO.InfoTile: select a land or static map tile, not an item or mobile.";
if (valid)
OpenInteractiveInfoGump("C# Tile Information", result);
PrintInteractiveResult(result);
}, 0, TargetType.Neutral);
PrintInteractiveResult("UO.InfoTile: target a land or static map tile.");
return 1;
});
}Performs the displayed calls and state updates.
Parameters: string message, int color
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1568.
public void Say(string message, int color)
Result: void.
Calls:
InvokeGameActions.SayReportStatus
Internal implementation code; this is not a standalone script.
public void Say(string message, int color) => Invoke(() =>
{
GameActions.Say(message ?? string.Empty, unchecked((ushort)color),
allowYokoCommand: SCRIPT_SAY_ALLOW_YOKO_COMMAND);
ReportStatus($"UO.UOSayColor delivered through ClassicUO server speech (hue=0x{unchecked((ushort)color):X4})");
});Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:140.
public int Self
Result: int.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public int Self => Invoke(() => _world.Player is { IsDestroyed: false } player
? unchecked((int)player.Serial) : 0);Performs the displayed calls and state updates.
Parameters: string reply
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3896.
public void SendShopReply(string reply)
Result: void.
Conditions:
_world.Shops.Last is { } shopgump == null
Calls:
Invokeshop.ReplyUIManager.Gumps.OfType<ShopGump>().LastOrDefaultUIManager.Gumps.OfType<ShopGump>Errorgump.SendYokoShopReply
Internal implementation code; this is not a standalone script.
public void SendShopReply(string reply) => Invoke(() =>
{
if (_world.Shops.Last is { } shop) { shop.Reply(reply); return; }
ShopGump gump = UIManager.Gumps.OfType<ShopGump>().LastOrDefault(item => item.World == _world && !item.IsDisposed && item.ShopState == null);
if (gump == null)
Error("UO.SendShopReply: no active vendor offer");
else
gump.SendYokoShopReply(reply);
});Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1699.
public void StopMoving()
Result: void.
Calls:
Invoke_manager.StopFollowing.Pathfinder.StopAutoWalk
Internal implementation code; this is not a standalone script.
public void StopMoving() => Invoke(() =>
{
_manager.StopFollowing();
_world.Player?.Pathfinder.StopAutoWalk();
});Performs the displayed calls and state updates.
Parameters: int windowIndex, int checkbox, int state, bool setState
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:657.
public int TradeCheck(int windowIndex, int checkbox, int state, bool setState)
Result: int.
Conditions:
gump == null || checkbox < 0 || checkbox > 1setState && checkbox == 0 && gump.ImAccepting != (state != 0)
Calls:
InvokeFindTradeGameActions.AcceptTrade
Internal implementation code; this is not a standalone script.
public int TradeCheck(int windowIndex, int checkbox, int state, bool setState) => Invoke(() =>
{
ISessionTrade gump = FindTrade(windowIndex);
if (gump == null || checkbox < 0 || checkbox > 1)
return 0;
if (setState && checkbox == 0 && gump.ImAccepting != (state != 0))
{
gump.ImAccepting = state != 0;
GameActions.AcceptTrade(gump.ID1, gump.ImAccepting);
}
return (checkbox == 0 ? gump.ImAccepting : gump.HeIsAccepting) ? 1 : 0;
});Performs the displayed calls and state updates.
Parameters: int windowIndex
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:647.
public int TradeOpponent(int windowIndex)
Result: int.
Calls:
InvokeFindTrade
Internal implementation code; this is not a standalone script.
public int TradeOpponent(int windowIndex) => Invoke(() =>
{
ISessionTrade gump = FindTrade(windowIndex);
return (int)(gump?.ID2 ?? 0);
});Performs the displayed calls and state updates.
Parameters: int layer
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2249.
public int Unequip(int layer)
Result: int.
Calls:
UnequipExpected
Internal implementation code; this is not a standalone script.
public int Unequip(int layer) => UnequipExpected(layer, null);Performs the displayed calls and state updates.
Parameters: string nameOrId
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:303.
public int UseVirtue(string nameOrId)
Result: int.
Conditions:
id < 1 || id > 8
Calls:
.Trim().ToLowerInvariant.Trimint.TryParseInvokeNetClient.Socket.Send_InvokeVirtueRequest
Internal implementation code; this is not a standalone script.
public int UseVirtue(string nameOrId)
{
int id = nameOrId?.Trim().ToLowerInvariant() switch
{
"honor" => 1, "sacrifice" => 2, "valor" => 3,
"compassion" => 4, "honesty" => 5, "humility" => 6,
"justice" => 7, "spirituality" => 8,
_ => int.TryParse(nameOrId, out int value) ? value : 0
};
if (id < 1 || id > 8) return 0;
Invoke(() => NetClient.Socket.Send_InvokeVirtueRequest((byte)id));
return 1;
}Performs the displayed calls and state updates.
Parameters: int id1, int id2
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:848.
public void WaitTargetObject(int id1, int id2)
Result: void.
Calls:
_manager.QueueTarget
Internal implementation code; this is not a standalone script.
public void WaitTargetObject(int id1, int id2)
{
_manager.QueueTarget((uint)id1, _cancellationToken);
_manager.QueueTarget((uint)id2, _cancellationToken);
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClientFontManager.cs:182.
internal static void Invalidate()
Result: void.
Calls:
—
Internal implementation code; this is not a standalone script.
internal static void Invalidate()
{
unchecked
{
_revision++;
}
}Performs the displayed calls and state updates.
Parameters: string text
Source: Project_Full/src/ClassicUO.Client/Game/Managers/JournalManager.cs:34.
internal static void AddYokoIgnoredText(string text)
Result: void.
Conditions:
!string.IsNullOrWhiteSpace(text)
Calls:
string.IsNullOrWhiteSpace_yokoIgnoredText.Addtext.Trim
Internal implementation code; this is not a standalone script.
internal static void AddYokoIgnoredText(string text)
{
if (!string.IsNullOrWhiteSpace(text))
_yokoIgnoredText.Add(text.Trim());
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:2810.
internal int GetScriptsCount()
Result: int.
Calls:
_running.Count
Internal implementation code; this is not a standalone script.
internal int GetScriptsCount() => _running.Count(entry => !entry.Value.Cancellation.IsCancellationRequested);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:3322.
private bool HasServerTargetCursor()
Result: bool.
Calls:
—
Internal implementation code; this is not a standalone script.
private bool HasServerTargetCursor() => _world.TargetManager.IsServerTarget;Performs the displayed calls and state updates.
Parameters: IEnumerable<YokoProcedureInfo> procedures, string filePath
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:2903.
internal static YokoProcedureInfo SelectFileEntryPoint(IEnumerable<YokoProcedureInfo> procedures, string filePath)
Result: YokoProcedureInfo.
Calls:
-
`(procedures ?? Enumerable.Empty())
.Where(item => item.CanRun && item.Kind.Equals("C#", StringComparison.Ordinal) && item.Name.Equals("Main", StringComparison.OrdinalIgnoreCase)) .OrderBy(item => item.LineNumber) .FirstOrDefault` -
`(procedures ?? Enumerable.Empty())
.Where(item => item.CanRun && item.Kind.Equals("C#", StringComparison.Ordinal) && item.Name.Equals("Main", StringComparison.OrdinalIgnoreCase)) .OrderBy` -
`(procedures ?? Enumerable.Empty())
.Where` -
Enumerable.Empty<YokoProcedureInfo> -
item.Kind.Equals -
item.Name.Equals
Internal implementation code; this is not a standalone script.
internal static YokoProcedureInfo SelectFileEntryPoint(IEnumerable<YokoProcedureInfo> procedures, string filePath)
{
// Discovery publishes one C# file/project entry. Helper methods
// stay inside that program and are never separate file launches.
return (procedures ?? Enumerable.Empty<YokoProcedureInfo>())
.Where(item => item.CanRun
&& item.Kind.Equals("C#", StringComparison.Ordinal)
&& item.Name.Equals("Main", StringComparison.OrdinalIgnoreCase))
.OrderBy(item => item.LineNumber)
.FirstOrDefault();
}Performs the displayed calls and state updates.
Parameters: string value,string delimiter
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApi.cs:47.
private static int GetWordCount(string value,string delimiter)
Result: int.
Calls:
SplitWords
Internal implementation code; this is not a standalone script.
private static int GetWordCount(string value,string delimiter) => SplitWords(value,delimiter).Length;Performs the displayed calls and state updates.
Parameters: InjectionValue[] arguments
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4063.
private void AddType(InjectionValue[] arguments)
Result: void.
Conditions:
arguments[0].Kind != InjectionValueKind.Stringarguments.Length == 2arguments[1].Kind != InjectionValueKind.Integer && arguments[1].Kind != InjectionValueKind.String!(bridge is IApiTypeSelectionBridge selection)
Calls:
NamedTypes.ValidateNamestate.Types.SetResolveTypeSystemMessageselection.SelectType
Internal implementation code; this is not a standalone script.
private void AddType(InjectionValue[] arguments)
{
if (arguments[0].Kind != InjectionValueKind.String)
throw new NativeSubrutineException("UO.AddType name must be a string.");
string name = NamedTypes.ValidateName(arguments[0].String);
if (arguments.Length == 2)
{
if (arguments[1].Kind != InjectionValueKind.Integer && arguments[1].Kind != InjectionValueKind.String)
throw new NativeSubrutineException("UO.AddType type must be an integer graphic or a registered type name.");
state.Types.Set(name, ResolveType(arguments[1]));
return;
}
if (!(bridge is IApiTypeSelectionBridge selection))
throw new NativeSubrutineException("UO.AddType interactive selection is unavailable in this host.");
SystemMessage($"UO.AddType: select an item or mobile for '{name}'.");
int? selected = selection.SelectType();
if (selected.HasValue)
{
state.Types.Set(name, selected.Value);
SystemMessage($"UO.AddType: '{name}' = 0x{selected.Value:X4}.");
}
else
SystemMessage("UO.AddType: selection cancelled or not an item/mobile; previous type preserved.");
}Performs the displayed calls and state updates.
Parameters: string name
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5712.
public void Arm(string name)
Result: void.
Calls:
Equip
Internal implementation code; this is not a standalone script.
public void Arm(string name)
=> Equip(name, armSets, weaponLayers, "Weapon set requests processed.", "No weapons set with setarm.");Performs the displayed calls and state updates.
Parameters: string spellName
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5951.
public int Cast(string spellName)
Result: int.
Conditions:
NumberConversions.TryStr2Int((spellName ?? string.Empty).Trim(), out _)
Calls:
NumberConversions.TryStr2Int(spellName ?? string.Empty).TrimSystemMessageCastCore
Internal implementation code; this is not a standalone script.
public int Cast(string spellName)
{
if (NumberConversions.TryStr2Int((spellName ?? string.Empty).Trim(), out _))
{
SystemMessage("UO.Cast: use one spell name, for example UO.Cast(\"Heal\").");
return 0;
}
return CastCore(spellName) ? 1 : 0;
}Performs the displayed calls and state updates.
Parameters: InjectionValue[] values
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4943.
private int CompactFindNotoriety(InjectionValue[] values)
Result: int.
Conditions:
-
`values.Length == 2 && notoriety.Kind != InjectionValueKind.String
&& notoriety.Kind != InjectionValueKind.Array` -
values.Length > 6 -
container != -1 && container != 1
Calls:
ResolveTypebridge.FindNotorietyNumberConversions.ToIntResolveCompactDistancebridge.GetFindDistanceToBooleanResolveCompactMaxZbridge.GetFindVerticalConvertContainerFindFilteredMobileSerial
Internal implementation code; this is not a standalone script.
private int CompactFindNotoriety(InjectionValue[] values)
{
int type = ResolveType(values[0]);
InjectionValue notoriety = values[1];
// Keep the exact two-argument Stealth/native contract on the bridge.
// Extended overloads add the v50 distance/Z/color filters below.
if (values.Length == 2 && notoriety.Kind != InjectionValueKind.String
&& notoriety.Kind != InjectionValueKind.Array)
return bridge.FindNotoriety(type, NumberConversions.ToInt(notoriety));
int distance = values.Length > 2 ? ResolveCompactDistance(values[2]) : bridge.GetFindDistance();
bool nearest = values.Length > 3 && ToBoolean(values[3]);
int maxZ = values.Length > 4 ? ResolveCompactMaxZ(values[4]) : bridge.GetFindVertical();
int color = values.Length > 5 ? NumberConversions.ToInt(values[5]) : -1;
if (values.Length > 6)
{
int container = ConvertContainer(values[6]);
// Mobiles only exist in the world/ground search scope. An explicit
// item/container serial cannot contain a Mobile, so the filtered
// result must be empty instead of silently ignoring the argument.
if (container != -1 && container != 1)
return 0;
}
return FindFilteredMobileSerial(type, notoriety, distance, nearest, maxZ, color, false);
}Performs the displayed calls and state updates.
Parameters: InjectionValue[] values
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2307.
private InjectionValue CompactGetPathArray3D(InjectionValue[] values)
Result: InjectionValue.
Conditions:
values == null || values.Length < 10 || values.Length > 16
Calls:
BuildPortablePathNumberConversions.ToIntToBooleanMath.Max
Internal implementation code; this is not a standalone script.
private InjectionValue CompactGetPathArray3D(InjectionValue[] values)
{
if (values == null || values.Length < 10 || values.Length > 16)
throw new NativeSubrutineException("UO.GetPathArray3D expects 10..16 arguments.");
return BuildPortablePath(
NumberConversions.ToInt(values[0]), NumberConversions.ToInt(values[1]), NumberConversions.ToInt(values[2]),
NumberConversions.ToInt(values[3]), NumberConversions.ToInt(values[4]), NumberConversions.ToInt(values[5]),
NumberConversions.ToInt(values[6]), NumberConversions.ToInt(values[7]), NumberConversions.ToInt(values[8]),
true, ToBoolean(values[9]),
values.Length > 10 ? Math.Max(0, NumberConversions.ToInt(values[10])) : 0,
values.Length > 11 ? Math.Max(0, NumberConversions.ToInt(values[11])) : 0,
values.Length > 12 && ToBoolean(values[12]),
values.Length > 13 && ToBoolean(values[13]),
values.Length > 14 && ToBoolean(values[14]),
values.Length <= 15 || ToBoolean(values[15]));
}Performs the displayed calls and state updates.
Parameters: InjectionValue[] values
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4099.
private int CompactUseType(InjectionValue[] values)
Result: int.
Conditions:
values == null || values.Length == 0values.Length > 6nearestselected == 0
Calls:
-
ResolveType -
NumberConversions.ToInt -
ConvertContainer -
ResolveCompactDistance -
bridge.GetFindDistance -
ToBoolean -
ResolveCompactMaxZ -
bridge.GetFindVertical -
bridge.GetZ -
bridge.GetIgnoreList -
state.IgnoreTypeLists.FilterFor -
`EnumerateUseTypeItems(container)
.Where(id => id > 0 && (!ignored.Contains(id) && !MatchesIgnoredType(id, ignoredTypes))) .Where(id => type < 0 || type == 0xFFFF || bridge.GetGraphics(id) == type) .Where(id => color < 0 || color == 0xFFFF || bridge.GetColor(id) == color) .Where(id => distance < 0 || bridge.GetDistance(id) <= distance) .Where` -
`EnumerateUseTypeItems(container)
.Where(id => id > 0 && (!ignored.Contains(id) && !MatchesIgnoredType(id, ignoredTypes))) .Where(id => type < 0 || type == 0xFFFF || bridge.GetGraphics(id) == type) .Where(id => color < 0 || color == 0xFFFF || bridge.GetColor(id) == color) .Where` -
`EnumerateUseTypeItems(container)
.Where(id => id > 0 && (!ignored.Contains(id) && !MatchesIgnoredType(id, ignoredTypes))) .Where(id => type < 0 || type == 0xFFFF || bridge.GetGraphics(id) == type) .Where` -
`EnumerateUseTypeItems(container)
.Where(id => id > 0 && (!ignored.Contains(id) && !MatchesIgnoredType(id, ignoredTypes))) .Where` -
`EnumerateUseTypeItems(container)
.Where` -
EnumerateUseTypeItems -
ignored.Contains -
MatchesIgnoredType -
bridge.GetGraphics -
bridge.GetColor -
bridge.GetDistance -
ResolveUseTypeWorldHeight -
Math.Abs -
candidates.OrderBy(id => bridge.GetDistance(id)).ThenBy -
candidates.OrderBy -
candidates.FirstOrDefault -
SystemMessage -
UseObject
Internal implementation code; this is not a standalone script.
private int CompactUseType(InjectionValue[] values)
{
if (values == null || values.Length == 0)
throw new NativeSubrutineException("UO.UseType requires at least type.");
if (values.Length > 6)
throw new NativeSubrutineException("UO.UseType accepts at most type, color, container, distance, nearest, maxZ.");
int type = ResolveType(values[0]);
int color = values.Length > 1 ? NumberConversions.ToInt(values[1]) : -1;
int container = values.Length > 2 ? ConvertContainer(values[2]) : -1;
int distance = values.Length > 3 ? ResolveCompactDistance(values[3]) : bridge.GetFindDistance();
bool nearest = values.Length <= 4 || ToBoolean(values[4]);
int maxZ = values.Length > 5 ? ResolveCompactMaxZ(values[5]) : bridge.GetFindVertical();
int selfZ = bridge.GetZ(bridge.Self);
HashSet<int> ignored = new HashSet<int>(bridge.GetIgnoreList());
IgnoreTypeFilter ignoredTypes = state.IgnoreTypeLists.FilterFor(state.SelectedIgnoreList);
// A contained item's stored Z belongs to its container, not to the world.
// Cache ancestors for this selection so stacks in the same bag do not
// repeatedly cross the client bridge to resolve the same owner.
var worldHeights = new Dictionary<int, int?>();
var heightChain = new List<int>();
IEnumerable<int> candidates = EnumerateUseTypeItems(container)
.Where(id => id > 0 && (!ignored.Contains(id) && !MatchesIgnoredType(id, ignoredTypes)))
.Where(id => type < 0 || type == 0xFFFF || bridge.GetGraphics(id) == type)
.Where(id => color < 0 || color == 0xFFFF || bridge.GetColor(id) == color)
.Where(id => distance < 0 || bridge.GetDistance(id) <= distance)
.Where(id => maxZ < 0 || ResolveUseTypeWorldHeight(id, worldHeights, heightChain) is int z
&& Math.Abs((long)z - selfZ) <= maxZ);
if (nearest)
candidates = candidates.OrderBy(id => bridge.GetDistance(id)).ThenBy(id => id);
int selected = candidates.FirstOrDefault();
if (selected == 0)
{
SystemMessage("No matching item found for UO.UseType.");
return 0;
}
UseObject(selected);
return selected;
}Performs the displayed calls and state updates.
Parameters: InjectionValue[] values
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4210.
private int CompactWaitTarget(InjectionValue[] values)
Result: int.
Conditions:
values == null || values.Length == 0TryGetObject(targetValue, out int directTarget) && directTarget > 0targetSentinel != 0 && targetSentinel != -1selected <= 0
Calls:
TryGetObjectWaitTargetObjectNumberConversions.ToIntSystemMessagebridge.CancelNextTargetResolveCompactDistancebridge.GetFindDistanceToBooleanResolveCompactMaxZbridge.GetFindVerticalFindFilteredTargetSerial
Internal implementation code; this is not a standalone script.
private int CompactWaitTarget(InjectionValue[] values)
{
if (values == null || values.Length == 0)
throw new NativeSubrutineException("UO.WaitTarget requires at least target.");
InjectionValue targetValue = values[0];
if (TryGetObject(targetValue, out int directTarget) && directTarget > 0)
{
WaitTargetObject(directTarget);
return directTarget;
}
int targetSentinel = NumberConversions.ToInt(targetValue);
if (targetSentinel != 0 && targetSentinel != -1)
{
SystemMessage("UO.WaitTarget: invalid direct target.");
bridge.CancelNextTarget();
return 0;
}
InjectionValue type = values.Length > 1 ? values[1] : InjectionValue.MinusOne;
int color = values.Length > 2 ? NumberConversions.ToInt(values[2]) : -1;
int distance = values.Length > 3 ? ResolveCompactDistance(values[3]) : bridge.GetFindDistance();
InjectionValue notoriety = values.Length > 4 ? values[4] : InjectionValue.MinusOne;
bool nearest = values.Length <= 5 || ToBoolean(values[5]);
int maxZ = values.Length > 6 ? ResolveCompactMaxZ(values[6]) : bridge.GetFindVertical();
int selected = FindFilteredTargetSerial(type, color, distance, notoriety, nearest, maxZ);
if (selected <= 0)
{
SystemMessage("UO.WaitTarget: no object matches the requested filters; next target request canceled.");
bridge.CancelNextTarget();
return 0;
}
WaitTargetObject(selected);
return selected;
}Performs the displayed calls and state updates.
Parameters: int layer
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6530.
private string ConvertLayer(int layer)
Result: string.
Calls:
layerNumberToName.TryGetValue
Internal implementation code; this is not a standalone script.
private string ConvertLayer(int layer) => layerNumberToName.TryGetValue(layer, out string name)
? name
: $"0x{layer:X2}";Performs the displayed calls and state updates.
Parameters: InjectionValue id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3877.
public int Dead(InjectionValue id)
Result: int.
Conditions:
serial == bridge.Self
Calls:
GetObjectDeadbridge.IsDead
Internal implementation code; this is not a standalone script.
public int Dead(InjectionValue id)
{
int serial = GetObject(id);
if (serial == bridge.Self)
return Dead();
return serial > 0 ? bridge.IsDead(serial) : 0;
}Performs the displayed calls and state updates.
Parameters: string value
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2854.
private static string DecodeRecordingText(string value)
Result: string.
Calls:
Encoding.UTF8.GetStringConvert.FromBase64String
Internal implementation code; this is not a standalone script.
private static string DecodeRecordingText(string value)
=> Encoding.UTF8.GetString(Convert.FromBase64String(value ?? string.Empty));Performs the displayed calls and state updates.
Parameters: InjectionValue id, InjectionValue amount, InjectionValue timeout
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5363.
public int Drag(InjectionValue id, InjectionValue amount, InjectionValue timeout)
Result: int.
Conditions:
serial == 0result == 0 || timeoutMs <= 0bridge.Picking() != 0DateTime.UtcNow >= deadline
Calls:
GetObjectNumberConversions.ToIntMath.Maxbridge.DragItemDateTime.UtcNow.AddMillisecondsbridge.Pickingbridge.WaitSystemMessage
Internal implementation code; this is not a standalone script.
public int Drag(InjectionValue id, InjectionValue amount, InjectionValue timeout)
{
int serial = GetObject(id);
if (serial == 0)
return 0;
int requestedAmount = NumberConversions.ToInt(amount);
int timeoutMs = Math.Max(0, NumberConversions.ToInt(timeout));
int result = bridge.DragItem(serial, requestedAmount);
if (result == 0 || timeoutMs <= 0)
return result;
DateTime deadline = DateTime.UtcNow.AddMilliseconds(timeoutMs);
do
{
if (bridge.Picking() != 0)
return 1;
if (DateTime.UtcNow >= deadline)
break;
bridge.Wait(10);
}
while (true);
SystemMessage($"UO.Drag: item pickup was not observable within {timeoutMs} ms.");
return 0;
}Performs the displayed calls and state updates.
Parameters: string layer, string id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5858.
public int Equip(string layer, string id)
Result: int.
Calls:
EquipGetObject
Internal implementation code; this is not a standalone script.
public int Equip(string layer, string id) => Equip(layer, GetObject(id));Checks the conditions below and returns the displayed result.
Parameters: index
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1152.
string[] StringArrayArg(int index)
Result: string[].
Result: Array.Empty<string>().
Calls: Array.Empty<string>, arguments[index].Array.Select(value => value.ToString()).ToArray, arguments[index].Array.Select, Text.
Conditions: index >= arguments.Length.
Calls:
-
InjectionScript.Runtime.InjectionValue.ToString:value.ToString(). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(index).
Internal implementation code; this is not a standalone script.
string[] StringArrayArg(int index)
{
if (index >= arguments.Length) return Array.Empty<string>();
return arguments[index].Kind == InjectionValueKind.Array
? arguments[index].Array.Select(value => value.ToString()).ToArray()
: new[] { Text(index) };
}This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1742.
Result: new InjectionValue(legacyId).
Conditions: arguments[0].Kind != InjectionValueKind.Array; arguments[0].Kind == InjectionValueKind.String && !NumberConversions.TryStr2Int(arguments[0].String, out graphic); arguments[0].Array.Length < 4.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(1, bridge.WorldNumber). -
InjectionScript.Runtime.NumberConversions.TryStr2Int:NumberConversions.TryStr2Int(arguments[0].String, out graphic). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(1). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.AddUserStatic:AddUserStatic(graphic, bridge.GetX(bridge.Self), bridge.GetY(bridge.Self), bridge.GetZ(bridge.Self), 0, map). -
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). -
InjectionScript.Runtime.InjectionApiUO.AddUserStatic:AddUserStatic( NumberConversions.ToInt(item[0]), NumberConversions.ToInt(item[1]), NumberConversions.ToInt(item[2]), NumberConversions.ToInt(item[3]), item.Length > 4 ? NumberConversions.ToInt(item[4]) : 0, map). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(item[0]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(item[1]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(item[2]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(item[3]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(item[4]). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.WorldNumber:bridge.WorldNumber. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Self:bridge.Self.
Internal implementation code; this is not a standalone script.
case "adduserstatic":
{
int map = Arg(1, bridge.WorldNumber);
if (arguments[0].Kind != InjectionValueKind.Array)
{
int graphic = 0;
if (arguments[0].Kind == InjectionValueKind.String &&
!NumberConversions.TryStr2Int(arguments[0].String, out graphic))
{
int legacyId = state.NextUserStaticId++;
state.UserStatics[legacyId] = Text(0) + "|" + Text(1);
return new InjectionValue(legacyId);
}
graphic = arguments[0].Kind == InjectionValueKind.String
? graphic
: NumberConversions.ToInt(arguments[0]);
return new InjectionValue(AddUserStatic(graphic, bridge.GetX(bridge.Self), bridge.GetY(bridge.Self),
bridge.GetZ(bridge.Self), 0, map));
}
if (arguments[0].Array.Length < 4)
throw new NativeSubrutineException("AddUserStatic expects [graphic,x,y,z,color] and world number, or graphic,x,y,z,color,world.");
InjectionValue[] item = arguments[0].Array;
return new InjectionValue(AddUserStatic(
NumberConversions.ToInt(item[0]), NumberConversions.ToInt(item[1]), NumberConversions.ToInt(item[2]),
NumberConversions.ToInt(item[3]), item.Length > 4 ? NumberConversions.ToInt(item[4]) : 0, map));
}This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1288.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoSellRule:bridge.SetAutoSellRule(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 "autosell":
bridge.SetAutoSellRule(Arg(0), Arg(1), Arg(2)); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1596.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ClearContextMenu:bridge.ClearContextMenu().
Internal implementation code; this is not a standalone script.
case "clearcontextmenu": bridge.ClearContextMenu(); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2007.
new []
Result: [].
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RuntimeProductName:bridge.RuntimeProductName. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RuntimeProductVersion:bridge.RuntimeProductVersion. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ClientPath:bridge.ClientPath.
Internal implementation code; this is not a standalone script.
case "clientinfo":
return new InjectionValue(new[]
{
new InjectionValue(bridge.RuntimeProductName),
new InjectionValue(bridge.RuntimeProductVersion),
new InjectionValue(bridge.ClientPath)
});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:
-
InjectionScript.Runtime.InjectionApiUO.SystemMessage:SystemMessage(Text(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0).
Internal implementation code; this is not a standalone script.
case "addtojournal":
case "addtosystemjournal":
case "clientprint":
SystemMessage(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:1485.
Result: new InjectionValue(bridge.FindFullQuantity()).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindType:bridge.FindType(ResolveType(arguments[0]), Arg(1), StealthContainer(2), -1, false). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::StealthContainer:StealthContainer(2). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindFullQuantity:bridge.FindFullQuantity().
Internal implementation code; this is not a standalone script.
case "countex":
bridge.FindType(ResolveType(arguments[0]), Arg(1), StealthContainer(2), -1, false);
return new InjectionValue(bridge.FindFullQuantity());This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1303.
Result: new InjectionValue(state.DisconnectedTime.ToOADate()).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.UpdateConnectionState:UpdateConnectionState().
Internal implementation code; this is not a standalone script.
case "disconnectedtime":
UpdateConnectionState();
return new InjectionValue(state.DisconnectedTime.ToOADate());This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1497.
Result: new InjectionValue(bridge.FireResistance).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FireResistance:bridge.FireResistance.
Internal implementation code; this is not a standalone script.
case "fireresist": return new InjectionValue(bridge.FireResistance);This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1591.
Result: StringArray(bridge.GetMenuItems(Text(0), true)).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.StringArray:StringArray(bridge.GetMenuItems(Text(0), true)). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetMenuItems:bridge.GetMenuItems(Text(0), true). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0).
Internal implementation code; this is not a standalone script.
case "getmenuitemsex": return StringArray(bridge.GetMenuItems(Text(0), true));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1372.
Result: new InjectionValue(arguments.Length > 0 ? bridge.GetStamina(Arg(0)) : bridge.Stamina).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetStamina:bridge.GetStamina(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Stamina:bridge.Stamina.
Internal implementation code; this is not a standalone script.
case "getstam": return new InjectionValue(arguments.Length > 0 ? bridge.GetStamina(Arg(0)) : bridge.Stamina);This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1425.
Result: new InjectionValue(bridge.GetTooltip(Arg(0))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetTooltip:bridge.GetTooltip(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "getcliloc":
case "gettooltip":
return new InjectionValue(bridge.GetTooltip(Arg(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1516.
Result: new InjectionValue(bridge.GetTradeOpponent(Arg(0))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetTradeOpponent:bridge.GetTradeOpponent(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "gettradeopponent": return new InjectionValue(bridge.GetTradeOpponent(Arg(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1915.
Result: new InjectionValue(bridge.GlobalChatActiveChannel()).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GlobalChatActiveChannel:bridge.GlobalChatActiveChannel().
Internal implementation code; this is not a standalone script.
case "globalchatactivechannel": return new InjectionValue(bridge.GlobalChatActiveChannel());This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1918.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GlobalChatLeave:bridge.GlobalChatLeave().
Internal implementation code; this is not a standalone script.
case "globalchatleavechannel": bridge.GlobalChatLeave(); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1910.
Result: InjectionValue.Unit.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.QueueGumpControl:QueueGumpControl("radio", Arg(0), Text(1)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(1).
Internal implementation code; this is not a standalone script.
case "gumpautoradiobutton": QueueGumpControl("radio", Arg(0), Text(1)); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1511.
Result: new InjectionValue(bridge.IsContainer(Arg(0))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsContainer:bridge.IsContainer(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "iscontainer": return new InjectionValue(bridge.IsContainer(Arg(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1364.
Result: new InjectionValue(bridge.GetLocked(Arg(0, bridge.Self))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetLocked:bridge.GetLocked(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 "isparalyzed": return new InjectionValue(bridge.GetLocked(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:1837.
Result: new InjectionValue(state.LastStepUsedDoor).
Conditions: arguments.Length > 0.
Calls:
Internal implementation code; this is not a standalone script.
case "laststepquseddoor":
if (arguments.Length > 0) state.LastStepUsedDoor = Arg(0);
return new InjectionValue(state.LastStepUsedDoor);This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1907.
Result: SetIndexedGumpValue(Arg(0), "radio", Arg(1), Text(2)).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.SetIndexedGumpValue:SetIndexedGumpValue(Arg(0), "radio", 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 "numgumpradiobutton": return SetIndexedGumpValue(Arg(0), "radio", 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:1701.
Result: new InjectionValue(bridge.PartyMembersList().Select(serial => new InjectionValue(serial)).ToArray()).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PartyMembersList:bridge.PartyMembersList().
Internal implementation code; this is not a standalone script.
case "partymemberslist":
return new InjectionValue(bridge.PartyMembersList().Select(serial => new InjectionValue(serial)).ToArray());This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1503.
Result: new InjectionValue(bridge.FollowersMax).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FollowersMax:bridge.FollowersMax.
Internal implementation code; this is not a standalone script.
case "petsmax": return new InjectionValue(bridge.FollowersMax);This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1558.
Result: new InjectionValue(bridge.ProfileName).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ProfileName:bridge.ProfileName.
Internal implementation code; this is not a standalone script.
case "profilename": return new InjectionValue(bridge.ProfileName);This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1679.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.QuestRequest:bridge.QuestRequest().
Internal implementation code; this is not a standalone script.
case "questrequest": bridge.QuestRequest(); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1965.
Result: InjectionValue.Unit.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(1). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetName:bridge.GetName(bridge.Self). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(2). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetReconnectSelection:bridge.SetReconnectSelection(state.AutoReconnectShard, state.AutoReconnectCharacter, useAtEveryConnect). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ShardName:bridge.ShardName. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Self:bridge.Self.
Internal implementation code; this is not a standalone script.
case "setarextparams":
{
string requestedShard = arguments.Length > 0 ? Text(0) : string.Empty;
string requestedCharacter = arguments.Length > 1 ? Text(1) : string.Empty;
state.AutoReconnectShard = string.IsNullOrWhiteSpace(requestedShard)
? bridge.ShardName
: requestedShard;
state.AutoReconnectCharacter = string.IsNullOrWhiteSpace(requestedCharacter)
? bridge.GetName(bridge.Self) ?? string.Empty
: requestedCharacter;
int useAtEveryConnect = arguments.Length > 2 ? Arg(2) : 0;
bridge.SetReconnectSelection(state.AutoReconnectShard, state.AutoReconnectCharacter, useAtEveryConnect);
return InjectionValue.Unit;
}This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1319.
Result: InjectionValue.Unit.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoBuyDelay:bridge.SetAutoBuyDelay(state.AutoBuyDelay).
Internal implementation code; this is not a standalone script.
case "setautobuydelay":
state.AutoBuyDelay = Math.Max(0, Arg(0));
bridge.SetAutoBuyDelay(state.AutoBuyDelay);
return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2018.
Result: InjectionValue.Unit.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(2).
Internal implementation code; this is not a standalone script.
case "setglobal":
// Region overloads share the same cross-profile namespace as
// UO.SetGlobal(name, value). A separator keeps (region,name)
// unambiguous while preserving the two-argument public API.
globals.SetGlobal(Text(0) + "\u001F" + Text(1), Text(2));
return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1343.
Result: InjectionValue.Unit.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ClampMoveTimer:ClampMoveTimer(Arg(0), 200). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetMovementTimers:bridge.SetMovementTimers(state.RunMountTimer, state.RunUnmountTimer, state.WalkMountTimer, state.WalkUnmountTimer).
Internal implementation code; this is not a standalone script.
case "setrununmounttimer":
state.RunUnmountTimer = ClampMoveTimer(Arg(0), 200);
bridge.SetMovementTimers(state.RunMountTimer, state.RunUnmountTimer, state.WalkMountTimer, state.WalkUnmountTimer);
return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1526.
Result: new InjectionValue(bridge.StartScript(Text(0))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.StartScript:bridge.StartScript(Text(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0).
Internal implementation code; this is not a standalone script.
case "startscript": return new InjectionValue(bridge.StartScript(Text(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1335.
Result: new InjectionValue(state.MoveThroughNpc).
Conditions: arguments.Length > 0.
Calls:
Internal implementation code; this is not a standalone script.
case "movethroughnpc": if (arguments.Length > 0) state.MoveThroughNpc = Math.Max(0, Arg(0)); return new InjectionValue(state.MoveThroughNpc);Checks the conditions below and returns the displayed result.
Parameters: index, fallback
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2826.
int Arg(int index, int fallback = 0)
Result: int.
Result: fallback; serial; NumberConversions.ToInt(arguments[index]).
Calls: TryGetObject, NumberConversions.ToInt.
Conditions: index >= arguments.Length; arguments[index].Kind == InjectionValueKind.String && TryGetObject(arguments[index], out int serial).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.TryGetObject:TryGetObject(arguments[index], out int serial). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[index]).
Internal implementation code; this is not a standalone script.
int Arg(int index, int fallback = 0)
{
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]);
}This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2887.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0, 100). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetJournalLength:bridge.SetJournalLength(state.JournalLength).
Internal implementation code; this is not a standalone script.
case "changejournallength": state.JournalLength = Math.Max(1, Arg(0, 100)); bridge.SetJournalLength(state.JournalLength); break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2963.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.SystemMessage:SystemMessage("C# Scripts IDE: use UO.* in scripts or the configured chat prefix. Open Options > C# Scripts IDE > Manual.").
Internal implementation code; this is not a standalone script.
case "help": SystemMessage("C# Scripts IDE: use UO.* in scripts or the configured chat prefix. Open Options > C# Scripts IDE > Manual."); break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2975.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetLight:bridge.SetLight(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "light": bridge.SetLight(Arg(0)); break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2971.
Conditions: arguments.Length > 0.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.UseSkillAtTarget:UseSkillAtTarget(new InjectionValue("Poisoning"), arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.UseSkill:UseSkill("Poisoning").
Internal implementation code; this is not a standalone script.
case "poison":
if (arguments.Length > 0) UseSkillAtTarget(new InjectionValue("Poisoning"), arguments[0]);
else UseSkill("Poisoning");
break;Performs the displayed calls and state updates.
Parameters: string journalText, string patternsText, bool equals, bool ignoreCase
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5651.
private static int FindJournalPatternId(string journalText, string patternsText, bool equals, bool ignoreCase)
Result: int.
Conditions:
patterns.Length == 0found
Calls:
-
`(patternsText ?? string.Empty)
.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries) .Select(pattern => pattern.Trim()) .Where(pattern => pattern.Length > 0) .ToArray` -
`(patternsText ?? string.Empty)
.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries) .Select(pattern => pattern.Trim()) .Where` -
`(patternsText ?? string.Empty)
.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries) .Select` -
`(patternsText ?? string.Empty)
.Split` -
pattern.Trim -
candidate.Equals -
candidate.IndexOf
Internal implementation code; this is not a standalone script.
private static int FindJournalPatternId(string journalText, string patternsText, bool equals, bool ignoreCase)
{
string[] patterns = (patternsText ?? string.Empty)
.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
.Select(pattern => pattern.Trim())
.Where(pattern => pattern.Length > 0)
.ToArray();
if (patterns.Length == 0)
return -1;
string candidate = journalText ?? string.Empty;
StringComparison comparison = ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal;
for (int i = 0; i < patterns.Length; i++)
{
bool found = equals
? candidate.Equals(patterns[i], comparison)
: candidate.IndexOf(patterns[i], comparison) >= 0;
if (found)
return i;
}
return -1;
}Performs the displayed calls and state updates.
Parameters: int minX, int minY, int maxX, int maxY, int map, int[] tileTypes, bool statics
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2447.
private InjectionValue FindPortableTiles(int minX, int minY, int maxX, int maxY, int map, int[] tileTypes, bool statics)
Result: InjectionValue.
Conditions:
-
`(uint)minX > ushort.MaxValue || (uint)minY > ushort.MaxValue
|| (uint)maxX > ushort.MaxValue || (uint)maxY > ushort.MaxValue || (uint)map > byte.MaxValue` -
((long)lastX - firstX + 1) * ((long)lastY - firstY + 1) > 1_000_000L -
map != bridge.WorldNumber -
cells > 0 && Stopwatch.GetTimestamp() - started >= Stopwatch.Frequency / 1000
Calls:
Array.Empty<int>Math.MinMath.MaxArray.Empty<InjectionValue>Stopwatch.GetTimestampbridge.GetLandscapeTilewanted.Containsresult.Addbridge.GetStaticTilesbridge.Waitscheduler.ExecutePathQuerySliceScanSliceresult.ToArray
The source file contains the complete code; exact excerpts follow.
Internal implementation code; this is not a standalone script.
private InjectionValue FindPortableTiles(int minX, int minY, int maxX, int maxY, int map, int[] tileTypes, bool statics)
{
if ((uint)minX > ushort.MaxValue || (uint)minY > ushort.MaxValue
|| (uint)maxX > ushort.MaxValue || (uint)maxY > ushort.MaxValue
|| (uint)map > byte.MaxValue)
throw new NativeSubrutineException("Tile coordinates must be 0..65535 and map 0..255.");
var result = new List<InjectionValue>();
// …
if (((long)lastX - firstX + 1) * ((long)lastY - firstY + 1) > 1_000_000L)
throw new NativeSubrutineException("Tile search area is limited to 1,000,000 cells per call.");
if (map != bridge.WorldNumber)
return new InjectionValue(Array.Empty<InjectionValue>());
// …
if (map != bridge.WorldNumber) { mapChanged = true; return; }
// …
if (cells > 0 && Stopwatch.GetTimestamp() - started >= Stopwatch.Frequency / 1000) break;
if (!statics)
// …
if (tile.Length >= 2 && (wanted.Count == 0 || wanted.Contains(tile[0])))
// …
if (wanted.Count == 0 || wanted.Contains(records[i]))
// …
if (++y > lastY) { y = firstY; x++; }
// …
bridge.Wait(0);
if (bridge is IApiPathQueryScheduler scheduler) scheduler.ExecutePathQuerySlice(ScanSlice);
else ScanSlice();
if (mapChanged) return new InjectionValue(Array.Empty<InjectionValue>());
}
bridge.Wait(0);
return new InjectionValue(result.ToArray());
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3755.
public int GetDir()
Result: int.
Calls:
GetDir
Internal implementation code; this is not a standalone script.
public int GetDir() => GetDir("self");Performs the displayed calls and state updates.
Parameters: string id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3756.
public int GetDir(string id)
Result: int.
Calls:
GetDirGetObject
Internal implementation code; this is not a standalone script.
public int GetDir(string id) => GetDir(GetObject(id));Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3732.
public string GetGraphics()
Result: string.
Calls:
GetGraphics
Internal implementation code; this is not a standalone script.
public string GetGraphics() => GetGraphics(bridge.Self);Performs the displayed calls and state updates.
Parameters: string arg
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3720.
private string GetInfo(string arg)
Result: string.
Conditions:
arg.Equals("character", StringComparison.Ordinal)
Calls:
arg.EqualsGetName
Internal implementation code; this is not a standalone script.
private string GetInfo(string arg)
{
if (arg.Equals("character", StringComparison.Ordinal))
return GetName("self");
return "UNKNOWN";
}Performs the displayed calls and state updates.
Parameters: int direction
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3613.
private int GetKey(int direction)
Result: int.
Conditions:
direction == 0direction == 1direction == 2direction == 3
Calls:
—
Internal implementation code; this is not a standalone script.
private int GetKey(int direction)
{
if (direction == 0)
return 33;
else if (direction == 1)
return 39;
else if (direction == 2)
return 34;
else if (direction == 3)
return 40;
else if (direction == 4)
return 35;
else if (direction == 5)
return 37;
else if (direction == 6)
return 36;
else if (direction == 7)
return 38;
throw new NativeSubrutineException($"Invalid movement direction {direction}. Expected a value from 0 through 7.");
}Performs the displayed calls and state updates.
Parameters: string id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3860.
public string GetSerial(string id)
Result: string.
Calls:
NumberConversions.ToHexGetObject
Internal implementation code; this is not a standalone script.
public string GetSerial(string id) => NumberConversions.ToHex(GetObject(id));Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4045.
public void GetStatus(int id)
Result: void.
Calls:
bridge.GetStatus
Internal implementation code; this is not a standalone script.
public void GetStatus(int id) => bridge.GetStatus(id);Performs the displayed calls and state updates.
Parameters: string id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3686.
public int GetZ(string id)
Result: int.
Calls:
GetZGetObject
Internal implementation code; this is not a standalone script.
public int GetZ(string id) => GetZ(GetObject(id));InjectionScript.Runtime.InjectionApiUO.Hidden
Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3886.
public int Hidden(int id)
Result: int.
Calls:
bridge.Hidden
Internal implementation code; this is not a standalone script.
public int Hidden(int id) => bridge.Hidden(id);Performs the displayed calls and state updates.
Parameters: string id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5339.
public void Ignore(string id)
Result: void.
Calls:
IgnoreGetObject
Internal implementation code; this is not a standalone script.
public void Ignore(string id) => Ignore(GetObject(id));Performs the displayed calls and state updates.
Parameters: string name
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6171.
private static bool IsSupportedLegacyEventName(string name)
Result: bool.
Calls:
string.Equals
Internal implementation code; this is not a standalone script.
private static bool IsSupportedLegacyEventName(string name)
=> string.Equals(name, "SeeNewPlayer", StringComparison.OrdinalIgnoreCase)
|| string.Equals(name, "Death", StringComparison.OrdinalIgnoreCase)
|| string.Equals(name, "ChangeHitPoints", StringComparison.OrdinalIgnoreCase)
|| string.Equals(name, "ChangeMana", StringComparison.OrdinalIgnoreCase)
|| string.Equals(name, "ChangeStamina", StringComparison.OrdinalIgnoreCase);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3892.
public string LastMessage()
Result: string.
Calls:
bridge.LastMessage
Internal implementation code; this is not a standalone script.
public string LastMessage() => bridge.LastMessage();Performs the displayed calls and state updates.
Parameters: int id, IEnumerable<string> filters, int selfX, int selfY, int selfZ
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3801.
private bool MatchesMobileFilters(int id, IEnumerable<string> filters, int selfX, int selfY, int selfZ)
Result: bool.
Conditions:
bridge.IsDead(id) == 0bridge.IsDead(id) != 0distance > 4distance < 5 || distance > 9
Calls:
bridge.GetDistancebridge.GetZbridge.GetXbridge.GetYbridge.GetGraphicsIsHumanBodyExpandMobileFilters(raw ?? "all").Trim().ToLowerInvariant(raw ?? "all").Trimbridge.IsDeadbridge.IsNpc
Internal implementation code; this is not a standalone script.
private bool MatchesMobileFilters(int id, IEnumerable<string> filters, int selfX, int selfY, int selfZ)
{
int distance = bridge.GetDistance(id);
int z = bridge.GetZ(id);
int x = bridge.GetX(id);
int y = bridge.GetY(id);
int graphic = bridge.GetGraphics(id);
bool human = IsHumanBody(graphic);
foreach (string raw in ExpandMobileFilters(filters))
{
switch ((raw ?? "all").Trim().ToLowerInvariant())
{
case "": case "all": break;
case "dead": if (bridge.IsDead(id) == 0) return false; break;
case "alive": if (bridge.IsDead(id) != 0) return false; break;
case "near": if (distance > 4) return false; break;
case "medium": if (distance < 5 || distance > 9) return false; break;
case "far": if (distance < 10) return false; break;
case "below": if (z >= selfZ) return false; break;
case "above": if (z <= selfZ) return false; break;
case "north": if (y >= selfY) return false; break;
case "south": if (y <= selfY) return false; break;
case "east": if (x <= selfX) return false; break;
case "west": if (x >= selfX) return false; break;
case "human": if (!human) return false; break;
case "npc": if (bridge.IsNpc(id) == 0 || !human) return false; break;
case "mob": if (bridge.IsNpc(id) == 0 || human) return false; break;
default: throw new NativeSubrutineException($"Unknown FindMobile filter '{raw}'.");
}
}
return true;
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2136.
void StopOwnRequest()
Result: void.
Calls: bridge.StopMoving, ownership.StopMovementRequest.
Conditions: ownership == null.
Internal implementation code; this is not a standalone script.
void StopOwnRequest()
{
if (ownership == null) bridge.StopMoving();
else ownership.StopMovementRequest(requestId);
}Performs the displayed calls and state updates.
Parameters: InjectionValue value
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5176.
private HashSet<int> ParseTypeMask(InjectionValue value)
Result: HashSet<int>.
Conditions:
entry.Kind != InjectionValueKind.Stringstate.Types.TryGet(parts[i], out int graphic)
Calls:
(entry.String ?? string.Empty).Splitstate.Types.TryGetgraphic.ToStringstring.JoinParseIntMaskvalue.Array.Select(ResolveEntry).ToArrayvalue.Array.SelectResolveEntry
Internal implementation code; this is not a standalone script.
private HashSet<int> ParseTypeMask(InjectionValue value)
{
InjectionValue ResolveEntry(InjectionValue entry)
{
if (entry.Kind != InjectionValueKind.String) return entry;
string[] parts = (entry.String ?? string.Empty).Split('|');
for (int i = 0; i < parts.Length; i++)
if (state.Types.TryGet(parts[i], out int graphic))
parts[i] = graphic.ToString(CultureInfo.InvariantCulture);
return new InjectionValue(string.Join("|", parts));
}
return ParseIntMask(value.Kind == InjectionValueKind.Array
? new InjectionValue(value.Array.Select(ResolveEntry).ToArray()) : ResolveEntry(value));
}Performs the displayed calls and state updates.
Parameters: InjectionValue value
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.ClassMasks.cs:42.
private static string ReadClassName(InjectionValue value)
Result: string.
Conditions:
name.Length == 0 || name == "-1" || name.IndexOfAny(new[] { '|', ',', ';' }) >= 0 || name.Equals("any", StringComparison.OrdinalIgnoreCase) || name.Equals("all", StringComparison.OrdinalIgnoreCase)
Calls:
(value.String ?? string.Empty).Trimname.IndexOfAnyname.Equals
Internal implementation code; this is not a standalone script.
private static string ReadClassName(InjectionValue value)
{
string name = value.Kind == InjectionValueKind.String ? (value.String ?? string.Empty).Trim() : string.Empty;
if (name.Length == 0 || name == "-1" || name.IndexOfAny(new[] { '|', ',', ';' }) >= 0
|| name.Equals("any", StringComparison.OrdinalIgnoreCase) || name.Equals("all", StringComparison.OrdinalIgnoreCase))
throw new StatementFailedException("ClassMask: use a nonempty class name without | , ; or reserved any/all/-1.");
return name;
}Performs the displayed calls and state updates.
Parameters: int index
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5578.
private JournalEntrySnapshot ReadJournalSnapshot(int index)
Result: JournalEntrySnapshot.
Conditions:
bridge is IApiJournalReader readerindex < 0 || index >= bridge.JournalEntryCount()
Calls:
reader.ReadJournalEntrybridge.JournalEntryCountbridge.GetJournalTextbridge.JournalSerialIntbridge.JournalNameNumberConversions.ToIntbridge.JournalColorbridge.JournalFontbridge.JournalMessageTypebridge.JournalTextTypebridge.JournalTimestamp
Internal implementation code; this is not a standalone script.
private JournalEntrySnapshot ReadJournalSnapshot(int index)
{
if (bridge is IApiJournalReader reader)
return reader.ReadJournalEntry(index);
if (index < 0 || index >= bridge.JournalEntryCount())
return null;
return new JournalEntrySnapshot(0, index, bridge.GetJournalText(index), bridge.JournalSerialInt(index),
bridge.JournalName(index), NumberConversions.ToInt(bridge.JournalColor(index)), bridge.JournalFont(index),
bridge.JournalMessageType(index), bridge.JournalTextType(index), bridge.JournalTimestamp(index));
}Performs the displayed calls and state updates.
Parameters: int id, Dictionary<int, int?> cache, List<int> chain
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4144.
private int? ResolveUseTypeWorldHeight(int id, Dictionary<int, int?> cache, List<int> chain)
Result: int?.
Conditions:
cache.TryGetValue(id, out height)parent <= 0
Calls:
chain.Clearcache.TryGetValuechain.Addbridge.ContainerOfbridge.GetZ
Internal implementation code; this is not a standalone script.
private int? ResolveUseTypeWorldHeight(int id, Dictionary<int, int?> cache, List<int> chain)
{
chain.Clear();
int? height = null;
for (int depth = 0; depth < 128; depth++)
{
if (cache.TryGetValue(id, out height))
break;
// A repeated unresolved ancestor is malformed cyclic container data.
cache[id] = null;
chain.Add(id);
int parent = bridge.ContainerOf(id);
if (parent <= 0)
{
height = bridge.GetZ(id);
break;
}
id = parent;
}
foreach (int visited in chain)
cache[visited] = height;
return height;
}Performs the displayed calls and state updates.
Parameters: JournalEntrySnapshot entry
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5589.
private void SelectJournalEntry(JournalEntrySnapshot entry)
Result: void.
Calls:
—
Internal implementation code; this is not a standalone script.
private void SelectJournalEntry(JournalEntrySnapshot entry)
{
selectedJournalEntry = entry;
foundedTextIndex = entry?.Index ?? -1;
foundedTextId = -1;
}Performs the displayed calls and state updates.
Parameters: InjectionValue name, InjectionValue stateValue
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6119.
public void SetEvent(InjectionValue name, InjectionValue stateValue)
Result: void.
Calls:
SetEvent
Internal implementation code; this is not a standalone script.
public void SetEvent(InjectionValue name, InjectionValue stateValue)
=> SetEvent(name, stateValue, InjectionValue.True, new InjectionValue(string.Empty));Performs the displayed calls and state updates.
Parameters: InjectionValue identifier, InjectionValue key, InjectionValue stateValue
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3368.
public void SetGump(InjectionValue identifier, InjectionValue key, InjectionValue stateValue)
Result: void.
Calls:
bridge.SetGumpValueidentifier.ToStringNumberConversions.ToIntstateValue.ToString
Internal implementation code; this is not a standalone script.
public void SetGump(InjectionValue identifier, InjectionValue key, InjectionValue stateValue)
=> bridge.SetGumpValue(-1, identifier.ToString(), NumberConversions.ToInt(key), stateValue.ToString());Performs the displayed calls and state updates.
Parameters: string skillName, int variant
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5921.
public int SkillVal(string skillName, int variant)
Result: int.
Conditions:
!skillId.HasValue!skillValBaselines.ContainsKey(id)
Calls:
ConvertSkillNameSystemMessagebridge.SkillBaseValskillValBaselines.ContainsKeybridge.SkillValbridge.SkillLockVal
Internal implementation code; this is not a standalone script.
public int SkillVal(string skillName, int variant)
{
int? skillId = ConvertSkillName(skillName);
if (!skillId.HasValue)
{
SystemMessage("UO.SkillVal: unknown skill name.");
return 0;
}
int id = skillId.Value;
int baseValue = bridge.SkillBaseVal(id);
if (!skillValBaselines.ContainsKey(id))
skillValBaselines[id] = baseValue;
switch (variant)
{
case 0:
return bridge.SkillVal(id);
case 1:
return baseValue;
case 2:
return baseValue - skillValBaselines[id];
case 3:
return bridge.SkillLockVal(id);
default:
SystemMessage("UO.SkillVal: variant must be 0, 1, 2 or 3.");
return 0;
}
}Performs the displayed calls and state updates.
Parameters: InjectionValue name, out int id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3952.
public bool TryGetObject(InjectionValue name, out int id)
Result: bool.
Conditions:
name.Kind == InjectionValueKind.Integername.Kind == InjectionValueKind.Decimalname.Kind == InjectionValueKind.String
Calls:
TryGetObject
Internal implementation code; this is not a standalone script.
public bool TryGetObject(InjectionValue name, out int id)
{
if (name.Kind == InjectionValueKind.Integer)
{
id = name.Integer;
return true;
}
if (name.Kind == InjectionValueKind.Decimal)
{
id = unchecked((int)name.Decimal);
return true;
}
if (name.Kind == InjectionValueKind.String)
return TryGetObject(name.String, out id);
id = -1;
return false;
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5726.
public int Undress()
Result: int.
Calls:
Unequip
Internal implementation code; this is not a standalone script.
public int Undress()
=> Unequip(dressLayers, "Clothing removed.");Performs the displayed calls and state updates.
Parameters: string skillName
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5876.
private bool UseSkillCore(string skillName)
Result: bool.
Conditions:
!skillId.HasValuebridge.UseSkill(skillId.Value) == 0
Calls:
ConvertSkillNameSystemMessagebridge.UseSkillTimer
Internal implementation code; this is not a standalone script.
private bool UseSkillCore(string skillName)
{
var skillId = ConvertSkillName(skillName);
if (!skillId.HasValue)
{
SystemMessage("Unknown action skill name");
return false;
}
if (bridge.UseSkill(skillId.Value) == 0)
return false;
ticksSkill = Timer();
return true;
}Performs the displayed calls and state updates.
Parameters: int type, string color
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4090.
public int UseType(int type, string color)
Result: int.
Calls:
UseTypeNumberConversions.ToInt
Internal implementation code; this is not a standalone script.
public int UseType(int type, string color) => UseType(type, NumberConversions.ToInt(color));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:866.
values
Result: values.
Result: ``.
Calls:
-
InjectionScript.Runtime.FollowStopCondition.Parse:FollowStopCondition.Parse(values[3]). -
InjectionScript.Runtime.InjectionApiUO.GetObject:GetObject(values[0]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(values[1]). -
InjectionScript.Runtime.InjectionApiUO.ToBoolean:ToBoolean(values[2]).
Internal implementation code; this is not a standalone script.
values =>
{
FollowStopCondition[] conditions = FollowStopCondition.Parse(values[3]);
return new InjectionValue(bridge is IApiConditionalFollowBridge follow
? follow.Follow(GetObject(values[0]), NumberConversions.ToInt(values[1]), ToBoolean(values[2]), conditions) : 0);
}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:1048.
Result: bridge.Followers.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Followers:bridge.Followers.
Internal implementation code; this is not a standalone script.
() => bridge.FollowersThe 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:1059.
serial
Result: serial.
Result: serial > 0 && bridge.Exists(serial) != 0 && IsDeadState(serial) == 0 ? 1 : 0.
Calls: bridge.Exists, IsDeadState.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Exists:bridge.Exists(serial). -
InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases::IsDeadState:IsDeadState(serial).
Internal implementation code; this is not a standalone script.
serial => serial > 0 && bridge.Exists(serial) != 0 && IsDeadState(serial) == 0 ? 1 : 0InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases [GetHidden]
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:1061.
serial
Result: serial.
Result: bridge.Hidden(serial).
Calls: bridge.Hidden.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Hidden:bridge.Hidden(serial).
Internal implementation code; this is not a standalone script.
serial => bridge.Hidden(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: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:1068.
Result: bridge.IsMoving().
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsMoving:bridge.IsMoving().
Internal implementation code; this is not a standalone script.
() => bridge.IsMoving()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:487.
values
Result: values.
Result: ``.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.CompactWaitTarget:CompactWaitTarget(values).
Internal implementation code; this is not a standalone script.
values =>
{
CompactWaitTarget(values);
return InjectionValue.Unit;
}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)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))Performs the displayed calls and state updates.
Parameters: string str, out int value
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/NumberConversions.cs:59.
public static bool TryStr2Int(string str, out int value)
Result: bool.
Conditions:
string.IsNullOrWhiteSpace(str)str.Length > offset + 2 && str.Substring(offset, 2).Equals("0x", StringComparison.OrdinalIgnoreCase)!uint.TryParse(str.Substring(offset + 2), NumberStyles.AllowHexSpecifier, CultureInfo.InvariantCulture, out uint hex) || (negative && hex > 0x80000000u)
Calls:
string.IsNullOrWhiteSpacestr.Trimstr.Substring(offset, 2).Equalsstr.Substringuint.TryParseint.TryParse
Internal implementation code; this is not a standalone script.
public static bool TryStr2Int(string str, out int value)
{
value = 0;
if (string.IsNullOrWhiteSpace(str))
return false;
str = str.Trim();
int offset = str[0] == '+' || str[0] == '-' ? 1 : 0;
bool negative = str[0] == '-';
if (str.Length > offset + 2 && str.Substring(offset, 2).Equals("0x", StringComparison.OrdinalIgnoreCase))
{
if (!uint.TryParse(str.Substring(offset + 2), NumberStyles.AllowHexSpecifier,
CultureInfo.InvariantCulture, out uint hex) || (negative && hex > 0x80000000u))
return false;
value = negative ? unchecked(-(int)hex) : unchecked((int)hex);
return true;
}
return int.TryParse(str, NumberStyles.Integer, CultureInfo.InvariantCulture, out value);
}Returns the value of the expression below.
Parameters: x, y
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/PortablePathSearch.cs:35.
int Estimate(int x, int y)
Result: int.
Result: diagonal ? Math.Max(dx, dy) : dx + dy.
Calls: Math.Max, Math.Abs.
Internal implementation code; this is not a standalone script.
int Estimate(int x, int y)
{
int dx = Math.Max(0, Math.Abs(finishX - x) - accuracy);
int dy = Math.Max(0, Math.Abs(finishY - y) - accuracy);
return diagonal ? Math.Max(dx, dy) : dx + dy;
}Performs the displayed calls and state updates.
Parameters: InjectionRuntimeState state, IApiBridge bridge
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/ScriptPathObstacles.cs:11.
public static Func<int, int, bool> Create(InjectionRuntimeState state, IApiBridge bridge)
Result: Func<int, int, bool>.
Conditions:
state == null || state.BadLocations.Count == 0 && state.BadObjects.Count == 0parts.Length == 2 && int.TryParse(parts[0], out int x) && int.TryParse(parts[1], out int y) && x >= 0 && x <= ushort.MaxValue && y >= 0 && y <= ushort.MaxValueparts.Length == 3 && int.TryParse(parts[0], out int type) && int.TryParse(parts[1], out int hue) && int.TryParse(parts[2], out int radius) && type >= -1 && type <= ushort.MaxValue && hue >= -1 && hue <= ushort.MaxValue && radius >= 0 && radius <= byte.MaxValuerules.Count != 0
Calls:
value.Splitint.TryParselocations.Addrules.Addbridge.GetWorldItemsbridge.GetGraphicsbridge.GetColorMath.Maxregions.Addbridge.GetXbridge.GetYlocations.ContainsMath.Abs
Internal implementation code; this is not a standalone script.
public static Func<int, int, bool> Create(InjectionRuntimeState state, IApiBridge bridge)
{
if (state == null || state.BadLocations.Count == 0 && state.BadObjects.Count == 0) return null;
var locations = new HashSet<(int, int)>();
var rules = new List<(int Type, int Hue, int Radius)>();
var regions = new List<(int X, int Y, int Radius)>();
foreach (string value in state.BadLocations)
{
string[] parts = value.Split(',');
if (parts.Length == 2 && int.TryParse(parts[0], out int x) && int.TryParse(parts[1], out int y)
&& x >= 0 && x <= ushort.MaxValue && y >= 0 && y <= ushort.MaxValue) locations.Add((x, y));
}
foreach (string value in state.BadObjects)
{
string[] parts = value.Split(',');
if (parts.Length == 3 && int.TryParse(parts[0], out int type) && int.TryParse(parts[1], out int hue)
&& int.TryParse(parts[2], out int radius) && type >= -1 && type <= ushort.MaxValue
&& hue >= -1 && hue <= ushort.MaxValue && radius >= 0 && radius <= byte.MaxValue)
rules.Add((type & 0xFFFF, hue & 0xFFFF, radius));
}
if (rules.Count != 0)
{
foreach (int item in bridge.GetWorldItems())
{
int type = bridge.GetGraphics(item), hue = bridge.GetColor(item), radius = -1;
foreach (var rule in rules)
if ((rule.Type == 0xFFFF || rule.Type == type) && (rule.Hue == 0xFFFF || rule.Hue == hue))
radius = Math.Max(radius, rule.Radius);
if (radius >= 0) regions.Add((bridge.GetX(item), bridge.GetY(item), radius));
}
}
if (locations.Count == 0 && regions.Count == 0) return null;
return (x, y) =>
{
if (locations.Contains((x, y))) return true;
foreach (var region in regions)
if (Math.Abs((long)x - region.X) <= region.Radius && Math.Abs((long)y - region.Y) <= region.Radius) return true;
return false;
};
}Performs the displayed calls and state updates.
Parameters: int layer
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/State/EquipSet.cs:32.
public int GetAtLayer(int layer)
Result: int.
Calls:
equips.FirstOrDefault
Internal implementation code; this is not a standalone script.
public int GetAtLayer(int layer) => equips.FirstOrDefault(x => x.Layer == layer)?.Id ?? 0;Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/State/NamedIgnoreLists.cs:58.
public void Clear()
Result: void.
Calls:
lists.Clear
Internal implementation code; this is not a standalone script.
public void Clear() { lock (sync) lists.Clear(); }