EN UO Topic shops vendors - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
Home · C# · IDE · UO API · A–Z · Examples · Languages
Buying, selling, store listings, delays and personal merchant prices. AllPrice and MassPriceMove use the item type where specified in their parameters.
Open full catalog and examples
| Topic | Commands and explanations |
|---|---|
| Buy | UO.Buy |
| Sell | UO.Sell |
| AutoBuy | UO.AutoBuy |
| AutoSell | UO.AutoSell |
| Shop List | UO.GetShopList · UO.ClearShopList · UO.Shop |
| Prices | UO.GetPrice · UO.AllPrice · UO.MassPriceMove |
| VendorMenu | UO.VendorMenu |
| SendShopReply | UO.SendShopReply |
UO.Buy · UO.Sell · UO.AutoBuy · UO.AutoBuyEx · UO.AutoSell · UO.Shop · UO.GetShopList · UO.ClearShopList · UO.VendorMenu · UO.SendShopReply
UO.GetPrice · UO.AllPrice · UO.MassPriceMove
UO.GetAutoBuyDelay · UO.GetAutoSellDelay · UO.SetAutoBuyDelay · UO.SetAutoSellDelay
Each command card has several independent scenarios: direct code, functions and classes. Below are selected short scenarios; restrictions and full analysis are in the cards.
Parameters, result and all scenarios
UO.AllPrice(125);
UO.Print("Drop goods into your vendor inventory");Parameters, result and all scenarios
UO.MassPriceMove(350, 50, 0, 125);
UO.Print("Drag one complete stack into your vendor bag");Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.AllPrice();
void UO.AllPrice(object? price);
void UO.AllPrice(object? price, object? @type);Enables automatic price entry after placing an item in your vendor's inventory. The team does not carry items itself. First turn on the mode, then drag the item. The price is sent only after a corresponding server request. The second parameter filters the TYPE of the item.
-
price— The first parameter is the whole price for the entire exposed item/stack, from 0 to 2147483647. 125 means price 125. 0 - clearly zero price (free if allowed by the server), no shutdown. A negative value turns off the mode; UO.AllPrice() without arguments is recommended. -
type— The second optional parameter is TYPE/Graphic from 0 to 65535, a number or a hex string, for example 0x0EED. 0 or absence - any types. Item Serial and Object Name are not appropriate. Color is not filtered.
void: no value. Activate AllPrice reports activation. The sent price line indicates the response was sent, not the acceptance of the price confirmed by the server.
- The mode applies to subsequent transfers until it is turned off. A price request that was already pending before inclusion/transfer is not automatically filled. Doesn't respond to vendor/store rename requests.
- Requires that the container belongs to another character/NPC known to the client. The right to manage the vendor and the acceptability of the price are checked by the server. The character's regular backpack, chest on the ground, and land do not receive an automatic price.
- For a standard vendor, the cliloc 1043303 price request is recognized regardless of the client's language. System text prompts starting with Type in a price, Enter a price, Enter the price, Enter a price or Enter a price are also supported. An unknown invitation is left for manual response.
- ASCII and Unicode server queries are supported. If the invitation does not arrive within 10 seconds, the delayed reply is cancelled. During a mass transfer, the queue also stops. Replies already sent will not be recalled.
- The other TYPE item does not receive a price. If MassMove is enabled, the next submission waits for the price request to be processed; an unknown or inappropriate request stops the queue to avoid mixing up items.
- AllPrice() clears pending prices and turns off the mode. TerminateAll(), quitting, dying, or changing cards also resets the automatic price. This command does not change the prices of already listed products.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.AllPrice");
UO.AllPrice();Parameters and execution flow:
- price=125 — the entire price of each item. type absent: all types are suitable.
- After launch, manually add the item to your vendor's inventory. The customer will respond to a price request with 125. Each subsequent item receives the same price until it is switched off.
- Print only resembles the action; This procedure itself does not transfer anything.
UO.AllPrice(125);
UO.Print("Drop goods into your vendor inventory");Parameters and execution flow:
- salePrice is transmitted as price=250. itemType is transmitted as type=0x0F7A, not serial of an individual product.
- The price 250 refers to the entire stack being displayed. The command does not multiply the price by the number of units within it.
- Other types remain without automatic response. For these, enter the price manually or include AllPrice with a different filter.
return RunScenario();
object? RunScenario()
{
var itemType = "0x0F7A";
var salePrice = 250;
UO.AllPrice(salePrice, itemType);
return null;
}Parameters and execution flow:
- price=0 — send the string 0 to the server as a price. This is not canceling the dialogue or shutting down.
- type=0x0F7A limits the free price to this type. The behavior of the free sale depends on the server rules.
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
UO.AllPrice(0, "0x0F7A");
return null;
}
}Parameters and execution flow:
- No arguments: the mode is turned off and pending responses are deleted.
- The price already set by the server does not change. The user fills out the next price request himself.
Shop lists / Buy and sell lists
UO.AllPrice();C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: No parameters.
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.AllPrice:bridge.AllPrice(arguments.Length > 0 ? NumberConversions.ToInt(arguments[0]) : -1, arguments.Length > 1 ? ResolveType(arguments[1]) : 0). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[1]).
Internal implementation code; this is not a standalone script.
case "allprice":
bridge.AllPrice(arguments.Length > 0 ? NumberConversions.ToInt(arguments[0]) : -1,
arguments.Length > 1 ? ResolveType(arguments[1]) : 0);
break;Parameters: price (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.AllPrice:bridge.AllPrice(arguments.Length > 0 ? NumberConversions.ToInt(arguments[0]) : -1, arguments.Length > 1 ? ResolveType(arguments[1]) : 0). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[1]).
Internal implementation code; this is not a standalone script.
case "allprice":
bridge.AllPrice(arguments.Length > 0 ? NumberConversions.ToInt(arguments[0]) : -1,
arguments.Length > 1 ? ResolveType(arguments[1]) : 0);
break;Parameters: price (Any), type (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.AllPrice:bridge.AllPrice(arguments.Length > 0 ? NumberConversions.ToInt(arguments[0]) : -1, arguments.Length > 1 ? ResolveType(arguments[1]) : 0). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[1]).
Internal implementation code; this is not a standalone script.
case "allprice":
bridge.AllPrice(arguments.Length > 0 ? NumberConversions.ToInt(arguments[0]) : -1,
arguments.Length > 1 ? ResolveType(arguments[1]) : 0);
break;Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.AutoBuy(object? itemType, object? itemColor, object? quantity);Creates, updates or deletes an automatic purchase rule in the main Default list of the current Bad Newbie profile. The command configures future processing of the NPC-seller's offer; does not say buy/sell, does not open a store and does not confirm the transaction. Full procedure: store listings.
-
itemType- Graphic product 0..65535: for example 0x0F7A - Black Pearl, 0x0F51 - dagger. This is not the serial of the seller/item and not the body of the character. A negative number or a number greater than 65535 is rejected. Here 0xFFFF is a specific graphic, not a mask for all products. -
itemColor— Product Hue: negative number or 0xFFFF — any; 0 - only unpainted objects. For precise hue use 0..65534. Do not use colors outside this range: a positive value is converted to ushort. Required. -
quantity— The number of UNITS of goods per one store offer received, not the number of stacks and not the desired balance in the backpack. The positive is limited to 65535. 0/negative removes the matching type+color rule from Default; it is not “the whole quantity.” Required.
void - no value. Call on a separate line, without var result = and without if. The end of the call means the end of the setup, not a successful transaction. If there is no profile or invalid graphic the rule is not created; There is no numerical result of the error. Check the actual transaction by the contents of the backpack, gold and server response.
- All 3 arguments are required. This is a rule setting, not a wait function.
- The rule key is graphic and the hue mask is in Default. The repeated call replaces the quantity and other fields of this rule; it does not add another limit on top of the previous one. Without price/name, the previous restrictions on these fields are removed.
- New/updated Enabled=true rule. The general buy/sell switch is set based on the presence of rules, and the profile is saved. The disabled Default list itself is not automatically enabled: both the general mode and the list must be enabled in the settings. Other named lists are not changed.
- Processing begins when a list of goods arrives. The limit is spent in total across rows matched to one rule. For each position, the first matching enabled rule is used. Reopening the store gives a new offer and a new limit while the rule is active.
- Works at Full with Bad Newbie; in Classic this automation is disabled. Do not substitute the name NPC or the name of the saved list in the parameters. AutoBuyEx adds price/name filters when purchasing; ClearShopList resets both automations entirely.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.AutoBuy");
UO.AutoBuy(0x0F7A, -1, 1);Parameters and execution flow:
- 0x0F7A is a graphic of the reagent, not ID NPC. Quantity - 1; color - any. There is no price ceiling specified in this form. The script itself does not say anything and does not open the store. The rule continues to apply for subsequent sentences until you change/disable it.
UO.AutoBuy(0x0F7A, -1, 1);Parameters and execution flow:
- 20 - in a maximum of one store response, and not “bring the quantity to 20”. AutoBuy has no price and name arguments. If they are needed, use AutoBuyEx; its full example is available at the link below. Lack of goods, money and server rules determine the outcome.
return RunScenario();
object? RunScenario()
{
UO.AutoBuy(0x0F7A, 0, 20);
return null;
}Parameters and execution flow:
- The assistant accepts graphic. Only Default rules with AnyHue are deleted; the individual hue=0 rules are retained. This does not cancel a deal already sent to the server. To remove an exact color, pass the same hue with which the rule was created.
Shop lists / Buy and sell lists
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
DisableReagentRule(0x0F7A);
DisableReagentRule(0x0F84);
return null;
}
void DisableReagentRule(dynamic itemType)
{
UO.AutoBuy(itemType, -1, 0);
}
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: itemType (Any), itemColor (Any), quantity (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoBuyRule:bridge.SetAutoBuyRule(Arg(0), Arg(1), Arg(2), 0, string.Empty). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "autobuy":
bridge.SetAutoBuyRule(Arg(0), Arg(1), Arg(2), 0, string.Empty); return InjectionValue.Unit;Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.AutoBuyEx(object? itemType, object? itemColor, object? quantity, object? price, object? name);Creates, updates or deletes an automatic purchase rule in the main Default list of the current Bad Newbie profile. The command configures future processing of the NPC-seller's offer; does not say buy/sell, does not open a store and does not confirm the transaction. Full procedure: store listings.
-
itemType- Graphic product 0..65535: for example 0x0F7A - Black Pearl, 0x0F51 - dagger. This is not the serial of the seller/item and not the body of the character. A negative number or a number greater than 65535 is rejected. Here 0xFFFF is a specific graphic, not a mask for all products. -
itemColor— Product Hue: negative number or 0xFFFF — any; 0 - only unpainted objects. For precise hue use 0..65534. Do not use colors outside this range: a positive value is converted to ushort. Required. -
quantity— The number of UNITS of goods per one store offer received, not the number of stacks and not the desired balance in the backpack. The positive is limited to 65535. 0/negative removes the matching type+color rule from Default; it is not “the whole quantity.” Required. -
price— Maximum price of ONE unit, not the entire transaction. 0/negative – no price ceiling. Products that are more expensive than the positive limit are allowed through. The price is not traded or changed on the server. Required. -
name— Substring of the PRODUCT name, case insensitive; edge spaces are removed, empty line - no filter. This is not the name of the seller or the name of the listing. For example, "Black Pearl" checks the text of the store position if the server sent exactly such a name. Required.
void - no value. Call on a separate line, without var result = and without if. The end of the call means the end of the setup, not a successful transaction. If there is no profile or invalid graphic the rule is not created; There is no numerical result of the error. Check the actual transaction by the contents of the backpack, gold and server response.
- All 5 arguments are required. This is a rule setting, not a wait function.
- The rule key is graphic and the hue mask is in Default. The repeated call replaces the quantity and other fields of this rule; it does not add another limit on top of the previous one. Without price/name, the previous restrictions on these fields are removed.
- New/updated Enabled=true rule. The general buy/sell switch is set based on the presence of rules, and the profile is saved. The disabled Default list itself is not automatically enabled: both the general mode and the list must be enabled in the settings. Other named lists are not changed.
- Processing begins when a list of goods arrives. The limit is spent in total across rows matched to one rule. For each position, the first matching enabled rule is used. Reopening the store gives a new offer and a new limit while the rule is active.
- Works at Full with Bad Newbie; in Classic this automation is disabled. Do not substitute the name NPC or the name of the saved list in the parameters. AutoBuyEx adds price/name filters when purchasing; ClearShopList resets both automations entirely.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.AutoBuyEx");
UO.AutoBuyEx(0x0F7A, -1, 1, 5, "");Parameters and execution flow:
- 0x0F7A is a graphic of the reagent, not ID NPC. Quantity - 1; color - any. Price ceiling 5 per unit. The script itself does not say anything and does not open the store. The rule continues to apply for subsequent sentences until you change/disable it.
UO.AutoBuyEx(0x0F7A, -1, 1, 5, "");Parameters and execution flow:
- 20 - maximum in one store response, and not “bring the quantity to 20”. 5 — price per unit, “Black Pearl” — substring of the product name. If the server calls the reagent differently, change the filter or pass "". Lack of goods, money and server rules determine the outcome.
return RunScenario();
object? RunScenario()
{
UO.AutoBuyEx(0x0F7A, 0, 20, 5, "Black Pearl");
return null;
}Parameters and execution flow:
- The assistant accepts graphic. Only Default rules with AnyHue are deleted; the individual hue=0 rules are retained. This does not cancel a deal already sent to the server. To remove an exact color, pass the same hue with which the rule was created.
Shop lists / Buy and sell lists
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
DisableReagentRule(0x0F7A);
DisableReagentRule(0x0F84);
return null;
}
void DisableReagentRule(dynamic itemType)
{
UO.AutoBuyEx(itemType, -1, 0, 0, "");
}
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: itemType (Any), itemColor (Any), quantity (Any), price (Any), name (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility. -
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::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;Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.AutoSell(object? itemType, object? itemColor, object? quantity);Creates, updates or deletes an automatic sale rule in the main Default list of the current Bad Newbie profile. The command configures future processing of the NPC-seller's offer; does not say buy/sell, does not open a store and does not confirm the transaction. Full procedure: store listings.
-
itemType- Graphic product 0..65535: for example 0x0F7A - Black Pearl, 0x0F51 - dagger. This is not the serial of the seller/item and not the body of the character. A negative number or a number greater than 65535 is rejected. Here 0xFFFF is a specific graphic, not a mask for all products. -
itemColor— Product Hue: negative number or 0xFFFF — any; 0 - only unpainted objects. For precise hue use 0..65534. Do not use colors outside this range: a positive value is converted to ushort. Required. -
quantity— The number of UNITS of goods per one store offer received, not the number of stacks and not the desired balance in the backpack. The positive is limited to 65535. 0/negative removes the matching type+color rule from Default; it is not “the whole quantity.” Required.
void - no value. Call on a separate line, without var result = and without if. The end of the call means the end of the setup, not a successful transaction. If there is no profile or invalid graphic the rule is not created; There is no numerical result of the error. Check the actual transaction by the contents of the backpack, gold and server response.
- All 3 arguments are required. This is a rule setting, not a wait function.
- The rule key is graphic and the hue mask is in Default. The repeated call replaces the quantity and other fields of this rule; it does not add another limit on top of the previous one. Without price/name, the previous restrictions on these fields are removed.
- New/updated Enabled=true rule. The general buy/sell switch is set based on the presence of rules, and the profile is saved. The disabled Default list itself is not automatically enabled: both the general mode and the list must be enabled in the settings. Other named lists are not changed.
- Processing begins when a list of goods arrives. The limit is spent in total across rows matched to one rule. For each position, the first matching enabled rule is used. Reopening the store gives a new offer and a new limit while the rule is active.
- Works at Full with Bad Newbie; in Classic this automation is disabled. Do not substitute the name NPC or the name of the saved list in the parameters. AutoBuyEx adds price/name filters when purchasing; ClearShopList resets both automations entirely.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.AutoSell");
UO.AutoSell(0x0F51, -1, 1);Parameters and execution flow:
- 0x0F51 - graphic of a dagger, any hue, 1 - one per sentence. The team does not select a specific serial and does not check the usefulness/value of the item. Select the exact type/color of your product.
UO.AutoSell(0x0F51, -1, 1);Parameters and execution flow:
- 0x1F03 is an example of a standard graphic robe, 0x0044 is an example of hue. Replace both with your product. 5 — units, not price; the minimum price and Sell/AutoSell name parameters are not accepted. The server must include the item in the offer of sale.
return RunScenario();
object? RunScenario()
{
UO.AutoSell(0x1F03, 0x0044, 5);
return null;
}Parameters and execution flow:
- The procedure name is arbitrary; itemType and hue are its parameters. Other rules, purchasing, and custom named lists are retained. If another enabled list also sells these items, disable the corresponding rule in it through the settings.
Shop lists / Buy and sell lists
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
RemoveSaleRule(0x0F51, -1);
RemoveSaleRule(0x1F03, 0x0044);
return null;
}
void RemoveSaleRule(dynamic itemType, dynamic hue)
{
UO.AutoSell(itemType, hue, 0);
}
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: itemType (Any), itemColor (Any), quantity (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoSellRule:bridge.SetAutoSellRule(Arg(0), Arg(1), Arg(2)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "autosell":
bridge.SetAutoSellRule(Arg(0), Arg(1), Arg(2)); return InjectionValue.Unit;Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.Buy(object? @type);
void UO.Buy(object? @type, object? color);
void UO.Buy(object? @type, object? color, object? quantity);
void UO.Buy(object? @type, object? color, object? quantity, object? maxPrice);
void UO.Buy(object? @type, object? color, object? quantity, object? maxPrice, object? name);Creates, updates or deletes an automatic purchase rule in the main Default list of the current Bad Newbie profile. The command configures future processing of the NPC-seller's offer; does not say buy/sell, does not open a store and does not confirm the transaction. Full procedure: store listings.
-
type- Graphic product 0..65535: for example 0x0F7A - Black Pearl, 0x0F51 - dagger. This is not the serial of the seller/item and not the body of the character. A negative number or a number greater than 65535 is rejected. Here 0xFFFF is a specific graphic, not a mask for all products. -
color— Product Hue: negative number or 0xFFFF — any; 0 - only unpainted objects. For precise hue use 0..65534. Do not use colors outside this range: a positive value is converted to ushort. Default - 1. -
quantity— The number of UNITS of goods per one store offer received, not the number of stacks and not the desired balance in the backpack. The positive is limited to 65535. 0/negative removes the matching type+color rule from Default; it is not “the whole quantity.” Default is 1. -
maxPrice— Maximum price of ONE unit, not the entire transaction. 0/negative – no price ceiling. Products that are more expensive than the positive limit are allowed through. The price is not traded or changed on the server. Default is 0. -
name— Substring of the PRODUCT name, case insensitive; edge spaces are removed, empty line - no filter. This is not the name of the seller or the name of the listing. For example, "Black Pearl" checks the text of the store position if the server sent exactly such a name. Default is empty string.
void - no value. Call on a separate line, without var result = and without if. The end of the call means the end of the setup, not a successful transaction. If there is no profile or invalid graphic the rule is not created; There is no numerical result of the error. Check the actual transaction by the contents of the backpack, gold and server response.
- Buy takes from 1 to 5 arguments; missing on the right color=-1, quantity=1, maxPrice=0, name="".
- The rule key is graphic and the hue mask is in Default. The repeated call replaces the quantity and other fields of this rule; it does not add another limit on top of the previous one. Without price/name, the previous restrictions on these fields are removed.
- New/updated Enabled=true rule. The general buy/sell switch is set based on the presence of rules, and the profile is saved. The disabled Default list itself is not automatically enabled: both the general mode and the list must be enabled in the settings. Other named lists are not changed.
- Processing begins when a list of goods arrives. The limit is spent in total across rows matched to one rule. For each position, the first matching enabled rule is used. Reopening the store gives a new offer and a new limit while the rule is active.
- Works at Full with Bad Newbie; in Classic this automation is disabled. Do not substitute the name NPC or the name of the saved list in the parameters. AutoBuyEx adds price/name filters when purchasing; ClearShopList resets both automations entirely.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.Buy");
UO.Buy(0x0F7A);Parameters and execution flow:
- 0x0F7A is a graphic of the reagent, not ID NPC. Quantity - 1; color - any. There is no price ceiling specified in this form. The script itself does not say anything and does not open the store. The rule continues to apply for subsequent sentences until you change/disable it.
UO.Buy(0x0F7A);Parameters and execution flow:
- 20 - maximum in one store response, and not “bring the quantity to 20”. 5 — price per unit, “Black Pearl” — substring of the product name. If the server calls the reagent differently, change the filter or pass "". Lack of goods, money and server rules determine the outcome.
return RunScenario();
object? RunScenario()
{
UO.Buy(0x0F7A, 0, 20, 5, "Black Pearl");
return null;
}Parameters and execution flow:
- The assistant accepts graphic. Only Default rules with AnyHue are deleted; the individual hue=0 rules are retained. This does not cancel a deal already sent to the server. To remove an exact color, pass the same hue with which the rule was created.
Shop lists / Buy and sell lists
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
DisableReagentRule(0x0F7A);
DisableReagentRule(0x0F84);
return null;
}
void DisableReagentRule(dynamic itemType)
{
UO.Buy(itemType, -1, 0);
}
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: type (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoBuyRule:bridge.SetAutoBuyRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1, arguments.Length > 3 ? Arg(3) : 0, arguments.Length > 4 ? Text(4) : string.Empty). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Text:Text(4).
Internal implementation code; this is not a standalone script.
case "buy":
bridge.SetAutoBuyRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1, arguments.Length > 3 ? Arg(3) : 0, arguments.Length > 4 ? Text(4) : string.Empty);
break;Parameters: type (Any), color (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoBuyRule:bridge.SetAutoBuyRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1, arguments.Length > 3 ? Arg(3) : 0, arguments.Length > 4 ? Text(4) : string.Empty). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Text:Text(4).
Internal implementation code; this is not a standalone script.
case "buy":
bridge.SetAutoBuyRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1, arguments.Length > 3 ? Arg(3) : 0, arguments.Length > 4 ? Text(4) : string.Empty);
break;Parameters: type (Any), color (Any), quantity (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoBuyRule:bridge.SetAutoBuyRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1, arguments.Length > 3 ? Arg(3) : 0, arguments.Length > 4 ? Text(4) : string.Empty). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Text:Text(4).
Internal implementation code; this is not a standalone script.
case "buy":
bridge.SetAutoBuyRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1, arguments.Length > 3 ? Arg(3) : 0, arguments.Length > 4 ? Text(4) : string.Empty);
break;Parameters: type (Any), color (Any), quantity (Any), maxPrice (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoBuyRule:bridge.SetAutoBuyRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1, arguments.Length > 3 ? Arg(3) : 0, arguments.Length > 4 ? Text(4) : string.Empty). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Text:Text(4).
Internal implementation code; this is not a standalone script.
case "buy":
bridge.SetAutoBuyRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1, arguments.Length > 3 ? Arg(3) : 0, arguments.Length > 4 ? Text(4) : string.Empty);
break;Parameters: type (Any), color (Any), quantity (Any), maxPrice (Any), name (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoBuyRule:bridge.SetAutoBuyRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1, arguments.Length > 3 ? Arg(3) : 0, arguments.Length > 4 ? Text(4) : string.Empty). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Text:Text(4).
Internal implementation code; this is not a standalone script.
case "buy":
bridge.SetAutoBuyRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1, arguments.Length > 3 ? Arg(3) : 0, arguments.Length > 4 ? Text(4) : string.Empty);
break;Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.ClearShopList();Removes the rules for automatic buying and selling of the active profile.
There are no parameters.
void - no return value.
- Clears BackNewbieAutoBuyRules and BackNewbieAutoSellRules, turns off shared AutoBuy/AutoSell, updates OptionsGump and saves the profile. The list of loot does not change; the absence of a profile gives an empty action.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.ClearShopList");
UO.ClearShopList();Parameters and execution flow:
- Removes the rules for automatic buying and selling of the active profile.
UO.ClearShopList();Parameters and execution flow:
- Remove the rule for buying bandages along with the rest of the trading rules.
return RunScenario();
object? RunScenario()
{
UO.AutoBuy(0x0E21, -1, 10);
UO.ClearShopList();
return null;
}Parameters and execution flow:
- Clearing an empty set is acceptable and does not create a new setting.
Shop lists / Buy and sell lists
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
UO.ClearShopList();
UO.ClearShopList();
return null;
}
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: No parameters.
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ClearAutoShopRules:bridge.ClearAutoShopRules().
Internal implementation code; this is not a standalone script.
case "clearshoplist":
bridge.ClearAutoShopRules(); return InjectionValue.Unit;Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
dynamic UO.GetAutoBuyDelay();Reads the current automatic purchase delay from the customer profile.
There are no parameters.
int — current delay in milliseconds. The values written by the setter are limited to 0…65535. 0 means no additional delay; this is not a mistake. If there is no loaded profile, 3 is returned. Reading does not return the item quantity or confirm the transaction.
- The setting is general for the current profile: changes in another script or UI are visible the next time you read it. Zero is a valid setting, not a sign of missing data and not a reason to return the old script cache.
- The default value is 3 ms. After sending an automatic operation, the manager sets the time for the next allowed operation. Vendor lists that arrived earlier are not processed by this pass; getter does not trigger a wait and does not send a buy/sell itself.
- This is not delay MassMove, Drag/Drop or manual trading. The new value is applied when scheduling the next delay; the already assigned moment is not recalculated.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The result of one call is printed in the journal. A number is not converted to bool; an array is displayed as its element count.
object? result = UO.GetAutoBuyDelay();
UO.Print(result is Array values ? "Count: " + values.Length : Convert.ToString(result));Parameters and execution flow:
- There are no arguments. delay — time in milliseconds.
- The value reflects the profile at the time of the call. The saved var will not be updated later.
var delay = UO.GetAutoBuyDelay();
UO.Print("Delay ms: " + Convert.ToString(delay));Parameters and execution flow:
- setter gets 70000 ms; the permissible maximum is 65535. The example changes the profile setting.
- actual must contain 65535 when the profile is loaded. Getter returns the actual constrained value rather than the original argument 70000.
return RunScenario();
object? RunScenario()
{
UO.SetAutoBuyDelay(70000);
var actual = UO.GetAutoBuyDelay();
UO.Print(Convert.ToString(actual));
return null;
}Parameters and execution flow:
- Zero is checked explicitly. This example does not change the profile.
- Zero latency does not mean the operation was completed. For the result of the transaction, check the game objects.
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
var current = UO.GetAutoBuyDelay();
if (Truth(current == 0))
{
UO.Print("No additional delay");
}
else
{
UO.Print("Delay: " + Convert.ToString(current) + " ms");
}
return null;
}
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: No parameters.
Result: dynamic / Any.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetAutoBuyDelay:bridge.GetAutoBuyDelay().
Internal implementation code; this is not a standalone script.
case "getautobuydelay":
return new InjectionValue(bridge.GetAutoBuyDelay());Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
dynamic UO.GetAutoSellDelay();Reads the current automatic sale delay from the customer profile.
There are no parameters.
int — current delay in milliseconds. The values written by the setter are limited to 0…65535. 0 means no additional delay; this is not a mistake. If there is no loaded profile, 3 is returned. Reading does not return the item quantity or confirm the transaction.
- The setting is general for the current profile: changes in another script or UI are visible the next time you read it. Zero is a valid setting, not a sign of missing data and not a reason to return the old script cache.
- The default value is 3 ms. After sending an automatic operation, the manager sets the time for the next allowed operation. Vendor lists that arrived earlier are not processed by this pass; getter does not trigger a wait and does not send a buy/sell itself.
- This is not delay MassMove, Drag/Drop or manual trading. The new value is applied when scheduling the next delay; the already assigned moment is not recalculated.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The result of one call is printed in the journal. A number is not converted to bool; an array is displayed as its element count.
object? result = UO.GetAutoSellDelay();
UO.Print(result is Array values ? "Count: " + values.Length : Convert.ToString(result));Parameters and execution flow:
- There are no arguments. delay — time in milliseconds.
- The value reflects the profile at the time of the call. The saved var will not be updated later.
var delay = UO.GetAutoSellDelay();
UO.Print("Delay ms: " + Convert.ToString(delay));Parameters and execution flow:
- setter gets 70000 ms; the permissible maximum is 65535. The example changes the profile setting.
- actual must contain 65535 when the profile is loaded. Getter returns the actual constrained value rather than the original argument 70000.
return RunScenario();
object? RunScenario()
{
UO.SetAutoSellDelay(70000);
var actual = UO.GetAutoSellDelay();
UO.Print(Convert.ToString(actual));
return null;
}Parameters and execution flow:
- Zero is checked explicitly. This example does not change the profile.
- Zero latency does not mean the operation was completed. For the result of the transaction, check the game objects.
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
var current = UO.GetAutoSellDelay();
if (Truth(current == 0))
{
UO.Print("No additional delay");
}
else
{
UO.Print("Delay: " + Convert.ToString(current) + " ms");
}
return null;
}
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: No parameters.
Result: dynamic / Any.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetAutoSellDelay:bridge.GetAutoSellDelay().
Internal implementation code; this is not a standalone script.
case "getautoselldelay":
return new InjectionValue(bridge.GetAutoSellDelay());Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
dynamic UO.GetPrice(object? objID);Reads the Item.Price known to the client for a serial item.
-
objID— Serial of the object or supported name of self/backpack/lasttarget/saved object; numeric strings and 0x strings are resolved by runtime.
int — unchecked conversion of uint Item.Price to int. A missing item gives 0; prices above 2147483647 are displayed as negative int.
- The team does not request a vendor proposal. The value depends on the data previously received by the client. Zero can indicate an unknown/zero price or the absence of an item; to check an object use Exists.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The result of one call is printed in the journal. A number is not converted to bool; an array is displayed as its element count.
object? result = UO.GetPrice(UO.LastTarget());
UO.Print(result is Array values ? "Count: " + values.Length : Convert.ToString(result));Parameters and execution flow:
- The result is a cached Item.Price.
var item = UO.LastTarget();
if (Truth(UO.Exists(item)))
{
var price = UO.GetPrice(item);
UO.Print(Convert.ToString(price));
}
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;Parameters and execution flow:
- A missing item gives 0.
return RunScenario();
object? RunScenario()
{
var price = UO.GetPrice(0);
UO.Print(Convert.ToString(price));
return null;
}Parameters and execution flow:
- Only a new call rereads the model; the pause itself does not ask for a price.
return await new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenarioAsync();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
async public Task<object?> RunScenarioAsync()
{
var item = UO.LastTarget();
var before = UO.GetPrice(item);
await Delay(500);
var after = UO.GetPrice(item);
UO.Print(Convert.ToString(before) + " " + Convert.ToString(after));
return null;
}
Task Delay(object? milliseconds) => WaitAsync(checked((int)Convert.ToDouble(milliseconds)));
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: objID (Any)
Result: dynamic / Any.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetPrice:bridge.GetPrice(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "getprice":
return new InjectionValue(bridge.GetPrice(Arg(0)));Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
dynamic UO.GetShopList();Reads the products of the last active offer of the NPC-seller. Allows you to check the type, quantity and price before buying or selling.
There are no parameters.
Array of string — array of strings, indices from 0. Each line: serial|graphic|hue|amount|price|name. Serial - ID specific position, graphic - type, hue - color; the first three fields are written in 0x format. Amount — available units minus the draft in the window, price — price of one unit, name — name. This is not a list of serial or bool. If there is no offer, the array is empty. The name can contain |: the first five delimiters define the fields, the rest is the name.
- First, as a normal game action, open a buy or sell from the desired NPC and wait for the server to offer. These teams themselves do not look for a seller, do not open trade, do not set a price for a personal vendor, and do not transfer items between chests. ID of the seller is not passed as a parameter: in case of several offers, the last one is used.
- In the manager, the offer is stored in the game session. Closing the graphical client saves the proposal and draft, opening it restores the window. Closing the store itself, responding, closing the server, or disconnecting the connection removes the offer. Autobuy/autosell Bad Newbie can process it before the script.
- Reading does not send requests to the server. This is a snapshot of the supply already received, not a guarantee of the current stock of NPC. The quantity field reflects the units, not the number of rows/stacks. ArrayLength(rows) counts positions. Prices here read GetShopList; SendShopReply does not accept the price.
- The explicit list replaces the draft and is not added to it. Repeating one serial totals the quantity; the total is limited by the total quantity of the item in the offer. Unknown serial, invalid or non-positive quantity will reject the entire response before submitting, saving the offer. If there is no sentence, SendShopReply reports an error. The line "0" is not an undo command; use "".
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The result of one call is printed in the journal. A number is not converted to bool; an array is displayed as its element count.
object? result = UO.GetShopList();
UO.Print(result is Array values ? "Count: " + values.Length : Convert.ToString(result));Parameters and execution flow:
- GetWord uses the index from 0: 0 - serial, 1 - graphic, 2 - hue, 3 - quantity, 4 - price. Before rows[0] the length of the array is checked.
var rows = UO.GetShopList();
if (Truth(ArrayLength(rows) == 0))
{
return null;
}
var serial = ReadField(rows[0], 0, "|");
var itemType = ReadField(rows[0], 1, "|");
var amount = Convert.ToInt32(ReadField(rows[0], 3, "|"));
var price = Convert.ToDouble(ReadField(rows[0], 4, "|"));
UO.Print(serial + " / " + itemType + " / " + Convert.ToString(amount) + " / " + Convert.ToString(price));
int ArrayLength(object? value) => value is System.Array array ? array.Length : 0;
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
string ReadField(object? row, int index, string separator) { string[] fields = (Convert.ToString(row) ?? "").Split(new[] { separator }, StringSplitOptions.None); return index >= 0 && index < fields.Length ? fields[index] : ""; }Parameters and execution flow:
- For pre-open BUY offer only. 0x0E21 — bandages, 5 — maximum unit price, 10 — required quantity. The first suitable position is taken; the exact serial is read from the sentence. The code does not start the purchase itself.
return RunScenario();
object? RunScenario()
{
var rows = UO.GetShopList();
for (int i = (int)(0); i <= ArrayLength(rows) - 1; i += (int)(1))
{
var row = rows[i];
if (Truth(ReadField(row, 1, "|") == "0x0E21"))
{
var price = Convert.ToDouble(ReadField(row, 4, "|"));
var amount = Convert.ToInt32(ReadField(row, 3, "|"));
if (Truth(price > 0) && Truth(price <= 5) && Truth(amount > 0))
{
if (Truth(amount > 10))
{
amount = 10;
}
UO.SendShopReply(ReadField(row, 0, "|") + ":" + Convert.ToString(amount));
return null;
}
}
}
return null;
}
int ArrayLength(object? value) => value is System.Array array ? array.Length : 0;
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
string ReadField(object? row, int index, string separator)
{
string[] fields = (Convert.ToString(row) ?? "").Split(new[] { separator }, StringSplitOptions.None);
return index >= 0 && index < fields.Length ? fields[index] : "";
}Parameters and execution flow:
- The auxiliary function is given in full: it sums the amount field of all positions of the specified type. If the clause is empty, returns 0; this is the number of units available, not the number of animals or items on the character.
Shop lists / Buy and sell lists
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
var available = CountOfferedType("0x0E21");
if (Truth(available < 10))
{
UO.Print("Bandage stock below 10: " + Convert.ToString(available));
}
return null;
}
dynamic CountOfferedType(dynamic itemType)
{
var total = 0;
var rows = UO.GetShopList();
for (int i = (int)(0); i <= ArrayLength(rows) - 1; i += (int)(1))
{
if (Truth(ReadField(rows[i], 1, "|") == itemType))
{
total = total + Convert.ToInt32(ReadField(rows[i], 3, "|"));
}
}
return total;
}
int ArrayLength(object? value) => value is System.Array array ? array.Length : 0;
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
string ReadField(object? row, int index, string separator)
{
string[] fields = (Convert.ToString(row) ?? "").Split(new[] { separator }, StringSplitOptions.None);
return index >= 0 && index < fields.Length ? fields[index] : "";
}
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: No parameters.
Result: dynamic / Any.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.GetShopList. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetShopList:bridge.GetShopList().
Internal implementation code; this is not a standalone script.
public InjectionValue GetShopList()
=> new InjectionValue((bridge.GetShopList() ?? Array.Empty<string>()).Select(item => new InjectionValue(item)).ToArray());Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.MassPriceMove();
void UO.MassPriceMove(object? delay, object? quantity, object? @type, object? price);
void UO.MassPriceMove(object? delay, object? quantity, object? @type, object? price, object? destination);
void UO.MassPriceMove(object? delay, object? quantity, object? @type, object? price, object? destination, object? x, object? y, object? z);Enables mass transfer of items of one TYPE with automatic pricing in your vendor's inventory. The source is determined by the first manual transfer. Each stack is transferred entirely and is considered one item; after his price request, the client responds and only then continues the queue.
-
delay— The first parameter is the delay between transfer requests in milliseconds, an integer from 0 to 2147483647. 350 means 0,35 seconds. With 0 no more than one next carry is sent per game frame. No delay is added to GrabDelay. A negative value disables the mode and clears the queue; for switching off, a clear UO.MassPriceMove() notation is preferred. -
quantity- The second parameter is the TOTAL limit of individual items (items), including the first manual transfer. One stack/stack is considered one item, regardless of the quantity inside. 50 means up to 50 whole stacks or 50 single items. The stack is NOT split at this limit. 0 - all suitable items. Negative values are not allowed. -
type- The third parameter is the item type code (Graphic/Type), the integer 0..65535, for example 0x0EED or the string "0x0EED" for gold. This is NOT serial/ID and NOT the name AddObject. 0 determines the type by the first manual transfer. With an explicit type, dragging another type does not activate the queue; The mode continues to wait for a suitable item. -
price— The fourth required parameter is the whole price 0..2147483647 for each complete item/stack displayed. 0 means free, no shutdown. Negative price is rejected. -
destination— The fifth optional parameter is serial or the saved name of the container in your vendor’s inventory. If absent, it is taken from the manual reset. An ordinary backpack, a chest on the ground and destination=0 are deviated here: it is impossible to set a price on the ground. -
x- Sixth parameter - X inside the vendor container: -1 or 65535 for automatic placement, otherwise 0..65535. Indicated only together with Y and Z. -
y- Seventh parameter - Y inside the vendor container: -1/65535 for automatic placement, otherwise 0..65535. Only indicated together with X and Z. -
z— The eighth parameter is the height -128..127, inside the container usually 0. Without explicit X/Y/Z, with a given destination, -1,-1,0 are used; When assigning manually, the reset location is taken.
void: no value. Activate MassPriceMove enables manual sample wait. Transfer and price messages indicate requests submitted and not a guarantee of server acceptance.
- Forms with 0, 4, 5 or 8 arguments. Exact order: delay, quantity, type, price, destination, x, y, z. Partial coordinate triples are not supported.
- First, call the command, then pick up and drag the entire appropriate item. Type 0 remembers it TYPE; an explicit type skips manual wraps of other types. The source is always taken from the first suitable item.
- The quantity includes the first manual item. 50 means 50 full stacks from 100, not 50 units from the stack. 0 - all suitable straight objects. Color is not filtered and nested containers are not expanded.
- The AllPrice price request recognition rules apply, including ASCII/Unicode and 10-second wait. Pause delay - minimum interval: a slow server increases it so as not to confuse prices.
- General mode AllPrice does not need to be enabled. The price of this operation takes precedence over AllPrice. Changing the price AllPrice or manually transferring additional items during the queue is not recommended: an unknown response or server failure interrupts the queue.
- MassPriceMove() turns off the current transfer queue and cancels the pending price response; the general AllPrice, if it was enabled separately, is retained. TerminateAll() turns off both modes. This is one queue in common with MassMove: the new activation replaces the old one.
- If the price request is not recognized, the command leaves the dialog for manual entry and stops further transfers. Server failure, death, map change, and unavailable item/container also stop working.
- Repeatedly calling the same command correctly, while the mode is still waiting for the first mouse drag, turns off the waiting: Deactivate MassMove/MassPriceMove appears directly in the game window. The next call turns the mode back on. After the first transfer, use the no-argument form to stop the remaining queue. Requests that have already been sent are not rolled back.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.MassPriceMove");
UO.MassPriceMove();Parameters and execution flow:
- delay=350 ms; quantity=50 of individual items, including the first manual one; type=0 remembers TYPE sample; price=125 for each entire item.
- destination and coordinates are missing: drag the sample directly into your vendor's inventory.
- If the original stacks are 100, a maximum of 50 full stacks are transferred. Each receives a price 125 after the server requests.
UO.MassPriceMove(350, 50, 0, 125);
UO.Print("Drag one complete stack into your vendor bag");Parameters and execution flow:
- AddObject prompts you to select a vendor bag and saves it as vendor_bag. This is the ID destination; type remains the code 0x0F7A.
- delay=500, quantity=0 without limit, type=0x0F7A, price=250, destination=vendor_bag.
- X/Y/Z missing: -1,-1,0. To start a queue, manually drag one item of the appropriate type; from it the original bag is determined.
return RunScenario();
object? RunScenario()
{
UO.AddObject("vendor_bag");
UO.MassPriceMove(500, 0, "0x0F7A", 250, "vendor_bag");
UO.Print("Now drag one matching item from the source");
return null;
}Parameters and execution flow:
- delay=350 ms; quantity=10 full items; type=itemType=0x0EED; price=1000 for each full stack.
- destination=vendorBag is the real ID of your vendor's bags, replace the example. This is the fifth parameter, not the fourth.
- x=60, y=70 is the place inside this bag, z=0. These are not the character's coordinates on the map.
- Once called, manually drag and drop the appropriate sample from the source. If the server rejects the placement, further requests are stopped.
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
var itemType = "0x0EED";
var vendorBag = "0x40005678";
UO.MassPriceMove(350, 10, itemType, 1000, vendorBag, 60, 70, 0);
return null;
}
}Parameters and execution flow:
- With no arguments, the command turns off the general bulk transfer queue and clears its pending price response.
- Prices and transfers already accepted by the server are not rolled back. To stop other procedures and separately enabled AllPrice, use UO.TerminateAll().
Shop lists / Buy and sell lists
UO.MassPriceMove();C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: No parameters.
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MassPriceMove:bridge.MassPriceMove(-1, 0, 0, 0, -1, -1, -1, 0). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[2]). -
InjectionScript.Runtime.InjectionApiUO.ResolveTransferDestination:ResolveTransferDestination(arguments[4], true).
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;Parameters: delay (Any), quantity (Any), type (Any), price (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MassPriceMove:bridge.MassPriceMove(-1, 0, 0, 0, -1, -1, -1, 0). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[2]). -
InjectionScript.Runtime.InjectionApiUO.ResolveTransferDestination:ResolveTransferDestination(arguments[4], true).
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;Parameters: delay (Any), quantity (Any), type (Any), price (Any), destination (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MassPriceMove:bridge.MassPriceMove(-1, 0, 0, 0, -1, -1, -1, 0). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[2]). -
InjectionScript.Runtime.InjectionApiUO.ResolveTransferDestination:ResolveTransferDestination(arguments[4], true).
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;
UO.MassPriceMove(delay, quantity, type, price, destination, x, y, z) — UO.MassPriceMove(Any,Any,Any,Any,Any,Any,Any,Any)
Parameters: delay (Any), quantity (Any), type (Any), price (Any), destination (Any), x (Any), y (Any), z (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MassPriceMove:bridge.MassPriceMove(-1, 0, 0, 0, -1, -1, -1, 0). -
InjectionScript.Runtime.NumberConversions.ToInt:NumberConversions.ToInt(arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[2]). -
InjectionScript.Runtime.InjectionApiUO.ResolveTransferDestination:ResolveTransferDestination(arguments[4], true).
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;Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.Sell(object? @type);
void UO.Sell(object? @type, object? color);
void UO.Sell(object? @type, object? color, object? quantity);Creates, updates or deletes an automatic sale rule in the main Default list of the current Bad Newbie profile. The command configures future processing of the NPC-seller's offer; does not say buy/sell, does not open a store and does not confirm the transaction. Full procedure: store listings.
-
type- Graphic product 0..65535: for example 0x0F7A - Black Pearl, 0x0F51 - dagger. This is not the serial of the seller/item and not the body of the character. A negative number or a number greater than 65535 is rejected. Here 0xFFFF is a specific graphic, not a mask for all products. -
color— Product Hue: negative number or 0xFFFF — any; 0 - only unpainted objects. For precise hue use 0..65534. Do not use colors outside this range: a positive value is converted to ushort. Default - 1. -
quantity— The number of UNITS of goods per one store offer received, not the number of stacks and not the desired balance in the backpack. The positive is limited to 65535. 0/negative removes the matching type+color rule from Default; it is not “the whole quantity.” Default is 1.
void - no value. Call on a separate line, without var result = and without if. The end of the call means the end of the setup, not a successful transaction. If there is no profile or invalid graphic the rule is not created; There is no numerical result of the error. Check the actual transaction by the contents of the backpack, gold and server response.
- Sell takes from 1 to 3 arguments; missing on the right color=-1, quantity=1.
- The rule key is graphic and the hue mask is in Default. The repeated call replaces the quantity and other fields of this rule; it does not add another limit on top of the previous one. Without price/name, the previous restrictions on these fields are removed.
- New/updated Enabled=true rule. The general buy/sell switch is set based on the presence of rules, and the profile is saved. The disabled Default list itself is not automatically enabled: both the general mode and the list must be enabled in the settings. Other named lists are not changed.
- Processing begins when a list of goods arrives. The limit is spent in total across rows matched to one rule. For each position, the first matching enabled rule is used. Reopening the store gives a new offer and a new limit while the rule is active.
- Works at Full with Bad Newbie; in Classic this automation is disabled. Do not substitute the name NPC or the name of the saved list in the parameters. AutoBuyEx adds price/name filters when purchasing; ClearShopList resets both automations entirely.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.Sell");
UO.Sell(0x0F51);Parameters and execution flow:
- 0x0F51 - graphic of a dagger, any hue, 1 - one per sentence. The team does not select a specific serial and does not check the usefulness/value of the item. Select the exact type/color of your product.
UO.Sell(0x0F51);Parameters and execution flow:
- 0x1F03 is an example of a standard graphic robe, 0x0044 is an example of hue. Replace both with your product. 5 — units, not price; the minimum price and Sell/AutoSell name parameters are not accepted. The server must include the item in the offer of sale.
return RunScenario();
object? RunScenario()
{
UO.Sell(0x1F03, 0x0044, 5);
return null;
}Parameters and execution flow:
- The procedure name is arbitrary; itemType and hue are its parameters. Other rules, purchasing, and custom named lists are retained. If another enabled list also sells these items, disable the corresponding rule in it through the settings.
Shop lists / Buy and sell lists
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
RemoveSaleRule(0x0F51, -1);
RemoveSaleRule(0x1F03, 0x0044);
return null;
}
void RemoveSaleRule(dynamic itemType, dynamic hue)
{
UO.Sell(itemType, hue, 0);
}
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: type (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoSellRule:bridge.SetAutoSellRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "sell":
bridge.SetAutoSellRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1);
break;Parameters: type (Any), color (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoSellRule:bridge.SetAutoSellRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "sell":
bridge.SetAutoSellRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1);
break;Parameters: type (Any), color (Any), quantity (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoSellRule:bridge.SetAutoSellRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0).
Internal implementation code; this is not a standalone script.
case "sell":
bridge.SetAutoSellRule(Arg(0), arguments.Length > 1 ? Arg(1) : -1, arguments.Length > 2 ? Arg(2) : 1);
break;Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.SendShopReply(object? reply);Sends the product selection to the last active offer of the NPC-seller. The direction of the transaction is determined by the offer: buying from NPC or selling to him.
-
reply— String: "serial:quantity"; several positions are separated by |, ; or comma. Instead of : let's say =. Serial - ID positions from GetShopList, decimal or 0x, not graphic and not ID seller. Quantity is a positive integer number of ones, not the number of stacks; without it, 1 is taken. "accept" is case insensitive or "1" confirms the draft window; an empty line cancels the transaction with an empty response.
void - there is no return value: neither true/false, nor amount, nor purchase confirmation. The server decides whether the transaction is valid. After submitting, check for updated items, gold, or server message.
- First, as a normal game action, open a buy or sell from the desired NPC and wait for the server to offer. These teams themselves do not look for a seller, do not open trade, do not set a price for a personal vendor, and do not transfer items between chests. ID of the seller is not passed as a parameter: in case of several offers, the last one is used.
- In the manager, the offer is stored in the game session. Closing the graphical client saves the proposal and draft, opening it restores the window. Closing the store itself, responding, closing the server, or disconnecting the connection removes the offer. Autobuy/autosell Bad Newbie can process it before the script.
- Reading does not send requests to the server. This is a snapshot of the supply already received, not a guarantee of the current stock of NPC. The quantity field reflects the units, not the number of rows/stacks. ArrayLength(rows) counts positions. Prices here read GetShopList; SendShopReply does not accept the price.
- The explicit list replaces the draft and is not added to it. Repeating one serial totals the quantity; the total is limited by the total quantity of the item in the offer. Unknown serial, invalid or non-positive quantity will reject the entire response before submitting, saving the offer. If there is no sentence, SendShopReply reports an error. The line "0" is not an undo command; use "".
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.SendShopReply");
UO.SendShopReply("");Parameters and execution flow:
- Up to 3 first position units are selected; serial is not hard-skinned. For a purchase offer it is a purchase, for a sale offer it is a sale. Check which offer you have opened.
var rows = UO.GetShopList();
if (Truth(ArrayLength(rows) == 0))
{
return null;
}
var amount = Convert.ToInt32(ReadField(rows[0], 3, "|"));
if (Truth(amount > 3))
{
amount = 3;
}
if (Truth(amount > 0))
{
UO.SendShopReply(ReadField(rows[0], 0, "|") + ":" + Convert.ToString(amount));
}
int ArrayLength(object? value) => value is System.Array array ? array.Length : 0;
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
string ReadField(object? row, int index, string separator) { string[] fields = (Convert.ToString(row) ?? "").Split(new[] { separator }, StringSplitOptions.None); return index >= 0 && index < fields.Length ? fields[index] : ""; }Parameters and execution flow:
- Only for BUY offer: budget 30, type 0x0E21. One unit is selected from each eligible item if the price is positive and within the remaining budget. The string is concatenated using |; one SendShopReply sends the entire selection.
return RunScenario();
object? RunScenario()
{
double budget = 30;
var reply = "";
var rows = UO.GetShopList();
for (int i = (int)(0); i <= ArrayLength(rows) - 1; i += (int)(1))
{
var row = rows[i];
if (Truth(ReadField(row, 1, "|") == "0x0E21"))
{
var price = Convert.ToDouble(ReadField(row, 4, "|"));
var amount = Convert.ToInt32(ReadField(row, 3, "|"));
if (Truth(price > 0) && Truth(price <= budget) && Truth(amount > 0))
{
if (Truth(reply != ""))
{
reply = reply + "|";
}
reply = reply + ReadField(row, 0, "|") + ":1";
budget = budget - price;
}
}
}
if (Truth(reply != ""))
{
UO.SendShopReply(reply);
}
return null;
}
int ArrayLength(object? value) => value is System.Array array ? array.Length : 0;
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;
string ReadField(object? row, int index, string separator)
{
string[] fields = (Convert.ToString(row) ?? "").Split(new[] { separator }, StringSplitOptions.None);
return index >= 0 && index < fields.Length ? fields[index] : "";
}Parameters and execution flow:
- Pre-select quantities in the store window. "accept" sends exactly this draft; After closing the game window it is saved. If nothing is selected, an empty response will be sent. "1" is a synonym for confirmation, not a serial item.
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
UO.SendShopReply("accept");
return null;
}
}Parameters and execution flow:
- An empty line sends an empty response and closes the active offer. The GetShopList check avoids being called when there are no goods, but it does not distinguish between an empty sentence and an absent one.
Shop lists / Buy and sell lists
if (Truth(ArrayLength(UO.GetShopList()) > 0))
{
UO.SendShopReply("");
}
int ArrayLength(object? value) => value is System.Array array ? array.Length : 0;
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: reply (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.SendShopReply. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SendShopReply:bridge.SendShopReply(reply.ToString()). -
InjectionScript.Runtime.InjectionValue.ToString:reply.ToString().
Internal implementation code; this is not a standalone script.
public void SendShopReply(InjectionValue reply) => bridge.SendShopReply(reply.ToString());Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.SetAutoBuyDelay(object? value);Sets the automatic purchase delay and saves the current profile.
-
value— Required number of milliseconds. A negative value is limited to 0, a value greater than 65535 is limited to the number 65535. 0 disables the additional delay, but does not disable the automatic trading itself.
void - no return value. Call as a separate line, then use GetAutoBuyDelay() to read the effective setting. If there is no profile, the setter does not save anything; getter in this state gives standard 3 ms.
- The setting is general for the current profile: changes in another script or UI are visible the next time you read it. Zero is a valid setting, not a sign of missing data and not a reason to return the old script cache.
- The default value is 3 ms. After sending an automatic operation, the manager sets the time for the next allowed operation. Vendor lists that arrived earlier are not processed by this pass; getter does not trigger a wait and does not send a buy/sell itself.
- This is not delay MassMove, Drag/Drop or manual trading. The new value is applied when scheduling the next delay; the already assigned moment is not recalculated.
- In a regular client host, this state data is taken from the GetPersistentState manager and is common to scripts/chat/macros of the same world/profile, and does not belong to one script. Another process or an apparently separate InjectionRuntimeState has a different state. Loading/clearing a profile can replace it; saved serial are still checked against the loaded world.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.SetAutoBuyDelay");
UO.SetAutoBuyDelay(350);Parameters and execution flow:
- Value=350 — milliseconds between allowed automatic operations.
- The setting is saved in the current profile and is visible to other scripts.
UO.SetAutoBuyDelay(350);
UO.Print(Convert.ToString(UO.GetAutoBuyDelay()));Parameters and execution flow:
- Value=0 has an independent meaning; is not replaced by the previous non-zero value.
- Only the delay changes. Rules, lists and a general automatic trading switch are set separately.
return RunScenario();
object? RunScenario()
{
UO.SetAutoBuyDelay(0);
var actual = UO.GetAutoBuyDelay();
if (Truth(actual == 0))
{
UO.Print("Delay disabled");
}
return null;
}
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;Parameters and execution flow:
- requested=70000 exceeds the maximum. applied reads the profile after setter restrictions.
- When the profile is loaded, the result will be 65535. To revert to the standard delay, explicitly call the setter with 3.
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
var requested = 70000;
UO.SetAutoBuyDelay(requested);
var applied = UO.GetAutoBuyDelay();
UO.Print("Requested: " + Convert.ToString(requested));
UO.Print("Applied: " + Convert.ToString(applied));
return null;
}
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: value (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility. -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoBuyDelay:bridge.SetAutoBuyDelay(state.AutoBuyDelay).
Internal implementation code; this is not a standalone script.
case "setautobuydelay":
state.AutoBuyDelay = Math.Max(0, Arg(0));
bridge.SetAutoBuyDelay(state.AutoBuyDelay);
return InjectionValue.Unit;Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.SetAutoSellDelay(object? value);Sets the automatic sale delay and saves the current profile.
-
value— Required number of milliseconds. A negative value is limited to 0, a value greater than 65535 is limited to the number 65535. 0 disables the additional delay, but does not disable the automatic trading itself.
void - no return value. Call as a separate line, then use GetAutoSellDelay() to read the effective setting. If there is no profile, the setter does not save anything; getter in this state gives standard 3 ms.
- The setting is general for the current profile: changes in another script or UI are visible the next time you read it. Zero is a valid setting, not a sign of missing data and not a reason to return the old script cache.
- The default value is 3 ms. After sending an automatic operation, the manager sets the time for the next allowed operation. Vendor lists that arrived earlier are not processed by this pass; getter does not trigger a wait and does not send a buy/sell itself.
- This is not delay MassMove, Drag/Drop or manual trading. The new value is applied when scheduling the next delay; the already assigned moment is not recalculated.
- In a regular client host, this state data is taken from the GetPersistentState manager and is common to scripts/chat/macros of the same world/profile, and does not belong to one script. Another process or an apparently separate InjectionRuntimeState has a different state. Loading/clearing a profile can replace it; saved serial are still checked against the loaded world.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.SetAutoSellDelay");
UO.SetAutoSellDelay(350);Parameters and execution flow:
- Value=350 — milliseconds between allowed automatic operations.
- The setting is saved in the current profile and is visible to other scripts.
UO.SetAutoSellDelay(350);
UO.Print(Convert.ToString(UO.GetAutoSellDelay()));Parameters and execution flow:
- Value=0 has an independent meaning; is not replaced by the previous non-zero value.
- Only the delay changes. Rules, lists and a general automatic trading switch are set separately.
return RunScenario();
object? RunScenario()
{
UO.SetAutoSellDelay(0);
var actual = UO.GetAutoSellDelay();
if (Truth(actual == 0))
{
UO.Print("Delay disabled");
}
return null;
}
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;Parameters and execution flow:
- requested=70000 exceeds the maximum. applied reads the profile after setter restrictions.
- When the profile is loaded, the result will be 65535. To revert to the standard delay, explicitly call the setter with 3.
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
var requested = 70000;
UO.SetAutoSellDelay(requested);
var applied = UO.GetAutoSellDelay();
UO.Print("Requested: " + Convert.ToString(requested));
UO.Print("Applied: " + Convert.ToString(applied));
return null;
}
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: value (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility. -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoSellDelay:bridge.SetAutoSellDelay(state.AutoSellDelay).
Internal implementation code; this is not a standalone script.
case "setautoselldelay":
state.AutoSellDelay = Math.Max(0, Arg(0));
bridge.SetAutoSellDelay(state.AutoSellDelay);
return InjectionValue.Unit;Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.Shop();Prints a local list of trade lines.
There are no parameters.
void - no value. Call on a separate line; completion does not confirm the server's action.
- ExecuteLegacyManualAlias reads bridge.GetShopList and concatenates the lines via "|" for SystemMessage. The seller menu does not open, buying/selling is not carried out.
- Modifies or displays only the specified local data. This command does not have server confirmation.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.Shop");
UO.Shop();Parameters and execution flow:
- Prints a local list of trade lines.
UO.Shop();Parameters and execution flow:
- ExecuteLegacyManualAlias reads bridge.GetShopList and concatenates the lines via "|" for SystemMessage. The seller menu does not open, buying/selling is not carried out.
return RunScenario();
object? RunScenario()
{
UO.Shop();
UO.Print(UO.GetArrayLength(UO.GetShopList()));
return null;
}Parameters and execution flow:
- Modifies or displays only the specified local data. This command does not have server confirmation.
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
UO.Shop();
UO.TextOpen();
UO.TextPrint("Shop list was printed in the journal");
return null;
}
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: No parameters.
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
InjectionScript.Runtime.InjectionApiUO.SystemMessage:SystemMessage(string.Join(" | ", bridge.GetShopList())). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetShopList:bridge.GetShopList().
Internal implementation code; this is not a standalone script.
case "shop": SystemMessage(string.Join(" | ", bridge.GetShopList())); break;Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.VendorMenu(object? vendor);
void UO.VendorMenu(object? menu, object? choice);Uses a seller or registers a permanent menu hook.
-
vendor— Form with one argument: serial/alias of the seller object. -
menu— A form with two arguments: a title and a menu element, both as text. This is a different operation; the first argument is not serial. -
choice— A form with two arguments: a title and a menu element, both as text. This is a different operation; the first argument is not serial.
void - no value. Call on a separate line; completion does not confirm the server's action.
- One argument calls bridge.UseObject. The two arguments call bridge.AddMenuHook(menu,choice,true), where true means a repeatable hook.
- Does not automatically buy or sell. Opening and selecting menus is determined by the server; the registered hook acts on the next matching menus until canceled.
- For menu/choice forms, the manager selects the first menu whose title contains prompt, case insensitive; SessionMenu selects the first item whose name contains choice, also case insensitive. Blank text is suitable for anyone; numeric text is a fragment of the name, not an index. A successful selection sends a response and closes the local menu. A one-time hook is deleted only after a successful selection; a permanent hook remains.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.VendorMenu");
UO.VendorMenu("lasttarget");Parameters and execution flow:
- Uses a seller or registers a permanent menu hook.
if (Truth(UO.Exists("lasttarget")))
{
UO.VendorMenu("lasttarget");
}
bool Truth(object? value) => value is bool flag ? flag : value is string text ? !string.IsNullOrEmpty(text) : value != null && Convert.ToDouble(value) != 0;Parameters and execution flow:
- One argument calls bridge.UseObject. The two arguments call bridge.AddMenuHook(menu,choice,true), where true means a repeatable hook.
return RunScenario();
object? RunScenario()
{
UO.VendorMenu("Vendor", "Buy");
return null;
}Parameters and execution flow:
- Does not automatically buy or sell. Opening and selecting menus is determined by the server; the registered hook acts on the next matching menus until canceled.
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
UO.VendorMenu("Vendor", "Buy");
UO.Print(UO.MenuHookPresent());
UO.CancelMenu();
return null;
}
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: vendor (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.AddMenuHook:bridge.AddMenuHook(Text(0), Text(1), true). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Text:Text(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.UseObject:bridge.UseObject(Arg(0, bridge.LastTarget)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0, bridge.LastTarget). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.LastTarget:bridge.LastTarget.
Internal implementation code; this is not a standalone script.
case "vendormenu":
if (arguments.Length >= 2) bridge.AddMenuHook(Text(0), Text(1), true);
else bridge.UseObject(Arg(0, bridge.LastTarget));
break;Parameters: menu (Any), choice (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.AddMenuHook:bridge.AddMenuHook(Text(0), Text(1), true). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Text:Text(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.UseObject:bridge.UseObject(Arg(0, bridge.LastTarget)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0, bridge.LastTarget). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.LastTarget:bridge.LastTarget.
Internal implementation code; this is not a standalone script.
case "vendormenu":
if (arguments.Length >= 2) bridge.AddMenuHook(Text(0), Text(1), true);
else bridge.UseObject(Arg(0, bridge.LastTarget));
break;