Repository navigation
EN Runtime Helpers 6
uk · ru · en · de · fr · it · es · zh-tw · ja · ko
Internal implementation code; this is not a standalone script.
Performs the displayed calls and state updates.
Parameters: listener
Source: Project_Full/src/ClassicUO.CSharp/CSharpCallbacks.cs:239.
private void Remove(Listener listener)
Result: void.
Calls: listeners.Remove, listener.Source.Dispose.
Conditions: listener.Closed.
Internal implementation code; this is not a standalone script.
private void Remove(Listener listener)
{
lock (sync) { if (listener.Closed) return; listener.Closed = true; listeners.Remove(listener); }
listener.Source.Dispose();
}Performs the displayed calls and state updates.
Parameters: name
Source: Project_Full/src/ClassicUO.CSharp/CSharpCallbacks.cs:386.
private void RemoveState(string name)
Result: void.
Calls: stateEvents.Remove, .Dispose.
Internal implementation code; this is not a standalone script.
private void RemoveState(string name)
{
StateEvent? state;
lock (sync) { stateEvents.Remove(name, out state); }
state?.Subscription?.Dispose();
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.CSharp/CSharpScriptEngine.cs:576.
internal static void VerifyActive()
Result: void.
Calls: .Verify.
Conditions: CurrentFinalization.Value?.IsActive == true.
Internal implementation code; this is not a standalone script.
internal static void VerifyActive()
{
Current.Value?.Verify();
if (CurrentFinalization.Value?.IsActive == true)
throw new InvalidOperationException("Game API calls are unavailable from a CLR finalizer.");
}Checks the conditions below and returns the displayed result.
Parameters: value
Source: Project_Full/src/ClassicUO.Client/Configuration/ProfileManager.cs:311.
private static string EncodePathSegment(string value)
Result: string.
Result: "UnknownServer"; result.
Calls: string.IsNullOrWhiteSpace, IsWindowsTrimmedSuffix, builder.Append('~').Append, builder.Append, ((int)character).ToString, builder.ToString, result.Split, baseName.Equals.
Conditions: string.IsNullOrWhiteSpace(value); windowsInvalid || windowsTrimmedAtEnd; `baseName.Equals("CON", StringComparison.OrdinalIgnoreCase)
|| baseName.Equals("PRN", StringComparison.OrdinalIgnoreCase)
|| baseName.Equals("AUX", StringComparison.OrdinalIgnoreCase)
|| baseName.Equals("NUL", StringComparison.OrdinalIgnoreCase)
|| baseName.Length == 4
&& (baseName.StartsWith("COM", StringComparison.OrdinalIgnoreCase)
|| baseName.StartsWith("LPT", StringComparison.OrdinalIgnoreCase))
&& baseName[3] is >= '1' and <= '9'`.
Internal implementation code; this is not a standalone script.
private static string EncodePathSegment(string value)
{
if (string.IsNullOrWhiteSpace(value))
return "UnknownServer";
var builder = new StringBuilder(value.Length);
for (int index = 0; index < value.Length; index++)
{
char character = value[index];
bool windowsInvalid = character < 32
|| character is '<' or '>' or ':' or '"' or '/' or '\\' or '|' or '?' or '*' or '~';
bool windowsTrimmedAtEnd = (character == '.' || character == ' ')
&& IsWindowsTrimmedSuffix(value, index);
if (windowsInvalid || windowsTrimmedAtEnd)
builder.Append('~').Append(((int)character).ToString("X4"));
else
builder.Append(character);
}
string result = builder.Length == 0 ? "UnknownServer" : builder.ToString();
string baseName = result.Split('.')[0];
if (baseName.Equals("CON", StringComparison.OrdinalIgnoreCase)
|| baseName.Equals("PRN", StringComparison.OrdinalIgnoreCase)
|| baseName.Equals("AUX", StringComparison.OrdinalIgnoreCase)
|| baseName.Equals("NUL", StringComparison.OrdinalIgnoreCase)
|| baseName.Length == 4
&& (baseName.StartsWith("COM", StringComparison.OrdinalIgnoreCase)
|| baseName.StartsWith("LPT", StringComparison.OrdinalIgnoreCase))
&& baseName[3] is >= '1' and <= '9')
{
result = "~005F" + result;
}
return result;
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1388.
public void ActivateHandle()
Result: void.
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => SDL3.SDL.SDL_RaiseWindow(RequireGameView("ActivateHandle").Window.Handle)). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => SDL3.SDL.SDL_RaiseWindow(RequireGameView("ActivateHandle").Window.Handle)). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RequireGameView:RequireGameView("ActivateHandle").
Internal implementation code; this is not a standalone script.
public void ActivateHandle() => Invoke(() => SDL3.SDL.SDL_RaiseWindow(RequireGameView("ActivateHandle").Window.Handle));Performs the displayed calls and state updates.
Parameters: name
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1960.
public void AddChatUserIgnore(string name)
Result: void.
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => JournalManager.AddYokoIgnoredUser(name)). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => JournalManager.AddYokoIgnoredUser(name)). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.JournalManager.AddYokoIgnoredUser:JournalManager.AddYokoIgnoredUser(name).
Internal implementation code; this is not a standalone script.
public void AddChatUserIgnore(string name) => Invoke(() => JournalManager.AddYokoIgnoredUser(name));Performs the displayed calls and state updates.
Parameters: caption, item, persistent
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:693.
public void AddMenuHook(string caption, string item, bool persistent)
Result: void.
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => _manager.AddMenuHook(caption, item, persistent)). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => _manager.AddMenuHook(caption, item, persistent)). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.YokoInjectionManager.AddMenuHook:_manager.AddMenuHook(caption, item, persistent).
Internal implementation code; this is not a standalone script.
public void AddMenuHook(string caption, string item, bool persistent) => Invoke(() => _manager.AddMenuHook(caption, item, persistent));Performs the displayed calls and state updates.
Parameters: uiWindowType, id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2860.
public void CloseClientWindow(int uiWindowType, int id)
Result: void.
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { if (uiWindowType == 2) _world.CharacterPanels.Profile(unchecked((uint)id))?.Close(true); if (uiWindowType == 0) _world.NativePopups.Close(SessionPopupKind.Paperdoll, unchecked((uint)id)); if (uiWindowType == 3) _world.Containers.Close(unchecked((uint)id)); bool MatchesType(Gump gump) => uiWindowType switch { 0 => gump is PaperDollGump, 1 => gump is StatusGumpBase, 2 => gump is ProfileGump, 3 => gump is ContainerGump, _ => false }; foreach (Gump gump in UIManager.Gumps.Where(gump => !gump.IsDisposed && gump.LocalSerial == unchecked((uint)id) && MatchesType(gump)).ToArray()) gump.Dispose(); }). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { if (uiWindowType == 2) _world.CharacterPanels.Profile(unchecked((uint)id))?.Close(true); if (uiWindowType == 0) _world.NativePopups.Close(SessionPopupKind.Paperdoll, unchecked((uint)id)); if (uiWindowType == 3) _world.Containers.Close(unchecked((uint)id)); bool MatchesType(Gump gump) => uiWindowType switch { 0 => gump is PaperDollGump, 1 => gump is StatusGumpBase, 2 => gump is ProfileGump, 3 => gump is ContainerGump, _ => false }; foreach (Gump gump in UIManager.Gumps.Where(gump => !gump.IsDisposed && gump.LocalSerial == unchecked((uint)id) && MatchesType(gump)).ToArray()) gump.Dispose(); }). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CloseClientWindow::MatchesType:MatchesType(gump).
Internal implementation code; this is not a standalone script.
public void CloseClientWindow(int uiWindowType, int id) => Invoke(() =>
{
if (uiWindowType == 2) _world.CharacterPanels.Profile(unchecked((uint)id))?.Close(true);
if (uiWindowType == 0) _world.NativePopups.Close(SessionPopupKind.Paperdoll, unchecked((uint)id));
if (uiWindowType == 3) _world.Containers.Close(unchecked((uint)id));
bool MatchesType(Gump gump) => uiWindowType switch
{
0 => gump is PaperDollGump,
1 => gump is StatusGumpBase,
2 => gump is ProfileGump,
3 => gump is ContainerGump,
_ => false
};
foreach (Gump gump in UIManager.Gumps.Where(gump => !gump.IsDisposed
&& gump.LocalSerial == unchecked((uint)id) && MatchesType(gump)).ToArray())
gump.Dispose();
});Returns the value of the expression below.
Parameters: tradeNumber
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:280.
public int ConfirmTrade(int tradeNumber)
Result: int.
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { ISessionTrade gump = FindNumberedTrade(tradeNumber); if (gump == null) return 0; if (!gump.ImAccepting) { gump.ImAccepting = true; GameActions.AcceptTrade(gump.ID1, true); } return 1; }). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { ISessionTrade gump = FindNumberedTrade(tradeNumber); if (gump == null) return 0; if (!gump.ImAccepting) { gump.ImAccepting = true; GameActions.AcceptTrade(gump.ID1, true); } return 1; }). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindNumberedTrade:FindNumberedTrade(tradeNumber). -
ClassicUO.Game.GameActions.AcceptTrade:GameActions.AcceptTrade(gump.ID1, true).
Internal implementation code; this is not a standalone script.
public int ConfirmTrade(int tradeNumber) => Invoke(() =>
{
ISessionTrade gump = FindNumberedTrade(tradeNumber);
if (gump == null) return 0;
if (!gump.ImAccepting)
{
gump.ImAccepting = true;
GameActions.AcceptTrade(gump.ID1, true);
}
return 1;
});Returns the value of the expression below.
Parameters: id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2730.
public int ContainerOf(int id)
Result: int.
Result: Invoke(() => _world.Items.Get((uint)id) is Item item ? (int)item.Container : 0).
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => _world.Items.Get((uint)id) is Item item ? (int)item.Container : 0). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => _world.Items.Get((uint)id) is Item item ? (int)item.Container : 0). Overload candidates: the source does not establish which candidate is selected.
Internal implementation code; this is not a standalone script.
public int ContainerOf(int id) => Invoke(() => _world.Items.Get((uint)id) is Item item ? (int)item.Container : 0);Checks the conditions below and returns the displayed result.
Parameters: control
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3953.
private static string DescribeControl(Control control)
Result: string.
Result: logical.Describe(); string.IsNullOrWhiteSpace(text) ? common : common + $" text={text}".
Calls: logical.Describe, control.GetType, GetControlText, string.IsNullOrWhiteSpace.
Conditions: control is SessionGumpControl logical; control is Button button; control is Checkbox checkbox.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetControlText:GetControlText(control).
Internal implementation code; this is not a standalone script.
private static string DescribeControl(Control control)
{
if (control is SessionGumpControl logical) return logical.Describe();
string common = $"{control.GetType().Name} page={control.Page} id=0x{control.LocalSerial:X8} "
+ $"x={control.X} y={control.Y} width={control.Width} height={control.Height}";
if (control is Button button)
{
return common + $" ButtonID={button.ButtonID} action={button.ButtonAction} toPage={button.ToPage} "
+ $"normal=0x{button.ButtonGraphicNormal:X4} pressed=0x{button.ButtonGraphicPressed:X4} over=0x{button.ButtonGraphicOver:X4}";
}
if (control is Checkbox checkbox)
{
string kind = checkbox is RadioButton ? "RadioButton" : "Checkbox";
return $"{kind} page={control.Page} ID={control.LocalSerial} x={control.X} y={control.Y} "
+ $"checked={checkbox.IsChecked} inactive=0x{checkbox.InactiveGraphic:X4} active=0x{checkbox.ActiveGraphic:X4}";
}
string text = GetControlText(control);
return string.IsNullOrWhiteSpace(text) ? common : common + $" text={text}";
}Performs the displayed calls and state updates.
Parameters: subrutineName
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2715.
public void Exec(string subrutineName)
Result: void.
Calls: _manager.RunNamedProcedureFromScript.
Internal implementation code; this is not a standalone script.
public void Exec(string subrutineName)
{
_manager.RunNamedProcedureFromScript(subrutineName, _csharpGlobals?.Cancellation ?? _cancellationToken);
}Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:203.
public int GetDropDelay()
Result: int.
Result: State.GrabDelay.
Internal implementation code; this is not a standalone script.
public int GetDropDelay() => State.GrabDelay;Returns the value of the expression below.
Parameters: id
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:619.
public int GetFlags(int id)
Result: int.
Result: Invoke(() => _world.Get((uint)id) is Entity entity ? (int)entity.Flags : 0).
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => _world.Get((uint)id) is Entity entity ? (int)entity.Flags : 0). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => _world.Get((uint)id) is Entity entity ? (int)entity.Flags : 0). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.World.Get:_world.Get((uint)id).
Internal implementation code; this is not a standalone script.
public int GetFlags(int id) => Invoke(() => _world.Get((uint)id) is Entity entity ? (int)entity.Flags : 0);Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2804.
public int GetGumpCount()
Result: int.
Result: Invoke(() => ServerGumpsUnsafe().Count).
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => ServerGumpsUnsafe().Count). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => ServerGumpsUnsafe().Count). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ServerGumpsUnsafe:ServerGumpsUnsafe().
Internal implementation code; this is not a standalone script.
public int GetGumpCount() => Invoke(() => ServerGumpsUnsafe().Count);Returns the value of the expression below.
Parameters: index
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2814.
public int GetGumpSerial(int index)
Result: int.
Result: Invoke(() => (int)(ServerGumpsUnsafe().ElementAtOrDefault(index)?.LocalSerial ?? 0)).
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => (int)(ServerGumpsUnsafe().ElementAtOrDefault(index)?.LocalSerial ?? 0)). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => (int)(ServerGumpsUnsafe().ElementAtOrDefault(index)?.LocalSerial ?? 0)). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ServerGumpsUnsafe:ServerGumpsUnsafe().
Internal implementation code; this is not a standalone script.
public int GetGumpSerial(int index) => Invoke(() => (int)(ServerGumpsUnsafe().ElementAtOrDefault(index)?.LocalSerial ?? 0));Returns the value of the expression below.
Parameters: index
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:315.
public string GetScriptPath(int index)
Result: string.
Result: _manager.GetScriptPath(index).
Calls: _manager.GetScriptPath.
Calls:
-
ClassicUO.Game.Managers.YokoInjectionManager.GetScriptPath:_manager.GetScriptPath(index).
Internal implementation code; this is not a standalone script.
public string GetScriptPath(int index) => _manager.GetScriptPath(index);Performs the displayed calls and state updates.
Parameters: buffer, offset, value
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3346.
static void Write16(byte[] buffer, int offset, int value)
Result: void.
Internal implementation code; this is not a standalone script.
static void Write16(byte[] buffer, int offset, int value)
{
buffer[offset] = (byte)value;
buffer[offset + 1] = (byte)(value >> 8);
}Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1126.
public int[] GetWaitTargetQueue()
Result: int[].
Result: _manager.GetPendingTargetSerials().
Calls: _manager.GetPendingTargetSerials.
Calls:
-
ClassicUO.Game.Managers.YokoInjectionManager.GetPendingTargetSerials:_manager.GetPendingTargetSerials().
Internal implementation code; this is not a standalone script.
public int[] GetWaitTargetQueue() => _manager.GetPendingTargetSerials();Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1962.
public int JournalEntryCount()
Result: int.
Result: Invoke(() => JournalManager.Entries.Count).
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => JournalManager.Entries.Count). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => JournalManager.Entries.Count). Overload candidates: the source does not establish which candidate is selected.
Internal implementation code; this is not a standalone script.
public int JournalEntryCount() => Invoke(() => JournalManager.Entries.Count);Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1963.
public int JournalMatchCount()
Result: int.
Result: _journalMatchCount.
Internal implementation code; this is not a standalone script.
public int JournalMatchCount() => _journalMatchCount;Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:146.
public int LastTarget
Result: int.
Result: Invoke(() => (int)_world.TargetManager.LastTargetInfo.Serial).
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => (int)_world.TargetManager.LastTargetInfo.Serial). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => (int)_world.TargetManager.LastTargetInfo.Serial). Overload candidates: the source does not establish which candidate is selected.
Internal implementation code; this is not a standalone script.
public int LastTarget => Invoke(() => (int)_world.TargetManager.LastTargetInfo.Serial);Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1127.
public int[] LastTile()
Result: int[].
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { LastTargetInfo info = _world.TargetManager.LastTargetInfo; return new[] { (int)info.Graphic, (int)info.X, (int)info.Y, (int)info.Z }; }). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { LastTargetInfo info = _world.TargetManager.LastTargetInfo; return new[] { (int)info.Graphic, (int)info.X, (int)info.Y, (int)info.Z }; }). Overload candidates: the source does not establish which candidate is selected.
Internal implementation code; this is not a standalone script.
public int[] LastTile() => Invoke(() =>
{
LastTargetInfo info = _world.TargetManager.LastTargetInfo;
return new[] { (int)info.Graphic, (int)info.X, (int)info.Y, (int)info.Z };
});Returns the value of the expression below.
Parameters: x, y, z, accuracy, running, staminaThreshold, openDoor, throughCorner, throughNpcs, heuristicMultiplier, turnCost, exitOnDisconnect, accuracyZ, optimized, betweenTwoCorners
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1463.
`public int MoveTo(int x, int y, int z, int accuracy, bool running, int staminaThreshold,
bool openDoor, bool throughCorner, bool throughNpcs, int heuristicMultiplier,
int turnCost, bool exitOnDisconnect, int accuracyZ = 255, bool optimized = true,
bool betweenTwoCorners = false)`
Result: int.
Calls: Invoke.
Internal implementation code; this is not a standalone script.
public int MoveTo(int x, int y, int z, int accuracy, bool running, int staminaThreshold,
bool openDoor, bool throughCorner, bool throughNpcs, int heuristicMultiplier,
int turnCost, bool exitOnDisconnect, int accuracyZ = 255, bool optimized = true,
bool betweenTwoCorners = false) => Invoke(() =>
{
if (_world.Player == null) return 0;
_manager.StopFollowing();
Pathfinder pathfinder = _world.Player.Pathfinder;
bool started = pathfinder.WalkTo(
x,
y,
z,
Math.Clamp(accuracy, 0, 20),
running,
Math.Max(0, staminaThreshold),
openDoor,
throughCorner,
throughNpcs,
Math.Max(1, heuristicMultiplier),
Math.Max(0, turnCost),
exitOnDisconnect,
Math.Clamp(accuracyZ, 0, 255),
optimized,
betweenTwoCorners,
ScriptPathObstacles.Create(_csharpState, this), incremental: true);
if (started)
{
_lastMovementPathfinder = pathfinder;
_lastMovementPlayer = _world.Player;
_lastMovementMap = _world.Map;
_lastMovementMapIndex = _world.MapIndex;
Interlocked.Exchange(ref _lastMovementRequestId, pathfinder.AutoWalkRequestGeneration);
_pathCancellation.Unregister();
long generation = pathfinder.AutoWalkGeneration;
if (pathfinder.AutoWalking)
_pathCancellation = _cancellationToken.Register(() => _manager.ReleaseScriptMovement(pathfinder, generation));
}
return started ? 1 : 0;
});Performs the displayed calls and state updates.
Parameters: id, delay
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1317.
public void ReceiveObjectName(int id, int delay)
Result: void.
Calls: Click, Stopwatch.StartNew, Math.Max, string.IsNullOrEmpty, GetName, Wait, Math.Min.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Click:Click(id). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetName:GetName(id). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Wait:Wait((int)Math.Min(25, Math.Max(1L, delay - elapsed.ElapsedMilliseconds))).
Internal implementation code; this is not a standalone script.
public void ReceiveObjectName(int id, int delay)
{
Click(id);
var elapsed = Stopwatch.StartNew();
while (elapsed.ElapsedMilliseconds < Math.Max(0, delay) && string.IsNullOrEmpty(GetName(id)))
Wait((int)Math.Min(25, Math.Max(1L, delay - elapsed.ElapsedMilliseconds)));
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:292.
public void RequestVirtuesGump()
Result: void.
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { if (_world.Player != null) GameActions.ReplyGump(_world.Player, 0x000001CD, 0x00000001, new[] { _world.Player.Serial }, Array.Empty<Tuple<ushort, string>>()); }). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { if (_world.Player != null) GameActions.ReplyGump(_world.Player, 0x000001CD, 0x00000001, new[] { _world.Player.Serial }, Array.Empty<Tuple<ushort, string>>()); }). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.GameActions.ReplyGump:GameActions.ReplyGump(_world.Player, 0x000001CD, 0x00000001, new[] { _world.Player.Serial }, Array.Empty<Tuple<ushort, string>>()).
Internal implementation code; this is not a standalone script.
public void RequestVirtuesGump() => Invoke(() =>
{
if (_world.Player != null)
GameActions.ReplyGump(_world.Player, 0x000001CD, 0x00000001, new[] { _world.Player.Serial }, Array.Empty<Tuple<ushort, string>>());
});Parses or resolves the argument using the rules shown in the code.
Parameters: gumpId
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3915.
private Gump ResolveGumpUnsafe(int gumpId)
Result: Gump.
Result: _selectedServerGump != null && !_selectedServerGump.IsDisposed ? _selectedServerGump : gumps.LastOrDefault().
Calls: ServerGumpsUnsafe, gumps.LastOrDefault, gumps.FirstOrDefault.
Conditions: gumpId == -1.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ServerGumpsUnsafe:ServerGumpsUnsafe().
Internal implementation code; this is not a standalone script.
private Gump ResolveGumpUnsafe(int gumpId)
{
List<Gump> gumps = ServerGumpsUnsafe();
if (gumpId == -1)
{
return _selectedServerGump != null && !_selectedServerGump.IsDisposed ? _selectedServerGump : gumps.LastOrDefault();
}
return gumps.FirstOrDefault(g => g.LocalSerial == (uint)gumpId || g.ServerSerial == (uint)gumpId)
?? (gumpId >= 0 && gumpId < gumps.Count ? gumps[gumpId] : null);
}Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:738.
public int SelectContainer()
Result: int.
Result: SelectObject() is Item item ? (int)item.Serial : 0.
Calls: SelectObject.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SelectObject:SelectObject().
Internal implementation code; this is not a standalone script.
public int SelectContainer() => SelectObject() is Item item ? (int)item.Serial : 0;Performs the displayed calls and state updates.
Parameters: command, message
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1404.
private void SendServerSpeech(string command, string message)
Result: void.
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { GameActions.Say(message ?? string.Empty, allowYokoCommand: SCRIPT_SAY_ALLOW_YOKO_COMMAND); ReportStatus($"{command} delivered through ClassicUO server speech"); }). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { GameActions.Say(message ?? string.Empty, allowYokoCommand: SCRIPT_SAY_ALLOW_YOKO_COMMAND); ReportStatus($"{command} delivered through ClassicUO server speech"); }). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ReportStatus:ReportStatus($"{command} delivered through ClassicUO server speech").
Internal implementation code; this is not a standalone script.
private void SendServerSpeech(string command, string message) => Invoke(() =>
{
GameActions.Say(message ?? string.Empty, allowYokoCommand: SCRIPT_SAY_ALLOW_YOKO_COMMAND);
ReportStatus($"{command} delivered through ClassicUO server speech");
});Returns the value of the expression below.
Parameters: path
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:318.
public int StartScript(string path)
Result: int.
Result: _manager.StartScript(path).
Calls: _manager.StartScript.
Calls:
-
ClassicUO.Game.Managers.YokoInjectionManager.StartScript:_manager.StartScript(path).
Internal implementation code; this is not a standalone script.
public int StartScript(string path) => _manager.StartScript(path);Returns the value of the expression below.
Parameters: spellId
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2193.
internal static int ToClassicUOCastIndex(int spellId)
Result: int.
Result: spellId.
Internal implementation code; this is not a standalone script.
internal static int ToClassicUOCastIndex(int spellId) => spellId;Returns the value of the expression below.
Parameters: id, amount, destination, x, y, z
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1171.
private bool TryMoveItemRequest(int id, int amount, int destination, int x, int y, int z)
Result: bool.
Result: TryMoveItemRequest(_world, id, amount, destination, x, y, z).
Calls: TryMoveItemRequest.
Internal implementation code; this is not a standalone script.
private bool TryMoveItemRequest(int id, int amount, int destination, int x, int y, int z)
=> TryMoveItemRequest(_world, id, amount, destination, x, y, z);Returns the value of the expression below.
Parameters: abilityId
Source: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2226.
public int UseAbility(int abilityId)
Result: int.
Calls: Invoke.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { if (_world.Player == null || abilityId < 1 || abilityId > AbilityData.Abilities.Length) return 0; int primary = (byte)_world.Player.Abilities[0] & 0x7F; int secondary = (byte)_world.Player.Abilities[1] & 0x7F; if (abilityId == primary) { GameActions.UsePrimaryAbility(_world); return 1; } if (abilityId == secondary) { GameActions.UseSecondaryAbility(_world); return 1; } return 0; }). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { if (_world.Player == null || abilityId < 1 || abilityId > AbilityData.Abilities.Length) return 0; int primary = (byte)_world.Player.Abilities[0] & 0x7F; int secondary = (byte)_world.Player.Abilities[1] & 0x7F; if (abilityId == primary) { GameActions.UsePrimaryAbility(_world); return 1; } if (abilityId == secondary) { GameActions.UseSecondaryAbility(_world); return 1; } return 0; }). Overload candidates: the source does not establish which candidate is selected. -
ClassicUO.Game.GameActions.UsePrimaryAbility:GameActions.UsePrimaryAbility(_world). -
ClassicUO.Game.GameActions.UseSecondaryAbility:GameActions.UseSecondaryAbility(_world).
Internal implementation code; this is not a standalone script.
public int UseAbility(int abilityId) => Invoke(() =>
{
if (_world.Player == null || abilityId < 1 || abilityId > AbilityData.Abilities.Length)
return 0;
int primary = (byte)_world.Player.Abilities[0] & 0x7F;
int secondary = (byte)_world.Player.Abilities[1] & 0x7F;
if (abilityId == primary)
{
GameActions.UsePrimaryAbility(_world);
return 1;
}
if (abilityId == secondary)
{
GameActions.UseSecondaryAbility(_world);
return 1;
}
return 0;
});Performs the displayed calls and state updates.
Parameters: scriptKey, text
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoIdeToolBuffers.cs:124.
internal void AppendOutput(string scriptKey, string text)
Result: void.
Calls: _output.Add, _clock, NormalizeKey, NormalizeText, TrimOldest.
Internal implementation code; this is not a standalone script.
internal void AppendOutput(string scriptKey, string text)
{
lock (_sync)
{
_output.Add(new YokoOutputEntry
{
Sequence = ++_sequence,
Timestamp = _clock(),
ScriptKey = NormalizeKey(scriptKey),
Text = NormalizeText(text)
});
TrimOldest(_output);
_revision++;
}
}Dispatches work to the game thread and observes cancellation.
Parameters: callback, cancellationToken
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:3488.
internal void InvokeOnGameThread(Action callback, CancellationToken cancellationToken)
Result: void.
Calls: InvokeOnGameThread.
Internal implementation code; this is not a standalone script.
internal void InvokeOnGameThread(Action callback, CancellationToken cancellationToken)
{
InvokeOnGameThread(() =>
{
callback();
return true;
}, cancellationToken);
}Performs the displayed calls and state updates.
Parameters: index
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:2841.
internal void PauseResumeScript(int index)
Result: void.
Calls: ElementAt, RunningScripts, script.ToggleManualPause, MarkRuntimeStateChanged.
Conditions: script == null.
Calls:
-
ClassicUO.Game.Managers.YokoInjectionManager.ElementAt:ElementAt(RunningScripts(), index). -
ClassicUO.Game.Managers.YokoInjectionManager.RunningScripts:RunningScripts(). -
ClassicUO.Game.Managers.YokoInjectionManager.MarkRuntimeStateChanged:MarkRuntimeStateChanged().
Internal implementation code; this is not a standalone script.
internal void PauseResumeScript(int index)
{
YokoRunningScript script = ElementAt(RunningScripts(), index);
if (script == null)
return;
script.ToggleManualPause();
MarkRuntimeStateChanged();
}Performs the displayed calls and state updates.
Parameters: text, scriptKey
Source: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:3749.
internal void SetStatus(string text, string scriptKey = null)
Result: void.
Calls: IsScriptPublicationCurrent, Volatile.Write, PublishStatus.
Conditions: !IsScriptPublicationCurrent(scriptKey).
Internal implementation code; this is not a standalone script.
internal void SetStatus(string text, string scriptKey = null)
{
if (!IsScriptPublicationCurrent(scriptKey))
return;
Volatile.Write(ref _statusPriority, 1);
PublishStatus(text, scriptKey);
}Returns the value of the expression below.
Parameters: serial
Source: Project_Full/src/ClassicUO.Client/Game/SerialHelper.cs:16.
public static bool IsMobile(uint serial)
Result: bool.
Result: serial > 0 && serial < 0x40000000.
Internal implementation code; this is not a standalone script.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsMobile(uint serial)
{
return serial > 0 && serial < 0x40000000;
}Performs the displayed calls and state updates.
Parameters: season, music
Source: Project_Full/src/ClassicUO.Client/Game/World.cs:321.
public void ChangeSeason(Season season, int music)
Result: void.
Calls: Map.GetUsedChunks, .GetHeadObject, obj.UpdateGraphicBySeason, .GetCurrentMusic, audio.PlayMusic.
Conditions: audio != null && (currentMusic == null || currentMusic.Index == audio.LoginMusicIndex).
Calls:
-
ClassicUO.Game.Map.Map.GetUsedChunks:Map.GetUsedChunks().
Internal implementation code; this is not a standalone script.
public void ChangeSeason(Season season, int music)
{
Season = season;
foreach (Chunk chunk in Map.GetUsedChunks())
{
for (int x = 0; x < 8; x++)
{
for (int y = 0; y < 8; y++)
{
for (GameObject obj = chunk?.GetHeadObject(x, y); obj != null; obj = obj.TNext)
{
obj.UpdateGraphicBySeason();
}
}
}
}
//TODO(deccer): refactor this out into _audioPlayer.PlayMusic(...)
var audio = Client.Game?.Audio;
UOMusic currentMusic = audio?.GetCurrentMusic();
if (audio != null && (currentMusic == null || currentMusic.Index == audio.LoginMusicIndex))
{
audio.PlayMusic(music, false);
}
}Returns the value of the expression below.
Parameters: value, wordIndex
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApi.cs:41.
private static string GetWord(string value,int wordIndex)
Result: string.
Result: GetWord(value,wordIndex," ").
Calls: GetWord.
Calls:
-
InjectionScript.Runtime.InjectionApi.GetWord:GetWord(value,wordIndex," ").
Internal implementation code; this is not a standalone script.
private static string GetWord(string value,int wordIndex) => GetWord(value,wordIndex," ");Returns the value of the expression below.
Parameters: value, delimiter
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApi.cs:36.
private static string[] SplitWords(string value,string delimiter)
Result: string[].
Result: string.IsNullOrEmpty(delimiter)||delimiter==" "?value.Split((char[])null,StringSplitOptions.RemoveEmptyEntries):value.Split(new[]{delimiter},StringSplitOptions.RemoveEmptyEntries).
Calls: string.IsNullOrEmpty, value.Split.
Internal implementation code; this is not a standalone script.
private static string[] SplitWords(string value,string delimiter)
{
value=value??string.Empty;
return string.IsNullOrEmpty(delimiter)||delimiter==" "?value.Split((char[])null,StringSplitOptions.RemoveEmptyEntries):value.Split(new[]{delimiter},StringSplitOptions.RemoveEmptyEntries);
}Checks the conditions below and returns the displayed result.
Parameters: fromX, fromY, toX, toY
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2803.
private static int CalculateDirection(int fromX, int fromY, int toX, int toY)
Result: int.
Result: 100; dy < 0 ? 0 : 4; dx > 0 ? 2 : 6; dy < 0 ? 1 : 3; dy > 0 ? 5 : 7.
Calls: Math.Sign.
Conditions: dx == 0 && dy == 0; dx == 0; dy == 0; dx > 0.
Internal implementation code; this is not a standalone script.
private static int CalculateDirection(int fromX, int fromY, int toX, int toY)
{
int dx = Math.Sign(toX - fromX);
int dy = Math.Sign(toY - fromY);
if (dx == 0 && dy == 0) return 100;
if (dx == 0) return dy < 0 ? 0 : 4;
if (dy == 0) return dx > 0 ? 2 : 6;
if (dx > 0) return dy < 0 ? 1 : 3;
return dy > 0 ? 5 : 7;
}Checks the conditions below and returns the displayed result.
Parameters: values
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4950.
private int CompactAttackNearest(InjectionValue[] values)
Result: int.
Result: 0; serial.
Calls: ResolveCompactDistance, bridge.GetFindDistance, ResolveCompactMaxZ, bridge.GetFindVertical, ToBoolean, NumberConversions.ToInt, TryResolveClassRules, FilterMobiles.
Conditions: !TryResolveClassRules(classMask, out EquipmentClassRule[] rules); serial != 0.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ResolveCompactDistance:ResolveCompactDistance(values[1]). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetFindDistance:bridge.GetFindDistance(). -
InjectionScript.Runtime.InjectionApiUO.ResolveCompactMaxZ:ResolveCompactMaxZ(values[3]). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetFindVertical:bridge.GetFindVertical(). -
InjectionScript.Runtime.InjectionApiUO.ToBoolean:ToBoolean(values[4]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(values[5]). -
InjectionScript.Runtime.InjectionApiUO.ToBoolean:ToBoolean(values[7]). -
InjectionScript.Runtime.InjectionApiUO.ToBoolean:ToBoolean(values[8]). -
InjectionScript.Runtime.InjectionApiUO.TryResolveClassRules:TryResolveClassRules(classMask, out EquipmentClassRule[] rules). -
InjectionScript.Runtime.InjectionApiUO.FilterMobiles:FilterMobiles(distance, notoriety, body, maxZ, color, false, false, aliveOnly, visibleOnly). -
InjectionScript.Runtime.InjectionApiUO.SelectClassCandidate:SelectClassCandidate(mobiles, rules, nearest). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Attack:bridge.Attack(serial).
Internal implementation code; this is not a standalone script.
private int CompactAttackNearest(InjectionValue[] values)
{
InjectionValue notoriety = values[0];
int distance = values.Length > 1 ? ResolveCompactDistance(values[1]) : bridge.GetFindDistance();
InjectionValue body = values.Length > 2 ? values[2] : InjectionValue.MinusOne;
int maxZ = values.Length > 3 ? ResolveCompactMaxZ(values[3]) : bridge.GetFindVertical();
bool nearest = values.Length <= 4 || ToBoolean(values[4]);
int color = values.Length > 5 ? NumberConversions.ToInt(values[5]) : -1;
InjectionValue classMask = values.Length > 6 ? values[6] : default(InjectionValue);
bool aliveOnly = values.Length > 7 && ToBoolean(values[7]);
bool visibleOnly = values.Length > 8 && ToBoolean(values[8]);
// Resolve once, before any attack. A misspelled/undefined class must
// never degrade into an unrestricted search or a name substring match.
if (!TryResolveClassRules(classMask, out EquipmentClassRule[] rules))
return 0;
IEnumerable<int> mobiles = FilterMobiles(distance, notoriety, body, maxZ, color, false,
false, aliveOnly, visibleOnly);
int serial = SelectClassCandidate(mobiles, rules, nearest);
if (serial != 0)
bridge.Attack(serial);
return serial;
}Checks the conditions below and returns the displayed result.
Parameters: values
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3143.
private int CompactWaitGump(InjectionValue[] values)
Result: int.
Result: 1; 0.
Calls: CollectGumpButtons, automation.QueueGumpButtons, buttons.ToArray, CompactWaitGump, (value.String ?? string.Empty).Contains, `(value.String ?? string.Empty)
.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries)
.Select(part => new InjectionValue(part.Trim())).ToArray`, `(value.String ?? string.Empty)
.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries)
.Select`, `(value.String ?? string.Empty)
.Split`.
Conditions: values == null || values.Length == 0; bridge is IApiGumpAutomation automation; value.Kind == InjectionValueKind.Array; CompactWaitGump(value.Array) == 0.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.CollectGumpButtons:CollectGumpButtons(values, buttons). -
InjectionScript.Runtime.InjectionApiUO.CompactWaitGump:CompactWaitGump(value.Array). -
InjectionScript.Runtime.InjectionApiUO.CompactWaitGump:CompactWaitGump(nested). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(value). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.WaitGumpSelect:bridge.WaitGumpSelect(triggerId, 30_000).
Internal implementation code; this is not a standalone script.
private int CompactWaitGump(InjectionValue[] values)
{
if (values == null || values.Length == 0)
throw new NativeSubrutineException("UO.WaitGump requires at least one trigger/button id.");
if (bridge is IApiGumpAutomation automation)
{
var buttons = new List<int>();
CollectGumpButtons(values, buttons);
automation.QueueGumpButtons(buttons.ToArray());
return 1;
}
foreach (InjectionValue value in values)
{
if (value.Kind == InjectionValueKind.Array)
{
if (CompactWaitGump(value.Array) == 0)
return 0;
continue;
}
if (value.Kind == InjectionValueKind.String
&& ((value.String ?? string.Empty).Contains('|') || (value.String ?? string.Empty).Contains(',')))
{
InjectionValue[] nested = (value.String ?? string.Empty)
.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries)
.Select(part => new InjectionValue(part.Trim())).ToArray();
if (CompactWaitGump(nested) == 0)
return 0;
continue;
}
int triggerId = NumberConversions.ToInt(value);
if (bridge.WaitGumpSelect(triggerId, 30_000) == 0)
return 0;
}
return 1;
}Checks the conditions below and returns the displayed result.
Parameters: layer
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6405.
private int ConvertLayer(string layer)
Result: int.
Result: value.
Calls: layerNameToNumber.TryGetValue, (layer ?? string.Empty).Trim.
Conditions: layerNameToNumber.TryGetValue((layer ?? string.Empty).Trim(), out int value).
Internal implementation code; this is not a standalone script.
private int ConvertLayer(string layer)
{
if (layerNameToNumber.TryGetValue((layer ?? string.Empty).Trim(), out int value))
return value;
throw new NativeSubrutineException($"Unknown equipment layer '{layer}'. Use a documented layer such as Rhand, Lhand, Helmet, Necklace, Backpack, Robe, Legs, or Mount.");
}Checks the conditions below and returns the displayed result.
Parameters: containerId
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6361.
private int ConvertMoveDestination(InjectionValue containerId)
Result: int.
Result: ResolveTransferDestination(backpack ? new InjectionValue("backpack") : containerId, allowGround: true).
Calls: NumberConversions.TryStr2Int, .Trim, ResolveTransferDestination.
Conditions: containerId.Kind != InjectionValueKind.String && containerId.Kind != InjectionValueKind.Integer.
Calls:
-
InjectionScript.Runtime.NumberConversions.TryStr2Int:NumberConversions.TryStr2Int(containerId.String?.Trim() ?? string.Empty, out int literal). -
InjectionScript.Runtime.InjectionApiUO.ResolveTransferDestination:ResolveTransferDestination(backpack ? new InjectionValue("backpack") : containerId, allowGround: true).
Internal implementation code; this is not a standalone script.
private int ConvertMoveDestination(InjectionValue containerId)
{
if (containerId.Kind != InjectionValueKind.String && containerId.Kind != InjectionValueKind.Integer)
throw new NativeSubrutineException("A move destination must be an object name or serial ID.");
// Preserve the legacy -1 backpack selector. Resolve names before
// lifting: a misspelled or unset container must never become ground.
bool backpack = containerId.Kind == InjectionValueKind.Integer
? containerId.Integer == -1
: NumberConversions.TryStr2Int(containerId.String?.Trim() ?? string.Empty, out int literal) && literal == -1;
return ResolveTransferDestination(backpack ? new InjectionValue("backpack") : containerId, allowGround: true);
}Returns the value of the expression below.
Parameters: type
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5208.
public int Count(InjectionValue type)
Result: int.
Result: Count(ResolveType(type), -1, -1).
Calls: Count, ResolveType.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.Count:Count(ResolveType(type), -1, -1). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(type).
Internal implementation code; this is not a standalone script.
public int Count(InjectionValue type)
=> Count(ResolveType(type), -1, -1);Performs the displayed calls and state updates.
Parameters: text
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5401.
public void DeleteJournal(string text)
Result: void.
Calls: bridge.DeleteJournal, SelectJournalEntry.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.DeleteJournal:bridge.DeleteJournal(text). -
InjectionScript.Runtime.InjectionApiUO.SelectJournalEntry:SelectJournalEntry(null).
Internal implementation code; this is not a standalone script.
public void DeleteJournal(string text)
{
bridge.DeleteJournal(text);
SelectJournalEntry(null);
}Performs the displayed calls and state updates.
Parameters: name
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3809.
public void DeleteObject(string name)
Result: void.
Calls: objects.TryGet, objects.Remove, SystemMessage.
Conditions: objects.TryGet(name, out int value).
Calls:
-
InjectionScript.Runtime.State.RuntimeDictionary.TryGet:objects.TryGet(name, out int value). -
InjectionScript.Runtime.State.RuntimeDictionary.Remove:objects.Remove(name). -
InjectionScript.Runtime.InjectionApiUO.SystemMessage:SystemMessage($"Object {name} has been deleted"). -
InjectionScript.Runtime.InjectionApiUO.SystemMessage:SystemMessage($"Object {name} not found").
Internal implementation code; this is not a standalone script.
public void DeleteObject(string name)
{
if (objects.TryGet(name, out int value))
{
objects.Remove(name);
SystemMessage($"Object {name} has been deleted");
}
else
SystemMessage($"Object {name} not found");
}Returns the value of the expression below.
Parameters: index
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1144.
string Text(int index)
Result: string.
Result: index < arguments.Length ? arguments[index].ToString() : string.Empty.
Calls: arguments[index].ToString.
Calls:
-
InjectionScript.Runtime.InjectionValue.ToString:arguments[index].ToString().
Internal implementation code; this is not a standalone script.
string Text(int index) => index < arguments.Length ? arguments[index].ToString() : string.Empty;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:1286.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoBuyRule:bridge.SetAutoBuyRule(Arg(0), Arg(1), Arg(2), Arg(3), Text(4)). -
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::Arg:Arg(3). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(4).
Internal implementation code; this is not a standalone script.
case "autobuyex":
bridge.SetAutoBuyRule(Arg(0), Arg(1), Arg(2), Arg(3), Text(4)); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1550.
Result: new InjectionValue(bridge.CancelTrade(Arg(0))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CancelTrade:bridge.CancelTrade(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "canceltrade": return new InjectionValue(bridge.CancelTrade(Arg(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1306.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ConnectClient:bridge.ConnectClient().
Internal implementation code; this is not a standalone script.
case "connect": bridge.ConnectClient(); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1565.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.GetDistance:GetDistance(Arg(0), Arg(1), Arg(2), Arg(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::Arg:Arg(3). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetDistance:bridge.GetDistance(Arg(0)).
Internal implementation code; this is not a standalone script.
case "dist": return new InjectionValue(arguments.Length >= 4
? GetDistance(Arg(0), Arg(1), Arg(2), Arg(3))
: bridge.GetDistance(Arg(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1627.
Result: new InjectionValue(ChangeEquipmentItems(ArrayArg(0), true)).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ChangeEquipmentItems:ChangeEquipmentItems(ArrayArg(0), true). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::ArrayArg:ArrayArg(0).
Internal implementation code; this is not a standalone script.
case "equipitems":
return new InjectionValue(ChangeEquipmentItems(ArrayArg(0), true));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2005.
new []
Result: [].
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ClientPath:bridge.ClientPath. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CurrentProfilePath:bridge.CurrentProfilePath. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GameServerAddress:bridge.GameServerAddress. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GameServerPort:bridge.GameServerPort.
Internal implementation code; this is not a standalone script.
case "extendedinfo":
return new InjectionValue(new[] { new InjectionValue(bridge.ClientPath), new InjectionValue(bridge.CurrentProfilePath), new InjectionValue(bridge.GameServerAddress), new InjectionValue(bridge.GameServerPort) });This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1476.
Result: new InjectionValue(bridge.FindType(ResolveType(arguments[0]), Arg(1), StealthContainer(2), -1, Arg(3) != 0)).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindType:bridge.FindType(ResolveType(arguments[0]), Arg(1), StealthContainer(2), -1, Arg(3) != 0). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::StealthContainer:StealthContainer(2). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(3).
Internal implementation code; this is not a standalone script.
case "findtypeex": return new InjectionValue(bridge.FindType(ResolveType(arguments[0]), Arg(1), StealthContainer(2), -1, Arg(3) != 0));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1587.
Result: new InjectionValue(bridge.GetActiveAbility()).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetActiveAbility:bridge.GetActiveAbility().
Internal implementation code; this is not a standalone script.
case "getactiveability": return new InjectionValue(bridge.GetActiveAbility());This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1590.
Result: StringArray(bridge.GetMenuItems(Text(0), false)).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.StringArray:StringArray(bridge.GetMenuItems(Text(0), false)). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetMenuItems:bridge.GetMenuItems(Text(0), false). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0).
Internal implementation code; this is not a standalone script.
case "getmenuitems": return StringArray(bridge.GetMenuItems(Text(0), false));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1919.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GlobalChatSend:bridge.GlobalChatSend(Text(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0).
Internal implementation code; this is not a standalone script.
case "globalchatsendmsg": bridge.GlobalChatSend(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:1273.
Result: new InjectionValue(InJournal(Text(0))).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.InJournal:InJournal(Text(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0).
Internal implementation code; this is not a standalone script.
case "injournal": return new InjectionValue(InJournal(Text(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2043.
Result: new InjectionValue(selectedJournalEntry?.Color ?? 0).
Internal implementation code; this is not a standalone script.
case "linetextcolor":
return new InjectionValue(selectedJournalEntry?.Color ?? 0);This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1534.
Result: new InjectionValue(ReadPredictedCoordinate(1)).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ReadPredictedCoordinate:ReadPredictedCoordinate(1).
Internal implementation code; this is not a standalone script.
case "predictedy": return new InjectionValue(ReadPredictedCoordinate(1));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1594.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RequestContextMenu:bridge.RequestContextMenu(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "requestcontextmenu": bridge.RequestContextMenu(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:1357.
Result: InjectionValue.Unit.
Calls:
Internal implementation code; this is not a standalone script.
case "setsilentmode": state.SilentMode = Arg(0) != 0 ? 1 : 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:1655.
Result: InjectionValue.Unit.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.WarMode:WarMode(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "setwarmode": WarMode(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:1295.
Result: new InjectionValue(bridge.GetTargetCursorId()).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetTargetCursorId:bridge.GetTargetCursorId().
Internal implementation code; this is not a standalone script.
case "targetid": return new InjectionValue(bridge.GetTargetCursorId());This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1250.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.UseObject:bridge.UseObject(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "useobject": bridge.UseObject(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:1681.
Result: InjectionValue.Unit.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.UseSecondaryAbility:bridge.UseSecondaryAbility().
Internal implementation code; this is not a standalone script.
case "usesecondaryability": bridge.UseSecondaryAbility(); return InjectionValue.Unit;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1642.
Result: new InjectionValue(bridge.WaitUntilTargeting(Arg(0))).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.WaitUntilTargeting:bridge.WaitUntilTargeting(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "waitfortarget": return new InjectionValue(bridge.WaitUntilTargeting(Arg(0)));This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1369.
Result: new InjectionValue(bridge.Weight).
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Weight:bridge.Weight.
Internal implementation code; this is not a standalone script.
case "weight": return new InjectionValue(bridge.Weight);This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2844.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::LegacyList:LegacyList(name). -
InjectionScript.Runtime.InjectionValue.ToString:value.ToString().
Internal implementation code; this is not a standalone script.
case "adddir":
case "addfindlist":
case "addgate":
case "addrecall":
case "addstep":
LegacyList(name).Add(string.Join("|", arguments.Select(value => value.ToString())));
break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2876.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ClearMenuHooks:bridge.ClearMenuHooks().
Internal implementation code; this is not a standalone script.
case "cancelmenu": bridge.ClearMenuHooks(); break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2858.
Conditions: arguments.Length == 0.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::LegacyList:LegacyList("AddFindList"). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Text:Text(0).
Internal implementation code; this is not a standalone script.
case "clearfindlist":
if (arguments.Length == 0) LegacyList("AddFindList").Clear();
else LegacyList("AddFindList").RemoveAll(value => value.Split('|')[0]
.Equals(Text(0), StringComparison.OrdinalIgnoreCase));
break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2888.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CloseHandle:bridge.CloseHandle().
Internal implementation code; this is not a standalone script.
case "closeuo": bridge.CloseHandle(); break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2991.
Conditions: arguments.Length == 0.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MassMove:bridge.MassMove(-1, 0, 0, -1, -1, -1, 0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MassMove:bridge.MassMove(NumberConversions.ToInt(arguments[0]), arguments.Length > 1 ? NumberConversions.ToInt(arguments[1]) : 0, arguments.Length > 2 ? ResolveType(arguments[2]) : 0, arguments.Length > 3 ? ResolveTransferDestination(arguments[3], true) : -1, arguments.Length > 4 ? NumberConversions.ToInt(arguments[4]) : -1, arguments.Length > 5 ? NumberConversions.ToInt(arguments[5]) : -1, arguments.Length > 6 ? NumberConversions.ToInt(arguments[6]) : 0). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[0]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[1]). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[2]). -
InjectionScript.Runtime.InjectionApiUO.ResolveTransferDestination:ResolveTransferDestination(arguments[3], true). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[4]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[5]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[6]).
Internal implementation code; this is not a standalone script.
case "massmove":
if (arguments.Length == 0) bridge.MassMove(-1, 0, 0, -1, -1, -1, 0);
else bridge.MassMove(NumberConversions.ToInt(arguments[0]),
arguments.Length > 1 ? NumberConversions.ToInt(arguments[1]) : 0,
arguments.Length > 2 ? ResolveType(arguments[2]) : 0,
arguments.Length > 3 ? ResolveTransferDestination(arguments[3], true) : -1,
arguments.Length > 4 ? NumberConversions.ToInt(arguments[4]) : -1,
arguments.Length > 5 ? NumberConversions.ToInt(arguments[5]) : -1,
arguments.Length > 6 ? NumberConversions.ToInt(arguments[6]) : 0);
break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3001.
Conditions: arguments.Length == 0.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MassPriceMove:bridge.MassPriceMove(-1, 0, 0, 0, -1, -1, -1, 0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MassPriceMove:bridge.MassPriceMove(NumberConversions.ToInt(arguments[0]), NumberConversions.ToInt(arguments[1]), ResolveType(arguments[2]), NumberConversions.ToInt(arguments[3]), arguments.Length > 4 ? ResolveTransferDestination(arguments[4], true) : -1, arguments.Length > 5 ? NumberConversions.ToInt(arguments[5]) : -1, arguments.Length > 6 ? NumberConversions.ToInt(arguments[6]) : -1, arguments.Length > 7 ? NumberConversions.ToInt(arguments[7]) : 0). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[0]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[1]). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[2]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[3]). -
InjectionScript.Runtime.InjectionApiUO.ResolveTransferDestination:ResolveTransferDestination(arguments[4], true). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[5]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[6]). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[7]).
Internal implementation code; this is not a standalone script.
case "masspricemove":
if (arguments.Length == 0) bridge.MassPriceMove(-1, 0, 0, 0, -1, -1, -1, 0);
else bridge.MassPriceMove(NumberConversions.ToInt(arguments[0]),
NumberConversions.ToInt(arguments[1]), ResolveType(arguments[2]),
NumberConversions.ToInt(arguments[3]),
arguments.Length > 4 ? ResolveTransferDestination(arguments[4], true) : -1,
arguments.Length > 5 ? NumberConversions.ToInt(arguments[5]) : -1,
arguments.Length > 6 ? NumberConversions.ToInt(arguments[6]) : -1,
arguments.Length > 7 ? NumberConversions.ToInt(arguments[7]) : 0);
break;This branch handles only the specified command name.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3020.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Resync:bridge.Resync().
Internal implementation code; this is not a standalone script.
case "resend": bridge.Resync(); break;Returns the value of the expression below.
Parameters: id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3740.
public int Exists(int id)
Result: int.
Result: bridge.Exists(id).
Calls: bridge.Exists.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Exists:bridge.Exists(id).
Internal implementation code; this is not a standalone script.
public int Exists(int id) => bridge.Exists(id);Returns the value of the expression below.
Parameters: x, y
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6188.
public InjectionValue GetLandTileAt(InjectionValue x, InjectionValue y)
Result: InjectionValue.
Result: GetLandTileAt(x, y, new InjectionValue(bridge.WorldNumber)).
Calls: GetLandTileAt.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.GetLandTileAt:GetLandTileAt(x, y, new InjectionValue(bridge.WorldNumber)). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.WorldNumber:bridge.WorldNumber.
Internal implementation code; this is not a standalone script.
public InjectionValue GetLandTileAt(InjectionValue x, InjectionValue y)
=> GetLandTileAt(x, y, new InjectionValue(bridge.WorldNumber));Checks the conditions below and returns the displayed result.
Parameters: name
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3888.
public int GetObject(string name)
Result: int.
Result: 0; id.
Calls: TryGetObject.
Conditions: !TryGetObject(name, out int id).
Calls:
-
InjectionScript.Runtime.InjectionApiUO.TryGetObject:TryGetObject(name, out int id).
Internal implementation code; this is not a standalone script.
public int GetObject(string name)
{
if (!TryGetObject(name, out int id))
return 0;
return id;
}Returns the value of the expression below.
Parameters: group, tileId
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6257.
public string GetTileName(InjectionValue group, InjectionValue tileId)
Result: string.
Result: bridge.GetTileDataName(NumberConversions.ToInt(group), NumberConversions.ToInt(tileId)).
Calls: bridge.GetTileDataName, NumberConversions.ToInt.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetTileDataName:bridge.GetTileDataName(NumberConversions.ToInt(group), NumberConversions.ToInt(tileId)). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(group). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(tileId).
Internal implementation code; this is not a standalone script.
public string GetTileName(InjectionValue group, InjectionValue tileId)
=> bridge.GetTileDataName(NumberConversions.ToInt(group), NumberConversions.ToInt(tileId));Returns the value of the expression below.
Parameters: id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6274.
public string GetUserStatic(InjectionValue id)
Result: string.
Result: state.UserStatics.TryGetValue(NumberConversions.ToInt(id), out string value) ? value : string.Empty.
Calls: state.UserStatics.TryGetValue, NumberConversions.ToInt.
Calls:
-
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(id).
Internal implementation code; this is not a standalone script.
public string GetUserStatic(InjectionValue id)
=> state.UserStatics.TryGetValue(NumberConversions.ToInt(id), out string value) ? value : string.Empty;Returns the value of the expression below.
Parameters: id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3564.
public int GetY(string id)
Result: int.
Result: GetY(GetObject(id)).
Calls: GetY, GetObject.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.GetY:GetY(GetObject(id)). -
InjectionScript.Runtime.InjectionApiUO.GetObject:GetObject(id).
Internal implementation code; this is not a standalone script.
public int GetY(string id) => GetY(GetObject(id));Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3766.
public int Hidden()
Result: int.
Result: Hidden("self").
Calls: Hidden.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.Hidden:Hidden("self").
Internal implementation code; this is not a standalone script.
public int Hidden() => Hidden("self");Performs the displayed calls and state updates.
Parameters: id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5222.
public void Ignore(int id)
Result: void.
Calls: bridge.Ignore.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Ignore:bridge.Ignore(id).
Internal implementation code; this is not a standalone script.
public void Ignore(int id) => bridge.Ignore(id);Returns the value of the expression below.
Parameters: pattern, maxLinesOrIgnoreCase
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5345.
public int InJournal(string pattern, int maxLinesOrIgnoreCase)
Result: int.
Calls: InJournalCore, Math.Max.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.InJournalCore:InJournalCore(pattern, maxLinesOrIgnoreCase == -1 ? -1 : Math.Max(0, maxLinesOrIgnoreCase), ignoreCase: maxLinesOrIgnoreCase == -1).
Internal implementation code; this is not a standalone script.
public int InJournal(string pattern, int maxLinesOrIgnoreCase)
=> InJournalCore(pattern,
maxLinesOrIgnoreCase == -1 ? -1 : Math.Max(0, maxLinesOrIgnoreCase),
ignoreCase: maxLinesOrIgnoreCase == -1);Returns the value of the expression below.
Parameters: graphic
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3731.
private static bool IsHumanBody(int graphic)
Result: bool.
Internal implementation code; this is not a standalone script.
private static bool IsHumanBody(int graphic) => graphic == 0x0190 || graphic == 0x0191
|| graphic == 0x0192 || graphic == 0x0193 || graphic == 0x025D || graphic == 0x025E
|| graphic == 0x025F || graphic == 0x0260 || graphic == 0x029A || graphic == 0x029B
|| graphic == 0x02B6 || graphic == 0x02B7;Returns the value of the expression below.
Parameters: x, y
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3306.
public int IsTreeTile(InjectionValue x, InjectionValue y)
Result: int.
Result: bridge.IsTreeTile(NumberConversions.ToInt(x), NumberConversions.ToInt(y)).
Calls: bridge.IsTreeTile, NumberConversions.ToInt.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsTreeTile:bridge.IsTreeTile(NumberConversions.ToInt(x), NumberConversions.ToInt(y)). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(x). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(y).
Internal implementation code; this is not a standalone script.
public int IsTreeTile(InjectionValue x, InjectionValue y) => bridge.IsTreeTile(NumberConversions.ToInt(x), NumberConversions.ToInt(y));Returns the value of the expression below.
Parameters: index
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5512.
private int JournalEntryTime(int index)
Result: int.
Result: JournalEntryTime(bridge.JournalTimestamp(index)).
Calls: JournalEntryTime, bridge.JournalTimestamp.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.JournalEntryTime:JournalEntryTime(bridge.JournalTimestamp(index)). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.JournalTimestamp:bridge.JournalTimestamp(index).
Internal implementation code; this is not a standalone script.
private int JournalEntryTime(int index)
=> JournalEntryTime(bridge.JournalTimestamp(index));Performs the displayed calls and state updates.
Parameters: type
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5899.
public void Morph(int type)
Result: void.
Calls: bridge.Morph, Timer.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Morph:bridge.Morph(type). -
InjectionScript.Runtime.InjectionApiUO.Timer:Timer().
Internal implementation code; this is not a standalone script.
public void Morph(int type)
{
bridge.Morph(type);
ticksAnim = Timer();
}Checks the conditions below and returns the displayed result.
Parameters: id, amount, targetContainer, x, y, z
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4566.
private bool MoveItemChecked(int id, int amount, int targetContainer, int x, int y, int z)
Result: bool.
Result: false; bridge.MoveItem(id, amount, targetContainer, x, y, z) != 0.
Calls: bridge.GetX, bridge.GetY, Math.Max, Math.Abs, SystemMessage, bridge.MoveItem.
Conditions: id == 0; targetContainer == 0 && state.DropCheckCoord != 0; Math.Max(Math.Abs(x - playerX), Math.Abs(y - playerY)) > 2.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetX:bridge.GetX(bridge.Self). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetY:bridge.GetY(bridge.Self). -
InjectionScript.Runtime.InjectionApiUO.SystemMessage:SystemMessage("Drop cancelled: destination is more than 2 tiles away (DropCheckCoord is enabled)."). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MoveItem:bridge.MoveItem(id, amount, targetContainer, x, y, z). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Self:bridge.Self.
Internal implementation code; this is not a standalone script.
private bool MoveItemChecked(int id, int amount, int targetContainer, int x, int y, int z)
{
if (id == 0)
return false;
if (targetContainer == 0 && state.DropCheckCoord != 0)
{
int playerX = bridge.GetX(bridge.Self);
int playerY = bridge.GetY(bridge.Self);
if (Math.Max(Math.Abs(x - playerX), Math.Abs(y - playerY)) > 2)
{
SystemMessage("Drop cancelled: destination is more than 2 tiles away (DropCheckCoord is enabled).");
return false;
}
}
return bridge.MoveItem(id, amount, targetContainer, x, y, z) != 0;
}Returns the value of the expression below.
Parameters: name
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5203.
private static string NormalizeApiName(string name)
Result: string.
Result: (name ?? string.Empty).Trim().
Calls: (name ?? string.Empty).Trim.
Internal implementation code; this is not a standalone script.
private static string NormalizeApiName(string name)
{
return (name ?? string.Empty).Trim();
}Performs the displayed calls and state updates.
Parameters: x, y
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5242.
public void RDblClick(int x, int y)
Result: void.
Calls: bridge.RDblClick.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RDblClick:bridge.RDblClick(x, y).
Internal implementation code; this is not a standalone script.
public void RDblClick(int x, int y) => bridge.RDblClick(x, y);These functions register the API. They do not run again for every command call.
Parameters: getter, names
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:993.
void AddText(Func<string> getter, params string[] names)
Result: void.
Calls: metadata.NativeSubrutineExists, metadata.Add, metadata.IntrinsicVariableExists, metadata.AddIntrinsicVariable.
Conditions: !metadata.NativeSubrutineExists(name, 0); !metadata.IntrinsicVariableExists(name).
Calls:
-
InjectionScript.Runtime.Metadata.NativeSubrutineExists:metadata.NativeSubrutineExists(name, 0). -
InjectionScript.Runtime.Metadata.Add:metadata.Add(new NativeSubrutineDefinition(name, getter)). -
InjectionScript.Runtime.Metadata.IntrinsicVariableExists:metadata.IntrinsicVariableExists(name). -
InjectionScript.Runtime.Metadata.AddIntrinsicVariable:metadata.AddIntrinsicVariable(new NativeSubrutineDefinition(name, getter)).
Internal implementation code; this is not a standalone script.
void AddText(Func<string> getter, params string[] names)
{
foreach (string shortName in names)
{
string name = "UO." + shortName;
if (!metadata.NativeSubrutineExists(name, 0))
metadata.Add(new NativeSubrutineDefinition(name, getter));
if (!metadata.IntrinsicVariableExists(name))
metadata.AddIntrinsicVariable(new NativeSubrutineDefinition(name, getter));
}
}Parses or resolves the argument using the rules shown in the code.
Parameters: value
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5093.
private int ResolveCompactDistance(InjectionValue value)
Result: int.
Result: parsed < 0 ? bridge.GetFindDistance() : Math.Max(0, parsed).
Calls: NumberConversions.ToInt, bridge.GetFindDistance, Math.Max.
Calls:
-
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(value). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetFindDistance:bridge.GetFindDistance().
Internal implementation code; this is not a standalone script.
private int ResolveCompactDistance(InjectionValue value)
{
int parsed = NumberConversions.ToInt(value);
return parsed < 0 ? bridge.GetFindDistance() : Math.Max(0, parsed);
}Performs the displayed calls and state updates.
Parameters: name
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5587.
public void SetArm(string name)
Result: void.
Calls: SetEquip.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.SetEquip:SetEquip(name, armSets, weaponLayers, "Arm set.").
Internal implementation code; this is not a standalone script.
public void SetArm(string name)
=> SetEquip(name, armSets, weaponLayers, "Arm set.");Performs the displayed calls and state updates.
Parameters: name, stateValue, repeatOrHandler
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6004.
public void SetEvent(InjectionValue name, InjectionValue stateValue, InjectionValue repeatOrHandler)
Result: void.
Calls: repeatOrHandler.ToString, string.IsNullOrWhiteSpace, NumberConversions.TryStr2Int, SetEvent.
Conditions: !string.IsNullOrWhiteSpace(raw) && !NumberConversions.TryStr2Int(raw, out _).
Calls:
-
InjectionScript.Runtime.InjectionValue.ToString:repeatOrHandler.ToString(). -
InjectionScript.Runtime.NumberConversions.TryStr2Int:NumberConversions.TryStr2Int(raw, out _). -
InjectionScript.Runtime.InjectionApiUO.SetEvent:SetEvent(name, stateValue, InjectionValue.True, repeatOrHandler). -
InjectionScript.Runtime.InjectionApiUO.SetEvent:SetEvent(name, stateValue, repeatOrHandler, new InjectionValue(string.Empty)).
Internal implementation code; this is not a standalone script.
public void SetEvent(InjectionValue name, InjectionValue stateValue, InjectionValue repeatOrHandler)
{
string raw = repeatOrHandler.ToString() ?? string.Empty;
if (!string.IsNullOrWhiteSpace(raw) && !NumberConversions.TryStr2Int(raw, out _))
SetEvent(name, stateValue, InjectionValue.True, repeatOrHandler);
else
SetEvent(name, stateValue, repeatOrHandler, new InjectionValue(string.Empty));
}Performs the displayed calls and state updates.
Parameters: index
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5414.
public void SetJournalLine(int index)
Result: void.
Calls: bridge.SetJournalLine.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetJournalLine:bridge.SetJournalLine(index).
Internal implementation code; this is not a standalone script.
public void SetJournalLine(int index) => bridge.SetJournalLine(index);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5912.
public void Terminate()
Result: void.
Calls: bridge.Terminate.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Terminate:bridge.Terminate(string.Empty).
Internal implementation code; this is not a standalone script.
public void Terminate() => bridge.Terminate(string.Empty);Performs the displayed calls and state updates.
Parameters: subrutineName
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5911.
public void Terminate(string subrutineName)
Result: void.
Calls: bridge.Terminate.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Terminate:bridge.Terminate(subrutineName).
Internal implementation code; this is not a standalone script.
public void Terminate(string subrutineName) => bridge.Terminate(subrutineName);Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5315.
public void TextOpen()
Result: void.
Calls: bridge.TextOpen.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.TextOpen:bridge.TextOpen().
Internal implementation code; this is not a standalone script.
public void TextOpen() => bridge.TextOpen();Performs the displayed calls and state updates.
Parameters: flag
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5989.
public void Track(InjectionValue flag)
Result: void.
Calls: Track, NumberConversions.ToInt, GetX, GetY.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.Track:Track(NumberConversions.ToInt(flag), GetX(), GetY()). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(flag). -
InjectionScript.Runtime.InjectionApiUO.GetX:GetX(). -
InjectionScript.Runtime.InjectionApiUO.GetY:GetY().
Internal implementation code; this is not a standalone script.
public void Track(InjectionValue flag) => Track(NumberConversions.ToInt(flag), GetX(), GetY());Returns the value of the expression below.
Parameters: windowIndex, checkbox, stateValue
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3294.
public int TradeCheck(InjectionValue windowIndex, InjectionValue checkbox, InjectionValue stateValue)
Result: int.
Result: bridge.TradeCheck(NumberConversions.ToInt(windowIndex), NumberConversions.ToInt(checkbox), NumberConversions.ToInt(stateValue), true).
Calls: bridge.TradeCheck, NumberConversions.ToInt.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.TradeCheck:bridge.TradeCheck(NumberConversions.ToInt(windowIndex), NumberConversions.ToInt(checkbox), NumberConversions.ToInt(stateValue), true). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(windowIndex). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(checkbox). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(stateValue).
Internal implementation code; this is not a standalone script.
public int TradeCheck(InjectionValue windowIndex, InjectionValue checkbox, InjectionValue stateValue)
=> bridge.TradeCheck(NumberConversions.ToInt(windowIndex), NumberConversions.ToInt(checkbox), NumberConversions.ToInt(stateValue), true);Checks the conditions below and returns the displayed result.
Parameters: supportedLayers, successMessage
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5699.
private int Unequip(int[] supportedLayers, string successMessage)
Result: int.
Result: success ? 1 : 0.
Calls: bridge.ObjAtLayer, bridge.Unequip, injectionApi.Wait, SystemMessage.
Conditions: bridge.ObjAtLayer(layer) != 0; state.DressSpeed > 0.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ObjAtLayer:bridge.ObjAtLayer(layer). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Unequip:bridge.Unequip(layer). -
InjectionScript.Runtime.InjectionApi.Wait:injectionApi.Wait(state.DressSpeed). -
InjectionScript.Runtime.InjectionApiUO.SystemMessage:SystemMessage(success ? successMessage : "Some equipment could not be removed.").
Internal implementation code; this is not a standalone script.
private int Unequip(int[] supportedLayers, string successMessage)
{
bool success = true;
foreach (var layer in supportedLayers)
{
if (bridge.ObjAtLayer(layer) != 0)
{
success &= bridge.Unequip(layer) != 0;
if (state.DressSpeed > 0)
injectionApi.Wait(state.DressSpeed);
}
}
SystemMessage(success ? successMessage : "Some equipment could not be removed.");
return success ? 1 : 0;
}Performs the displayed calls and state updates.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4368.
public void UnsetReceivingContainer()
Result: void.
Calls: bridge.UnsetReceivingContainer.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.UnsetReceivingContainer:bridge.UnsetReceivingContainer().
Internal implementation code; this is not a standalone script.
public void UnsetReceivingContainer() => bridge.UnsetReceivingContainer();Performs the displayed calls and state updates.
Parameters: id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3918.
public void UseObject(string id)
Result: void.
Calls: UseObject, GetObject.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.UseObject:UseObject(GetObject(id)). -
InjectionScript.Runtime.InjectionApiUO.GetObject:GetObject(id).
Internal implementation code; this is not a standalone script.
public void UseObject(string id) => UseObject(GetObject(id));Returns the value of the expression below.
Parameters: type, color
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3975.
public int UseType(int type, int color)
Result: int.
Calls: CompactUseType.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.CompactUseType:CompactUseType(new[] { new InjectionValue(type), new InjectionValue(color) }).
Internal implementation code; this is not a standalone script.
public int UseType(int type, int color) => CompactUseType(new[]
{
new InjectionValue(type),
new InjectionValue(color)
});Performs the displayed calls and state updates.
Parameters: startTime, maxDelay, text
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5417.
public void WaitingForJournalText(int startTime, int maxDelay, string text)
Result: void.
Calls: WaitingForJournalText.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.WaitingForJournalText:WaitingForJournalText(startTime, maxDelay, text, 0, 0, InjectionValue.Zero).
Internal implementation code; this is not a standalone script.
public void WaitingForJournalText(int startTime, int maxDelay, string text)
=> WaitingForJournalText(startTime, maxDelay, text, 0, 0, InjectionValue.Zero);Checks the conditions below and returns the displayed result.
Parameters: delayValue, menuCountValue, blockMenuValue, menuNameValue, skillOrSerial
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3313.
public int WaitingForMenu(InjectionValue delayValue, InjectionValue menuCountValue, InjectionValue blockMenuValue, InjectionValue menuNameValue, InjectionValue skillOrSerial)
Result: int.
Result: 1; 0.
Calls: Math.Max, NumberConversions.ToInt, menuNameValue.ToString, timeSource.Now.AddMilliseconds, TriggerWaitAction, bridge.GetLastMenuIdentity, identity.Equals, bridge.GetLastMenuCaption.
Conditions: identity.Length == 0; !identity.Equals(previousIdentity, StringComparison.Ordinal); observedMenuCount >= requiredMenuCount && nameMatches; blockMenu.
Calls:
-
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(delayValue). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(menuCountValue). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(blockMenuValue). -
InjectionScript.Runtime.InjectionValue.ToString:menuNameValue.ToString(). -
InjectionScript.Runtime.InjectionApiUO.TriggerWaitAction:TriggerWaitAction(skillOrSerial). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetLastMenuIdentity:bridge.GetLastMenuIdentity(). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetLastMenuCaption:bridge.GetLastMenuCaption(). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CloseMenu:bridge.CloseMenu(). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Wait:bridge.Wait(Math.Min(25, Math.Max(1, delay))).
Internal implementation code; this is not a standalone script.
public int WaitingForMenu(InjectionValue delayValue, InjectionValue menuCountValue, InjectionValue blockMenuValue, InjectionValue menuNameValue, InjectionValue skillOrSerial)
{
int delay = Math.Max(0, NumberConversions.ToInt(delayValue));
int requiredMenuCount = Math.Max(1, NumberConversions.ToInt(menuCountValue));
bool blockMenu = NumberConversions.ToInt(blockMenuValue) != 0;
string expectedName = menuNameValue.ToString() ?? string.Empty;
DateTime deadline = timeSource.Now.AddMilliseconds(delay);
string previousIdentity = string.Empty;
int observedMenuCount = 0;
TriggerWaitAction(skillOrSerial);
do
{
string identity = bridge.GetLastMenuIdentity() ?? string.Empty;
if (identity.Length == 0)
{
// Reset between server menus so an identical menu opened again
// still counts as a new appearance.
previousIdentity = string.Empty;
}
else if (!identity.Equals(previousIdentity, StringComparison.Ordinal))
{
previousIdentity = identity;
observedMenuCount++;
string caption = bridge.GetLastMenuCaption() ?? string.Empty;
bool nameMatches = expectedName.Length == 0
|| caption.Equals(expectedName, StringComparison.Ordinal);
if (observedMenuCount >= requiredMenuCount && nameMatches)
{
if (blockMenu)
bridge.CloseMenu();
return 1;
}
}
if (timeSource.Now >= deadline)
break;
bridge.Wait(Math.Min(25, Math.Max(1, delay)));
}
while (true);
return 0;
}Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3308.
public int WaitingMenu()
Result: int.
Result: bridge.WaitingMenu().
Calls: bridge.WaitingMenu.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.WaitingMenu:bridge.WaitingMenu().
Internal implementation code; this is not a standalone script.
public int WaitingMenu() => bridge.WaitingMenu();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:4667.
values
Result: values.
Result: new InjectionValue(CompactFindMan(values)).
Calls: CompactFindMan.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.CompactFindMan:CompactFindMan(values).
Internal implementation code; this is not a standalone script.
values => new InjectionValue(CompactFindMan(values))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:1049.
Result: bridge.FollowersMax.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FollowersMax:bridge.FollowersMax.
Internal implementation code; this is not a standalone script.
() => bridge.FollowersMaxThe call executes the stored handler delegate. The registration method creates this delegate while building the API.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1031.
Result: bridge.Intelligence.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Intelligence:bridge.Intelligence.
Internal implementation code; this is not a standalone script.
() => bridge.IntelligenceThe call executes the stored handler delegate. The registration method creates this delegate while building the API.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1028.
Result: bridge.Stamina.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Stamina:bridge.Stamina.
Internal implementation code; this is not a standalone script.
() => bridge.StaminaThe 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:693.
values
Result: values.
Result: new InjectionValue(SkillVal(values[0].ToString(), NumberConversions.ToInt(values[1]))).
Calls: SkillVal, values[0].ToString, NumberConversions.ToInt.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.SkillVal:SkillVal(values[0].ToString(), NumberConversions.ToInt(values[1])). -
InjectionScript.Runtime.InjectionValue.ToString:values[0].ToString(). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(values[1]).
Internal implementation code; this is not a standalone script.
values => new InjectionValue(SkillVal(values[0].ToString(), NumberConversions.ToInt(values[1])))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:1028.
Result: bridge.Stamina.
Calls:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Stamina:bridge.Stamina.
Internal implementation code; this is not a standalone script.
() => bridge.StaminaThe 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:1013.
value
Result: value.
Result: getter(GetObject(value)).
Calls: getter, GetObject.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.GetObject:GetObject(value).
Internal implementation code; this is not a standalone script.
value => getter(GetObject(value))Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1013.
value
Result: value.
Result: getter(GetObject(value)).
Calls: getter, GetObject.
Calls:
-
InjectionScript.Runtime.InjectionApiUO.GetObject:GetObject(value).
Internal implementation code; this is not a standalone script.
value => getter(GetObject(value))Performs the displayed calls and state updates.
Parameters: name, args
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/NativeConsoleDispatch.cs:280.
private void CallNativeSubrutine(string name, params InjectionValue[] args)
Result: void.
Calls: Checkpoint, Metadata.TryGetNativeSubrutine, nativeSubrutine.Call.
Conditions: !Metadata.TryGetNativeSubrutine("UO." + name, args, out var nativeSubrutine).
Calls:
-
InjectionScript.Runtime.InjectionRuntime.Checkpoint:Checkpoint(). -
InjectionScript.Runtime.Metadata.TryGetNativeSubrutine:Metadata.TryGetNativeSubrutine("UO." + name, args, out var nativeSubrutine). -
InjectionScript.Runtime.NativeSubrutineDefinition.Call:nativeSubrutine.Call(args).
Internal implementation code; this is not a standalone script.
private void CallNativeSubrutine(string name, params InjectionValue[] args)
{
Checkpoint();
if (!Metadata.TryGetNativeSubrutine("UO." + name, args, out var nativeSubrutine))
throw new NativeSubrutineException($"Native UO command '{name}' with {args.Length} argument(s) was not found.");
nativeSubrutine.Call(args);
Checkpoint();
}Performs the displayed calls and state updates.
Parameters: parameters
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/NativeConsoleDispatch.cs:10.
public void Exec(string parameters)
Result: void.
Calls: Tokenize(parameters).ToArray, Tokenize, command.Equals, string.IsNullOrWhiteSpace, bridge.Exec, parts.Skip(1).ToArray, parts.Skip, arguments.Select(token => token.Text).ToArray.
Conditions: parts.Length == 0; command.Equals("exec", StringComparison.OrdinalIgnoreCase); parts.Length != 2 || string.IsNullOrWhiteSpace(parts[1].Text); TryHandleLegacyConsoleCommand(command, rawArguments).
Calls:
-
InjectionScript.Runtime.InjectionRuntime.Tokenize:Tokenize(parameters). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Exec:bridge.Exec(parts[1].Text). -
InjectionScript.Runtime.InjectionRuntime.TryHandleLegacyConsoleCommand:TryHandleLegacyConsoleCommand(command, rawArguments). -
InjectionScript.Runtime.InjectionRuntime.NormalizeConsoleAlias:NormalizeConsoleAlias(command). -
InjectionScript.Runtime.InjectionRuntime.IsRemainderTextCommand:IsRemainderTextCommand(command). -
InjectionScript.Runtime.InjectionRuntime.ToConsoleValue:ToConsoleValue(token.Text). -
InjectionScript.Runtime.InjectionRuntime.CallNativeSubrutine:CallNativeSubrutine(command, args).
Internal implementation code; this is not a standalone script.
public void Exec(string parameters)
{
ConsoleToken[] parts = Tokenize(parameters).ToArray();
if (parts.Length == 0)
return;
string command = parts[0].Text;
if (command.Equals("exec", StringComparison.OrdinalIgnoreCase))
{
if (parts.Length != 2 || string.IsNullOrWhiteSpace(parts[1].Text))
throw new NativeSubrutineException("Usage: exec script_function");
bridge.Exec(parts[1].Text);
return;
}
ConsoleToken[] arguments = parts.Skip(1).ToArray();
string[] rawArguments = arguments.Select(token => token.Text).ToArray();
if (TryHandleLegacyConsoleCommand(command, rawArguments))
return;
command = NormalizeConsoleAlias(command);
if (IsRemainderTextCommand(command) && rawArguments.Length > 0)
arguments = new[] { new ConsoleToken(string.Join(" ", rawArguments), true) };
else if (command.Equals("ColorPrint", StringComparison.OrdinalIgnoreCase) && rawArguments.Length > 1)
arguments = new[] { arguments[0], new ConsoleToken(string.Join(" ", rawArguments.Skip(1)), true) };
else if (command.Equals("CharPrint", StringComparison.OrdinalIgnoreCase) && rawArguments.Length > 2)
arguments = new[] { arguments[0], arguments[1], new ConsoleToken(string.Join(" ", rawArguments.Skip(2)), true) };
InjectionValue[] args = arguments.Select(token => token.Quoted
? new InjectionValue(token.Text) : ToConsoleValue(token.Text)).ToArray();
CallNativeSubrutine(command, args);
}Returns the value of the expression below.
Parameters: No parameters.
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionValue.cs:405.
public override string ToString()
Result: string.
Result: "<unit>"; Integer.ToString(System.Globalization.CultureInfo.InvariantCulture); String; Decimal.ToString(System.Globalization.CultureInfo.InvariantCulture); FormatArray(Array, new HashSet<InjectionValue[]>(), 0); Object?.Name ?? string.Empty.
Calls: Integer.ToString, Decimal.ToString, FormatArray.
Calls:
-
InjectionScript.Runtime.InjectionValue.FormatArray:FormatArray(Array, new HashSet<InjectionValue[]>(), 0).
Internal implementation code; this is not a standalone script.
public override string ToString()
{
switch (Kind)
{
case InjectionValueKind.Unit:
return "<unit>";
case InjectionValueKind.Integer:
return Integer.ToString(System.Globalization.CultureInfo.InvariantCulture);
case InjectionValueKind.String:
return String;
case InjectionValueKind.Decimal:
return Decimal.ToString(System.Globalization.CultureInfo.InvariantCulture);
case InjectionValueKind.Array:
return FormatArray(Array, new HashSet<InjectionValue[]>(), 0);
case InjectionValueKind.Object:
return Object?.Name ?? string.Empty;
default:
throw new InvalidOperationException($"Unknown InjectionValue kind {Kind}.");
}
}Returns the value of the expression below.
Parameters: id
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/NumberConversions.cs:80.
public static string ToHex(short id)
Result: string.
Result: $"0x{id:X4}".
Internal implementation code; this is not a standalone script.
public static string ToHex(short id) => $"0x{id:X4}";Performs the displayed calls and state updates.
Parameters: bytes
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/ObjectTypes/MemoryStreamObject.cs:26.
internal void ReplaceBytes(byte[] bytes)
Result: void.
Calls: stream.SetLength, Array.Empty<byte>, stream.Write.
Conditions: bytes == null.
Internal implementation code; this is not a standalone script.
internal void ReplaceBytes(byte[] bytes)
{
stream.SetLength(0);
stream.Position = 0;
if (bytes == null)
bytes = Array.Empty<byte>();
stream.Write(bytes, 0, bytes.Length);
stream.Position = 0;
}Returns the value of the expression below.
Parameters: name
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/State/Globals.cs:22.
public string GetGlobal(string name)
Result: string.
Result: globals.TryGetValue(name, out var value) ? value : "N/A".
Calls: globals.TryGetValue.
Internal implementation code; this is not a standalone script.
public string GetGlobal(string name)
{
lock (globalsLock)
return globals.TryGetValue(name, out var value) ? value : "N/A";
}Checks the conditions below and returns the displayed result.
Parameters: name
Source: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/State/NamedIgnoreLists.cs:115.
private static string RequireName(string name)
Result: string.
Result: name.Trim().
Calls: string.IsNullOrWhiteSpace, nameof, name.Trim.
Conditions: string.IsNullOrWhiteSpace(name).
Internal implementation code; this is not a standalone script.
private static string RequireName(string name)
{
if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Ignore list name must not be empty.", nameof(name));
return name.Trim();
}ClassicUO — Bad Newbie & C# Scripts IDE