Bridges

Client Side


(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:

require "System\\ScriptCore"

BridgeFunctionAttach("LuaObjectAction", "ActionPlayer")

function ActionPlayer(Index,Action,Class,Weapon1,Weapon2,Wing,PosX,PosY,SafeZone)

	if Class == 24 then -- Grand Master Class
		if Action == 11 then
			if MapNumber() ~= 7 and MapNumber() ~= 10 thenus
				Action = 4
			end
		elseif Action == 34 then
			if  MapNumber() ~= 10 then
				if MapNumber() ~= 7 then
					Action = 32
				else
					Action = 33
				end
			end
		elseif Action == 26 then
			if MapNumber() ~= 7 and MapNumber() ~= 10 then
				Action = 32
			end
		end
	end

        return Action;
end

(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:

require "System\\ScriptCore"

BridgeFunctionAttach("LuaRenderTitle", "RenderTitle")

function RenderTitle(Player, Monster, PosX, PosY)

	if Monster == 602 then
		RenderImage(10000, PosX + 9, PosY - 54, 40, 40, 0, 0, 77.75, 77.75)
	end

	if Player >= 9000 then
		RenderImage(10001, PosX + 9, PosY - 54, 40, 40, 0, 0, 77.75, 77.75)
	end
end

(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" Example of using the bridge in conjunction with the UserRuneEffect function:

require "System\\ScriptCore"

BridgeFunctionAttach("LuaRuneEffect", "RuneEffect")

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

        if Character.MonsterIndex == 275 then
		UserRuneEffect(Character.Object, 700118, 5.0, 0.2, 0.2, 1.0, -0.5)
	end
end

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