Functions
Client Side
PlayerTarget() Returns the index of the Player if the mouse is over it.
GetNumberWindows() 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.
GetTickCount() 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.
GetSelectedName() Returns the name of the character that was selected on the character selection screen.
GetSelectedClass() Returns the class number of the character that was selected on the character selection screen.
SetCharDirection(Slot, Direction) Slot = Character slot on the selection screen, 0 ~ 4. Direction = Character rotation, direction relative to the map, 0 ~ 360. Changes the character's direction on the character selection screen, its slot and rotation value.
GetCharDirection(Slot) Slot = Character slot on the selection screen, 0 ~ 4. Returns the character's direction on the character selection screen by setting the slot.
SetSelectedChar(Slot) Slot = Character slot on the selection screen, 0 ~ 4. Select a character from the character selection screen by setting the slot number.
GetSelectedChar() Returns the slot of the character that was selected on the character selection screen.
IntDescriptionValue(INT, Value) INT = Number value according to the CustomItemDescription line. Value = 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
IsBuffPoison() Returns true if the character is poisoned.
ViewCurBP() Returns the character's current BP value.
ViewMaxBP() Returns the character's maximum BP value.
ViewCurSD() Returns the character's current SD value.
ViewMaxSD() Returns the character's maximum SD value.
ViewCurMP() Returns the character's current MP value.
ViewMaxMP() Returns the character's maximum MP value.
ViewCurHP() Returns the character's current HP value.
ViewMaxHP() Returns the character's maximum HP value.
NewSkillInstance() Used to check whether skills from the second layer were selected. Returns false for the first layer and true for the second layer.
GetAllKeysInSection(Section, FileName) Section = Section Name. FileName = 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.
RemovePrivateProfileSectionA(Section, FileName) Section = Name of the section to be removed. FileName = 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.
RemovePrivateProfileKeyA(Section, Key, FileName) Section = Section Name. Key = Name of the key to be removed. FileName = 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.
WritePrivateProfileString(Section, Key, Value, FileName) Section = Section Name. Key = Key Name. Value = Value to be written. FileName = 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.
GetPrivateProfileIntA(Section, Key, DefaultValue, FileName) Section = Section Name. Key = Key Name. DefaultValue = Default value if key is not found. FileName = 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.
GetPrivateProfileStringA(Section, Key, DefaultValue, FileName) Section = Section Name. Key = Key Name. DefaultValue = Default value if key is not found. FileName = 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.
GetMonsterName(Monster) Monster = Monster index. Return monster name.
LockPlayerWalk() if Condition == true then LockPlayerWalk() end When called this function blocks the character's walking
UnlockPlayerWalk() if Condition == true then UnlockPlayerWalk() end When called this function unlocks the character's floor
CharGetGuildName() Returns the character's guild name.
GetPetSlot() Returns the index of the Pet slot.
GetWingSlot() Returns the index of the Wing Slot.
GetSwordSlot() Returns the index of the Sword Slot.
GetShieldSlot() Returns the index of the Shield Slot.
GetHelmSlot() Returns the index of the Helm Slot.
GetArmorSlot() Returns the index of the Armor Slot.
GetPantsSlot() Returns the index of the Pants Slot.
GetGlovesSlot() Returns the index of the Gloves Slot.
GetBootsSlot() Returns the index of the Boots Slot.
GetSpecialCode() Returns the account's SpecialCode.
RenderMixEffect(PosX, PosY, SizeX, SizeY) PosX = X position of the effect on the screen. PosY = Y position of the effect on the screen. SizeX = Number of spaces in an inventory horizontally. SizeY = Number of spaces in a vertical inventory. Renders the mix effect.
RotateImage(Index, PosX, PosY, Width, Height, Rotate, MapX, MapY, SizeX, SizeY) Index = Image index. PosX = X position of the image on the screen. PosY = Y position of the image on the screen. Width = Image width. Height = Image height. Rotate = Image rotation 0~360. MapX = X mapping of the image. MapY = Y mapping of the image. SizeX = Actual image width. SizeY = Actual image height. Renders an image with 360 rotation option.
RenderMonsterSkin(Index, PosX, PosY, Width, Height, Size, Rotation) Index = Monster index. PosX = X position of the image on the screen. PosY = Y position of the image on the screen. Width = Width of the rendering space. Height = Height of the rendering space. Size = Size of the monster within the render space. Rotation = Monster rotation. Renders a monster on screen.
MouseWheel(Using) Using = Sends to the function if the mouse is rotating. local wheelDelta = MouseWheel(0)
if wheelDelta < 0 then MouseWheel(1) end if wheelDelta > 0 then MouseWheel(1) end Gets and returns the value of MouseWheel
MyCoordX() Returns the character's X coordinate.
MyCoordY() Returns the character's Y coordinate.
WindowName(String) String = 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"
LogText(String) String = Text. LogText("Text") LogText(string.format("Text: %d", ValueNumber)) LogText(string.format("Text: %s", ValueText)) Add text logs in the Console. Use in conjunction with ConsoleOn(1).
SceneFlag() Return to the scene (2 - SelectServer | 4 - SelectCharacter | 5 - InGame).
RenderImage(Image, PosX, PosY, Width, Height, MapX, MapY, SizeX, SizeY) Image = Image index. PosX = X position of the image on the screen. PosY = Y position of the image on the screen. Width = Image width. Height = Image height. MapX = X mapping of the image. MapY = Y mapping of the image. SizeX = Actual image width. SizeY = Actual image height. Renders an image on the screen.
GetWindowsX() Returns the actual horizontal size of the screen.
GetWindowsY() Returns the actual vertical size of the screen.
MouseX() Returns Mouse movement in the X direction of the screen.
MouseY() Returns Mouse movement in the Y direction of the screen.
RenderText(PositionX, PositionY, TextColorR, TextColorG, TextColorB, TextAlpha, BGColorR, BGColorG, BGColorB, BGAlpha, TextWidth, TextAlign, Text) PositionX = X position of the text on the screen. PositionY = Y position of the text on the screen. TextColorR = Red color of the text, to form RGB+Alpha. TextColorG = Green color of the text, to form RGB+Alpha. TextColorB = Blue color of the text, to form RGB+Alpha. TextAlpha = Alpha transparency of the text, to form RGB+Alpha. BGColorR = Red text background color, to form RGB+Alpha. BGColorG = Green text background color, to form RGB+Alpha. BGColorB = Blue text background color, to form RGB+Alpha. BGAlpha = Alpha transparency of the text background, to form RGB+Alpha. TextWidth = Text space width. TextAlign = Text alignment (1 - Left | 3 - Center | 4 - Right) Text = Text. RenderText(10, 10, 255, 0, 0, 255, 0, 0, 0, 255, 190, 3, "Text example") Renders simple text on the screen.
CustomText(FontType, FontSize, PositionX, PositionY, TextColorR, TextColorG, TextColorB, TextAlpha, BGColorR, BGColorG, BGColorB, BGAlpha, TextWidth, TextAlign, Text) FontType = 0 - Font Normal | 1 - Font Bold. FontSize = 8 ~ 20 or 30. PositionX = X position of the text on the screen. PositionY = Y position of the text on the screen. TextColorR = Red color of the text, to form RGB+Alpha. TextColorG = Green color of the text, to form RGB+Alpha. TextColorB = Blue color of the text, to form RGB+Alpha. TextAlpha = Alpha transparency of the text, to form RGB+Alpha. BGColorR = Red text background color, to form RGB+Alpha. BGColorG = Green text background color, to form RGB+Alpha. BGColorB = Blue text background color, to form RGB+Alpha. BGAlpha = Alpha transparency of the text background, to form RGB+Alpha. TextWidth = Text space width. TextAlign = Text alignment (1 - Left | 3 - Center | 4 - Right) Text = 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.
glColor(ColorR, ColorG, ColorB, Alpha) ColorR = Red Color (0~255). ColorG = Green Color (0~255). ColorB = Blue Color (0~255). Alpha = Alpha Transparency (0~255). Starts the OpenGL glColor4f function
SetBlend(Action) Action = 0 - False | 1 = True. Starts the OpenGL SetBlend function
IsPress(Key) Key = Key that will activate the function. if IsPress(0x01) then -- When clicking the left mouse button end Returns true when the key in question has been pressed.
IsRelease(Key) Key = Key that will activate the function. if IsRelease(0x02) then -- When releasing the right mouse button click end Returns true when the key in question has been released.
IsRepeat(Key) Key = Key that will activate the function. if IsRepeat(0x1B) then -- Get feedback when holding the ESC key end Returns true when the key in question is being pressed without interruption.
PlaySound(Sound) Sound = Sound index.
Plays the sound.
DrawBar(ColorR, ColorG, ColorB, Alpha, PositionX, PositionY, Width, Height) ColorR = Red color that forms RGB+Alpha. ColorG = Green color that forms RGB+Alpha. ColorB = Blue color that forms RGB+Alpha. Alpha = Alpha transparency that forms RGB+Alpha. PositionX = X position of the rendering on the screen. PositionY = Y position of the rendering on the screen. Width = Shape size horizontally. Height = Shape size vertically. Renders a 4-sided geometric shape.
DrawBarBorder(ColorR, ColorG, ColorB, Alpha, BorderR, BorderG, BorderB, BAlpha, PositionX, PositionY, Width, Height) ColorR = Red color that forms RGB+Alpha. ColorG = Green color that forms RGB+Alpha. ColorB = Blue color that forms RGB+Alpha. Alpha = Alpha transparency that forms RGB+Alpha. BorderR = Red color of the border that forms RGB+Alpha. BorderG = Green color of the border that forms RGB+Alpha. BorderB = Blue color of the border that forms RGB+Alpha. BAlpha = Alpha transparency of the edge that forms RGB+Alpha. PositionX = X position of the rendering on the screen. PositionY = Y position of the rendering on the screen. Width = Shape size horizontally. Height = Shape size vertically. Renders a 4-sided geometric shape with a border.
RenderItem(PositionX, PositionY, Width, Height, ItemIndex, ItemLevel, ItemExc, ItemAnc, Zoom) PositionX = X position of the item on the screen. PositionY = Y position of the item on the screen. Width = Width of the rendering space. Height = Height of the rendering space. ItemIndex = Item Index - ((Section x 512) + Line) ItemLevel = Item Level - (0 ~ 15) ItemExc = Item Excellent (0~1) ItemAnc = Item Ancient (0~1) Zoom = Distance from the item on the screen. This argument is optional - (Default value 1.0). Using the function with 8 arguments: RenderItem(10, 10, 0, 0, 4097, 13, 1, 0) -- Renders armor dragon +13 Excellent Using the function with 9 arguments: RenderItem(10, 10, 0, 0, 4097, 13, 1, 0, 1.0) -- Renders armor dragon +13 Excellent Renders an item on the screen.
SlidingText(Line, PositionX, PositionY, ColorR, ColorG, ColorB, Alpha, Width, Speed, Text) Line = The line must follow a global sequence. PositionX = X position of the text on the screen. PositionY = Y position of the text on the screen. ColorR = Red color that forms RGB+Alpha. ColorG = Green color that forms RGB+Alpha. ColorB = Blue color that forms RGB+Alpha. Alpha = Alpha transparency that forms RGB+Alpha. Width = Text space size. Speed = Scrolling speed. Text = 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.
LevelPoint()
Returns the value of available points.
LoadImage(Folder, Code) Folder = Image path on the client. Code = Start charging at 200000. LoadImage("Interface\NewRender\PointWarning1.tga", 200000) Uploads an image to Main.
OpenWindow(Window) Window = Code of the window to be opened. The structure of the windows is in ScriptDefines.lua Opens a specific window.
CloseWindow(Window) Window = Code of the window to be opened. The structure of the windows is in ScriptDefines.lua Closes a specific window.
CheckWindow(Window) Window = Code of the window to be opened. The structure of the windows is in ScriptDefines.lua Returns true if the specific window is open.
ToolTipText(PositionX, PositionY, Text) PositionX = X position of the tooltip on the screen. PositionY = Y position of the tooltip on the screen. Text = Text. Renders the text as a tooltip.
ItemToolTip(PositionX, PositionY, ItemIndex, ItemLevel, ItemSkill, ItemLuck, ItemOption, Excellent) PositionX = X position of the tooltip on the screen. PositionY = Y position of the tooltip on the screen. ItemIndex = Item index - ((Section x 512) + Line) ItemLevel = Item Level - (0 ~ 15) ItemSkill = Item Skill - (0 ~ 1) ItemLuck = Item Luck - (0 ~ 1) ItemOption = Item Option - (0 ~ 7) Excellent = Item Excellent - (0 ~ 64) Renders an item's information in a tooltip.
SendChat(String) String = Text. Send texts through the Chat structure, in the same way as using Chat.
MapNumber() Returns the current map number.
MapName(Map) Map = Map Number Returns the name of the current map.
FpsLimit() Returns the current FPS.
Notice(Text, Color) Text = Text. Color = Text Color. Renders a message in the middle of the screen.
CharClass() Returns the class name of the current character.
CharName() Returns the name of the current character.
CharLevel() Returns the current character's level.
CharMLevel() Returns the master level of the current character.
VipLevel() Returns the account level - (0 - Free | 1 - VIP1 | 2 - VIP2 | 3 - VIP3)
CharReset() Returns the amount of resets for the current character.
CharMReset() Returns the amount of master resets for the current character.
ConsoleOn(Action) Action = Use 1 to activate. Open the Debug console.
MemorySet(DWORD Offset, DWORD Value, DWORD Size) Offset = Initial memory address. Value = Memory padding value. Size = Number of bytes to fill. Used for Assembly programming.
SetByte(DWORD Offset, BYTE Value) Offset = Memory address. Value = Memory padding value. Used for Assembly programming.
SetDword(DWORD Offset, DWORD Value) Offset = Memory address. Value = Memory padding value. Used for Assembly programming.
SetDouble(DWORD Offset, double Value) Offset = Memory address. Value = Memory padding value. Used for Assembly programming.
SetFloat(DWORD Offset, float Value) Offset = Memory address. Value = Memory padding value. Used for Assembly programming.
SetCompleteHook(BYTE Head, DWORD Value1, DWORD Value2) Head = First byte value. Value1 = Memory address. Value2 = Destination memory address. Used for Assembly programming.
DrawGUI(ImageID, PositionX, PositionY, RealWidth, RealHeight) ImageID = Image Index. PositionX = X position of the image on the screen. PositionY = Y position of the image on the screen. RealWidth = Actual width of the image. RealHeight = Actual image height. Main's original image rendering.
InSafeZone() Returns true if the character is in a safe zone.
GlobalText(Line) Line = Text line number in the Text.bmd file. Returns the given line of text from the Text.bmd file.
MuHelperOn() Returns true if MuHelper is active.
NpcTarget() Returns the index of the NPC if the mouse is over it.
Coin1() Returns the value of WCoinC.
Coin2() Returns the value of WCoinP.
Coin3() Returns the value of Goblin Points.
Money() Returns the value of Zen.
SetEmote(Action) Action = 0 ~ 23. Set an emotion movement for the character.
PlayerDirection(Direction)
Direction = 0 ~ 7.
Sets a direction for the character in relation to the map.
CheckMouseIn(PositionX, PositionY, Width, Height) 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.
OpenLink(Link) Link = Internet link. Opens an external link in the browser.
MainLanguage() Returns the current language of Main - "Por", "Eng", "Spn".
MainIntLanguage() Returns the current language of Main in numerical form - (0 - Eng | 1 - Por | 2 - Spn)
Volume() Returns the Main sound volume.
SetVolume(Value) Value = 0 Mute, 1 ~ 10. Set a value for the sound volume.
GetSlotIndex() Gets the number of the inventory slot the mouse is over, equipped items as well.
PartyMemberCount() Returns the number of people who are in a party.
Send(String) String = Parameter to be sent in text form. Sends texts to the GameServer, used as a package system for interacting with the Serveridor
InvLevel()
Get the level of the inventory item when the mouse is over it.
InvIndex()
Get the Index of the inventory item when the mouse is over it.
InvSlot()
Gets the number of the inventory slot the mouse is in, excluding equipped items.
FUNCTION BigNumber(PositionX, PositionY, Number, Size) PositionX = X position of numbers on the screen. PositionY = Y position of numbers on the screen. Number = Number to be rendered. Size = Number size, default is 1.0. Renders the Stack item numbering model.
Last updated