List and Description of Bridge Functions

1 Replies, 897 Views

BRIDGE FUNCTION ATTACH
Código:
BridgeFunctionAttach(BridgeName, FunctionName)
BridgeName = Name of the bridge function.
FunctionName = Name of the custom function.
Attach a custom function to the selected bridge function.

BRIDGE FUNCTION LIST
OnReadScript()
OnShutScript()
OnTimerThread()
OnCommandManager()
OnCommandDone()
OnCharacterEntry()
OnCharacterClose()
OnNpcTalk()
OnMonsterDie()
OnUserDie()
OnUserRespawn()
OnCheckUserTarget()
OnCheckUserKiller()
OnUserItemPick()
OnUserItemDrop()
OnUserItemMove()
OnSQLAsyncResult() 

BRIDGE FUNCTION DESCRIPTION

OnReadScript()
Called once at GameServer initialization.

OnShutScript()
Called once before script reload.

OnTimerThread()
Called every 1 second, can be used as a timer.

OnCommandManager(aIndex, code, arg)
Called after a user types a valid command, must return (1) if the command is valid, (0) if not.

OnCommandDone(aIndex, code)
Called after a user executes a valid command.

OnCharacterEntry(aIndex)
Called after a user enters the game with a character.

OnCharacterClose(aIndex)
Called after a user leaves the game with a character.

OnNpcTalk(aIndex, bIndex)
Called after a user talks with an NPC, must return (1) if the talk is successful, (0) if not.

OnMonsterDie(aIndex, bIndex)
Called after a monster dies.

OnUserDie(aIndex, bIndex)
Called after a user dies.

OnUserRespawn(aIndex, KillerType)
Called when a user is going to respawn.

OnCheckUserTarget(aIndex, bIndex)
Called on the attack target verification, must return (1) if the target can be attacked, (0) if not.

OnCheckUserKiller(aIndex, bIndex)
Called on the player killer verification, must return (1) if the killer is going to receive PK status, (0) if not.

OnUserItemPick(aIndex, index)
Called on item pick, must return (1) if the item can be picked, (0) if not.

OnUserItemDrop(aIndex, index, x, y)
Called on item drop, must return (1) if the item can be dropped, (0) if not.

OnUserItemMove(aIndex, aFlag, aSlot, bFlag, bSlot)
Called on item move, must return (1) if the item can be moved, (0) if not.

OnSQLAsyncResult(label, param, result) 
Called after async query execution.
Hi. Could you add some more information about the parameters besides the name? Like string, number, boolean, a list of possible values if that's the case, and so on?

Even better if there could be some kind of example.

Thanks!
(Última modificación: 03-10-2024, 11:26 PM por smuar.)



Usuarios navegando en este tema: 2 invitado(s)