-
Notifications
You must be signed in to change notification settings - Fork 12
Commands
The following commands are available in your EasyLOU LUA scripts.
Commands are not in alphabetic order. Rather, they are (somewhat) grouped by functionality.
- FindItem
- FindPermanent
- Key
- Move
- Stop
- ScanJournal
- Macro
- Say
- SayCustom
- ToggleWarPeace
- TargetDynamic
- TargetPermanent
- TargetLoc
- LastTarget
- TargetSelf
- WaitForTarget
- AttackSelected
- UseSelected
- ContextMenu
- Drag
- Dropc
- Dropg
- FindMobile
- FindGameObject
- SetUsername
- SetPassword
- Login
- SelectServer
- CharacterSelect
- FindButton
- FindInput
- FindLabel
- FindPanel
- ClickButton
- GetTooltip
- SetInput
- SetTargetFrameRate
- SetVSyncCount
- SetMainCameraMask
- ResetVars
- RegisterHotKey
- OnHotKey
- IsHotKeyDown
- PlayScript
- PlayAllScripts
- PauseScript
- StopScript
- StopAllScripts
- StopAllScriptsButThis
Parameters:
- Item: either a number or a string.
- ContainerID: a number, optional.
Useful for pretty much any item in game. If Item is a number, FindItem will search for a dynamic object having the given ObjectID. If Item is a string, FindItem will search for all the dynamic objects whose Name contains the given string.
If ContainerID is given, FindItem will only search within the container having the given ObjectId.
FindItem("hatchet") -- finds all hatchets and stores the result in FINDITEM
FindItem("hatchet",BACKPACKID) -- finds all hatchet in your backpack and stores the result in FINDITEM
Parameters:
- Permanent: either a number or a string.
- Distance: maximum search distance. If not specified, it defaults to 30.
Useful for trees, rocks, etc. If Permanent is a number, FindPermanent will search for a permanent object having the given PermanentID. If Permanent is a string, FindPermanent will search for all the permanent objects whose Name contains the given string.
FindPermanent("tree") -- finds all trees and stores the result in FINDITEM
Unused.
Parameters:
- x: x coordinate.
- y: y coordinate.
- z: z coordinate.
or alternatively
- id: ObjectID.
Character will attempt to move at the given location x, y, and z, or if an ObjectID was provided, will attempt to move at the location of the given ObjectID.
Please note that pathfinding will be used, but if there are obstacles such as doors the action will probably fail and character will stay at the original position.
Likewise, if the location is too far from the current position than just a couple of screens, the action will probably fail and character will stay at the original position.
A sleep() command may be desired after the call to Move() to allow the character time to walk to the location.
Move(500,30,1000) -- moves to word coordinates 500,30,1000
Parameters:
None.
If the character is moving, it will stop.
Parameters:
- timestamp: timestamp in seconds.
The journal will be scanned, and it will return the first entry that immediately follows the given timestamp.
If the timestamp provided is equal to 0, it will return the very first message of the journal.
ScanJournal(TIME) -- reads the latest entry of the journal
Parameters:
- macro: a number.
It will execute the given macro.
Macros dropped on the left bar are usually from 0-27.
Primary action (usually bound to Q) is usually 27.
Secondary action (usually bound to E) is usually 28.
Macro(0) -- presses first hotbar button
Macro(10) -- presses first hotbar button on second bar
Parameters:
- text: a string.
Will say the given text. This can also be used to trigger scripts commands, i.e. commands that starts with "/" such as "/wave".
Parameters:
- text: a string.
Useful for context-menu commands such as "Stack Contents", "Release", etc. See 04-finditem-drag-split example file.
Parameters: None.
Toggles between War and Peace.
Parameters:
- id: the ObjectID to target.
Targets a dynamic object (i.e. an item, or a mobile).
FindItem("bear")
TargetDynamic(FINDITEM[1].ID)
Parameters:
- id: the PermanentID to target.
Targets a permanent object (i.e. a rock, or a tree).
FindPermanent("tree")
TargetPermanent(FINDITEM[1].ID)
Parameters:
- x (number): x coordinate to target.
- y (number): y coordinate to target.
- z (number): z coordinate to target.
- objectId (number): not sure, may not be needed. it looks like an object with a given objectId can be targeted at the given coords.
Targets the given location.
Parameters: None.
Execute the LastTarget macro.
Parameters: None.
Execute the TargetSelf macro.
Parameters:
- timeout in milliseconds, optional, default is 5000 (i.e. 5 seconds.).
Wait for the cursor to change into a target, or for the timeout to elapse, whichever occurs first.
Parameters:
- id: the ObjectID to attack.
Attack the given ObjectID.
Parameters:
- id: the ObjectID to use.
Use the given ObjectID. It is the equivalent of Double Clicking the object.
FindItem("cotton")
UseSelected(FINDITEM[1].ID)
Parameters:
- id: the ObjectID to trigger the command on.
- command: the Context Menu command to trigger.
Triggers the given Context Menu command on the given object.
ContextMenu(CHARID, "Dismount")
ContextMenu(CHARID, "Power Hour")
ContextMenu(FINDITEM[1].ID, "Split Stack")
ContextMenu(FINDITEM[1].CNTID, "Stack Contents")
Parameters:
- id: the ObjectID to drag.
Drag the given ObjectID.
Parameters:
- id: the ContainerID where the dragged item should be dropped.
To be used in conjunction with Drag.
Drops the currently dragged item into the given ContainerID.
Drag(itemId)
Dropc(BACKPACKID)
Parameters:
- x (number): x coordinate.
- y (number): y coordinate.
- z (number): z coordinate.
To be used in conjunction with Drag.
Drops the currently dragged item at the given location.
Parameters:
- Mobile: can be a number or a string.
- Distance: maximum search distance. If not specified, it defaults to 30.
Useful for searching mobs, npcs, etc.
If Mobile is a number, FindMobile will search for a mobile object having the given id.
If Mobile is a string, FindMobile will search for all the mobile objects whose Name contains the given string.
FindMobile("dragon")
if FINDMOBILE then
Say("OMG A DRAGON!")
end
Parameters:
- Name: a string.
FindGameObject will search for all the Unity GameObjects whose Name contains the given string.
Parameters:
- Username: a string.
Sets the Username textbox. This can be used at login.
Parameters:
- Password: a string.
Sets the Password textbox. This can be used at login.
No parameters.
Triggers the login button. This can be used at login.
Parameters:
- URL: a string.
Connects to the custom server with the given URL. This can be used at the server selection page.
Parameters:
- Character: a number.
Selects the given character (0-3). This can be used at the character selection page.
Parameters:
- Name: a string.
FindPanel will search for all the panels whose Name contains the given string.
FindPanel() -- all panels will be listed in variable FINDPANEL
FindPanel("Tracking") -- all panels containing the word Tracking will be listed in variable FINDPANEL
Parameters:
- Panel: a string.
- Name: a string. or
- Panel: a string.
- x: a GUI x coordinate.
- y: a GUI y coordinate.
If Name is provided, FindButton will search within the provided Panel all the buttons whose Name/Tooltip/Command contains the given Name string.
If X and Y are provided, FindButton will search within the provided Panel all the buttons that are clickable at the given GUI coordinates X and Y.
FindButton("CraftingWindow", "favorites")
ClickButton("CraftingWindow", FINDBUTTON[1].NAME)
Parameters:
- PanelName: a string.
- ButtonName: a string.
Trigger a click event on the button having the name specified and contained in the specified panel. Mouse over the button needed, and the ButtonName will be stored in the MOUSEOVERUINAME variable
FindPanel("Tracking")
ClickButton(FINDPANEL[1].ID, "0")
Parameters:
- id: the ObjectID to examine
Gets the tooltip data of an object. Each line of the tooltip is split with a '|' character and stored in the TOOLTIPTEXT variable.
FindItem("Chest")
GetTooltip(FINDITEM[1].ID)
Parameters:
- ContainerName: a string.
- InputName: a string.
- NewValue: a string.
Sets the value of the input having the name specified and contained in the specified panel.
Parameters:
- FrameRate: a number.
Set the given target frame rate.
Parameters:
- VSyncCount: a number.
Set the given target VSync count.
Parameters:
- CameraMask: a number.
Set the given camera mask.
If 0, will competely disable the rendering (CPU and GPU reduced usage).
If -1, will re-enable the rendering (CPU and GPU high usage).
Handy for multiboxing.
Parameters:
- None.
Reset EasyLOU state variables such as FIND variables, etc.
Parameters:
- Key: string, taken from the following list:
"backspace", "delete", "tab", "clear", "return", "pause", "escape", "space", "[0]", "[1]", "[2]", "[3]", "[4]", "[5]", "[6]", "[7]", "[8]", "[9]", "[.]", "[/]", "[*]", "[-]", "[+]", "equals", "enter", "up", "down", "right", "left", "insert", "home", "end", "pageup", "pagedown", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", "=", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "+", "[", "]", "`", "{", "}", "~", ";", "'", "\\", ":", "\", ""|", "", ".", "/", "<", ">", "?", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "numlock", "capslock", "scrolllock", "rightshift", "leftshift", "rightctrl", "leftctrl", "rightalt", "leftalt", "rightcmd", "leftcmd", "rightsuper", "leftsuper", "altgr", "compose", "help", "printscreen", "sysreq", "break", "menu", "power", "euro", "undo"
Register a hotkey that should be listened to.
Parameters:
- Key: string, see RegisterHotKey.
Returns true if the hotkey has been pressed. NOTE: this will fire only once per keypress.
RegisterHotKey("f1")
RegisterHotKey("f2")
RegisterHotKey("f3")
while true do
if OnHotKey("f1") then
Say("Hi")
end
if OnHotKey("f2") then
Say("Hey")
end
if OnHotKey("f3") then
Say("Hello")
end
end
RegisterHotKey("f1")
RegisterHotKey("f2")
RegisterHotKey("f3")
while true do
if OnHotKey("f1") then
CastHealSelf()
end
if OnHotKey("f2") then
CastCureSelf()
end
if OnHotKey("f3") then
CastArchCureSelf()
end
end
Parameters:
- Key: string, see RegisterHotKey.
Returns true if the hotkey is currently being pressed. NOTE: this will keep firing until the key is down.
RegisterHotKey("f1")
RegisterHotKey("f2")
RegisterHotKey("f3")
while true do
if IsHotKeyDown("f1") then
Say("Fire F1!!!")
end
if OnHotKey("f2") then
Say("Fire F2!!!")
end
if OnHotKey("f3") then
Say("Fire F3!!!")
end
end
Parameters:
- ScriptName: string, the name of a script.
Start the script.
Parameters: None.
Start all the scripts.
Parameters:
- ScriptName: string, the name of a script.
Pause the script.
Parameters:
- ScriptName: string, the name of a script.
Stop the script.
Parameters: None.
Stop all the scripts.
Parameters: None.
Stop all the scripts except the current one.