Bridges

Client Side


(Version 2.5) LuaLoadWavFile() Example of bridge usage:

require "System\\ScriptCore"

function WavFilePath()
	LoadWavFile(1, "Data\\Custom\\Sound\\Toasty.wav")
end

BridgeFunctionAttach("LuaLoadWavFile", "WavFilePath")

Ponte utilizada para chamar as funções LoadWavFile() para carregamento de arquivos de som no formato .wav.


(Version 2.5) LuaToolTipBridge(ToolTipTable) ToolTipTable = Table. ToolTip Table: ToolTip.Type - "Return Item index" ToolTip.Durability - "Return Item Durability" ToolTip.Level - "Return Item level" ToolTip.Skill - "Return Item Skill [0 or 1]" ToolTip.Luck - "Return Item Luck [0 or 1]" ToolTip.Option - "Return Optiton Life" ToolTip.Excellent - "Return Excellent Value" ToolTip.Ancient - "Return Ancient Type" ToolTip.Socket1 - "Return Socket Slot 1 Value" ToolTip.Socket2 - "Return Socket Slot 2 Value" ToolTip.Socket3- "Return Socket Slot 3 Value" ToolTip.Socket4 - "Return Socket Slot 4 Value" ToolTip.Socket5 - "Return Socket Slot 5 Value" ToolTip.Periodic - "Return Item Periodic [0 or 1]" Example of bridge usage:

require "System\\ScriptCore"

function ToolTipBridge(ToolTipTable)

	LogText(3, string.format("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",
	ToolTipTable.Type, ToolTipTable.Durability, ToolTipTable.Level, ToolTipTable.Skill,
	ToolTipTable.Luck, ToolTipTable.Option, ToolTipTable.Excellent, ToolTipTable.Ancient,
	ToolTipTable.Socket1, ToolTipTable.Socket2, ToolTipTable.Socket3, ToolTipTable.Socket4,
	ToolTipTable.Socket5, ToolTipTable.Periodic))

end

BridgeFunctionAttach("LuaToolTipBridge", "ToolTipBridge")

(Version 2.3) LuaObjectAction(Index, Action, Class, Weapon1, Weapon2, Wing, PosX, PosY, SafeZone) Index = User Index. Action = Movement ID. Class = Character class. SafeZone = "Returns 0 for hunting area and 1 for safe area" Bridge used to replace the characters' default movements. The function depends on the return of the Action argument. The maximum number of actions for Season 6 Player.bmd is 285, if Season 8 Player.bmd is used the system will automatically increase the limit to 305 actions. Example of Using:


(Version 2.3) LuaRenderTitle(Player, Monster, PosX, PosY) Player = User Index. Monster = Monster Class. Bridge used to render Images over the character as well as the RankUser 2D. Example of Using:


(Version 2.3) LuaRuneEffect(Character) Character = Character Table. Character Table: Character.Object - "Used in the first argument of the UserRuneEffect function" Character.Class - "Character class" Character.CtrlCode - "Administrative level = 0 none, 8 GM, 32 ADM" Character.Helm Character.Armor Character.Pants Character.Gloves Character.Boots Character.HelmLevel Character.ArmorLevel Character.PantsLevel Character.GlovesLevel Character.BootsLevel Character.HandR Character.HandL Character.HandRLevel Character.HandLLevel Character.Wing Character.WingLevel Character.Pet Character.MonsterIndex - "Monster Class" Character.UserIndex - "User Index" Example of using the bridge in conjunction with the UserRuneEffect function:


LuaWorkSS() Description: Activates only on Select Server. Used to launch visual functions, windows, images etc... Example: require "System\ScriptCore" BridgeFunctionAttach("LuaWorkSS", "NewWorkSS") NewWorkSS = function() -- Your visual function here end


LuaWorkSC() Description: Activates only on Select Character. Used to launch visual functions, windows, images etc... Example: require "System\ScriptCore" BridgeFunctionAttach("LuaWorkSC", "NewWorkSC") NewWorkSC = function() -- Your visual function here end


LuaWorkMH() Description: Used to launch visual functions, windows, images etc... Example: require "System\ScriptCore" BridgeFunctionAttach("LuaWorkMH", "NewWorkMH") NewWorkMH = function() -- Your visual function here end


LuaWork() Description: Used to launch visual functions, windows, images etc... Example: require "System\ScriptCore" BridgeFunctionAttach("LuaWork", "NewWork") NewWork = function() -- Your visual function here end


LuaLoadImages() Description: Hook function for loading images, use with LoadImage() Example: require "System\ScriptCore" BridgeFunctionAttach("LuaLoadImages", "NewLoad") NewLoad = function() LoadImage("Interface\NewRender\Exemple.tga", 200000) -- Use image ID from 200000 onwards end


LuaMouseEvent() Description: Used to initiate keyboard and mouse functions Example: require "System\ScriptCore" BridgeFunctionAttach("LuaMouseEvent", "NewEvent") NewEvent = function() if CheckMouseIn(X,Y,W,H) then if IsRelease(0x4E) then PlaySound(25) end return true -- Not Walk end return false -- Walk end


LuaEntryProc() Description: Starts functions that will be loaded once when opening Main.exe Example: require "System\ScriptCore" BridgeFunctionAttach("LuaEntryProc", "NewProc") NewProc = function() ConsoleOn(1) -- Open Main.exe with Debug Window end


LuaPacketRecv(aIndex, String) Description: Starts a function that receives packets from the GameServer Example: require "System\ScriptCore" require "System\ScriptDefines" BridgeFunctionAttach("LuaPacketRecv", "NewRecv")

local JoiaCunt = {aIndex, "", "", "", "", "", "", "", "", "", "", ""}

JBRecv = function(aIndex, str) if (obterElemento(str, 0) == "JewelBank") then if (obterElemento(str, 1) == "Open") then JoiaCunt[1] = obterElemento(str, 2) JoiaCunt[2] = obterElemento(str, 3) JoiaCunt[3] = obterElemento(str, 4) JoiaCunt[4] = obterElemento(str, 5) JoiaCunt[5] = obterElemento(str, 6) JoiaCunt[6] = obterElemento(str, 7) JoiaCunt[7] = obterElemento(str, 8) JoiaCunt[8] = obterElemento(str, 9) JoiaCunt[9] = obterElemento(str, 10) JoiaCunt[10] = obterElemento(str, 11) end end end


Last updated