> For the complete documentation index, see [llms.txt](https://changelog.matrixemulator.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://changelog.matrixemulator.com/welcome/luadoc/client-side/functions.md).

# Functions

***

*(Version 2.7)*\ <mark style="color:yellow;">**KeyRepeat(Key)**</mark>\ <mark style="color:orange;">It emulates the event of pressing and holding a specific key.</mark>\ <mark style="color:yellow;">**KeyRelease(Key)**</mark>\ <mark style="color:orange;">It emulates the event of releasing a specific key.</mark>\ <mark style="color:yellow;">**KeyPress(Key)**</mark>\ <mark style="color:orange;">It emulates the event of pressing and releasing a specific key.</mark>\
\
Functions used to emulate keystroke and click events.

***

*(Version 2.7)*\ <mark style="color:yellow;">**CashShopSwitchState()**</mark>\
\
Use this to toggle the CashShop window state between open and closed.

***

*(Version 2.7)*\ <mark style="color:yellow;">**HUD INTERFACE LUA FUNCTIONS:**</mark>\
\
[**CLICK HERE**](https://mega.nz/file/7Qt2TBCZ#xSLwdt7gQ6HOBQrXnkW9vbVsc-frQnsrslAv1K1GCu4) << <mark style="color:red;">Download here 4 examples of HUD interface scripts and their textures</mark><mark style="color:red;">**.**</mark>\
\ <mark style="color:yellow;">**SetExpPosition(PosX, PosY)**</mark>\ <mark style="color:green;">Defines the position of the numbers on the experience bar when you hover your mouse over them.</mark>\ <mark style="color:yellow;">PosX</mark> = Original Position + Custom Position, Float Number.\ <mark style="color:yellow;">PosY</mark> = Original Position + Custom Position, Float Number.\
\ <mark style="color:yellow;">**CheckQuestWarning()**</mark>\ <mark style="color:green;">Check if there are any active quests in the original quest window.</mark>\ <mark style="color:yellow;">Return</mark> = true or false.\
\ <mark style="color:yellow;">**CheckMailWarning()**</mark>\ <mark style="color:green;">Check your inbox for any emails or notifications in the Friends window.</mark>\ <mark style="color:yellow;">Return</mark> = true or false.\
\ <mark style="color:yellow;">**SkillBoxSize(Width, Height)**</mark>\ <mark style="color:green;">Define the skill size.</mark>\ <mark style="color:yellow;">Width</mark> = Original size + Custom size, Float Number.\ <mark style="color:yellow;">Height</mark> = Original size + Custom size, Float Number.\
\ <mark style="color:yellow;">**HudSetLayerDepth(Depth)**</mark>\ <mark style="color:green;">Defines the interface depth, typically changed to lie behind the Chat interface.</mark>\ <mark style="color:yellow;">Depth</mark> = Original Value + Custom Value, Float Number.\
\ <mark style="color:yellow;">**ExpNumber(PosX, PosY, Size)**</mark>\ <mark style="color:green;">Defines the position and size of the number displayed next to the XP bar.</mark>\ <mark style="color:yellow;">PosX</mark> = Original Position + Custom Position, Float Number.\ <mark style="color:yellow;">PosY</mark> = Original Position + Custom Position, Float Number.\ <mark style="color:yellow;">Size</mark> = Original size + Custom size, Float Number.\
\ <mark style="color:yellow;">**ExperienceBar(PosX, PosY, Width, Height)**</mark>\ <mark style="color:green;">Defines the position and size of the Experience bar.</mark>\ <mark style="color:yellow;">PosX</mark> = Float Number.\ <mark style="color:yellow;">PosY</mark> = Float Number.\ <mark style="color:yellow;">Width</mark> = Float Number.\ <mark style="color:yellow;">Height</mark> = Float Number.\
\ <mark style="color:yellow;">**MasterExperienceBar(PosX, PosY, Width, Height)**</mark>\ <mark style="color:green;">Defines the position and size of the Master Experience bar.</mark>\ <mark style="color:yellow;">PosX</mark> = Float Number.\ <mark style="color:yellow;">PosY</mark> = Float Number.\ <mark style="color:yellow;">Width</mark> = Float Number.\ <mark style="color:yellow;">Height</mark> = Float Number.\
\ <mark style="color:yellow;">**QNumberPosition**</mark><mark style="color:yellow;">**(PosX, PosY, Size)**</mark>\ <mark style="color:yellow;">**WNumberPosition**</mark><mark style="color:yellow;">**(PosX, PosY, Size)**</mark>\ <mark style="color:yellow;">**ENumberPosition**</mark><mark style="color:yellow;">**(PosX, PosY, Size)**</mark>\ <mark style="color:yellow;">**RNumberPosition**</mark><mark style="color:yellow;">**(PosX, PosY, Size)**</mark>\ <mark style="color:green;">Defines the location and size of the numbers representing the quantities of potions QWER.</mark>\ <mark style="color:yellow;">PosX</mark> = Original Position + Custom Position, Float Number.\ <mark style="color:yellow;">PosY</mark> = Original Position + Custom Position, Float Number.\ <mark style="color:yellow;">Size</mark> = Original Size + Custom Size, Float Number.\
\ <mark style="color:yellow;">**QButtonPosition**</mark><mark style="color:yellow;">**(PosX, PosY)**</mark>\ <mark style="color:yellow;">**WButtonPosition**</mark><mark style="color:yellow;">**(PosX, PosY)**</mark>\ <mark style="color:yellow;">**EButtonPosition**</mark><mark style="color:yellow;">**(PosX, PosY)**</mark>\ <mark style="color:yellow;">**RButtonPosition**</mark><mark style="color:yellow;">**(PosX, PosY)**</mark>\ <mark style="color:green;">Define the position of the potions QWER.</mark>\ <mark style="color:yellow;">PosX</mark> = Original Position + Custom Position, Float Number.\ <mark style="color:yellow;">PosY</mark> = Original Position + Custom Position, Float Number.\
\ <mark style="color:yellow;">**SetInfoSkillSlot(Slot)**</mark>\ <mark style="color:green;">Specify which skill the information will appear on when you hover your mouse over it.</mark>\ <mark style="color:yellow;">Slot</mark> = Slot number <mark style="color:orange;">\[0 \~ 9]</mark>.\
\ <mark style="color:yellow;">**ToggleSkillList()**</mark>\ <mark style="color:green;">Used to open and close the skill list.</mark>\
\ <mark style="color:yellow;">**SetCurrentSkill(Slot)**</mark>\ <mark style="color:green;">Specify which of the registered skills from 0 to 9 will appear in the slot of the skill currently in use.</mark>\ <mark style="color:yellow;">Slot</mark> = Slot number <mark style="color:orange;">\[0 \~ 9]</mark>.\
\ <mark style="color:yellow;">**GetCurrentSkill()**</mark>\ <mark style="color:green;">Returns the value of the skill that is currently in use.</mark>\ <mark style="color:yellow;">Return</mark> = Skill Number.\
\ <mark style="color:yellow;">**SetCurrentSkillPosition(PosX, PosY)**</mark>\ <mark style="color:green;">Defines the location of the skill in use.</mark>\ <mark style="color:yellow;">PosX</mark> = Float Number.\ <mark style="color:yellow;">PosY</mark> = Float Number.\
\ <mark style="color:yellow;">**SetSkillSlot(Skill, PosX, PosY)**</mark>\ <mark style="color:green;">Define the position for each skill slot from 0 to 9.</mark>\ <mark style="color:yellow;">Skill</mark> = Skill Number.\ <mark style="color:yellow;">PosX</mark> = Float Number.\ <mark style="color:yellow;">PosY</mark> = Float Number.\
\ <mark style="color:yellow;">**GetSkillSlot(Slot)**</mark>\ <mark style="color:green;">Returns the skill number for each slot, from 0 to 9.</mark>\ <mark style="color:yellow;">Slot</mark> = Slot number <mark style="color:orange;">\[0 \~ 9]</mark>.\ <mark style="color:yellow;">Return</mark> = Skill Number.

***

*(Version 2.6)*\ <mark style="color:yellow;">**WindowWidth()**</mark>\
\
Returns the current horizontal resolution.

***

*(Version 2.6)*\ <mark style="color:yellow;">**WindowHeight()**</mark>\
\
Returns the current vertical resolution.

***

*(Version 2.6)*\ <mark style="color:yellow;">**LoadBigImage(Path, ImageID, MaxSize)**</mark>\
\ <mark style="color:yellow;">Path =</mark> Texture absolute path.\ <mark style="color:yellow;">ImageID =</mark> Image ID, "Index".\ <mark style="color:yellow;">MaxSize =</mark> Value of the larger part of the image.\
\
**Usage Example:**

```lua
require "System\\ScriptCore"
require "System\\ScriptDefines"

WellcomeLoad = function()
	LoadBigImage("Interface\\NewRender\\Teste.tga", 400000, 2048)
end

WellcomeWork = function()
	local X = (GetWindowsX() / 2) - 200
	local Y = (GetWindowsY() / 2) - 200

	RenderImage(400000, X, Y, 400, 400, 0, 0, 2048, 2048)
end

BridgeFunctionAttach("LuaLoadImages", "WellcomeLoad")
BridgeFunctionAttach("LuaWork", "WellcomeWork")
```

It loads images larger than those supported by Main.exe; originally, only 1024x1024 images could be loaded.

***

*(Version 2.6)*\ <mark style="color:yellow;">**InvDurab()**</mark>\
\
Returns the durability of the item being pointed to by the cursor.

***

*(Version 2.5)*\ <mark style="color:yellow;">**PlayWavFile(Buffer)**</mark>\
\ <mark style="color:yellow;">Buffer</mark> = Song number in buffer. <mark style="color:orange;">"1 to 1000"</mark>\
\
**Example of use:**

```lua
PlayWavFile(1)
```

Used to play the sound file loaded by the LoadWavFile function.

***

*(Version 2.5)*\ <mark style="color:yellow;">**LoadWavFile(Buffer, wavPath)**</mark>\
\ <mark style="color:yellow;">Buffer</mark> = Song number in buffer. <mark style="color:orange;">"Limit 1 to 1000"</mark>\ <mark style="color:yellow;">wavPath</mark> = Image path on the client.\
\
**Example of use:**

```lua
LoadWavFile(1, "Data\\Custom\\Sound\\Toasty.wav")
```

Used to load sound files in .wav format.\
Use inside LuaLoadWavFile bridge.

***

*(Version 2.5)*\ <mark style="color:yellow;">**UpdateMainIcon(iconPath)**</mark>\
\ <mark style="color:yellow;">iconPath</mark> = Icon path in game folder.\
\
**Example of use:**

```lua
UpdateMainIcon("Data/Custom/Icon/Other.ico")
```

Used to update Main icons.

***

*(Version 2.5)*\ <mark style="color:yellow;">**GetMyClassType()**</mark>\
\ <mark style="color:red;">0 = \[Dark Wizard, Soul Master, Grand Master]</mark>\ <mark style="color:red;">1 = \[Dark Knight, Blade Knight, Blade Master]</mark>\ <mark style="color:red;">2 = \[Fairy Elf, Muse Elf, High Elf]</mark>\ <mark style="color:red;">3 = \[Magic Gradiator, Duel Master]</mark>\ <mark style="color:red;">4 = \[Dark Lord, Lord Emperor]</mark>\ <mark style="color:red;">5 = \[Summoner, Bloody Summoner, Dimension Master]</mark>\ <mark style="color:red;">6 = \[Rage Fighter, First Master]</mark>\
\
Returns the character's class number.

***

*(Version 2.5)*\ <mark style="color:yellow;">**RenderGLText(Size, PosX, PosY, TR, TG,  TB, TA, BR, BG, BB, BA, Count, Align, Text)**</mark>\
\ <mark style="color:yellow;">Size</mark> = Text size. <mark style="color:orange;">"1 \~ 100"</mark>\ <mark style="color:yellow;">PosX</mark> = X position of the text in relation to the screen.\ <mark style="color:yellow;">PosY</mark> = Y position of the text in relation to the screen.\ <mark style="color:yellow;">TR</mark> = Red text color for RGB set. <mark style="color:orange;">"0 \~ 255"</mark>\ <mark style="color:yellow;">TG</mark> = Green text color for RGB set. <mark style="color:orange;">"0 \~ 255"</mark>\ <mark style="color:yellow;">TB</mark> = Blue text color for RGB set. <mark style="color:orange;">"0 \~ 255"</mark>\ <mark style="color:yellow;">TA</mark> = Alpha transparency of text. <mark style="color:orange;">"0 \~ 255"</mark>\ <mark style="color:yellow;">BR</mark> = Red shadow color for RGB set. <mark style="color:orange;">"0 \~ 255"</mark>\ <mark style="color:yellow;">BG</mark> = Green shadow color for RGB set. <mark style="color:orange;">"0 \~ 255"</mark>\ <mark style="color:yellow;">BB</mark> = Blue shadow color for RGB set. <mark style="color:orange;">"0 \~ 255"</mark>\ <mark style="color:yellow;">BA</mark> = Alpha transparency of the shadow. <mark style="color:orange;">"0 \~ 255"</mark>\ <mark style="color:yellow;">Count</mark> = Text space size.\ <mark style="color:yellow;">Align</mark> = Aligns text within the space. <mark style="color:orange;">"1 to Left | 3 to Center | 4 to Right"</mark>\ <mark style="color:yellow;">Text</mark> = Text.\
\
**Example of use:**

```lua
require "System\\ScriptCore"
require "System\\ScriptDefines"

CustomGLTextWork = function()
	local X = (GetWindowsX() / 2) - (300 / 2)
	local Y = (GetWindowsY() / 2) - 150
	local time = GetTickCount() * 0.002

	for i = 0, 9 do
		local r = math.floor(128 + 127 * math.sin(time + i * 0.6))
		local g = math.floor(128 + 127 * math.sin(time + i * 0.6 + 2))
		local b = math.floor(128 + 127 * math.sin(time + i * 0.6 + 4))

		local text = string.format("Line %d - New Function RenderGLText()!", i + 1)
		RenderGLText(12 + i, X, Y + (i * 25), r, g, b, 255, 0, 0, 0, 255, 300, 3, text)
	end
end

BridgeFunctionAttach("LuaWork", "CustomGLTextWork")
```

***

*(Version 2.5)*\ <mark style="color:yellow;">**PrintQRCode(StartX, StartY, SizeXY, URL)**</mark>\
\ <mark style="color:yellow;">StartX</mark> = X position of the QRCode in relation to the screen.\ <mark style="color:yellow;">StartY</mark> = Y position of the QRCode in relation to the screen.\ <mark style="color:yellow;">SizeXY</mark> = QRCode frame X and Y size.\ <mark style="color:yellow;">URL</mark> = Website URL, Optional Text, or Pix Payment Link "Copy and Paste".\
\
**Example of use:**

```
Generate a QRCode that redirects to the Matrix Emulator 
website at position 100x100 on the screen with 
a size of 150px in X and Y.
```

```lua
PrintQRCode(100, 100, 150, "https://www.matrixemulator.com");
```

***

*(Version 2.4)*\ <mark style="color:yellow;">**SaveScreen()**</mark>\
\
Saves a screenshot, same function as the print screen key.

***

*(Version 2.4)*\ <mark style="color:yellow;">**EarthQuakeEffect(Rand)**</mark>\
\ <mark style="color:yellow;">Rand</mark> = Sequential random value that determines the power of the earthquake.\
\
This function creates the earthquake effect, the same effect used by the Horse or Kundun skill.

***

*(Version 2.4)*\ <mark style="color:yellow;">**RotateImage2(Texture, PosX, PosY, Size, RSize, Rotate)**</mark>\
\ <mark style="color:yellow;">Texture</mark> = Move.txt line.\ <mark style="color:yellow;">PosX</mark> = X position of the image on the screen.\ <mark style="color:yellow;">PosY</mark> = Y position of the image on the screen.\ <mark style="color:yellow;">Size</mark> = Desired size of the image on the screen, remembering that the image needs to be exactly square!\ <mark style="color:yellow;">RSize</mark> = Actual size of the image, remembering that the image must be exactly square.\ <mark style="color:yellow;">Rotate</mark> = Rotation value.\
\ <mark style="color:orange;">"Size limit of 1024x1024"</mark>\
\
Function used to rotate an image on the screen, commonly used to create roulettes.

***

*(Version 2.4)*\ <mark style="color:yellow;">**MapMoveSend(Move)**</mark>\
\ <mark style="color:yellow;">Move</mark> = Move.txt line.\
\
Sends the character to the Gate configured in the line.

***

*(Version 2.4)*\ <mark style="color:yellow;">**StartMuHelper()**</mark>\
\
Starts MuHelper if it is paused.

***

*(Version 2.4)*\ <mark style="color:yellow;">**StopMuHelper()**</mark>\
\
Pauses MuHelper if it is active.

***

*(Version 2.4)*\ <mark style="color:yellow;">**CheckMuHelper()**</mark>\
\
Checks if MuHelper is active.\
\
Returns 1 for active and 0 for inactive.

***

*(Version 2.4)*\ <mark style="color:yellow;">**ShowNames()**</mark>\
\
Function used to show all the names of the characters on the screen.

***

*(Version 2.4)*\ <mark style="color:yellow;">**HideNames()**</mark>\
\
Function used to hide all character names on screen.

***

*(Version 2.4)*\ <mark style="color:yellow;">**GetTextSize(String)**</mark>\
\ <mark style="color:yellow;">String</mark> = Text passed for size calculation.\
\
Returns the actual size of the text in pixels.\
\
**Example of use:**

```lua
local size = GetTextSize("Hello Word!")

local w = size.x
local h = size.y

LogText(3, string.format("Width: %d, Height: %d", w, h))
```

***

*(Version 2.4)*\ <mark style="color:yellow;">**CharIndex()**</mark>\
\
Returns your own character's Index.

***

*(Version 2.4)*\ <mark style="color:yellow;">**SetAutoMove(X, Y)**</mark>\
\ <mark style="color:yellow;">X</mark> = Coordinate X character's destiny.\ <mark style="color:yellow;">**Y**</mark> = Coordinate Y character's destiny.\
\ <mark style="color:orange;">Starts the character's AutoMove to the coordinates passed in the function.</mark>

***

*(Version 2.4)*\ <mark style="color:yellow;">**CancelAutoMove()**</mark>\
\
Cancels AutoMove if it is running.\\

***

*(Version 2.4)*\ <mark style="color:yellow;">**CheckAutoMove()**</mark>\
\
&#x20;<mark style="color:green;">Check if AutoMove is running.</mark>\\

\
Returns 1 for running or 0 for not.

***

*(Version 2.3)*\ <mark style="color:yellow;">**CUSTOM MENU FUNCTIONS:**</mark>\
\ <mark style="color:yellow;">**CheckAutoPotion()**</mark> <mark style="color:green;">Check if Auto Potion is active.</mark>\ <mark style="color:yellow;">**CheckAutoCtrl()**</mark> <mark style="color:green;">Check if Auto Ctrl is active.</mark>\ <mark style="color:yellow;">**CheckAmountZen()**</mark> <mark style="color:green;">Check if Amount Zen is active.</mark>\ <mark style="color:yellow;">**CheckViewEquipment()**</mark> <mark style="color:green;">Check if View Equipment is active.</mark>\ <mark style="color:yellow;">**CheckShadowEffect()**</mark> <mark style="color:green;">Check if Shadow Effect is active.</mark>\ <mark style="color:yellow;">**CheckGlowEffect()**</mark> <mark style="color:green;">Check if Glow Effect is active.</mark>\ <mark style="color:yellow;">**CheckSkillEffect()**</mark> <mark style="color:green;">Check if Skill Effect is active.</mark>\ <mark style="color:yellow;">**CheckDynamicEffect()**</mark> <mark style="color:green;">Check if Dynamic Effect is active.</mark>\ <mark style="color:yellow;">**CheckStaticEffect()**</mark> <mark style="color:green;">Check if Static Effect is active.</mark>\
\
All functions return 0 for off and 1 for on.

***

*(Version 2.3)*\ <mark style="color:yellow;">**CheckCustomWindow(Window)**</mark>\
\ <mark style="color:yellow;">Window</mark> = Custom window value. <mark style="color:orange;">"1 to 3"</mark>\
\ <mark style="color:red;">1 = Custom Command Window.</mark>\ <mark style="color:red;">2 = Custom Event Window.</mark>\ <mark style="color:red;">3 = Custom Ranking Window.</mark>\
\
Returns 0 for closed and 1 for open.

***

*(Version 2.3)*\ <mark style="color:yellow;">**SetDeleteFile(Path, Action)**</mark>\
\ <mark style="color:yellow;">Path</mark> = Path where the file is located.\ <mark style="color:yellow;">Action:</mark>\
0 = Continues opening main after deletion.\
1 = Closes main with warning after deletion.\
\
**Example of use:**

```lua
require "System\\ScriptCore"

function LuaFilePath()
	local FileName = "./Lua/JewelBank.Matrix"

	SetDeleteFile(FileName, 1) -- 0 tocontinue or 1 to exitprocess.
end

BridgeFunctionAttach("LuaEntryProc", "LuaFilePath")
```

***

*(Version 2.3)*\ <mark style="color:yellow;">**OFICIAL MU HELPER LUA FUNCTIONS:**</mark>\
\
[**CLICK HERE**](https://mega.nz/file/yFFXwZoC#eicFn-aeF-m4Soyjuu0v75g3MgV8yUphsA7lp114yHc) << <mark style="color:red;">**Download the script with all functions using default values ​​here.**</mark>\
\ <mark style="color:yellow;">**AddHelperPage(Amount, PosX, PosY)**</mark>\ <sup><mark style="color:green;">Defines the number and position of page selection buttons.<mark style="color:green;"></sup>\ <mark style="color:yellow;">Amount</mark> = Amount of pages. <mark style="color:orange;">"1 or 2"</mark>\
\ <mark style="color:yellow;">**MuHelperAddTitleWindow(PosX, PosY, Width, Align)**</mark>\ <sup><mark style="color:green;">Sets the position, size and alignment of the title.<mark style="color:green;"></sup>\ <mark style="color:yellow;">**Align**</mark> = Title Align. <mark style="color:orange;">"1 = left, 3 = center, 4 = right"</mark>\
\ <mark style="color:yellow;">**MuHelperAddWindow(Index, Image, PosX, PosY, Width, Height, MapX, MapY, RealW, RealH)**</mark>\ <sup><mark style="color:green;">Sets positions and dimensions of images used for the window.<mark style="color:green;"></sup>\ <mark style="color:yellow;">Index</mark> = Render Window Index. <mark style="color:orange;">"0 to 4"</mark>\ <mark style="color:yellow;">Image</mark> = Texture ID.\
\ <mark style="color:yellow;">**MuHelperAddRenderBox(Index, State, PosX, PosY, Width, Height)**</mark>\ <sup><mark style="color:green;">Refine positions and dimensions of the boxes that separate the information in the window.<mark style="color:green;"></sup>\ <mark style="color:yellow;">Index</mark> = Render Box Index. <mark style="color:orange;">"0 to 9"</mark>\ <mark style="color:yellow;">State</mark> = <mark style="color:orange;">"0 = Disable, 1 = Enable"</mark>\
\ <mark style="color:yellow;">**MuHelperAddTextMap(Index, State, PosX, PosY)**</mark>\ <sup><mark style="color:green;">Sets the position of the window texts.<mark style="color:green;"></sup>\ <mark style="color:yellow;">Index</mark> = Render Text Index. <mark style="color:orange;">"0 to 10"</mark>\ <mark style="color:yellow;">State</mark> = <mark style="color:orange;">"0 = Disable, 1 = Enable"</mark>\
\ <mark style="color:yellow;">**MuHelperAddButtonMap(Index, State, PosX, PosY)**</mark>\ <sup><mark style="color:green;">Sets the position of the window buttons.<mark style="color:green;"></sup>\ <mark style="color:yellow;">Index</mark> = Render Button Index. <mark style="color:orange;">"0 to 15"</mark>\ <mark style="color:yellow;">State</mark> = <mark style="color:orange;">"0 = Disable, 1 = Enable"</mark>\
\ <mark style="color:yellow;">**MuHelperAddRangeNumber(Index, State, PosX, PosY)**</mark>\ <sup><mark style="color:green;">Sets the position of the Hunting and Obtaining range numbers.<mark style="color:green;"></sup>\ <mark style="color:yellow;">Index</mark> = Range Number Index. <mark style="color:orange;">"0 to 1"</mark>\ <mark style="color:yellow;">State</mark> = <mark style="color:orange;">"0 = Disable, 1 = Enable"</mark>\
\ <mark style="color:yellow;">**MuHelperAddCheckBoxMap(Index, State, PosX, PosY)**</mark>\ <sup><mark style="color:green;">Sets the position of the check boxes.<mark style="color:green;"></sup>\ <mark style="color:yellow;">Index</mark> = Render Checkbox Index. <mark style="color:orange;">"0 to 27"</mark>\ <mark style="color:yellow;">State</mark> = <mark style="color:orange;">"0 = Disable, 1 = Enable"</mark>\
\ <mark style="color:yellow;">**MuHelperAddTextInputMap(Index, Sate, PosX, PosY)**</mark>\ <sup><mark style="color:green;">Sets the position of text input boxes.<mark style="color:green;"></sup>\ <mark style="color:yellow;">Index</mark> = Render Input Text Index. <mark style="color:orange;">"0 to 3"</mark>\ <mark style="color:yellow;">State</mark> = <mark style="color:orange;">"0 = Disable, 1 = Enable"</mark>\
\ <mark style="color:yellow;">**MuHelperAddSelectSkill(Index, State, PosX PosY)**</mark>\ <sup><mark style="color:green;">Sets the position of the skill and buff selectors.<mark style="color:green;"></sup>\ <mark style="color:yellow;">Index</mark> = Select Skill Index. <mark style="color:orange;">"0 to 5"</mark>\ <mark style="color:yellow;">State</mark> = <mark style="color:orange;">"0 = Disable, 1 = Enable"</mark>\
\ <mark style="color:yellow;">**MuHelperAddPickList(State, PosX, PosY, Width, Height, Amount)**</mark>\ <sup><mark style="color:green;">Define the position, size, and number of rows in the item collection list.<mark style="color:green;"></sup>\ <mark style="color:yellow;">State</mark> = <mark style="color:orange;">"0 = Disable, 1 = Enable"</mark>\ <mark style="color:yellow;">Amount</mark> = Amount Render Lines.

***

*(Version 2.3)*\ <mark style="color:yellow;">**UserRuneEffect(Object, ImageID, Size, ColorR, ColorG, ColorB, Speed)**</mark>\
\ <mark style="color:yellow;">Object</mark> = Object Table. <mark style="color:orange;">"Need to pass the table coming from the LuaRuneEffect() bridge"</mark>\ <mark style="color:yellow;">ImageID</mark> = Texture ID. <mark style="color:orange;">"It is advisable to use an OZJ image with a size of 256x256"</mark>\ <mark style="color:yellow;">Size</mark> = Image Size. <mark style="color:orange;">"Default size is 1.0"</mark>\ <mark style="color:yellow;">ColorR</mark> = RGB set <mark style="color:red;">**red**</mark> color.\ <mark style="color:yellow;">ColorG</mark> = RGB set <mark style="color:green;">**green**</mark> color.\ <mark style="color:yellow;">ColorB</mark> = RGB set <mark style="color:blue;">**blue**</mark> color.\ <mark style="color:yellow;">Speed</mark> = Rotation speed. <mark style="color:orange;">"Negative value makes it rotate in the opposite direction"</mark>\
\ <mark style="color:red;">ImageID is Integer number.</mark>\ <mark style="color:red;">Size is float number.</mark>\ <mark style="color:red;">Color R, G and B is float number.</mark>\ <mark style="color:red;">Speed is float number.</mark>\
\
**Example of use within the bridge:**

```lua
require "System\\ScriptCore"

function RuneEffect(Character)
        if Character.Armor == 4196 then
                UserRuneEffect(Character.Object, 700118, 2.0, 0.1, 0.5, 0.0, 0.5)
        end
end

BridgeFunctionAttach("LuaRuneEffect", "RuneEffect")
```

***

<mark style="color:yellow;">**GetCtrlCode()**</mark>\
\
Returns 0 for player, 8 for GM and 32 for ADM, values ​​above 0 only for positions with SIGN.

***

<mark style="color:yellow;">**GetItemName(Index, Level)**</mark>

<mark style="color:yellow;">Index</mark> = Calculated Item Index - ((Section x 512) + Line).\ <mark style="color:yellow;">Level</mark> = Item Level - (0 \~ 15).\
\
Returns the item name as a string.

***

<mark style="color:yellow;">**LoginBoxOn()**</mark>\
\
Returns 1 for visible LoginBox and 0 for not visible.

***

<mark style="color:yellow;">**SetFontValue(Size)**</mark>\
\ <mark style="color:yellow;">Size</mark> = Minimum 0, Maximum 10.\
\
Change the game font size to make it larger than the original size.

***

<mark style="color:yellow;">**GetWingSlotEx()**</mark>\
\
Returns the index of the visual item that is in use in the visual inventory wing slot, or returns -1 for empty.

***

<mark style="color:yellow;">**GetSwordSlotEx()**</mark>\
\
Returns the index of the visual item that is in use in the visual inventory sword slot, or returns -1 for empty.

***

<mark style="color:yellow;">**GetShieldSlotEx()**</mark>\
\
Returns the index of the visual item that is in use in the visual inventory shield slot, or returns -1 for empty.

***

<mark style="color:yellow;">**GetHelmSlotEx()**</mark>\
\
Returns the index of the visual item that is in use in the visual inventory helm slot, or returns -1 for empty.

***

<mark style="color:yellow;">**GetArmorSlotEx()**</mark>\
\
Returns the index of the visual item that is in use in the visual inventory armor slot, or returns -1 for empty.

***

<mark style="color:yellow;">**GetPantsSlotEx()**</mark>\
\
Returns the index of the visual item that is in use in the visual inventory pants slot, or returns -1 for empty.

***

<mark style="color:yellow;">**GetGlovesSlotEx()**</mark>\
\
Returns the index of the visual item that is in use in the visual inventory gloves slot, or returns -1 for empty.

***

<mark style="color:yellow;">**GetBootsSlotEx()**</mark>\
\
Returns the index of the visual item that is in use in the visual inventory boots slot, or returns -1 for empty.

***

<mark style="color:yellow;">**GetRingLeft()**</mark>\
\
Returns the index of the item that is in the Left Ring slot, returns -1 for empty.

***

<mark style="color:yellow;">**GetRingRight()**</mark>\
\
Returns the index of the item that is in the Right Ring slot, returns -1 for empty.

***

<mark style="color:yellow;">**GetPendantSlot()**</mark>\
\
Returns the index of the item that is in the pendant slot, returns -1 for empty.

***

<mark style="color:yellow;">**GetInventoryPage()**</mark>\
\
Returns 0 for normal inventory and 1 for visual inventory.

***

<mark style="color:yellow;">**GetHardwareId()**</mark>\
\
Returns the HardwareID of the computer obtained when Main.exe was launched.

***

<mark style="color:yellow;">**GetAnimationID()**</mark>\
\
Returns the ID of movement, standing, walking, attacking, swimming, etc...

***

<mark style="color:yellow;">**GetDyingTime()**</mark>\
\
Returns the time it takes between dying and being reborn.

***

<mark style="color:yellow;">**PlayerTarget()**</mark>\
\
Returns the Player index if the mouse is over it, otherwise it returns -1.

***

<mark style="color:yellow;">**GetNumberWindows()**</mark>\
\
Returns the number of original open windows.\
\
Example:\
\
If the inventory is open it will return 1.\
If the inventory and store are open, it will return 2.\
\
Returns 4 for the windows: SkillTree, FullMap and CashShop.

***

<mark style="color:yellow;">**GetTickCount()**</mark>\
\
Measure elapsed time in simple scenarios and Create basic timers or breaks.\
\
Windows API function that returns the number of milliseconds that have elapsed since the system started.

***

<mark style="color:yellow;">**GetSelectedName()**</mark>\
\
Returns the name of the character that was selected on the character selection screen.

***

<mark style="color:yellow;">**GetSelectedClass()**</mark>\
\
Returns the class number of the character that was selected on the character selection screen.

***

<mark style="color:yellow;">**SetCharDirection(Slot, Direction)**</mark>\
\ <mark style="color:yellow;">Slot</mark> = Character slot on the selection screen, 0 \~ 4.\ <mark style="color:yellow;">Direction</mark> = Character rotation, direction relative to the map, 0 \~ 360.\
\
Changes the character's direction on the character selection screen, its slot and rotation value.

***

<mark style="color:yellow;">**GetCharDirection(Slot)**</mark>\
\ <mark style="color:yellow;">Slot</mark> = Character slot on the selection screen, 0 \~ 4.\
\
Returns the character's direction on the character selection screen by setting the slot.

***

<mark style="color:yellow;">**SetSelectedChar(Slot)**</mark>\
\ <mark style="color:yellow;">Slot</mark> = Character slot on the selection screen, 0 \~ 4.\
\
Select a character from the character selection screen by setting the slot number.

***

<mark style="color:yellow;">**GetSelectedChar()**</mark>\
\
Returns the slot of the character that was selected on the character selection screen.

***

<mark style="color:yellow;">**IntDescriptionValue(INT,  Value)**</mark>\
\ <mark style="color:yellow;">INT</mark> = Number value according to the CustomItemDescription line.\ <mark style="color:yellow;">Value</mark> = Value to be set in the syntax.\
\
It can be used to create a weapon kill counter, or a new custom option on a specific item.\
\
Adds an integer numerical value to the variable in the INT column of CustomItemDescription.txt

***

<mark style="color:yellow;">**IsBuffPoison()**</mark>\
\
Returns true if the character is poisoned.

***

<mark style="color:yellow;">**ViewCurBP()**</mark>\
\
Returns the character's current BP value.

***

<mark style="color:yellow;">**ViewMaxBP()**</mark>\
\
Returns the character's maximum BP value.

***

<mark style="color:yellow;">**ViewCurSD()**</mark>\
\
Returns the character's current SD value.

***

<mark style="color:yellow;">**ViewMaxSD()**</mark>\
\
Returns the character's maximum SD value.

***

<mark style="color:yellow;">**ViewCurMP()**</mark>\
\
Returns the character's current MP value.

***

<mark style="color:yellow;">**ViewMaxMP()**</mark>\
\
Returns the character's maximum MP value.

***

<mark style="color:yellow;">**ViewCurHP()**</mark>\
\
Returns the character's current HP value.

***

<mark style="color:yellow;">**ViewMaxHP()**</mark>\
\
Returns the character's maximum HP value.

***

<mark style="color:yellow;">**NewSkillInstance()**</mark>\
\
Used to check whether skills from the second layer were selected.\
\
Returns false for the first layer and true for the second layer.

***

<mark style="color:yellow;">**GetAllKeysInSection(Section, FileName)**</mark>\
\ <mark style="color:yellow;">Section</mark> = Section Name.\ <mark style="color:yellow;">FileName</mark> = INI file path.\
\
Used to get all keys (and possibly their values) from a specific section in an .ini file.\
\
Returns the table with all keys.

***

<mark style="color:yellow;">**RemovePrivateProfileSectionA(Section, FileName)**</mark>\
\ <mark style="color:yellow;">Section</mark> = Name of the section to be removed.\ <mark style="color:yellow;">FileName</mark> = INI file path.\
\
Used to remove an entire section from an .ini file.\
\
Returns true (1) if the operation succeeds, or false (0) if it fails.

***

<mark style="color:yellow;">**RemovePrivateProfileKeyA(Section, Key, FileName)**</mark>\
\ <mark style="color:yellow;">Section</mark> = Section Name.\ <mark style="color:yellow;">Key</mark> = Name of the key to be removed.\ <mark style="color:yellow;">FileName</mark> = INI file path.\
\
Designed to remove a specific key from a section within an .ini file.\
\
Returns true (1) if the operation succeeds, or false (0) if it fails.

***

<mark style="color:yellow;">**WritePrivateProfileString(Section, Key, Value, FileName)**</mark>\
\ <mark style="color:yellow;">Section</mark> = Section Name.\ <mark style="color:yellow;">Key</mark> = Key Name.\ <mark style="color:yellow;">Value</mark> = Value to be written.\ <mark style="color:yellow;">FileName</mark> = INI file path.\
\
This function is used to save settings or data in a simple and accessible way for the program, storing the information in a .ini text format.\
\
Returns TRUE if the operation was successful, or FALSE if it failed.

***

<mark style="color:yellow;">**GetPrivateProfileIntA(Section, Key, DefaultValue, FileName)**</mark>\
\ <mark style="color:yellow;">Section</mark> = Section Name.\ <mark style="color:yellow;">Key</mark> = Key Name.\ <mark style="color:yellow;">DefaultValue</mark> = Default value if key is not found.\ <mark style="color:yellow;">FileName</mark> = INI file path.\
\
int value = GetPrivateProfileIntA("SaveAccount", "Passw1", -1, "./Settings.ini");\
\
Returns the integer value associated with the specified key within the section. If the key is not found, the function returns nDefault.

***

<mark style="color:yellow;">**GetPrivateProfileStringA(Section, Key, DefaultValue, FileName)**</mark>\
\ <mark style="color:yellow;">Section</mark> = Section Name.\ <mark style="color:yellow;">Key</mark> = Key Name.\ <mark style="color:yellow;">DefaultValue</mark> = Default value if key is not found.\ <mark style="color:yellow;">FileName</mark> = INI file path.\
\
char buffer\[256];\
GetPrivateProfileStringA("SaveAccount", "Login1", "Empy", buffer, sizeof(buffer), "./Settings.ini");\
\
Returns the number of characters written to the buffer, including the terminating null character ('\0'). If the key is not found, the default value is returned and the buffer is filled with this string. If the section or key does not exist, the function returns the default value size.

***

<mark style="color:yellow;">**GetMonsterName(Monster)**</mark>\
\ <mark style="color:yellow;">Monster</mark> = Monster index.\
\
Return monster name.

***

<mark style="color:yellow;">**LockPlayerWalk()**</mark>\
\
if Condition == true then \
&#x20;       LockPlayerWalk() \
end\
\
When called this function blocks the character's walking

***

<mark style="color:yellow;">**UnlockPlayerWalk()**</mark>\
\
if Condition == true then \
&#x20;       UnlockPlayerWalk() \
end\
\
When called this function unlocks the character's floor

***

<mark style="color:yellow;">CharGetGuildName()</mark>\
\
Returns the character's guild name.

***

<mark style="color:yellow;">**GetPetSlot()**</mark>\
\
Returns the index of the Pet slot.

***

<mark style="color:yellow;">**GetWingSlot()**</mark>\
\
Returns the index of the Wing Slot.

***

<mark style="color:yellow;">**GetSwordSlot()**</mark>\
\
Returns the index of the Sword Slot.

***

<mark style="color:yellow;">**GetShieldSlot()**</mark>\
\
Returns the index of the Shield Slot.

***

<mark style="color:yellow;">**GetHelmSlot()**</mark>\
\
Returns the index of the Helm Slot.

***

<mark style="color:yellow;">**GetArmorSlot()**</mark>\
\
Returns the index of the Armor Slot.

***

<mark style="color:yellow;">**GetPantsSlot()**</mark>\
\
Returns the index of the Pants Slot.

***

<mark style="color:yellow;">**GetGlovesSlot()**</mark>\
\
Returns the index of the Gloves Slot.

***

<mark style="color:yellow;">**GetBootsSlot()**</mark>\
\
Returns the index of the Boots Slot.

***

<mark style="color:yellow;">**GetSpecialCode()**</mark>\
\
Returns the account's SpecialCode.

***

<mark style="color:yellow;">**RenderMixEffect(PosX, PosY, SizeX, SizeY)**</mark>\
\ <mark style="color:yellow;">PosX</mark> = X position of the effect on the screen.\ <mark style="color:yellow;">PosY</mark> = Y position of the effect on the screen.\ <mark style="color:yellow;">SizeX</mark> = Number of spaces in an inventory horizontally.\ <mark style="color:yellow;">SizeY</mark> = Number of spaces in a vertical inventory.\
\
Renders the mix effect.

***

<mark style="color:yellow;">**RotateImage(Index, PosX, PosY, Width, Height, Rotate, MapX, MapY, SizeX, SizeY)**</mark>\
\ <mark style="color:yellow;">Index</mark> = Image index.\ <mark style="color:yellow;">PosX</mark> = X position of the image on the screen.\ <mark style="color:yellow;">PosY</mark> = Y position of the image on the screen.\ <mark style="color:yellow;">Width</mark> = Image width.\ <mark style="color:yellow;">Height</mark> = Image height.\ <mark style="color:yellow;">Rotate</mark> = Image rotation 0\~360.\ <mark style="color:yellow;">MapX</mark> = X mapping of the image.\ <mark style="color:yellow;">MapY</mark> = Y mapping of the image.\ <mark style="color:yellow;">SizeX</mark> = Actual image width.\ <mark style="color:yellow;">SizeY</mark> = Actual image height.\
\
Renders an image with 360 rotation option.

***

<mark style="color:yellow;">**RenderMonsterSkin(Index, PosX, PosY, Width, Height, Size, Rotation)**</mark>\
\ <mark style="color:yellow;">Index</mark> = Monster index.\ <mark style="color:yellow;">PosX</mark> = X position of the image on the screen.\ <mark style="color:yellow;">PosY</mark> = Y position of the image on the screen.\ <mark style="color:yellow;">Width</mark> = Width of the rendering space.\ <mark style="color:yellow;">Height</mark> = Height of the rendering space.\ <mark style="color:yellow;">Size</mark> = Size of the monster within the render space.\ <mark style="color:yellow;">Rotation</mark> = Monster rotation.\
\
Renders a monster on screen.

***

<mark style="color:yellow;">**MouseWheel(Using)**</mark>\
\ <mark style="color:yellow;">Using</mark> = Sends to the function if the mouse is rotating.\
\
local wheelDelta = MouseWheel(0)

if wheelDelta < 0 then \
&#x20;       MouseWheel(1) \
end\
\
if wheelDelta > 0 then \
&#x20;       MouseWheel(1) \
end\
\
Gets and returns the value of MouseWheel

***

<mark style="color:yellow;">**MyCoordX()**</mark>\
\
Returns the character's X coordinate.

***

<mark style="color:yellow;">**MyCoordY()**</mark>\
\
Returns the character's Y coordinate.

***

<mark style="color:yellow;">**WindowName(String)**</mark>\
\ <mark style="color:yellow;">String</mark> = Text.\
\
**Dynamic Example:** \
Dynamic Example: WindowName(string.format("Disponible Points: %d", LevelPoint()))\
\
Static Example: WindowName("Welcome to Matrix Emulator")\
\
Adds information to the Windows window. "Add inside a LuaWork function if the information is dynamic, if it is static add inside a LuaEntryProc function"

***

<mark style="color:yellow;">**LogText(Color, String)**</mark>\
\ <mark style="color:yellow;">Color</mark> = Color. <mark style="color:orange;">"0 to 7"</mark>\ <mark style="color:yellow;">String</mark> = Text.\
\ <mark style="color:red;">LogText(0, "Text")</mark> \ <mark style="color:red;">LogText(1, string.format("Text: %d", ValueNumber))</mark> \ <mark style="color:red;">LogText(2, string.format("Text: %s", ValueText))</mark>\
\
Add text logs in the Console.\
Use in conjunction with ConsoleOn(1).

***

<mark style="color:yellow;">**SceneFlag()**</mark>\
\
Return to the scene (2 - SelectServer | 4 - SelectCharacter | 5 - InGame).

***

<mark style="color:yellow;">**RenderImage(Image, PosX, PosY, Width, Height, MapX, MapY, SizeX, SizeY)**</mark>\
\ <mark style="color:yellow;">Image</mark> = Image index.\ <mark style="color:yellow;">PosX</mark> = X position of the image on the screen.\ <mark style="color:yellow;">PosY</mark> = Y position of the image on the screen.\ <mark style="color:yellow;">Width</mark> = Image width.\ <mark style="color:yellow;">Height</mark> = Image height.\ <mark style="color:yellow;">MapX</mark> = X mapping of the image.\ <mark style="color:yellow;">MapY</mark> = Y mapping of the image.\ <mark style="color:yellow;">SizeX</mark> = Actual image width.\ <mark style="color:yellow;">SizeY</mark> = Actual image height.\
\
Renders an image on the screen.

***

<mark style="color:yellow;">**GetWindowsX()**</mark>\
\
Returns the actual horizontal size of the screen.

***

<mark style="color:yellow;">**GetWindowsY()**</mark>\
\
Returns the actual vertical size of the screen.

***

<mark style="color:yellow;">**MouseX()**</mark>\
\
Returns Mouse movement in the X direction of the screen.

***

<mark style="color:yellow;">**MouseY()**</mark>\
\
Returns Mouse movement in the Y direction of the screen.

***

<mark style="color:yellow;">**RenderText(PositionX, PositionY, TextColorR, TextColorG, TextColorB, TextAlpha, BGColorR, BGColorG, BGColorB, BGAlpha, TextWidth, TextAlign, Text)**</mark>\
\ <mark style="color:yellow;">PositionX</mark> = X position of the text on the screen.\ <mark style="color:yellow;">PositionY</mark> = Y position of the text on the screen.\ <mark style="color:yellow;">TextColorR</mark> = Red color of the text, to form RGB+Alpha.\ <mark style="color:yellow;">TextColorG</mark> = Green color of the text, to form RGB+Alpha.\ <mark style="color:yellow;">TextColorB</mark> = Blue color of the text, to form RGB+Alpha.\ <mark style="color:yellow;">TextAlpha</mark> = Alpha transparency of the text, to form RGB+Alpha.\ <mark style="color:yellow;">BGColorR</mark> = Red text background color, to form RGB+Alpha.\ <mark style="color:yellow;">BGColorG</mark> = Green text background color, to form RGB+Alpha.\ <mark style="color:yellow;">BGColorB</mark> = Blue text background color, to form RGB+Alpha.\ <mark style="color:yellow;">BGAlpha</mark> = Alpha transparency of the text background, to form RGB+Alpha.\ <mark style="color:yellow;">TextWidth</mark> = Text space width.\ <mark style="color:yellow;">TextAlign</mark> = Text alignment (1 - Left | 3 - Center | 4 - Right)\ <mark style="color:yellow;">Text</mark> = Text.\
\
RenderText(10, 10, 255, 0, 0, 255, 0, 0, 0, 255, 190, 3, "Text example")\
\
Renders simple text on the screen.

***

<mark style="color:yellow;">**CustomText(FontType, FontSize, PositionX, PositionY, TextColorR, TextColorG, TextColorB, TextAlpha, BGColorR, BGColorG, BGColorB, BGAlpha, TextWidth, TextAlign, Text)**</mark>\
\ <mark style="color:yellow;">FontType</mark> = 0 - Font Normal | 1 - Font Bold.\ <mark style="color:yellow;">FontSize</mark> = 8 \~ 20 or 30.\ <mark style="color:yellow;">PositionX</mark> = X position of the text on the screen.\ <mark style="color:yellow;">PositionY</mark> = Y position of the text on the screen.\ <mark style="color:yellow;">TextColorR</mark> = Red color of the text, to form RGB+Alpha.\ <mark style="color:yellow;">TextColorG</mark> = Green color of the text, to form RGB+Alpha.\ <mark style="color:yellow;">TextColorB</mark> = Blue color of the text, to form RGB+Alpha.\ <mark style="color:yellow;">TextAlpha</mark> = Alpha transparency of the text, to form RGB+Alpha.\ <mark style="color:yellow;">BGColorR</mark> = Red text background color, to form RGB+Alpha.\ <mark style="color:yellow;">BGColorG</mark> = Green text background color, to form RGB+Alpha.\ <mark style="color:yellow;">BGColorB</mark> = Blue text background color, to form RGB+Alpha.\ <mark style="color:yellow;">BGAlpha</mark> = Alpha transparency of the text background, to form RGB+Alpha.\ <mark style="color:yellow;">TextWidth</mark> = Text space width.\ <mark style="color:yellow;">TextAlign</mark> = Text alignment (1 - Left | 3 - Center | 4 - Right)\ <mark style="color:yellow;">Text</mark> = Text.\
\
CustomText(0, 13, 10, 10, 255, 0, 0, 255, 0, 0, 0, 255, 190, 3, "Text Normal with Size 13 example") \
CustomText(1, 18, 10, 10, 255, 0, 0, 255, 0, 0, 0, 255, 190, 3, "Text Bold with Size 18 example")\
\
Renders rich text on the screen.

***

<mark style="color:yellow;">**glColor(ColorR, ColorG, ColorB, Alpha)**</mark>\
\ <mark style="color:yellow;">ColorR</mark> = Red Color (0\~255).\ <mark style="color:yellow;">ColorG</mark> = Green Color (0\~255).\ <mark style="color:yellow;">ColorB</mark> = Blue Color (0\~255).\ <mark style="color:yellow;">Alpha</mark> = Alpha Transparency (0\~255).\
\
Starts the OpenGL glColor4f function

***

<mark style="color:yellow;">**SetBlend(Action)**</mark>\
\ <mark style="color:yellow;">Action</mark> = 0 - False | 1 = True.\
\
Starts the OpenGL SetBlend function

***

<mark style="color:yellow;">**IsPress(Key)**</mark>\
\ <mark style="color:yellow;">Key</mark> = Key that will activate the function.\
\
if IsPress(0x01) then \
&#x20;       \-- When clicking the left mouse button\
end\
\
Returns true when the key in question has been pressed.

***

<mark style="color:yellow;">**IsRelease(Key)**</mark>\
\ <mark style="color:yellow;">Key</mark> = Key that will activate the function.\
\
if IsRelease(0x02) then \
&#x20;       \-- When releasing the right mouse button click\
end\
\
Returns true when the key in question has been released.

***

<mark style="color:yellow;">**IsRepeat(Key)**</mark>\
\ <mark style="color:yellow;">Key</mark> = Key that will activate the function.\
\
if IsRepeat(0x1B) then \
&#x20;       \-- Get feedback when holding the ESC key\
end\
\
Returns true when the key in question is being pressed without interruption.

***

<mark style="color:yellow;">**PlaySound(Sound)**</mark>\
\ <mark style="color:yellow;">Sound</mark> = Sound index.

Plays the sound.

***

<mark style="color:yellow;">**DrawBar(ColorR, ColorG, ColorB, Alpha, PositionX, PositionY, Width, Height)**</mark>\
\ <mark style="color:yellow;">ColorR</mark> = Red color that forms RGB+Alpha.\ <mark style="color:yellow;">ColorG</mark> = Green color that forms RGB+Alpha.\ <mark style="color:yellow;">ColorB</mark> = Blue color that forms RGB+Alpha.\ <mark style="color:yellow;">Alpha</mark> = Alpha transparency that forms RGB+Alpha.\ <mark style="color:yellow;">PositionX</mark> = X position of the rendering on the screen.\ <mark style="color:yellow;">PositionY</mark> = Y position of the rendering on the screen.\ <mark style="color:yellow;">Width</mark> = Shape size horizontally.\ <mark style="color:yellow;">Height</mark> = Shape size vertically.\
\
Renders a 4-sided geometric shape.

***

<mark style="color:yellow;">**DrawBarBorder(ColorR, ColorG, ColorB, Alpha, BorderR, BorderG, BorderB, BAlpha, PositionX, PositionY, Width, Height)**</mark>\
\ <mark style="color:yellow;">ColorR</mark> = Red color that forms RGB+Alpha.\ <mark style="color:yellow;">ColorG</mark> = Green color that forms RGB+Alpha.\ <mark style="color:yellow;">ColorB</mark> = Blue color that forms RGB+Alpha.\ <mark style="color:yellow;">Alpha</mark> = Alpha transparency that forms RGB+Alpha.\ <mark style="color:yellow;">BorderR</mark> = Red color of the border that forms RGB+Alpha.\ <mark style="color:yellow;">BorderG</mark> = Green color of the border that forms RGB+Alpha.\ <mark style="color:yellow;">BorderB</mark> = Blue color of the border that forms RGB+Alpha.\ <mark style="color:yellow;">BAlpha</mark> = Alpha transparency of the edge that forms RGB+Alpha.\ <mark style="color:yellow;">PositionX</mark> = X position of the rendering on the screen.\ <mark style="color:yellow;">PositionY</mark> = Y position of the rendering on the screen.\ <mark style="color:yellow;">Width</mark> = Shape size horizontally.\ <mark style="color:yellow;">Height</mark> = Shape size vertically.\
\
Renders a 4-sided geometric shape with a border.

***

<mark style="color:yellow;">**RenderItem(PositionX, PositionY, Width, Height, ItemIndex, ItemLevel, ItemExc, ItemAnc, Zoom)**</mark>\
\ <mark style="color:yellow;">PositionX</mark> = X <mark style="color:orange;">"Position of the item on the screen"</mark>\ <mark style="color:yellow;">PositionY</mark> = Y <mark style="color:orange;">"Position of the item on the screen"</mark>\ <mark style="color:yellow;">Width</mark> = Width of the rendering space\ <mark style="color:yellow;">Height</mark> = Height of the rendering space\ <mark style="color:yellow;">ItemIndex</mark> = Item Index <mark style="color:orange;">((Section x 512) + Line)</mark>\ <mark style="color:yellow;">ItemLevel</mark> = Item Level <mark style="color:orange;">(0 \~ 15)</mark>\ <mark style="color:yellow;">ItemExc</mark> = Item Excellent <mark style="color:orange;">(0\~1)</mark>\ <mark style="color:yellow;">ItemAnc</mark> = Item Ancient <mark style="color:orange;">(0\~1)</mark>\ <mark style="color:yellow;">Zoom</mark> = Distance from the item on the screen <mark style="color:orange;">(Default value 0.0)</mark>\
\ <mark style="color:red;">Using example:</mark>\ <mark style="color:red;">RenderItem(10, 10, 0, 0, 4097, 13, 1, 0, 0.0)</mark> \ <mark style="color:red;">-- Renders armor dragon +13 Excellent</mark>\
\
Renders an item on the screen.

***

<mark style="color:yellow;">**SlidingText(Line, PositionX, PositionY, ColorR, ColorG, ColorB, Alpha, Width, Speed, Text)**</mark>\
\ <mark style="color:yellow;">Line</mark> = The line must follow a global sequence.\ <mark style="color:yellow;">PositionX</mark> = X position of the text on the screen.\ <mark style="color:yellow;">PositionY</mark> = Y position of the text on the screen.\ <mark style="color:yellow;">ColorR</mark> = Red color that forms RGB+Alpha.\ <mark style="color:yellow;">ColorG</mark> = Green color that forms RGB+Alpha.\ <mark style="color:yellow;">ColorB</mark> = Blue color that forms RGB+Alpha.\ <mark style="color:yellow;">Alpha</mark> = Alpha transparency that forms RGB+Alpha.\ <mark style="color:yellow;">Width</mark> = Text space size.\ <mark style="color:yellow;">Speed</mark> = Scrolling speed.\ <mark style="color:yellow;">Text</mark> = Text.\
\
SlidingText(0, 10, 10, 0, 255, 0, 255, 10, 1.0, "The example text is wider than 10 width, but it will slide")\
\
You can render text in a smaller space, and when the mouse is over the text it will slide creating a marquee effect.

***

<mark style="color:yellow;">**LevelPoint()**</mark>

Returns the value of available points.

***

<mark style="color:yellow;">**LoadImage(Folder, Code)**</mark>\
\ <mark style="color:yellow;">Folder</mark> = Image path on the client.\ <mark style="color:yellow;">Code</mark> = Start charging at 200000.\
\
LoadImage("Interface\NewRender\PointWarning1.tga", 200000)\
\
Uploads an image to Main.

***

<mark style="color:yellow;">**OpenWindow(Window)**</mark>\
\ <mark style="color:yellow;">Window</mark> = Code of the window to be opened.\
\
The structure of the windows is in ScriptDefines.lua\
\
Opens a specific window.

***

<mark style="color:yellow;">**CloseWindow(Window)**</mark>\
\ <mark style="color:yellow;">Window</mark> = Code of the window to be opened.\
\
The structure of the windows is in ScriptDefines.lua\
\
Closes a specific window.

***

<mark style="color:yellow;">**CheckWindow(Window)**</mark>\
\ <mark style="color:yellow;">Window</mark> = Code of the window to be opened.\
\
The structure of the windows is in ScriptDefines.lua\
\
Returns true if the specific window is open.

***

<mark style="color:yellow;">**ToolTipText(PositionX, PositionY, Text)**</mark>\
\ <mark style="color:yellow;">**PositionX**</mark> = X position of the tooltip on the screen.\ <mark style="color:yellow;">**PositionY**</mark> = Y position of the tooltip on the screen.\ <mark style="color:yellow;">**Text**</mark> = Text.\
\
Renders the text as a tooltip.

***

<mark style="color:yellow;">**ItemToolTip(PositionX, PositionY, ItemIndex, ItemLevel, ItemSkill, ItemLuck, ItemOption, Excellent, Ancient, Socket1, Socket2, Socket3, Socket4, Socket5, SocketBonus, PeriodicTime, Option380, OptionHarmony, HamonyLevel)**</mark>\
\ <mark style="color:yellow;">PositionX</mark> = X position of the tooltip on the screen.\ <mark style="color:yellow;">PositionY</mark> = Y position of the tooltip on the screen.\ <mark style="color:yellow;">ItemIndex</mark> = Item index - <mark style="color:orange;">((Section x 512) + Line)</mark>\ <mark style="color:yellow;">ItemLevel</mark> = Item Level - <mark style="color:orange;">(0 \~ 15)</mark>\ <mark style="color:yellow;">ItemSkill</mark> = Item Skill - <mark style="color:orange;">(0 \~ 1)</mark>\ <mark style="color:yellow;">ItemLuck</mark> = Item Luck - <mark style="color:orange;">(0 \~ 1)</mark>\ <mark style="color:yellow;">ItemOption</mark> = Item Option - <mark style="color:orange;">(0 \~ 7)</mark>\ <mark style="color:yellow;">Excellent</mark> = Item Excellent - <mark style="color:orange;">(0 \~ 64)</mark>\ <mark style="color:yellow;">Ancient</mark> = Item Ancient - <mark style="color:orange;">(5 \~ 6)</mark>\ <mark style="color:yellow;">Socket1</mark> = Item Socket Slot 1 - <mark style="color:orange;">(0 \~ 255)</mark>\ <mark style="color:yellow;">Socket2</mark> = Item Socket Slot 2 - <mark style="color:orange;">(0 \~ 255)</mark>\ <mark style="color:yellow;">Socket3</mark> = Item Socket Slot 3 - <mark style="color:orange;">(0 \~ 255)</mark>\ <mark style="color:yellow;">Socket4</mark> = Item Socket Slot 4 - <mark style="color:orange;">(0 \~ 255)</mark>\ <mark style="color:yellow;">Socket5</mark> = Item Socket Slot 5 - <mark style="color:orange;">(0 \~ 255)</mark>\ <mark style="color:yellow;">SocketBonus</mark> = Item Socket Bonus - <mark style="color:orange;">(0 \~ 5 or 255)</mark>\
\&#xNAN;*(Version 2.5)* <mark style="color:yellow;">PeriodicTime</mark> = Item's time period - <mark style="color:orange;">(in seconds)</mark>\
\&#xNAN;*(Version 2.7)* <mark style="color:yellow;">Option380</mark> = Option 380 - <mark style="color:orange;">(0 \~ 1)</mark>\
*(Version 2.7)* <mark style="color:yellow;">OptionHarmony</mark> = Option Harmony - <mark style="color:orange;">(0 \~ 15)</mark>\
*(Version 2.7)* <mark style="color:yellow;">HarmonyLevel</mark> = Option Hamony Level - <mark style="color:orange;">(0 \~ 15)</mark>\
\
Renders an item's information in a tooltip.

***

<mark style="color:yellow;">**SendChat(String)**</mark>\
\ <mark style="color:yellow;">String</mark> = Text.\
\
Send texts through the Chat structure, in the same way as using Chat.

***

<mark style="color:yellow;">**MapNumber()**</mark>\
\
Returns the current map number.

***

<mark style="color:yellow;">**MapName(Map)**</mark>\
\ <mark style="color:yellow;">Map</mark> = Map Number\
\
Returns the name of the current map.

***

<mark style="color:yellow;">**FpsLimit()**</mark>\
\
Returns the current FPS.

***

<mark style="color:yellow;">**Notice(Text, Color)**</mark>\
\
Text = Text.\
Color = Text Color.\
\
Renders a message in the middle of the screen.

***

<mark style="color:yellow;">**CharClass()**</mark>\
\
Returns the class name of the current character.

***

<mark style="color:yellow;">**CharName()**</mark>\
\
Returns the name of the current character.

***

<mark style="color:yellow;">**CharLevel()**</mark>\
\
Returns the current character's level.

***

<mark style="color:yellow;">**CharMLevel()**</mark>\
\
Returns the master level of the current character.

***

<mark style="color:yellow;">**VipLevel()**</mark>\
\
Returns the account level - (0 - Free | 1 - VIP1 | 2 - VIP2 | 3 - VIP3)

***

<mark style="color:yellow;">**CharReset()**</mark>\
\
Returns the amount of resets for the current character.

***

<mark style="color:yellow;">**CharMReset()**</mark>\
\
Returns the amount of master resets for the current character.

***

<mark style="color:yellow;">**ConsoleOn(Action)**</mark>\
\ <mark style="color:yellow;">Action</mark> = Use 1 to activate.\
\
Open the Debug console.

***

<mark style="color:yellow;">**MemorySet(DWORD Offset, DWORD Value, DWORD Size)**</mark>\
\ <mark style="color:yellow;">Offset</mark> = Initial memory address.\ <mark style="color:yellow;">Value</mark> = Memory padding value.\ <mark style="color:yellow;">Size</mark> = Number of bytes to fill.\
\
Used for Assembly programming.

***

<mark style="color:yellow;">**SetByte(DWORD Offset, BYTE Value)**</mark>\
\ <mark style="color:yellow;">Offset</mark> = Memory address.\ <mark style="color:yellow;">Value</mark> = Memory padding value.\
\
Used for Assembly programming.

***

<mark style="color:yellow;">**SetDword(DWORD Offset, DWORD Value)**</mark>\
\ <mark style="color:yellow;">Offset</mark> = Memory address.\ <mark style="color:yellow;">Value</mark> = Memory padding value.\
\
Used for Assembly programming.

***

<mark style="color:yellow;">**SetDouble(DWORD Offset, double Value)**</mark>\
\ <mark style="color:yellow;">Offset</mark> = Memory address.\ <mark style="color:yellow;">Value</mark> = Memory padding value.\
\
Used for Assembly programming.

***

<mark style="color:yellow;">**SetFloat(DWORD Offset, float Value)**</mark>\
\ <mark style="color:yellow;">Offset</mark> = Memory address.\ <mark style="color:yellow;">Value</mark> = Memory padding value.\
\
Used for Assembly programming.

***

<mark style="color:yellow;">**SetCompleteHook(BYTE Head, DWORD Value1, DWORD Value2)**</mark>\
\ <mark style="color:yellow;">Head</mark> = First byte value.\ <mark style="color:yellow;">Value1</mark> = Memory address.\ <mark style="color:yellow;">Value2</mark> = Destination memory address.\
\
Used for Assembly programming.

***

<mark style="color:yellow;">**DrawGUI(ImageID, PositionX, PositionY, RealWidth, RealHeight)**</mark>\
\ <mark style="color:yellow;">ImageID</mark> = Image Index.\ <mark style="color:yellow;">PositionX</mark> = X position of the image on the screen.\ <mark style="color:yellow;">PositionY</mark> = Y position of the image on the screen.\ <mark style="color:yellow;">RealWidth</mark> = Actual width of the image.\ <mark style="color:yellow;">RealHeight</mark> = Actual image height.\
\
Main's original image rendering.

***

<mark style="color:yellow;">**InSafeZone()**</mark>\
\
Returns true if the character is in a safe zone.

***

<mark style="color:yellow;">**GlobalText(Line)**</mark>\
\ <mark style="color:yellow;">Line</mark> = Text line number in the Text.bmd file.\
\
Returns the given line of text from the Text.bmd file.

***

<mark style="color:yellow;">**MuHelperOn()**</mark>\
\
Returns true if MuHelper is active.

***

<mark style="color:yellow;">**NpcTarget()**</mark>\
\
Returns the NPC's index if the mouse is over it, otherwise returns -1.

***

<mark style="color:yellow;">**Coin1()**</mark>\
\
Returns the value of WCoinC.

***

<mark style="color:yellow;">**Coin2()**</mark>\
\
Returns the value of WCoinP.

***

<mark style="color:yellow;">**Coin3()**</mark>\
\
Returns the value of Goblin Points.

***

<mark style="color:yellow;">**Money()**</mark>\
\
Returns the value of Zen.

***

<mark style="color:yellow;">**SetEmote(Action)**</mark>\
\ <mark style="color:yellow;">Action</mark> = 0 \~ 23.\
\
Set an emotion movement for the character.

***

<mark style="color:yellow;">**PlayerDirection(Direction)**</mark>

<mark style="color:yellow;">Direction</mark> = 0 \~ 7.

Sets a direction for the character in relation to the map.

***

<mark style="color:yellow;">**CheckMouseIn(PositionX, PositionY, Width, Height)**</mark>\
\
PositionX = Starting point X of the Mouse in relation to the screen.\
PositionY = Starting point Y of the Mouse in relation to the screen.\
Width = Size X from the starting point.\
Height = Size Y from the starting point.\
\
Returns true if the arguments are met.

***

<mark style="color:yellow;">**OpenLink(Link)**</mark>\
\ <mark style="color:yellow;">Link</mark> = Internet link.\
\
Opens an external link in the browser.

***

<mark style="color:yellow;">**MainLanguage()**</mark>\
\
Returns the current language of Main - "Por", "Eng", "Spn".

***

<mark style="color:yellow;">**MainIntLanguage()**</mark>\
\
Returns the current language of Main in numerical form - (0 - Eng | 1 - Por | 2 - Spn)

***

<mark style="color:yellow;">**Volume()**</mark>\
\
Returns the Main sound volume.

***

<mark style="color:yellow;">**SetVolume(Value)**</mark>\
\ <mark style="color:yellow;">Value</mark> = 0 Mute, 1 \~ 10.\
\
Set a value for the sound volume.

***

<mark style="color:yellow;">**GetSlotIndex()**</mark>\
\
Gets the number of the inventory slot the mouse is over, equipped items as well.

***

<mark style="color:yellow;">**PartyMemberCount()**</mark>\
\
Returns the number of people who are in a party.

***

<mark style="color:yellow;">**Send(String)**</mark>\
\ <mark style="color:yellow;">String</mark> = Parameter to be sent in text form.\
\
Sends texts to the GameServer, used as a package system for interacting with the Serveridor

***

<mark style="color:yellow;">**InvLevel()**</mark>

Get the level of the inventory item when the mouse is over it.

***

<mark style="color:yellow;">**InvIndex()**</mark>

Get the Index of the inventory item when the mouse is over it.

***

<mark style="color:yellow;">**InvSlot()**</mark>

Gets the number of the inventory slot the mouse is in, excluding equipped items.

***

<mark style="color:yellow;">**DrawBigNumber(PositionX, PositionY, Number, Size)**</mark>\
\ <mark style="color:yellow;">PositionX</mark> = X position of numbers on the screen.\ <mark style="color:yellow;">PositionY</mark> = Y position of numbers on the screen.\ <mark style="color:yellow;">Number</mark> = Number to be rendered.\ <mark style="color:yellow;">Size</mark> = Number size, default is 1.0.\
\
Renders the Stack item numbering model.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://changelog.matrixemulator.com/welcome/luadoc/client-side/functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
