ChooseOption¶
The ChooseOption file holds functions and procedures that are related to the ingame context menu.
type TRSChooseOption¶
The type that holds functions and properties of the context menu.
var ChooseOption¶
Variable that stores functions and properties of the context menu.
ChooseOption.Open¶
function TRSChooseOption.Open(): Boolean;
Opens the optionbox, returns true if it worked.
Note
by slacky
ChooseOption.Open¶
function TRSChooseOption.Open(Box:TBox): Boolean; overload;
Opens the menu and stores it’s bounds, returns true if it worked.
Note
by slacky
ChooseOption.IsOpen¶
function TRSChooseOption.IsOpen(): Boolean;
Checks if the menu is open, it repeats the check for a +/-2 sec if it’s False
(expecting it to open).
Note
by slacky
ChooseOption.IsClosed¶
function TRSChooseOption.IsClosed(): Boolean;
Checks if the menu is closed, it repeats the check for a +/-650ms if it’s True
(expecting it to close).
Note
by slacky
ChooseOption.Find¶
function TRSChooseOption.Find(): Boolean;
Is used internally to find the option-menu, and store the coordinates in the instance. Returns True if it’s found.
Note
by slacky
ChooseOption.GetOptions¶
function TRSChooseOption.GetOptions(): TOptionArray;
Returns each option in the menu.
Note
by slacky
ChooseOption.SelectID¶
function TRSChooseOption.SelectID(ID: Int32; MouseAction: Int32=mouse_left; CloseIt: Boolean=True): Boolean;
By default it will click the given option ID, if it’s not there the menu will be closed. Returns True if the select-action was performed.
Slows down the mouse movement for more realistic sliding through the lines of text.
Note
by slacky
ChooseOption.Select¶
function TRSChooseOption.Select(SubStrings: TStringArray; MouseAction:Int32=mouse_left; AClose:Boolean=True; CaseSensitive:Boolean=True): Boolean;
function TRSChooseOption.Select(Option: String; MouseAction:Int32=mouse_left; AClose:Boolean=True; CaseSensitive:Boolean=True): Boolean;
Same as SelectID, except that this will look for the option by it’s text, rather than by id.
ChooseOption.MissSelect¶
function TRSChooseOption.MissSelect(Option, MissOpt: TStringArray; ChanceOfMiss: Int32=5): Boolean;
function TRSChooseOption.MissSelect(Option, MissOpt: String; ChanceOfMiss: Int32=5): Boolean;
For example, click Inspect when you meant to click Drop. By default there’s a 5% chance of misclick, it will automatically click the right one after a missclick.
ChooseOption.Close¶
function TRSChooseOption.Close(tryTime:Int32=-1): Boolean;
Closes the option menu by dragging the mouse away from it, if that failed it clicks the “Close”-option.
Note
by slacky