SilverScreen

Methods to interact with the silver‑smelting Silver Screen interface.

Note

Credits to Flight and Skunkworks


ERSSilverItem enum

ERSSilverItem = enum(OPAL_RING..TOPAZ_BRACELET);

Enum representing the silver jewelry that can be crafted.


TRSSilverScreen type

Main record to interact with the SilverScreen interface.


SilverScreen.SetupInterface

procedure TRSSilverScreen.SetupInterface();

Internal method used to setup the TRSSilverScreen coordinates. This is automatically called for you on the SilverScreen variable.


SilverScreen.IsOpen

function TRSSilverScreen.IsOpen(): Boolean;

Returns true if the SilverScreen interface is open.

Example:

WriteLn SilverScreen.IsOpen();

SilverScreen.WaitOpen

function TRSSilverScreen.WaitOpen(time, interval: Int32): Boolean;

Returns true if the SilverScreen interface opens within time milliseconds.

Example:

WriteLn SilverScreen.WaitOpen(5000);

SilverScreen.Close

function TRSSilverScreen.Close(PressEscape: Boolean): Boolean;

Attempts to close the SilverScreen interface. If PressEscape is true, the escape key is pressed to close, otherwise the close button is clicked.

Example:

WriteLn SilverScreen.Close(True);

SilverScreen.SetQuantity

function TRSSilverScreen.SetQuantity(Amount: Int32): Boolean;

Sets the quantity to craft. Pass -1 for “All”. If a preset button (1, 5, 10, All) matches the amount, it will be clicked. Otherwise, the “X” button is used to enter a custom amount.

Example:

SilverScreen.SetQuantity(10);
SilverScreen.SetQuantity(-1); // All

SilverScreen.CanCraftItem

function TRSSilverScreen.CanCraftItem(Item: TRSItem; out Box: TBox): Boolean;

Checks if the specified item can be crafted. Returns true if the item is found and craftable, and outputs the click box for the item.

Example:

var box: TBox;
if SilverScreen.CanCraftItem('Opal ring', box) then
  WriteLn 'Can craft opal ring';

SilverScreen.IsItemHighlighted

function TRSSilverScreen.IsItemHighlighted(Item: TRSItem): Boolean;

Returns true if the specified item is currently highlighted/selected in the interface. You probably won’t need to work with this directly

Example:

if SilverScreen.IsItemHighlighted('Opal ring') then
  Keyboard.KeyPress(EKeyCode.SPACE);

SilverScreen.CraftItem

function TRSSilverScreen.CraftItem(Item: TRSItem; Quantity: Int32; UseSpaceBar: Boolean): Boolean;

Crafts the specified item with the given quantity. If UseSpaceBar is true and the item is already highlighted, spacebar will be pressed instead of clicking.

Example:

SilverScreen.CraftItem('Opal ring', 10, True);

SilverScreen variable

Global TRSSilverScreen variable.