Repository navigation
EN Runtime Helpers 7
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
Internal implementation code; this is not a standalone script.
This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.CSharp/CSharpCallbacks.cs:412.
Result: true.
Calls:
-
ClassicUO.CSharp.CSharpCallbacks.IsRunning:IsRunning(runningName).
Internal implementation code; this is not a standalone script.
case "FunRunning":
string runningName = Convert.ToString(arguments[0]) ?? "";
result = IsRunning(runningName) || events is ICSharpScriptHost runningHost && runningHost.IsCSharpScriptRunning(runningName) ? 1 : 0;
return true;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.CSharp/CSharpCallbacks.cs:426.
when Length== 1: string routine = Convert.ToString(arguments[0]) ?? ""
Result: when.
Calls: Convert.ToString.
Calls:
-
ClassicUO.CSharp.CSharpCallbacks.Exists:Exists(routine). -
ClassicUO.CSharp.CSharpCallbacks.Cancel:Cancel(routine).
Internal implementation code; this is not a standalone script.
case "Terminate" when arguments.Length == 1:
string routine = Convert.ToString(arguments[0]) ?? "";
if (Exists(routine)) { Cancel(routine); return true; }
if (Cancel(routine)) return true;
return false;Performs the displayed calls and state updates.
Parameters: object? value
Source: Project_Full/src/ClassicUO.CSharp/CSharpCallbacks.cs:335.
private static string HandlerName(object? value)
Result: string.
Conditions:
name.StartsWith("exec ", StringComparison.OrdinalIgnoreCase)name.StartsWith("_exec ", StringComparison.OrdinalIgnoreCase)
Calls:
(Convert.ToString(value) ?? "").TrimConvert.ToStringname.StartsWithname[5..].Trimname[6..].Trim
Internal implementation code; this is not a standalone script.
private static string HandlerName(object? value)
{
string name = (Convert.ToString(value) ?? "").Trim();
if (name.StartsWith("exec ", StringComparison.OrdinalIgnoreCase)) return name[5..].Trim();
if (name.StartsWith("_exec ", StringComparison.OrdinalIgnoreCase)) return name[6..].Trim();
return name;
}Performs the displayed calls and state updates.
Parameters: int page, string text
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2001.
public void BookSetPageText(int page, string text)
Result: void.
Conditions:
book == null!book.YokoTrySetPageText(page, text)
Calls:
InvokeGetOpenBookErrorbook.YokoTrySetPageText
Internal implementation code; this is not a standalone script.
public void BookSetPageText(int page, string text) => Invoke(() =>
{
ISessionBook book = GetOpenBook();
if (book == null) { Error("UO.BookSetPageText: no open book."); return; }
if (!book.YokoTrySetPageText(page, text))
Error("UO.BookSetPageText: invalid page, read-only book, too many lines, or a line is too long.");
});Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1581.
public void Bow()
Result: void.
Calls:
InvokeGameActions.EmoteAction
Internal implementation code; this is not a standalone script.
public void Bow() => Invoke(() => GameActions.EmoteAction("bow"));Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:701.
public void CloseMenu()
Result: void.
Calls:
Invoke_world.ServerMenus.Snapshotmenu.CancelForYoko
Internal implementation code; this is not a standalone script.
public void CloseMenu() => Invoke(() =>
{
foreach (SessionMenu menu in _world.ServerMenus.Snapshot())
menu.CancelForYoko();
});Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:168.
public int ColdResistance
Result: int.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public int ColdResistance => Invoke(() => CurrentPlayer?.ColdResistance ?? 0);Performs the displayed calls and state updates.
Parameters: string message
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3986.
public void Error(string message)
Result: void.
Calls:
ReportStatus
Internal implementation code; this is not a standalone script.
public void Error(string message) => ReportStatus(message);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2482.
public int FindCount()
Result: int.
Calls:
—
Internal implementation code; this is not a standalone script.
public int FindCount() => _findCount;Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:139.
public int FindItem
Result: int.
Calls:
—
Internal implementation code; this is not a standalone script.
public int FindItem => _findItem;Performs the displayed calls and state updates.
Parameters: int type, int notoriety
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2876.
public int FindNotoriety(int type, int notoriety)
Result: int.
Conditions:
-
`mobile.IsDestroyed || State.IgnoredSerials.Contains((int)mobile.Serial) || ignoredTypes.Matches(mobile.Graphic, mobile.Hue) || mobile == _world.Player
|| type >= 0 && type != 0xFFFF && mobile.Graphic != (ushort)type || notoriety >= 0 && (int)mobile.NotorietyFlag != notoriety || mobile.Distance > State.FindDistance || _world.Player != null && Math.Abs(mobile.Z - _world.Player.Z) > State.FindVertical`
Calls:
InvokeResetFindResultsState.IgnoreTypeLists.FilterForState.IgnoredSerials.ContainsignoredTypes.MatchesMath.AbsRegisterFound
Internal implementation code; this is not a standalone script.
public int FindNotoriety(int type, int notoriety)
{
return Invoke(() =>
{
ResetFindResults();
IgnoreTypeFilter ignoredTypes = State.IgnoreTypeLists.FilterFor(State.SelectedIgnoreList);
foreach (Mobile mobile in _world.Mobiles.Values)
{
if (mobile.IsDestroyed || State.IgnoredSerials.Contains((int)mobile.Serial) || ignoredTypes.Matches(mobile.Graphic, mobile.Hue) || mobile == _world.Player
|| type >= 0 && type != 0xFFFF && mobile.Graphic != (ushort)type
|| notoriety >= 0 && (int)mobile.NotorietyFlag != notoriety
|| mobile.Distance > State.FindDistance
|| _world.Player != null && Math.Abs(mobile.Z - _world.Player.Z) > State.FindVertical)
{
continue;
}
RegisterFound(mobile);
}
return _findItem;
});
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:184.
public int GameServerPort
Result: int.
Calls:
—
Internal implementation code; this is not a standalone script.
public int GameServerPort => Settings.GlobalSettings.Port;Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:234.
public int GetHP(int id)
Result: int.
Calls:
WithEntity
Internal implementation code; this is not a standalone script.
public int GetHP(int id) => WithEntity(id, e => e.Hits);Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:627.
public int GetLocked(int id)
Result: int.
Calls:
Invoke_world.Get
Internal implementation code; this is not a standalone script.
public int GetLocked(int id) => Invoke(() => (_world.Get(unchecked((uint)id)) as Mobile)?.IsParalyzed == true ? 1 : 0);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:344.
public int GetPing()
Result: int.
Calls:
—
Internal implementation code; this is not a standalone script.
public int GetPing() => NetClient.Socket.Statistics.ServerPing;Performs the displayed calls and state updates.
Parameters: buffer, offset, value
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3351.
static void Write32(byte[] buffer, int offset, int value)
Result: void.
Internal implementation code; this is not a standalone script.
static void Write32(byte[] buffer, int offset, int value)
{
buffer[offset] = (byte)value;
buffer[offset + 1] = (byte)(value >> 8);
buffer[offset + 2] = (byte)(value >> 16);
buffer[offset + 3] = (byte)(value >> 24);
}Performs the displayed calls and state updates.
Parameters: int tradeNumber
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:267.
public string GetTradeOpponentName(int tradeNumber)
Result: string.
Calls:
InvokeFindNumberedTrade
Internal implementation code; this is not a standalone script.
public string GetTradeOpponentName(int tradeNumber) => Invoke(() =>
{
ISessionTrade gump = FindNumberedTrade(tradeNumber);
return gump?.OpponentName ?? string.Empty;
});Performs the displayed calls and state updates.
Parameters: string pattern, int startTime, int endTime, int limit
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2130.
public int InJournalBetweenTimes(string pattern, int startTime, int endTime, int limit)
Result: int.
Calls:
now.AddMillisecondsMath.MaxMath.MinFindJournal
Internal implementation code; this is not a standalone script.
public int InJournalBetweenTimes(string pattern, int startTime, int endTime, int limit)
{
DateTime now = DateTime.Now;
DateTime start = now.AddMilliseconds(-Math.Max(startTime, endTime));
DateTime end = now.AddMilliseconds(-Math.Min(startTime, endTime));
return FindJournal(pattern, start, end, limit, false, true);
}Performs the displayed calls and state updates.
Parameters: string pattern, int startTime, int endTime, int limit
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2144.
public int InJournalSystemBetweenTimes(string pattern, int startTime, int endTime, int limit)
Result: int.
Calls:
now.AddMillisecondsMath.MaxMath.MinFindJournal
Internal implementation code; this is not a standalone script.
public int InJournalSystemBetweenTimes(string pattern, int startTime, int endTime, int limit)
{
DateTime now = DateTime.Now;
DateTime start = now.AddMilliseconds(-Math.Max(startTime, endTime));
DateTime end = now.AddMilliseconds(-Math.Min(startTime, endTime));
return FindJournal(pattern, start, end, limit, true, true);
}Performs the displayed calls and state updates.
Parameters: int x, int y
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:676.
public int IsWaterTile(int x, int y)
Result: int.
Calls:
InvokeAnyTileAt
Internal implementation code; this is not a standalone script.
public int IsWaterTile(int x, int y) => Invoke(() => AnyTileAt(x, y, tile =>
tile is Land land ? land.TileData.IsWet
: tile.Graphic < Client.UO.FileManager.TileData.StaticData.Length
&& Client.UO.FileManager.TileData.StaticData[tile.Graphic].IsWet) ? 1 : 0);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:142.
public int LastCorpse
Result: int.
Calls:
Invoke_world.Items.Values.Where(i => i.IsCorpse && !i.IsDestroyed).OrderBy(i => i.Distance).FirstOrDefault_world.Items.Values.Where(i => i.IsCorpse && !i.IsDestroyed).OrderBy_world.Items.Values.Where
Internal implementation code; this is not a standalone script.
public int LastCorpse => Invoke(() => (int)(_world.Items.Values.Where(i => i.IsCorpse && !i.IsDestroyed).OrderBy(i => i.Distance).FirstOrDefault()?.Serial ?? 0));Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:166.
public int MaxMana
Result: int.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public int MaxMana => Invoke(() => CurrentPlayer?.ManaMax ?? 0);Performs the displayed calls and state updates.
Parameters: int sourceContainerId, int type, int color, int targetContainerId, int x, int y, int z, int delayMs
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1455.
public int MoveItems(int sourceContainerId, int type, int color, int targetContainerId, int x, int y, int z, int delayMs)
Result: int.
Calls:
MoveContainerItems
Internal implementation code; this is not a standalone script.
public int MoveItems(int sourceContainerId, int type, int color, int targetContainerId, int x, int y, int z, int delayMs)
=> MoveContainerItems(sourceContainerId, type, color, targetContainerId, x, y, z, delayMs).Sent > 0 ? 1 : 0;Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:174.
public int Race
Result: int.
Calls:
Invoke
Internal implementation code; this is not a standalone script.
public int Race => Invoke(() => (int)(CurrentPlayer?.Race ?? 0));Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3132.
public void SelectGump(int id)
Result: void.
Conditions:
_selectedServerGump == null && id >= 0 && id < gumps.Count_selectedServerGump == null
Calls:
InvokeServerGumpsUnsafegumps.FirstOrDefaultError
Internal implementation code; this is not a standalone script.
public void SelectGump(int id) => Invoke(() =>
{
List<Gump> gumps = ServerGumpsUnsafe();
_selectedServerGump = gumps.FirstOrDefault(g => g.LocalSerial == (uint)id || g.ServerSerial == (uint)id);
if (_selectedServerGump == null && id >= 0 && id < gumps.Count)
{
_selectedServerGump = gumps[id];
}
if (_selectedServerGump == null)
{
Error($"UO.SelectGump: gump {id} was not found");
}
});Performs the displayed calls and state updates.
Parameters: int gumpIndex, int triggerId
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3000.
public int SendGumpSelect(int gumpIndex, int triggerId)
Result: int.
Calls:
InvokeServerGumpsUnsafe().ElementAtOrDefaultServerGumpsUnsafeSendGumpButtonUnsafe
Internal implementation code; this is not a standalone script.
public int SendGumpSelect(int gumpIndex, int triggerId) => Invoke(() =>
{
Gump gump = ServerGumpsUnsafe().ElementAtOrDefault(gumpIndex);
return SendGumpButtonUnsafe(gump, triggerId, $"gump index {gumpIndex} was not found");
});Performs the displayed calls and state updates.
Parameters: int type, int color, int quantity, int maxPrice, string name
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3905.
public void SetAutoBuyRule(int type, int color, int quantity, int maxPrice, string name)
Result: void.
Calls:
InvokeSetAutoShopRule
Internal implementation code; this is not a standalone script.
public void SetAutoBuyRule(int type, int color, int quantity, int maxPrice, string name) =>
Invoke(() => SetAutoShopRule(ProfileManager.CurrentProfile?.BackNewbieAutoBuyRules, true, type, color, quantity, maxPrice, name));Performs the displayed calls and state updates.
Parameters: int figureId, int kind, int coord, int x1, int y1, int x2, int y2, int brushColor, int brushStyle, int color, int worldNum, string text
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2551.
public int SetMapFigure(int figureId, int kind, int coord, int x1, int y1, int x2, int y2, int brushColor, int brushStyle, int color, int worldNum, string text)
Result: int.
Calls:
InvokeWorldMapGump.SetYokoMapFigure
Internal implementation code; this is not a standalone script.
public int SetMapFigure(int figureId, int kind, int coord, int x1, int y1, int x2, int y2, int brushColor, int brushStyle, int color, int worldNum, string text)
=> Invoke(() => WorldMapGump.SetYokoMapFigure(figureId, kind, coord, x1, y1, x2, y2, brushColor, brushStyle, color, worldNum, text));Performs the displayed calls and state updates.
Parameters: int enabled
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:317.
public void SetPauseScriptOnDisconnectStatus(int enabled)
Result: void.
Calls:
—
Internal implementation code; this is not a standalone script.
public void SetPauseScriptOnDisconnectStatus(int enabled) => _manager.PauseScriptsOnDisconnect = enabled != 0;Performs the displayed calls and state updates.
Parameters: string pattern
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:4073.
private static string[] SplitPatterns(string pattern)
Result: string[].
Calls:
(pattern ?? string.Empty).Split
Internal implementation code; this is not a standalone script.
private static string[] SplitPatterns(string pattern) => (pattern ?? string.Empty).Split('|', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);Performs the displayed calls and state updates.
Parameters: int type, int x, int y, int z
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:855.
public void TargetToTile(int type, int x, int y, int z)
Result: void.
Conditions:
_world.TargetManager.IsServerTarget
Calls:
Invoke_world.TargetManager.Target
Internal implementation code; this is not a standalone script.
public void TargetToTile(int type, int x, int y, int z) => Invoke(() =>
{
if (_world.TargetManager.IsServerTarget)
_world.TargetManager.Target((ushort)type, (ushort)x, (ushort)y, (short)z);
});Performs the displayed calls and state updates.
Parameters: string text
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1979.
public void TextPrint(string text)
Result: void.
Conditions:
_textWindow.Count >= MaxTextWindowLines
Calls:
_textWindow.RemoveRange_textWindow.AddInvokeYokoTextWindowGump.ShowReportStatus
Internal implementation code; this is not a standalone script.
public void TextPrint(string text)
{
if (_textWindow.Count >= MaxTextWindowLines)
_textWindow.RemoveRange(0,
_textWindow.Count - MaxTextWindowLines + 1);
_textWindow.Add(text ?? string.Empty);
_textWindowOpen = true;
Invoke(() =>
{
YokoTextWindowGump.Show(_world, _textWindow);
ReportStatus($"UO.TextPrint: {_textWindow.Count} line(s) visible");
});
}Performs the displayed calls and state updates.
Parameters: int timeoutMs, out int pingMs
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:348.
private bool TryProbeServerPing(int timeoutMs, out int pingMs)
Result: bool.
Conditions:
!_world.InGame || !NetClient.Socket.IsConnectedrequest.Token < 0NetClient.Socket.Statistics.GetPingEchoGeneration((byte)request.Token) != request.Generationtimeout == 0
Calls:
Math.MaxInvokeNetClient.Socket.Statistics.SendPingProbeNetClient.Socket.Statistics.GetPingEchoGenerationWaitMath.Min
Internal implementation code; this is not a standalone script.
private bool TryProbeServerPing(int timeoutMs, out int pingMs)
{
int timeout = Math.Max(0, timeoutMs);
(int Token, int Generation) request = Invoke(() =>
{
if (!_world.InGame || !NetClient.Socket.IsConnected)
return (-1, -1);
return NetClient.Socket.Statistics.SendPingProbe();
});
if (request.Token < 0)
{
pingMs = -1;
return false;
}
long deadline = Environment.TickCount64 + timeout;
do
{
if (NetClient.Socket.Statistics.GetPingEchoGeneration((byte)request.Token) != request.Generation)
{
pingMs = NetClient.Socket.Statistics.ServerPing;
return pingMs >= 0;
}
if (timeout == 0)
break;
long remaining = deadline - Environment.TickCount64;
if (remaining <= 0)
break;
Wait((int)Math.Min(10, remaining));
}
while (true);
pingMs = -1;
return false;
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1305.
public void UnsetReceivingContainer()
Result: void.
Calls:
—
Internal implementation code; this is not a standalone script.
public void UnsetReceivingContainer() => State.ReceivingContainer = 0;Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:778.
public void UseObject(int id)
Result: void.
Calls:
InvokeGameActions.DoubleClick
Internal implementation code; this is not a standalone script.
public void UseObject(int id) => Invoke(() => GameActions.DoubleClick(_world, (uint)id));Performs the displayed calls and state updates.
Parameters: string name, bool oneShot = false
Source: Project_Full/src/ClassicUO.Client/Game/Managers/LastCharacterManager.cs:107.
public static void OverrideLastCharacter(string name, bool oneShot = false)
Result: void.
Calls:
string.IsNullOrEmpty
Internal implementation code; this is not a standalone script.
public static void OverrideLastCharacter(string name, bool oneShot = false)
{
LastCharacterNameOverride = name ?? string.Empty;
LastCharacterNameOverrideOneShot = oneShot && !string.IsNullOrEmpty(LastCharacterNameOverride);
}Performs the displayed calls and state updates.
Parameters: uint? serial = null
Source: Project_Full/src/ClassicUO.Client/Game/Managers/UIManager.cs:277.
public static T GetGump<T>(uint? serial = null)
Result: T.
Conditions:
serial.HasValue!c.IsDisposed && c.LocalSerial == serial.Value && c is T t!c.IsDisposed && c is T t
Calls:
—
Internal implementation code; this is not a standalone script.
public static T GetGump<T>(uint? serial = null) where T : Control
{
if (serial.HasValue)
{
for (LinkedListNode<Gump> last = Gumps.Last; last != null; last = last.Previous)
{
Control c = last.Value;
if (!c.IsDisposed && c.LocalSerial == serial.Value && c is T t)
{
return t;
}
}
}
else
{
for (LinkedListNode<Gump> first = Gumps.First; first != null; first = first.Next)
{
Control c = first.Value;
if (!c.IsDisposed && c is T t)
{
return t;
}
}
}
return null;
}Performs the displayed calls and state updates.
Parameters: string scriptKey, string text
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:679.
internal void AppendIdeOutput(string scriptKey, string text)
Result: void.
Calls:
_ideToolBuffers.AppendOutput
Internal implementation code; this is not a standalone script.
internal void AppendIdeOutput(string scriptKey, string text) =>
_ideToolBuffers.AppendOutput(scriptKey, text);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:3347.
internal int[] GetPendingTargetSerials()
Result: int[].
Calls:
_pendingTargets.ToArray().Where(t => !t.Owner.IsCancellationRequested).Select(t => (int)t.Serial).ToArray_pendingTargets.ToArray().Where(t => !t.Owner.IsCancellationRequested).Select_pendingTargets.ToArray().Where_pendingTargets.ToArray
Internal implementation code; this is not a standalone script.
internal int[] GetPendingTargetSerials() =>
// Zero denotes a queued tile/cancellation. Waiting() and timed casts
// need to count these entries as well as object serials.
_pendingTargets.ToArray().Where(t => !t.Owner.IsCancellationRequested).Select(t => (int)t.Serial).ToArray();Performs the displayed calls and state updates.
Parameters: Func<T> callback, CancellationToken cancellationToken
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:3459.
internal T InvokeOnGameThread<T>(Func<T> callback, CancellationToken cancellationToken)
Result: T.
Conditions:
callback == nullVolatile.Read(ref _gameThreadId) == Environment.CurrentManagedThreadIdcancellationToken.IsCancellationRequested
Calls:
nameofcancellationToken.ThrowIfCancellationRequestedVolatile.ReadcallbackEnqueueMainThreadActionresult.TrySetCanceledresult.TrySetResultresult.TrySetExceptionresult.Task.Waitresult.Task.GetAwaiter().GetResultresult.Task.GetAwaiter
Internal implementation code; this is not a standalone script.
internal T InvokeOnGameThread<T>(Func<T> callback, CancellationToken cancellationToken)
{
if (callback == null)
throw new ArgumentNullException(nameof(callback));
cancellationToken.ThrowIfCancellationRequested();
if (Volatile.Read(ref _gameThreadId) == Environment.CurrentManagedThreadId)
return callback();
var result = new TaskCompletionSource<T>(TaskCreationOptions.RunContinuationsAsynchronously);
EnqueueMainThreadAction(() =>
{
if (cancellationToken.IsCancellationRequested)
{
result.TrySetCanceled(cancellationToken);
return;
}
try
{
result.TrySetResult(callback());
}
catch (Exception ex)
{
result.TrySetException(ex);
}
}, () => result.TrySetCanceled());
result.Task.Wait(cancellationToken);
return result.Task.GetAwaiter().GetResult();
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:3806.
private void MarkRuntimeStateChanged()
Result: void.
Calls:
Interlocked.Increment
Internal implementation code; this is not a standalone script.
private void MarkRuntimeStateChanged() =>
Interlocked.Increment(ref _runtimeStateRevision);Performs the displayed calls and state updates.
Parameters: uint serial, CancellationToken owner = default
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:3287.
internal void QueueTarget(uint serial, CancellationToken owner = default)
Result: void.
Calls:
owner.ThrowIfCancellationRequested_pendingTargets.Enqueue
Internal implementation code; this is not a standalone script.
internal void QueueTarget(uint serial, CancellationToken owner = default)
{
lock (_pendingTargetLock)
{
owner.ThrowIfCancellationRequested();
_pendingTargets.Enqueue(new PendingTarget(serial, owner));
}
}Performs the displayed calls and state updates.
Parameters: int buttonID
Source: Project_Full/src/ClassicUO.Client/Game/UI/Gumps/Gump.cs:142.
public override void OnButtonClick(int buttonID)
Result: void.
Conditions:
SessionState is { } state!IsDisposed && (LocalSerial != 0 || ServerSerial != 0)CanMove
Calls:
state.OnButtonClickswitches.Addentries.AddGameActions.ReplyGumpswitches.ToArrayentries.ToArrayUIManager.SavePositionUIManager.RemovePositionDispose
The source file contains the complete code; exact excerpts follow.
Internal implementation code; this is not a standalone script.
public override void OnButtonClick(int buttonID)
{
if (SessionState is { } state)
{
state.OnButtonClick(buttonID);
return;
}
if (!IsDisposed && (LocalSerial != 0 || ServerSerial != 0))
// …
if (CanMove)
// …
else
{
UIManager.RemovePosition(ServerSerial);
}
Dispose();
}
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/World.cs:258.
internal string ResolveProfileServerName()
Result: string.
Conditions:
string.IsNullOrWhiteSpace(_profileServerIdentity)
Calls:
string.IsNullOrWhiteSpacePath.CombineProfileShardIdentity.Resolve
Internal implementation code; this is not a standalone script.
internal string ResolveProfileServerName()
{
if (string.IsNullOrWhiteSpace(_profileServerIdentity))
{
string runtimeName = string.IsNullOrWhiteSpace(ServerName) || ServerName == "_"
? Settings.GlobalSettings.LastServerName
: ServerName;
string defaultSettingsPath = Path.Combine(
CUOEnviroment.ExecutablePath,
Settings.SETTINGS_FILENAME
);
_profileServerIdentity = ProfileShardIdentity.Resolve(
runtimeName,
Settings.GlobalSettings.IP,
Settings.GlobalSettings.Port,
_selectedProfileShardHost,
defaultSettingsPath,
authoritativeEndpoint: _sessionAccount != null
);
}
return _profileServerIdentity;
}Performs the displayed calls and state updates.
Parameters: InjectionValue timeout, InjectionValue retries
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3865.
public int CheckLag(InjectionValue timeout, InjectionValue retries)
Result: int.
Conditions:
bridge.CheckLag(timeoutMs) != 0
Calls:
Math.MaxNumberConversions.ToIntbridge.CheckLag
Internal implementation code; this is not a standalone script.
public int CheckLag(InjectionValue timeout, InjectionValue retries)
{
int timeoutMs = Math.Max(0, NumberConversions.ToInt(timeout));
int attempts = Math.Max(1, NumberConversions.ToInt(retries));
for (int attempt = 0; attempt < attempts; attempt++)
{
if (bridge.CheckLag(timeoutMs) != 0)
return 1;
}
return 0;
}Performs the displayed calls and state updates.
Parameters: InjectionValue[] values
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4969.
private InjectionValue CompactGetWorldItems(InjectionValue[] values)
Result: InjectionValue.
Conditions:
values.Length > 3 && !TryResolveWorldItemQueryContainer(values[3], out container)nearest
Calls:
-
ResolveType -
NumberConversions.ToInt -
ResolveCompactDistance -
bridge.GetFindDistance -
TryResolveWorldItemQueryContainer -
Array.Empty<InjectionValue> -
ToBoolean -
ResolveCompactMaxZ -
bridge.GetFindVertical -
bridge.GetContent -
bridge.GetWorldItems -
bridge.GetIgnoreList -
state.IgnoreTypeLists.FilterFor -
bridge.GetZ -
`source
.Where(id => (!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 => { int distanceObject = container > 0 ? container : id; return distance < 0 || bridge.GetDistance(distanceObject) <= distance; }) .Where` -
`source
.Where(id => (!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` -
`source
.Where(id => (!ignored.Contains(id) && !MatchesIgnoredType(id, ignoredTypes))) .Where(id => type < 0 || type == 0xFFFF || bridge.GetGraphics(id) == type) .Where` -
`source
.Where(id => (!ignored.Contains(id) && !MatchesIgnoredType(id, ignoredTypes))) .Where` -
`source
.Where` -
ignored.Contains -
MatchesIgnoredType -
bridge.GetGraphics -
bridge.GetColor -
bridge.GetDistance -
Math.Abs -
filtered.OrderBy(id => bridge.GetDistance(container > 0 ? container : id)).ThenBy -
filtered.OrderBy -
filtered.Select(id => new InjectionValue(id)).ToArray -
filtered.Select
Internal implementation code; this is not a standalone script.
private InjectionValue CompactGetWorldItems(InjectionValue[] values)
{
int type = values.Length > 0 ? ResolveType(values[0]) : -1;
int color = values.Length > 1 ? NumberConversions.ToInt(values[1]) : -1;
int distance = values.Length > 2 ? ResolveCompactDistance(values[2]) : bridge.GetFindDistance();
int container = 0;
if (values.Length > 3 && !TryResolveWorldItemQueryContainer(values[3], out container))
return new InjectionValue(Array.Empty<InjectionValue>());
bool nearest = values.Length > 4 && ToBoolean(values[4]);
int maxZ = values.Length > 5 ? ResolveCompactMaxZ(values[5]) : bridge.GetFindVertical();
IEnumerable<int> source = container > 0 ? bridge.GetContent(container) : bridge.GetWorldItems();
HashSet<int> ignored = new HashSet<int>(bridge.GetIgnoreList());
IgnoreTypeFilter ignoredTypes = state.IgnoreTypeLists.FilterFor(state.SelectedIgnoreList);
int selfZ = bridge.GetZ(bridge.Self);
IEnumerable<int> filtered = source
.Where(id => (!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 =>
{
int distanceObject = container > 0 ? container : id;
return distance < 0 || bridge.GetDistance(distanceObject) <= distance;
})
.Where(id =>
{
int zObject = container > 0 ? container : id;
return maxZ < 0 || Math.Abs(bridge.GetZ(zObject) - selfZ) <= maxZ;
});
if (nearest)
filtered = filtered.OrderBy(id => bridge.GetDistance(container > 0 ? container : id)).ThenBy(id => id);
return new InjectionValue(filtered.Select(id => new InjectionValue(id)).ToArray());
}Performs the displayed calls and state updates.
Parameters: string spellName
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6632.
private int? ConvertSpellName(string spellName)
Result: int?.
Conditions:
classicUoSpellId > 0spellNameToSpellId.TryGetValue(requested, out var spellId)NumberConversions.TryStr2Int(requested, out spellId) && spellId > 0
Calls:
(spellName ?? string.Empty).Trim().Replace(spellName ?? string.Empty).Trimbridge.ResolveSpellspellNameToSpellId.TryGetValueNumberConversions.TryStr2Int
Internal implementation code; this is not a standalone script.
private int? ConvertSpellName(string spellName)
{
string requested = (spellName ?? string.Empty).Trim().Replace('_', ' ');
int classicUoSpellId = bridge.ResolveSpell(requested);
if (classicUoSpellId > 0)
return classicUoSpellId;
if (spellNameToSpellId.TryGetValue(requested, out var spellId))
return spellId;
if (NumberConversions.TryStr2Int(requested, out spellId) && spellId > 0)
return spellId;
return null;
}Performs the displayed calls and state updates.
Parameters: int type, int color, int container
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5332.
public int Count(int type, int color, int container)
Result: int.
Calls:
bridge.Count
Internal implementation code; this is not a standalone script.
public int Count(int type, int color, int container)
=> bridge.Count(type, color, container);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6045.
public int Date()
Result: int.
Calls:
—
Internal implementation code; this is not a standalone script.
public int Date()
{
var now = timeSource.Now;
return (now.Year % 100) * 10000 + now.Month * 100 + now.Day;
}Performs the displayed calls and state updates.
Parameters: string easyValue
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2526.
private static int DecodeEasyUoId(string easyValue)
Result: int.
Conditions:
character < 'A' || character > 'Z'
Calls:
(easyValue ?? string.Empty).ToUpperInvariant
Internal implementation code; this is not a standalone script.
private static int DecodeEasyUoId(string easyValue)
{
uint value = 0;
foreach (char character in (easyValue ?? string.Empty).ToUpperInvariant())
{
if (character < 'A' || character > 'Z')
continue;
value = unchecked(value * 26 + (uint)(character - 'A'));
}
return unchecked((int)value);
}Performs the displayed calls and state updates.
Parameters: InjectionValue text
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5518.
public void DeleteJournal(InjectionValue text)
Result: void.
Calls:
DeleteJournal
Internal implementation code; this is not a standalone script.
public void DeleteJournal(InjectionValue text) => DeleteJournal((string)text);Performs the displayed calls and state updates.
Parameters: InjectionValue easyValue
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3513.
public string EUO2Inj(InjectionValue easyValue)
Result: string.
Conditions:
c < 'A' || c > 'Z'
Calls:
easyValue.ToString().ToUpperInvarianteasyValue.ToStringNumberConversions.ToHex
Internal implementation code; this is not a standalone script.
public string EUO2Inj(InjectionValue easyValue)
{
uint value = 0;
foreach (char c in easyValue.ToString().ToUpperInvariant())
{
if (c < 'A' || c > 'Z')
continue;
value = unchecked(value * 26 + (uint)(c - 'A'));
}
return NumberConversions.ToHex(unchecked((int)value));
}This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1777.
Result: InjectionValue.Unit.
Calls:
Internal implementation code; this is not a standalone script.
case "addgumpignorebyserial": state.IgnoredGumpSerials.Add(Arg(0)); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1814.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.TextClear:bridge.TextClear().
Internal implementation code; this is not a standalone script.
case "clearinfowindow": bridge.TextClear(); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1816.
Result: InjectionValue.True.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ClientHide:bridge.ClientHide(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "clienthide": bridge.ClientHide(Arg(0)); return InjectionValue.True;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1241.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CharPrintEx:bridge.CharPrintEx(Arg(0), Arg(1), Arg(2), Text(3)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(2). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(3).
Internal implementation code; this is not a standalone script.
case "clientprintex":
bridge.CharPrintEx(Arg(0), Arg(1), Arg(2), Text(3)); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1315.
Result: new InjectionValue(bridge.GetAutoReconnect()).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetAutoReconnect:bridge.GetAutoReconnect().
Internal implementation code; this is not a standalone script.
case "getarstatus": return new InjectionValue(bridge.GetAutoReconnect());This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1370.
Result: new InjectionValue(arguments.Length > 0 ? bridge.GetIntelligence(Arg(0)) : bridge.Intelligence).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetIntelligence:bridge.GetIntelligence(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Intelligence:bridge.Intelligence.
Internal implementation code; this is not a standalone script.
case "getint": return new InjectionValue(arguments.Length > 0 ? bridge.GetIntelligence(Arg(0)) : bridge.Intelligence);This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1564.
Result: new InjectionValue(bridge.GetZ(Arg(0, bridge.Self))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetZ:bridge.GetZ(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 "getz": return new InjectionValue(bridge.GetZ(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:1539.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Unignore:bridge.Unignore(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "ignoreoff": bridge.Unignore(Arg(0)); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1248.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Ignore:bridge.Ignore(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "ignore": bridge.Ignore(Arg(0)); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1367.
Result: new InjectionValue(bridge.Exists(Arg(0))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Exists:bridge.Exists(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "isobjectexists": return new InjectionValue(bridge.Exists(Arg(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1640.
Result: new InjectionValue(Waiting()).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.Waiting:Waiting().
Internal implementation code; this is not a standalone script.
case "iswaittargetactive": return new InjectionValue(Waiting());This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2035.
Result: new InjectionValue(bridge.JournalMatchCount()).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.JournalMatchCount:bridge.JournalMatchCount().
Internal implementation code; this is not a standalone script.
case "linecount": return new InjectionValue(bridge.JournalMatchCount());This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1957.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MoveBoat:bridge.MoveBoat(Arg(0), Arg(1)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(1).
Internal implementation code; this is not a standalone script.
case "moveboat": bridge.MoveBoat(Arg(0), Arg(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:1906.
Result: SetIndexedGumpValue(Arg(0), "checkbox", Arg(1), Text(2)).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.SetIndexedGumpValue:SetIndexedGumpValue(Arg(0), "checkbox", 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 "numgumpcheckbox": return SetIndexedGumpValue(Arg(0), "checkbox", 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:1537.
Result: new InjectionValue(bridge.ObjAtLayerEx(Arg(0), Arg(1))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ObjAtLayerEx:bridge.ObjAtLayerEx(Arg(0), Arg(1)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(1).
Internal implementation code; this is not a standalone script.
case "objatlayerex": return new InjectionValue(bridge.ObjAtLayerEx(Arg(0), Arg(1)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1708.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PartyAcceptInvite:bridge.PartyAcceptInvite().
Internal implementation code; this is not a standalone script.
case "partyacceptinvite": bridge.PartyAcceptInvite(); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1709.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PartyDeclineInvite:bridge.PartyDeclineInvite().
Internal implementation code; this is not a standalone script.
case "partydeclineinvite": bridge.PartyDeclineInvite(); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1707.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PartyLeave:bridge.PartyLeave().
Internal implementation code; this is not a standalone script.
case "partyleave": bridge.PartyLeave(); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1536.
Result: new InjectionValue(ReadPredictedCoordinate(3)).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ReadPredictedCoordinate:ReadPredictedCoordinate(3).
Internal implementation code; this is not a standalone script.
case "predicteddirection": return new InjectionValue(ReadPredictedCoordinate(3));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1597.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetContextMenuHook:bridge.SetContextMenuHook(Arg(0), Arg(1)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(1).
Internal implementation code; this is not a standalone script.
case "setcontextmenuhook": bridge.SetContextMenuHook(Arg(0), Arg(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:2863.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::LegacyList:LegacyList("AddFindList"). -
InjectionScript.Runtime.InjectionApiUO.LegacyListEntryMatches:LegacyListEntryMatches(value, arguments).
Internal implementation code; this is not a standalone script.
case "deletefindlist":
LegacyList("AddFindList").RemoveAll(value => LegacyListEntryMatches(value,
arguments));
break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2962.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SelectGump:bridge.SelectGump(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "gumpobject": bridge.SelectGump(Arg(0)); break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3025.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.Unequip:Unequip("Ring").
Internal implementation code; this is not a standalone script.
case "removering": Unequip("Ring"); break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2871.
Calls:
Internal implementation code; this is not a standalone script.
case "selectignorelist": state.SelectedIgnoreList = Text(0).Trim(); break;Performs the displayed calls and state updates.
Parameters: InjectionValue type, InjectionValue color
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4706.
public string FindType(InjectionValue type, InjectionValue color)
Result: string.
Conditions:
-
`color.Kind == InjectionValueKind.String
&& (color.String.Equals("ground", StringComparison.OrdinalIgnoreCase) || color.String.Equals("backpack", StringComparison.OrdinalIgnoreCase) || color.String.Equals("my", StringComparison.OrdinalIgnoreCase))`
Calls:
color.String.EqualsFindTypeResolveTypeConvertContainerNumberConversions.ToInt
Internal implementation code; this is not a standalone script.
public string FindType(InjectionValue type, InjectionValue color)
{
if (color.Kind == InjectionValueKind.String
&& (color.String.Equals("ground", StringComparison.OrdinalIgnoreCase)
|| color.String.Equals("backpack", StringComparison.OrdinalIgnoreCase)
|| color.String.Equals("my", StringComparison.OrdinalIgnoreCase)))
{
return FindType(ResolveType(type), -1, ConvertContainer(color), -1, color.String.Equals("my", StringComparison.OrdinalIgnoreCase));
}
return FindType(ResolveType(type), NumberConversions.ToInt(color), -1, -1, false);
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5605.
public int GetFoundedTextID()
Result: int.
Calls:
—
Internal implementation code; this is not a standalone script.
public int GetFoundedTextID() => foundedTextId >= 0 ? foundedTextId : 0;Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5606.
public int GetFoundedTextIndex()
Result: int.
Calls:
reader.FindJournalEntryIndex
Internal implementation code; this is not a standalone script.
public int GetFoundedTextIndex() => selectedJournalEntry != null && bridge is IApiJournalReader reader
? reader.FindJournalEntryIndex(selectedJournalEntry.Identity) : foundedTextIndex;Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5608.
public string GetFoundedTextSerial()
Result: string.
Calls:
—
Internal implementation code; this is not a standalone script.
public string GetFoundedTextSerial() => selectedJournalEntry != null
? $"0x{unchecked((uint)selectedJournalEntry.Serial):X8}" : "0x00000000";Performs the displayed calls and state updates.
Parameters: string id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3733.
public string GetGraphics(string id)
Result: string.
Calls:
GetGraphicsGetObject
Internal implementation code; this is not a standalone script.
public string GetGraphics(string id) => GetGraphics(GetObject(id));Performs the displayed calls and state updates.
Parameters: string identifier, int key
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3364.
public InjectionValue GetGump(string identifier, int key)
Result: InjectionValue.
Calls:
LastGump
Internal implementation code; this is not a standalone script.
public InjectionValue GetGump(string identifier, int key) => LastGump(identifier, key);Performs the displayed calls and state updates.
Parameters: InjectionValue id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3739.
public string GetLayer(InjectionValue id)
Result: string.
Calls:
ConvertLayerbridge.GetLayerGetObject
Internal implementation code; this is not a standalone script.
public string GetLayer(InjectionValue id) => ConvertLayer(bridge.GetLayer(GetObject(id)));Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3893.
public int GetRun()
Result: int.
Calls:
bridge.GetRun
Internal implementation code; this is not a standalone script.
public int GetRun() => bridge.GetRun(bridge.Self);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3685.
public int GetZ()
Result: int.
Calls:
GetZ
Internal implementation code; this is not a standalone script.
public int GetZ() => GetZ("self");Performs the displayed calls and state updates.
Parameters: int id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3687.
public int GetZ(int id)
Result: int.
Calls:
bridge.GetZ
Internal implementation code; this is not a standalone script.
public int GetZ(int id) => bridge.GetZ(id);Performs the displayed calls and state updates.
Parameters: InjectionValue id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4488.
public int Grab(InjectionValue id)
Result: int.
Calls:
CompactGrab
Internal implementation code; this is not a standalone script.
public int Grab(InjectionValue id) => CompactGrab(new[] { id });Performs the displayed calls and state updates.
Parameters: InjectionValue amount, InjectionValue id, InjectionValue container
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4492.
public int Grab(InjectionValue amount, InjectionValue id, InjectionValue container)
Result: int.
Calls:
CompactGrab
Internal implementation code; this is not a standalone script.
public int Grab(InjectionValue amount, InjectionValue id, InjectionValue container)
=> CompactGrab(new[] { amount, id, container });Performs the displayed calls and state updates.
Parameters: InjectionValue firstId, InjectionValue secondId
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3359.
public int GumpExists(InjectionValue firstId, InjectionValue secondId)
Result: int.
Calls:
bridge.GumpExistsNumberConversions.ToInt
Internal implementation code; this is not a standalone script.
public int GumpExists(InjectionValue firstId, InjectionValue secondId)
=> bridge.GumpExists(NumberConversions.ToInt(firstId), NumberConversions.ToInt(secondId));Performs the displayed calls and state updates.
Parameters: InjectionValue serialValue
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3499.
public string Inj2EUO(InjectionValue serialValue)
Result: string.
Conditions:
value == 0
Calls:
NumberConversions.ToIntresult.Insertresult.ToString
Internal implementation code; this is not a standalone script.
public string Inj2EUO(InjectionValue serialValue)
{
uint value = unchecked((uint)NumberConversions.ToInt(serialValue));
if (value == 0)
return "A";
var result = new StringBuilder();
while (value > 0)
{
result.Insert(0, (char)('A' + value % 26));
value /= 26;
}
return result.ToString();
}Performs the displayed calls and state updates.
Parameters: string identifier, int key
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3362.
public InjectionValue LastGump(string identifier, int key)
Result: InjectionValue.
Calls:
ConvertGumpValuebridge.GetGumpValue
Internal implementation code; this is not a standalone script.
public InjectionValue LastGump(string identifier, int key) => ConvertGumpValue(identifier, bridge.GetGumpValue(-1, identifier, key));Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4020.
public int MaxWeight()
Result: int.
Calls:
—
Internal implementation code; this is not a standalone script.
public int MaxWeight() => bridge.MaxWeight;Checks the conditions below and returns the displayed result.
Parameters: x, y, z, accuracy, running, accuracyZ, optimized, stepCallback, timeoutMs, maxSteps, maxDistance, avoidMobiles, openDoorsOverride, stopOnStuck
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2099.
`private int MoveToCanonical(int x, int y, int z, int accuracy, bool running, int accuracyZ = 255,
bool optimized = true, string stepCallback = null, int timeoutMs = 0, int maxSteps = 0,
int maxDistance = 0, bool? avoidMobiles = null, bool? openDoorsOverride = null, bool stopOnStuck = false)`
Result: int.
Result: 0; 1.
Calls: PortablePathSearch.ValidPoint, bridge.IsOnline, Math.Max, Math.Min, bridge.GetX, bridge.GetY, bridge.GetZ, Math.Abs.
Conditions: !PortablePathSearch.ValidPoint(x, y, z); state.MoveExitOnDisconnect != 0 && bridge.IsOnline() == 0; state.MoveCheckStamina > 0 && bridge.Stamina < state.MoveCheckStamina; !PortablePathSearch.ValidPoint(currentX, currentY, currentZ).
Calls:
-
InjectionScript.Runtime.PortablePathSearch.ValidPoint:PortablePathSearch.ValidPoint(x, y, z). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsOnline:bridge.IsOnline(). -
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.PortablePathSearch.ValidPoint:PortablePathSearch.ValidPoint(currentX, currentY, currentZ). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MoveTo:bridge.MoveTo( x, y, z, safeAccuracy, running, state.MoveCheckStamina, openDoors, state.MoveThroughCorner != 0, throughNpcs, Math.Max(1, state.MoveHeuristicMultiplier), Math.Max(0, state.MoveTurnCost), state.MoveExitOnDisconnect != 0, safeAccuracyZ, optimized, state.MoveBetweenTwoCorners != 0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.StopMoving:bridge.StopMoving(). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Move:bridge.Move(). -
InjectionScript.Runtime.InjectionApiUO.MoveToCanonical::IsCurrentRequest:IsCurrentRequest(). -
InjectionScript.Runtime.InjectionApiUO.MoveToCanonical::StopOwnRequest:StopOwnRequest(). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.InvokeStepCallback:bridge.InvokeStepCallback(stepCallback, currentX, currentY, currentZ). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Wait:bridge.Wait(5). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Stamina:bridge.Stamina. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Self:bridge.Self.
Internal implementation code; this is not a standalone script.
private int MoveToCanonical(int x, int y, int z, int accuracy, bool running, int accuracyZ = 255,
bool optimized = true, string stepCallback = null, int timeoutMs = 0, int maxSteps = 0,
int maxDistance = 0, bool? avoidMobiles = null, bool? openDoorsOverride = null, bool stopOnStuck = false)
{
if (!PortablePathSearch.ValidPoint(x, y, z)) return 0;
if (state.MoveExitOnDisconnect != 0 && bridge.IsOnline() == 0)
return 0;
if (state.MoveCheckStamina > 0 && bridge.Stamina < state.MoveCheckStamina)
return 0;
// …
if (!PortablePathSearch.ValidPoint(currentX, currentY, currentZ)) return 0;
// …
if (maxDistance > 0 && requestedDistance > maxDistance)
return 0;
if (requestedDistance <= safeAccuracy && Math.Abs(z - currentZ) <= safeAccuracyZ)
return 1;
// …
if (started == 0)
return 0;
// …
if (ownership == null) bridge.StopMoving();
// …
if (!IsCurrentRequest()) return 0;
if (state.MoveExitOnDisconnect != 0 && bridge.IsOnline() == 0)
// …
return 0;
// …
if (state.MoveCheckStamina > 0 && bridge.Stamina < state.MoveCheckStamina)
// …
return 0;
// …
if (timeoutMs > 0 && (timeSource.Now - startedAt).TotalMilliseconds >= timeoutMs)
// …
return 0;
// …
if (moved)
// …
if (!string.IsNullOrWhiteSpace(stepCallback)
// …
return 0;
// …
if (maxSteps > 0 && observedSteps >= maxSteps
// …
return 0;
// …
else if (stopOnStuck && bridge is IApiPathPlanningState planning && planning.IsPathPlanning())
// …
else if (stopOnStuck && (timeSource.Now - lastProgressAt).TotalMilliseconds >= 1000d)
// …
return 0;
// …
if (!IsCurrentRequest()) return 0;
// …
if ((currentX != lastX || currentY != lastY || currentZ != lastZ)
// …The source file contains the complete code; exact excerpts follow.
Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3417.
public int Picking()
Result: int.
Calls:
bridge.Picking
Internal implementation code; this is not a standalone script.
public int Picking() => bridge.Picking();Performs the displayed calls and state updates.
Parameters: int min, int max
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6063.
public int Random(int min, int max)
Result: int.
Conditions:
min > maxmin == maxcount <= int.MaxValue
Calls:
random.Nextrandom.NextBytesBitConverter.ToUInt32
Internal implementation code; this is not a standalone script.
public int Random(int min, int max)
{
if (min > max)
throw new NativeSubrutineException("UO.Random(min, max): min must not exceed max.");
if (min == max) return min;
long count = (long)max - min + 1;
lock (randomSync)
{
if (count <= int.MaxValue)
return (int)(min + (long)random.Next((int)count));
// Inclusive Int32.MaxValue and the full signed range must not
// overflow. Rejection avoids modulo bias; reuse the four bytes.
const ulong domain = 1UL << 32;
ulong limit = domain - domain % (ulong)count;
uint sample;
do
{
random.NextBytes(randomRangeBytes);
sample = BitConverter.ToUInt32(randomRangeBytes, 0);
} while (sample >= limit);
return (int)(min + (long)(sample % (ulong)count));
}
}Performs the displayed calls and state updates.
Parameters: InjectionValue value
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5217.
private int ResolveCompactMaxZ(InjectionValue value)
Result: int.
Calls:
NumberConversions.ToIntbridge.GetFindVerticalMath.Max
Internal implementation code; this is not a standalone script.
private int ResolveCompactMaxZ(InjectionValue value)
{
int parsed = NumberConversions.ToInt(value);
return parsed < 0 ? bridge.GetFindVertical() : Math.Max(0, parsed);
}Performs the displayed calls and state updates.
Parameters: string message
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5406.
public void Say(string message)
Result: void.
Calls:
bridge.Say
Internal implementation code; this is not a standalone script.
public void Say(string message) => bridge.Say(message);Performs the displayed calls and state updates.
Parameters: string name, int quality
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6040.
public int Snap(string name, int quality)
Result: int.
Calls:
bridge.SnapMath.MaxMath.Min
Internal implementation code; this is not a standalone script.
public int Snap(string name, int quality) => bridge.Snap(name, Math.Max(1, Math.Min(100, quality)), true);Performs the displayed calls and state updates.
Parameters: string name, int quality, bool includeUi
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6041.
public int Snap(string name, int quality, bool includeUi)
Result: int.
Calls:
bridge.SnapMath.MaxMath.Min
Internal implementation code; this is not a standalone script.
public int Snap(string name, int quality, bool includeUi)
=> bridge.Snap(name, Math.Max(1, Math.Min(100, quality)), includeUi);Performs the displayed calls and state updates.
Parameters: string recording, out string name, out InjectionValue[] arguments
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2767.
private static bool TryDeserializeRecordedLegacyAction(string recording, out string name, out InjectionValue[] arguments)
Result: bool.
Conditions:
string.IsNullOrWhiteSpace(recording)fields.Length < 2 || !fields[0].Equals(RecordedLegacyActionPrefix, StringComparison.Ordinal)!TryDeserializeRecordedValue(fields[index], out values[index - 2])
Calls:
Array.Empty<InjectionValue>string.IsNullOrWhiteSpacerecording.Splitfields[0].EqualsDecodeRecordingTextMath.MaxTryDeserializeRecordedValue
Internal implementation code; this is not a standalone script.
private static bool TryDeserializeRecordedLegacyAction(string recording, out string name, out InjectionValue[] arguments)
{
name = string.Empty;
arguments = Array.Empty<InjectionValue>();
if (string.IsNullOrWhiteSpace(recording)) return false;
string[] fields = recording.Split(new[] { '\t' }, StringSplitOptions.None);
if (fields.Length < 2 || !fields[0].Equals(RecordedLegacyActionPrefix, StringComparison.Ordinal)) return false;
try
{
name = DecodeRecordingText(fields[1]);
var values = new InjectionValue[Math.Max(0, fields.Length - 2)];
for (int index = 2; index < fields.Length; index++)
if (!TryDeserializeRecordedValue(fields[index], out values[index - 2])) return false;
arguments = values;
return !string.IsNullOrWhiteSpace(name);
}
catch (FormatException)
{
name = string.Empty;
arguments = Array.Empty<InjectionValue>();
return false;
}
}Performs the displayed calls and state updates.
Parameters: InjectionValue type
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4199.
public int UseFromGround(InjectionValue type)
Result: int.
Calls:
UseFromGround
Internal implementation code; this is not a standalone script.
public int UseFromGround(InjectionValue type) => UseFromGround(type, new InjectionValue(-1));Performs the displayed calls and state updates.
Parameters: int id1, int id2
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4294.
public void WaitTargetObject(int id1, int id2)
Result: void.
Calls:
bridge.WaitTargetObjectTimer
Internal implementation code; this is not a standalone script.
public void WaitTargetObject(int id1, int id2)
{
bridge.WaitTargetObject(id1, id2);
ticksTarget = Timer();
}Performs the displayed calls and state updates.
Parameters: int startTime, int maxDelay, string text, int equals
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5537.
public void WaitingForJournalText(int startTime, int maxDelay, string text, int equals)
Result: void.
Calls:
WaitingForJournalText
Internal implementation code; this is not a standalone script.
public void WaitingForJournalText(int startTime, int maxDelay, string text, int equals)
=> WaitingForJournalText(startTime, maxDelay, text, equals, 0, InjectionValue.Zero);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:404.
values
Result: values.
Result: CompactFindType(values[0], values[1], values[2], values[3], values[4], values[5]).
Calls: CompactFindType.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.CompactFindType:CompactFindType(values[0], values[1], values[2], values[3], values[4], values[5]).
Internal implementation code; this is not a standalone script.
values =>
CompactFindType(values[0], values[1], values[2], values[3], values[4], values[5])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:856.
values
Result: values.
Calls: follow.Follow, GetObject, NumberConversions.ToInt.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.GetObject:GetObject(values[0]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(values[1]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(values[2]).
Internal implementation code; this is not a standalone script.
values => new InjectionValue(bridge is IApiFollowBridge follow
? follow.Follow(count == 0 ? 0 : GetObject(values[0]),
count < 2 ? 1 : NumberConversions.ToInt(values[1]),
count < 3 || NumberConversions.ToInt(values[2]) != 0) : 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:1067.
serial
Result: serial.
Result: bridge.Flying(serial).
Calls: bridge.Flying.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Flying:bridge.Flying(serial).
Internal implementation code; this is not a standalone script.
serial => bridge.Flying(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:1034.
Result: bridge.MaxWeight.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MaxWeight:bridge.MaxWeight.
Internal implementation code; this is not a standalone script.
() => bridge.MaxWeightThe 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:1030.
Result: bridge.Strength.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Strength:bridge.Strength.
Internal implementation code; this is not a standalone script.
() => bridge.StrengthReturns 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: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:1007.
Result: getter(bridge.Self).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Self:bridge.Self.
Internal implementation code; this is not a standalone script.
() => getter(bridge.Self)Performs the displayed calls and state updates.
Parameters: string name, IEnumerable<InjectionValue> argumentValues, out NativeSubrutineDefinition subrutineDefinition
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/NativeSubrutineMetadata.cs:34.
public bool TryGet(string name, IEnumerable<InjectionValue> argumentValues, out NativeSubrutineDefinition subrutineDefinition)
Result: bool.
Conditions:
!byName.TryGetValue(name, out var arities)!arities.TryGetValue(arguments.Count, out var overloads)kind == InjectionValueKind.Anykind == arguments[i].Kind
Calls:
byName.TryGetValueargumentValues.ToArrayarities.TryGetValueStringComparer.OrdinalIgnoreCase.Comparecandidate.GetSignaturewildcard.GetSignature
Internal implementation code; this is not a standalone script.
public bool TryGet(string name, IEnumerable<InjectionValue> argumentValues, out NativeSubrutineDefinition subrutineDefinition)
{
subrutineDefinition = null;
// A script procedure is not a native. Avoid scanning the entire API
// (over 1600 registrations) twice for every ordinary helper call.
if (!byName.TryGetValue(name, out var arities)) return false;
var arguments = argumentValues as IReadOnlyList<InjectionValue> ?? argumentValues.ToArray();
if (!arities.TryGetValue(arguments.Count, out var overloads)) return false;
NativeSubrutineDefinition allAny = null, wildcard = null;
int bestWildcardCount = int.MaxValue;
foreach (var candidate in overloads)
{
bool compatible = true, exact = true;
int anyCount = 0;
for (int i = 0; i < arguments.Count; i++)
{
var kind = candidate.ParameterKinds[i];
if (kind == InjectionValueKind.Any) anyCount++;
if (kind == arguments[i].Kind) continue;
exact = false;
if (kind != InjectionValueKind.Any) { compatible = false; break; }
}
if (exact && compatible) { subrutineDefinition = candidate; return true; }
if (!compatible) continue;
if (anyCount == arguments.Count) { allAny = candidate; continue; }
if (anyCount < bestWildcardCount || (anyCount == bestWildcardCount
&& StringComparer.OrdinalIgnoreCase.Compare(candidate.GetSignature(), wildcard.GetSignature()) < 0))
{ wildcard = candidate; bestWildcardCount = anyCount; }
}
// Preserve existing dispatch precedence: exact, all-Any adapter,
// then the most specific mixed signature with its stable tie-break.
subrutineDefinition = allAny ?? wildcard;
return subrutineDefinition != null;
}Checks the conditions below and returns the displayed result.
Parameters: startX, startY, startZ, finishX, finishY, finishZ, accuracy, accuracyZ, maxSteps, diagonal, checkStep, checkCancellation, scheduleSlice
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/PortablePathSearch.cs:26.
`internal static (int X, int Y, int Z)[] Find(
int startX, int startY, int startZ, int finishX, int finishY, int finishZ,
int accuracy, int accuracyZ, int maxSteps, bool diagonal,
Func<int, int, int, int, int, int?> checkStep, Action checkCancellation, Action<Action> scheduleSlice)`
Result: (int X, int Y, int Z)[].
Result: empty; result.
Calls: Array.Empty<(int, int, int)>, ValidPoint, Comparer<Node>.Create, Math.Min, Estimate, open.Add, checkCancellation, scheduleSlice.
Conditions: !ValidPoint(startX, startY, startZ) || !ValidPoint(finishX, finishY, finishZ); start.Estimate > limit.
Calls:
-
InjectionScript.Runtime.PortablePathSearch.ValidPoint:ValidPoint(startX, startY, startZ). -
InjectionScript.Runtime.PortablePathSearch.ValidPoint:ValidPoint(finishX, finishY, finishZ). -
InjectionScript.Runtime.PortablePathSearch.Find::Estimate:Estimate(startX, startY). -
InjectionScript.Runtime.PortablePathSearch.Find::Estimate:Estimate(x, y). -
InjectionScript.Runtime.PortablePathSearch.ValidPoint:ValidPoint(x, y, z.Value).
Internal implementation code; this is not a standalone script.
internal static (int X, int Y, int Z)[] Find(
int startX, int startY, int startZ, int finishX, int finishY, int finishZ,
int accuracy, int accuracyZ, int maxSteps, bool diagonal,
Func<int, int, int, int, int, int?> checkStep, Action checkCancellation, Action<Action> scheduleSlice)
{
var empty = Array.Empty<(int, int, int)>();
if (!ValidPoint(startX, startY, startZ) || !ValidPoint(finishX, finishY, finishZ))
return empty;
int Estimate(int x, int y)
// …
return diagonal ? Math.Max(dx, dy) : dx + dy;
// …
if (order == 0) order = a.Estimate.CompareTo(b.Estimate);
return order == 0 ? a.Order.CompareTo(b.Order) : order;
// …
if (start.Estimate > limit) return empty;
// …
if (sliceNodes > 1 && Stopwatch.GetTimestamp() - sliceStarted >= Stopwatch.Frequency / 1000)
return;
// …
if (best[current.Point] != current) continue;
// …
if (current.Estimate == 0 && Math.Abs(finishZ - p.Z) <= accuracyZ)
// …
return;
// …
if (expanded++ >= ExpansionLimit) { completed = true; return; }
if (current.Steps >= limit) continue;
// …
if (x < 0 || x > ushort.MaxValue || y < 0 || y > ushort.MaxValue) continue;
// …
if (steps + estimate > limit) continue;
// …
if (!z.HasValue || !ValidPoint(x, y, z.Value)) continue;
// …
if (best.TryGetValue(key, out Node previous) && previous.Steps <= steps) continue;
// …
if (previous != null) open.Remove(previous);
// …
return result;
// …The source file contains the complete code; exact excerpts follow.
Performs the displayed calls and state updates.
Parameters: string name, out int graphic
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/State/NamedTypes.cs:30.
public bool TryGet(string name, out int graphic)
Result: bool.
Calls:
values.TryGetValue(name ?? string.Empty).Trim
Internal implementation code; this is not a standalone script.
public bool TryGet(string name, out int graphic)
{
lock (gate) return values.TryGetValue((name ?? string.Empty).Trim(), out graphic);
}Performs the displayed calls and state updates.
Parameters: string name, T value
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/State/RuntimeDictionary.cs:16.
public void Set(string name, T value)
Result: void.
Conditions:
!items.ContainsKey(name)notify
Calls:
items.ContainsKeyitems.Add.Invoke
Internal implementation code; this is not a standalone script.
public void Set(string name, T value)
{
bool notify = true;
lock (itemsLock)
{
if (!items.ContainsKey(name))
{
items.Add(name, value);
notify = true;
}
else
items[name] = value;
}
if (notify)
KeyAdded?.Invoke(name);
}Performs the displayed calls and state updates.
Parameters: int type, int color, int containerId
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2926.
public int CountDirectItems(int type, int color, int containerId)
Result: int.
Conditions:
MatchesFindIdentity(item, type, color, ignoredTypes) && MatchesFindContainer(item, containerId, range, false)IsGroundFindContainer(containerId)MatchesFindMobile(mobile, type, color, range, ignoredTypes)
Calls:
InvokeState.IgnoreTypeLists.FilterForResolveFindRangeMatchesFindIdentityMatchesFindContainerMath.MaxIsGroundFindContainerMatchesFindMobile
Internal implementation code; this is not a standalone script.
public int CountDirectItems(int type, int color, int containerId) => Invoke(() =>
{
IgnoreTypeFilter ignoredTypes = State.IgnoreTypeLists.FilterFor(State.SelectedIgnoreList);
int range = ResolveFindRange(State.FindDistance);
int quantity = 0;
foreach (Item item in _world.Items.Values)
if (MatchesFindIdentity(item, type, color, ignoredTypes)
&& MatchesFindContainer(item, containerId, range, false))
quantity = checked(quantity + Math.Max(1, (int)item.Amount));
if (IsGroundFindContainer(containerId))
foreach (Mobile mobile in _world.Mobiles.Values)
if (MatchesFindMobile(mobile, type, color, range, ignoredTypes))
quantity = checked(quantity + 1);
return quantity;
});ClassicUO — Bad Newbie & C# Scripts IDE