Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Guide Script Lua BridgeFunctions
#1
Información 
LUA Scripts support is included in the BETA versions.


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)

aIndex = User index.
code = Command index.
arg = Command parameters.

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


OnCharacterEntry(aIndex)

aIndex = User index.

Called after a user enters the game with a character.


OnCharacterClose(aIndex)

aIndex = User index.

Called after a user leaves the game with a character.


OnNpcTalk(aIndex,bIndex)

aIndex = NPC index.
bIndex = User index.

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


OnMonsterDie(aIndex,bIndex)

aIndex = Monster index (victim).
bIndex = User index (killer).

Called after a monster dies.


OnUserDie(aIndex,bIndex)

aIndex = User index (victim).
bIndex = Object index (killer).

Called after a user dies.


OnUserRespawn(aIndex,KillerType)

aIndex = User index.
KillerType = Killer type (0=Monster,1=User,2=GuildWar,3=Duel).

Called when a user is going to respawn.


OnCheckUserTarget(aIndex,bIndex)

aIndex = User index (attacker).
bIndex = User index (target).

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


OnCheckUserKiller(aIndex,bIndex)

aIndex = User index (killer).
bIndex = User index (victim).

Called on the player killer verification, must return (1) if the killer is going to recieve PK status, (0) if not.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)