SilverScreen¶
Methods to interact with the silver‑smelting Silver Screen interface.
Note
Credits to Flight and Skunkworks
ESilverItem enum¶
ESilverItem = enum(OPAL_RING, OPAL_NECKLACE.., TIARA, DEMONIC_SIGIL);
Enum representing the silver jewelry that can be crafted.
TSilverScreen type¶
Main record to interact with the SilverScreen interface.
SilverScreen.SetupInterface¶
procedure TSilverScreen.SetupInterface();
Internal method used to setup the TSilverScreen coordinates. This is automatically called for you on the SilverScreen variable.
SilverScreen.IsOpen¶
function TSilverScreen.IsOpen(): Boolean;
Returns true if the SilverScreen interface is open.
Example:
WriteLn SilverScreen.IsOpen();
SilverScreen.WaitOpen¶
function TSilverScreen.WaitOpen(time, interval: Integer): Boolean;
Returns true if the SilverScreen interface opens within time milliseconds.
Example:
WriteLn SilverScreen.WaitOpen(5000);
SilverScreen.Close¶
function TSilverScreen.Close(PressEscape: Boolean): Boolean;
function TSilverScreen.Close(
escapeProbability: Single = -1
): Boolean; overload;
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 TSilverScreen.SetQuantity(amount: Integer): Boolean;
Sets the quantity to craft. Pass 0 or any negative value 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(0); // All
SilverScreen.SetQuantity(-1); // All
SilverScreen.SetQuantity(QUANTITY_ALL); // All
SilverScreen.CanCraft¶
function TSilverScreen.CanCraft(silver: ESilverItem): Boolean;
Checks if the specified silver can be crafted.
Example:
WriteLn SilverScreen.CanCraft(ESilverItem.OPAL_RING);
SilverScreen.IsHighlighted¶
function TSilverScreen.IsHighlighted(silver: ESilverItem): Boolean;
Returns true if the specified silver is currently highlighted/selected in the
interface.
You probably won’t need to work with this directly.
Example:
if SilverScreen.IsHighlighted(ESilverItem.OPAL_RING) then
Keyboard.KeyPress(EKeyCode.SPACE);
SilverScreen.CraftItem¶
function TSilverScreen.CraftItem(
silver: ESilverItem; amount: Integer; useSpace: Boolean
): Boolean;
function TSilverScreen.CraftItem(
item: Tilver;
amount: Integer = QUANTITY_ALL;
spaceProbability: Single = -1
): Boolean; overload;
Crafts the specified item with the given amount.
If useSpace 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 TSilverScreen variable.