Smithing screen¶
For interacting with the smithing interface.
PS: You are expected to find and open the interface yourself.
var SmithingScreen: TRSSmithingScreen;
const SMITH_ALL = -1;
SmithingScreen.__Setup¶
procedure TRSSmithingScreen.__Setup();
Every interface needs some internal setup procedure..
SmithingScreen.__Prepare¶
function TRSSmithingScreen.__Prepare(): Boolean;
Internal method that’s used to generate the boundaries of the interface - automatically.
SmithingScreen.IsOpen¶
function TRSSmithingScreen.IsOpen(): Boolean;
Checks if the interface is open. Internally also used to prepare the boundaries of the interface
SmithingScreen.Debug¶
function TRSSmithingScreen.Debug(RetImage: Boolean = False): TMufasaBitmap;
Debugs the bounds of the interface, mainly used when maintenance is needed.
SmithingScreen.FindItem¶
function TRSSmithingScreen.FindItem(DTM: Integer): Int32;
Returns the slot index for the given item, if it’s found, otherwise -1
SmithingScreen.MouseOver¶
function TRSSmithingScreen.MouseOver(Slot: Int32): Boolean;
Returns True
if the interface is open, and we moved the mouse to the given slot.
SmithingScreen.ItemName¶
function TRSSmithingScreen.ItemName(Slot: Int32): String;
Returns the name of the item in the given slot. Returns empty string on failure.
SmithingScreen.BarCount¶
function TRSSmithingScreen.BarCount(Slot: Int32): Int32;
Returns the number of bars needed to smith the given item. Returns -1
if it fails.
SmithingScreen.CanSmith¶
function TRSSmithingScreen.CanSmith(Slot: Int32): Boolean;
Returns True
if the item in the given slot can be made. Detected by checking
the color of the item name is white and that the bar-count is green.
SmithingScreen.Find¶
function TRSSmithingScreen.Find(Name: String; PartialMatch: Boolean = True): Int32; ;
Returns the slot of the first item matching the given name. Returns -1
if not found.
SmithingScreen.Smith¶
function TRSSmithingScreen.Smith(Slot, Amount:Int32; Name:String=''): Boolean;
Attempts to smith the item in the given slot. Amount can be any value, while
-1
or SMITH_ALL
will cause it to smith as many as possible of those items.