EN UO Topic gameplay settings - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
Execution state and gameplay settings — 1
Home · A–Z · Execution state and gameplay settings
- UO.AutoCloseDoorDelayMs — door-close delay.
- UO.AutoCloseDoors — closing doors behind the player.
- UO.AutoNavigateAroundObstacles — obstacle avoidance for Step commands.
- UO.ObstacleLookAhead — route look-ahead.
- UO.ObstacleScanDistance — lateral detour budget.
- UO.ViewRange — requested visibility range.
- UO.IgnoreDistanceCheck — skipping the local distance check.
- UO.IgnoreStaminaCheck — skipping the local stamina threshold.
- UO.PauseScriptsOnDisconnect — pause after connection loss.
- UO.SingleProcedureExecution — single-procedure admission.
- UO.SingleProcedurePerFile — serial procedures from one file.
UO.AutoCloseDoorDelayMs
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
int UO.AutoCloseDoorDelayMs();
void UO.AutoCloseDoorDelayMs(int value);
Purpose
Read without arguments; change with one argument — door-close delay.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
value |
int |
door-close delay. milliseconds. The value is clamped to 0…5000. |
No parameters. → getter.
Return value
int — The current value; reading does not start an action. The setter returns void.
Default: 0.
Ownership
The setting belongs to this script execution. A new run copies the independent engine/chat defaults once, not the graphical Profile. A script setter changes neither the GUI nor other runs already executing. Named objects, types, equipment sets, Ignore lists and globals deliberately retain their documented shared scope.
A standalone chat command changes the lasting engine context: later commands read that value and new runs copy it. Existing runs keep their own values. Chat automation has its own controller and keeps operating after the command returns; GUI automation uses separate settings.
See execution state and gameplay settings.
Actual behavior
The controller records a traversed door and its owner’s settings. Closing targets only an observed open door from a reachable position; Stop cancels pending actions. The delay does not change server rules.
InjectionRuntimeState.AutoCloseDoorDelayMs → PendingAutoCloseDoor owner → PlayerMobile.TryCloseTrackedDoor.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
int current = UO.AutoCloseDoorDelayMs();
UO.Print("AutoCloseDoorDelayMs: " + current);
UO.AutoCloseDoorDelayMs(7000);
int applied = UO.AutoCloseDoorDelayMs();
UO.Print("Clamped delay: " + applied);
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,AutoCloseDoorDelayMs
,AutoCloseDoorDelayMs 250
Related commands
Execution state and gameplay settings · UO.AutoCloseDoors
UO.AutoCloseDoors
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
bool UO.AutoCloseDoors();
void UO.AutoCloseDoors(bool value);
Purpose
Read without arguments; change with one argument — closing doors behind the player.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
value |
bool |
true enables the named policy; false disables it. |
No parameters. → getter.
Return value
bool — The current value; reading does not start an action. The setter returns void.
Default: false.
Ownership
The setting belongs to this script execution. A new run copies the independent engine/chat defaults once, not the graphical Profile. A script setter changes neither the GUI nor other runs already executing. Named objects, types, equipment sets, Ignore lists and globals deliberately retain their documented shared scope.
A standalone chat command changes the lasting engine context: later commands read that value and new runs copy it. Existing runs keep their own values. Chat automation has its own controller and keeps operating after the command returns; GUI automation uses separate settings.
See execution state and gameplay settings.
Actual behavior
The controller records a traversed door and its owner’s settings. Closing targets only an observed open door from a reachable position; Stop cancels pending actions. The delay does not change server rules.
PlayerMobile.TrackDoorForAutoClose / UpdateTrackedDoorMovement / TryCloseTrackedDoor.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
bool current = UO.AutoCloseDoors();
UO.Print("AutoCloseDoors: " + current);
UO.AutoCloseDoors(true);
UO.AutoCloseDoorDelayMs(250);
UO.Print("Doors close behind this script after " + UO.AutoCloseDoorDelayMs() + " ms.");
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,AutoCloseDoors
,AutoCloseDoors true
Related commands
Execution state and gameplay settings · UO.AutoCloseDoorDelayMs
UO.AutoNavigateAroundObstacles
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
bool UO.AutoNavigateAroundObstacles();
void UO.AutoNavigateAroundObstacles(bool value);
Purpose
Read without arguments; change with one argument — obstacle avoidance for Step commands.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
value |
bool |
true enables the named policy; false disables it. |
No parameters. → getter.
Return value
bool — The current value; reading does not start an action. The setter returns void.
Default: false.
Ownership
The setting belongs to this script execution. A new run copies the independent engine/chat defaults once, not the graphical Profile. A script setter changes neither the GUI nor other runs already executing. Named objects, types, equipment sets, Ignore lists and globals deliberately retain their documented shared scope.
A standalone chat command changes the lasting engine context: later commands read that value and new runs copy it. Existing runs keep their own values. Chat automation has its own controller and keeps operating after the command returns; GUI automation uses separate settings.
See execution state and gameplay settings.
Actual behavior
Step commands use the local settings of the bounded obstacle planner. Searches run in small slices; budget 0 disables detour search. The next tile is checked even with look-ahead=0. Existing MoveTo routes have their own explicit parameters.
ClassicUOInjectionApiBridge.SelectScriptStep → BackNewbieObstaclePlanner.BeginAhead / Advance.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
bool current = UO.AutoNavigateAroundObstacles();
UO.Print("AutoNavigateAroundObstacles: " + current);
UO.AutoNavigateAroundObstacles(true);
UO.ObstacleScanDistance(3);
UO.ObstacleLookAhead(4);
UO.Print("Step result: " + UO.Step(0, false));
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,AutoNavigateAroundObstacles
,AutoNavigateAroundObstacles true
Related commands
Execution state and gameplay settings · UO.ObstacleScanDistance · UO.ObstacleLookAhead
UO.ObstacleLookAhead
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
int UO.ObstacleLookAhead();
void UO.ObstacleLookAhead(int value);
Purpose
Read without arguments; change with one argument — route look-ahead.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
value |
int |
route look-ahead. world tiles. The value is clamped to 0…5. |
No parameters. → getter.
Return value
int — The current value; reading does not start an action. The setter returns void.
Default: 3.
Ownership
The setting belongs to this script execution. A new run copies the independent engine/chat defaults once, not the graphical Profile. A script setter changes neither the GUI nor other runs already executing. Named objects, types, equipment sets, Ignore lists and globals deliberately retain their documented shared scope.
A standalone chat command changes the lasting engine context: later commands read that value and new runs copy it. Existing runs keep their own values. Chat automation has its own controller and keeps operating after the command returns; GUI automation uses separate settings.
See execution state and gameplay settings.
Actual behavior
Step commands use the local settings of the bounded obstacle planner. Searches run in small slices; budget 0 disables detour search. The next tile is checked even with look-ahead=0. Existing MoveTo routes have their own explicit parameters.
InjectionRuntimeState.ObstacleLookAhead → BackNewbieNavigationRoute.IsClearAhead.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
int current = UO.ObstacleLookAhead();
UO.Print("ObstacleLookAhead: " + current);
UO.AutoNavigateAroundObstacles(true);
UO.ObstacleLookAhead(5);
UO.Print("Look-ahead: " + UO.ObstacleLookAhead());
UO.Print("Step result: " + UO.Step(2, false));
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,ObstacleLookAhead
,ObstacleLookAhead 5
Related commands
Execution state and gameplay settings · UO.AutoNavigateAroundObstacles · UO.ObstacleScanDistance
UO.ObstacleScanDistance
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
int UO.ObstacleScanDistance();
void UO.ObstacleScanDistance(int value);
Purpose
Read without arguments; change with one argument — lateral detour budget.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
value |
int |
lateral detour budget. world tiles. The value is clamped to 0…5. |
No parameters. → getter.
Return value
int — The current value; reading does not start an action. The setter returns void.
Default: 2.
Ownership
The setting belongs to this script execution. A new run copies the independent engine/chat defaults once, not the graphical Profile. A script setter changes neither the GUI nor other runs already executing. Named objects, types, equipment sets, Ignore lists and globals deliberately retain their documented shared scope.
A standalone chat command changes the lasting engine context: later commands read that value and new runs copy it. Existing runs keep their own values. Chat automation has its own controller and keeps operating after the command returns; GUI automation uses separate settings.
See execution state and gameplay settings.
Actual behavior
Step commands use the local settings of the bounded obstacle planner. Searches run in small slices; budget 0 disables detour search. The next tile is checked even with look-ahead=0. Existing MoveTo routes have their own explicit parameters.
InjectionRuntimeState.ObstacleScanDistance → bounded Step detour planner.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
int current = UO.ObstacleScanDistance();
UO.Print("ObstacleScanDistance: " + current);
UO.AutoNavigateAroundObstacles(true);
UO.ObstacleScanDistance(0);
UO.Print("No detour search: " + UO.ObstacleScanDistance());
UO.ObstacleScanDistance(3);
UO.Print("Lateral budget: " + UO.ObstacleScanDistance());
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,ObstacleScanDistance
,ObstacleScanDistance 3
Related commands
Execution state and gameplay settings · UO.AutoNavigateAroundObstacles · UO.ObstacleLookAhead
UO.ViewRange
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
int UO.ViewRange();
void UO.ViewRange(int value);
Purpose
Read without arguments; change with one argument — requested visibility range.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
value |
int |
requested visibility range. world tiles. The value is clamped to 5…24. |
No parameters. → getter.
Return value
int — The current value; reading does not start an action. The setter returns void.
Default: 18.
Ownership
The setting belongs to this script execution. A new run copies the independent engine/chat defaults once, not the graphical Profile. A script setter changes neither the GUI nor other runs already executing. Named objects, types, equipment sets, Ignore lists and globals deliberately retain their documented shared scope.
A standalone chat command changes the lasting engine context: later commands read that value and new runs copy it. Existing runs keep their own values. Chat automation has its own controller and keeps operating after the command returns; GUI automation uses separate settings.
See execution state and gameplay settings.
Actual behavior
The client sends a 0xC8 range request: the maximum of GUI range, active script ranges and explicitly configured chat range. Finishing an owner releases its request. The server ACK caps retained objects without rewriting GUI/script requests. FindDistance is separate.
YokoGameplayContexts.RefreshSessionViewRange → Send_ClientViewRange (0xC8) → World.EffectiveObjectViewRange.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
int current = UO.ViewRange();
UO.Print("ViewRange: " + current);
UO.FindDistance(7);
UO.ViewRange(22);
UO.Print("Visibility: " + UO.ViewRange());
UO.Print("Find distance is separate: " + UO.FindDistance());
UO.Wait(2500);
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,ViewRange
,ViewRange 22
Related commands
Execution state and gameplay settings
UO.IgnoreDistanceCheck
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
bool UO.IgnoreDistanceCheck();
void UO.IgnoreDistanceCheck(bool value);
Purpose
Read without arguments; change with one argument — skipping the local distance check.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
value |
bool |
true enables the named policy; false disables it. |
No parameters. → getter.
Return value
bool — The current value; reading does not start an action. The setter returns void.
Default: false.
Ownership
The setting belongs to this script execution. A new run copies the independent engine/chat defaults once, not the graphical Profile. A script setter changes neither the GUI nor other runs already executing. Named objects, types, equipment sets, Ignore lists and globals deliberately retain their documented shared scope.
A standalone chat command changes the lasting engine context: later commands read that value and new runs copy it. Existing runs keep their own values. Chat automation has its own controller and keeps operating after the command returns; GUI automation uses separate settings.
See execution state and gameplay settings.
Actual behavior
The flag skips the corresponding local pickup/drag and Follow distance checks. It does not load unknown objects; the separate DropCheckCoord setting and server checks remain active.
InjectionRuntimeState.IgnoreDistanceCheck → GameActions.PickUp / NativeFollowController.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
bool current = UO.IgnoreDistanceCheck();
UO.Print("IgnoreDistanceCheck: " + current);
bool previous = UO.IgnoreDistanceCheck();
UO.IgnoreDistanceCheck(true);
UO.Print("Local distance override: " + UO.IgnoreDistanceCheck());
UO.IgnoreDistanceCheck(previous);
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,IgnoreDistanceCheck
,IgnoreDistanceCheck true
Related commands
Execution state and gameplay settings
UO.IgnoreStaminaCheck
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
bool UO.IgnoreStaminaCheck();
void UO.IgnoreStaminaCheck(bool value);
Purpose
Read without arguments; change with one argument — skipping the local stamina threshold.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
value |
bool |
true enables the named policy; false disables it. |
No parameters. → getter.
Return value
bool — The current value; reading does not start an action. The setter returns void.
Default: true.
Ownership
The setting belongs to this script execution. A new run copies the independent engine/chat defaults once, not the graphical Profile. A script setter changes neither the GUI nor other runs already executing. Named objects, types, equipment sets, Ignore lists and globals deliberately retain their documented shared scope.
A standalone chat command changes the lasting engine context: later commands read that value and new runs copy it. Existing runs keep their own values. Chat automation has its own controller and keeps operating after the command returns; GUI automation uses separate settings.
See execution state and gameplay settings.
Actual behavior
For this run, true sets moveCheckStamina=0, false sets 1. Character passage uses the separate moveThroughNPC threshold; its explicit value is not replaced by GUI IgnoreStamina. The server can reject movement.
InjectionRuntimeState.MoveCheckStamina → ScriptGameActionContext → PlayerMobile.Walk / Pathfinder.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
bool current = UO.IgnoreStaminaCheck();
UO.Print("IgnoreStaminaCheck: " + current);
UO.IgnoreStaminaCheck(true);
UO.moveThroughNPC(1000);
UO.Print("Ignore stamina: " + UO.IgnoreStaminaCheck());
UO.Print("NPC threshold: " + UO.moveThroughNPC());
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,IgnoreStaminaCheck
,IgnoreStaminaCheck false
Related commands
Execution state and gameplay settings
UO.PauseScriptsOnDisconnect
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
bool UO.PauseScriptsOnDisconnect();
void UO.PauseScriptsOnDisconnect(bool value);
Purpose
Read without arguments; change with one argument — pause after connection loss.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
value |
bool |
true enables the named policy; false disables it. |
No parameters. → getter.
Return value
bool — The current value; reading does not start an action. The setter returns void.
Default: false.
Ownership
The setting belongs to this script execution. A new run copies the independent engine/chat defaults once, not the graphical Profile. A script setter changes neither the GUI nor other runs already executing. Named objects, types, equipment sets, Ignore lists and globals deliberately retain their documented shared scope.
A standalone chat command changes the lasting engine context: later commands read that value and new runs copy it. Existing runs keep their own values. Chat automation has its own controller and keeps operating after the command returns; GUI automation uses separate settings.
See execution state and gameplay settings.
Actual behavior
After connection loss, checkpoints pause this run only when true. The default false allows independent connection commands. The owner of an explicit Disconnect can reach its following Connect.
YokoRunningScript.ExecutionState → ApplyDisconnectPauseState → cooperative checkpoints.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
bool current = UO.PauseScriptsOnDisconnect();
UO.Print("PauseScriptsOnDisconnect: " + current);
UO.PauseScriptsOnDisconnect(false);
UO.Print("This run may issue connection commands while offline.");
UO.Print("Pause policy: " + UO.PauseScriptsOnDisconnect());
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,PauseScriptsOnDisconnect
,PauseScriptsOnDisconnect false
Related commands
Execution state and gameplay settings
UO.SingleProcedureExecution
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
bool UO.SingleProcedureExecution();
void UO.SingleProcedureExecution(bool value);
Purpose
Read without arguments; change with one argument — single-procedure admission.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
value |
bool |
true enables the named policy; false disables it. |
No parameters. → getter.
Return value
bool — The current value; reading does not start an action. The setter returns void.
Default: false.
Ownership
The setting belongs to this script execution. A new run copies the independent engine/chat defaults once, not the graphical Profile. A script setter changes neither the GUI nor other runs already executing. Named objects, types, equipment sets, Ignore lists and globals deliberately retain their documented shared scope.
A standalone chat command changes the lasting engine context: later commands read that value and new runs copy it. Existing runs keep their own values. Chat automation has its own controller and keeps operating after the command returns; GUI automation uses separate settings.
See execution state and gameplay settings.
Actual behavior
The manager checks admission of new procedure requests. true rejects admission while another procedure is running, paused or stopping; it does not terminate existing runs.
ProcedureLaunchRequest.ExecutionState → RejectOverlappingProcedure / TryAddRunning.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
bool current = UO.SingleProcedureExecution();
UO.Print("SingleProcedureExecution: " + current);
UO.SingleProcedureExecution(true);
int Square(int value) => value * value;
UO.Print("Ordinary C# call: " + Square(7));
UO.Print("Launch policy: " + UO.SingleProcedureExecution());
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,SingleProcedureExecution
,SingleProcedureExecution true
Related commands
Execution state and gameplay settings
UO.SingleProcedurePerFile
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
bool UO.SingleProcedurePerFile();
void UO.SingleProcedurePerFile(bool value);
Purpose
Read without arguments; change with one argument — serial procedures from one file.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
value |
bool |
true enables the named policy; false disables it. |
No parameters. → getter.
Return value
bool — The current value; reading does not start an action. The setter returns void.
Default: false.
Ownership
The setting belongs to this script execution. A new run copies the independent engine/chat defaults once, not the graphical Profile. A script setter changes neither the GUI nor other runs already executing. Named objects, types, equipment sets, Ignore lists and globals deliberately retain their documented shared scope.
A standalone chat command changes the lasting engine context: later commands read that value and new runs copy it. Existing runs keep their own values. Chat automation has its own controller and keeps operating after the command returns; GUI automation uses separate settings.
See execution state and gameplay settings.
Actual behavior
Managed procedures from one file use a cancellable admission queue. Waiting does not block the game thread. Ordinary direct C# method calls keep their normal semantics.
ClassicUOInjectionApiBridge.AcquireProcedureAsync → CSharpProcedureGate.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
bool current = UO.SingleProcedurePerFile();
UO.Print("SingleProcedurePerFile: " + current);
UO.SingleProcedurePerFile(true);
bool serialWorkers = UO.SingleProcedurePerFile();
UO.Print("Managed file procedures are serial: " + serialWorkers);
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,SingleProcedurePerFile
,SingleProcedurePerFile true