User Tools

Site Tools


developer_center:developer_editor:lua_event

LUA Event Name

World Events

EventName Parameters Descriptionn
Backpack.ItemChange blockid, itemid, itemnum, x, y, z Any Items Changes In Any Container
Backpack.ItemPutIn blockid, itemid, itemnum, x, y, z Any Items Put In Any Container
Backpack.ItemTakeOut blockid, itemid, itemnum, x, y, z Any Items Taken Out From Any Container

Game Events

EventName Parameters Description
Game.Hour hours World hour time change
Game.RunTime second, ticks World Tick changes (Every 0.05 Seconds or Tick)

Player Events

EventName Parameters Description
Game.AnyPlayer.Defeat eventobjid: number, shortix,x,y,z Any Players Defeat
Game.AnyPlayer.EnterGame eventobjid: number, shortix,x,y,z Any Players Enter Game
Game.AnyPlayer.LeaveGame eventobjid: number, shortix,x,y,z Any Players Leave Game
Game.AnyPlayer.Victory eventobjid: number, shortix,x,y,z Any Players Win game
Player.AddBuff eventobjid: number, buffid: number, bufflvl: number The player gets a status effect
Player.AddItem eventobjid: number, itemid: number, itemnum: number The player gets an item
Player.AreaIn eventobjid: number, areaid: number Player enters an area
Player.AreaOut eventobjid: number, areaid: number Player leaves an area
Player.AttackHit eventobjid: number, targetactorid: number Player hits a target
Player.Attack eventobjid: number, shortix: number, x: number, y: number, z: number Player performs an attack
Player.BackPackChange eventobjid: number, itemid: number, itemnum: number, itemix: number Backpack Slot Changes
Player.BeHurt eventobjid: number, hurtlv: number Player takes damage
Player.ChangeAttr eventobjid: number, shortix: number, playerattr: number, playerattrval: number, x: number, y: number, z: number Player attribute changes
Player.ClickActor eventobjid: number, toobjid : number, targetactorid: number Player clicks on a bio (actor)
Player.ClickBlock eventobjid: number, blockid: number, x: number, y: number, z: number Player clicks on a block
Player.Collide eventobjid: number, toobjid: number Player collides with another player/mob
Player.ConsumeItem eventobjid: number, itemid: number, itemnum: number Player consumes an item
Player.DamageActor eventobjid: number, toobjid: number, targetactorid: number, hurtlv: number Player inflicts damage to a target
Player.DefeatActor eventobjid: number, toobjid: number, targetactorid: number Player defeats a target
Player.Die eventobjid: number, shortix: number, x: number, y: number, z: number Player dies
Player.DiscardItem eventobjid: number, itemid: number, itemnum: number, toobjid: number Player discards an item
Player.DismountActor eventobjid: number, targetactorid: number Player dismounts from an actor
Player.EquipChange eventobjid: number, itemid: number, itemnum: number, itemix: number Equipment column changes
Player.EquipOff eventobjid: number, itemid: number, itemnum: number, itemix: number Player takes off equipment
Player.EquipOn eventobjid: number, itemid: number, itemnum: number, itemix: number Player equips an item
Player.InputContent eventobjid: number, content: string Player inputs a string
Player.InputKeyDown eventobjid: number, vkey: number Player presses a key
Player.InputKeyOnPress eventobjid: number, vkey: number Player long-presses a key
Player.InputKeyUp eventobjid: number, vkey: number Player releases a key
Player.LevelModelUpgrade eventobjid: number Player's level changes
Player.MotionStateChange eventobjid: number, playermotion: number Player's motion state changes
Player.MountActor eventobjid: number, targetactorid: number Player mounts on an actor
Player.MoveOneBlockSize eventobjid: number, shortix: number, x: number, y: number, z: number Player moves one block size
Player.NewInputContent eventobjid: number, content: string Player types from the chat box
Player.PickUpItem eventobjid: number, toobjid: number, itemid: number, itemnum: number Player picks up an item
Player.PlayAction eventobjid: number, act: number Player performs an emote/action
Player.RemoveBuff eventobjid: number, buffid: number, bufflvl: number The player loses a specified status effect
Player.Revive eventobjid: number, shortix: number, x: number, y: number, z: number Player revives
Player.SelectShortcut eventobjid: number, itemid: number, itemnum: number Shortcut bar selection
Player.ShortcutChange eventobjid: number, itemid: number, itemnum: number, itemix: number Quick Bar Changes
Player.UseGiftPack eventobjid: number, itemid: number, itemnum: number Player uses a gift pack
Player.UseItem eventobjid: number, itemid: number, itemnum: number, itemix: number Player uses an item

Actor Events

EventName Parameters Description
Actor.AddBuff eventobjid, actorid, buffid, bufflvl Creatures gain status effects
Actor.AreaIn eventobjid, areaid Creatures enter the area
Actor.AreaOut eventobjid, areaid Creature leaves area
Actor.AttackHit eventobjid, toobjid, actorid, targetactorid Attack hit
Actor.Attack eventobjid, toobjid, actorid, targetactorid Attack
Actor.BeHurt eventobjid, toobjid, hurtlv, actorid Hurt
Actor.Beat eventobjid, toobjid, actorid, targetactorid Mob beats player/mob
Actor.ChangeAttr eventobjid, actorid, actorattr, actorattrval Attribute change
Actor.ChangeMotion eventobjid, areaid, actormotion Creature behavior state changed to [n]
Actor.Collide eventobjid, toobjid, actorid, targetactorid Collides with player/mob
Actor.Create eventobjid, actorid Was created
Actor.Damage eventobjid, toobjid, hurtlv, actorid, targetactorid Cause some damages
Actor.Die eventobjid, toobjid, actorid Die
Actor.Projectile.Hit eventobjid, toobjid, itemid, targetactorid, x, y, z, helper objid Throwing hits
Actor.RemoveBuff eventobjid, actorid, buffid, bufflvl Creatures lose status effects

Block Events

EventName Parameters Description
Block.Add blockid, x, y, z Triggered when a block with the specified block type is added at the given coordinates (x, y, z).
Block.DestroyBy eventobjid, blockid, x, y, z Event that occurs when local blocks of the specified type are destroyed. It provides information about the event player (eventobjid), the block type (blockid), and the coordinates (x, y, z) of the destroyed block.
Block.Dig.Begin eventobjid, blockid, x, y, z Triggered when any block is mined. It provides information about the event player (eventobjid), the block type being mined (blockid), and the coordinates (x, y, z) of the block being mined.
Block.Dig.Cancel eventobjid, blockid, x, y, z Event that occurs when the mining action on a block is canceled. It provides information about the event player (eventobjid), the block type being mined (blockid), and the coordinates (x, y, z) of the block being mined.
Block.Dig.End eventobjid, blockid, x, y, z Triggered when a block is successfully mined. It provides information about the event player (eventobjid), the block type being mined (blockid), and the coordinates (x, y, z) of the mined block.
Block.Remove blockid, x, y, z Event that occurs when a block with the specified block type is removed at the given coordinates (x, y, z).
Block.Trigger eventobjid, blockid, x, y, z Event that occurs when a block with the specified block type is triggered and becomes active or powered. It provides information about the event player (eventobjid), the block type (blockid), and the coordinates (x, y, z) of the triggered block.

Item Events

EventName Parameters Description
DropItem.AreaIn eventobjid, areaid, itemid Drop into area
DropItem.AreaOut eventobjid, areaid, itemid Drops leave area
Item.Create eventobjid, itemid, toobjid, x, y, z Drops are created
Item.Destroy eventobjid, itemid, itemnum When part of such equipment is destroyed
Item.Disappear eventobjid, itemid, itemnum, x, y, z Drop disappears
Item.Pickup eventobjid, toobjid, itemid, itemnum, x, y, z Drops are picked up
Item.Expend eventobjid, itemid, itemnum Local food items of this type are consumed
Missile.AreaIn eventobjid, areaid, itemid, helper objid Throwing objects enter the area
Missile.AreaOut eventobjid, areaid, itemid, helper objid Throwing objects leave the area
Missile.Create eventobjid, itemid, toobjid, x, y, z Throwables are created
Particle.Item.OnCreate eventobjid, effectid, x, y, z When the effect is created on the drop

UI Events

EventName Parameters Descriptionn
UI.Button.Click eventobjid,CustomUI,uielement Any UI buttons release
UI.Button.TouchBegin eventobjid,CustomUI,uielement Any UI buttons start to press
UI.Hide eventobjid,CustomUI Any UI closed
UI.LostFocus eventobjid,CustomUI,uielement,content Any input area loses focus
UI.Show eventobjid,CustomUI Any UI opened

MiniTimer Event

Event name Parameters Description
minitimer.change timerid, timername, timertime Triggers when a specified timer changes. Parameters: Timer ID, Timer Name, Timer Time

Other Event

Event List

Event Name Parameters Description
BluePrint.BuildBegin areaid Triggers when Blueprints start to create. Parameter: Area ID
Craft.end eventobjid, craftid, itemid, itemnum Triggers when any recipe is successfully synthesized. Parameters: Event object, recipe ID, item type, item quantity
Developer.BuyItem eventobjid, itemid Triggers when any player purchases commodity props. Parameters: Event object, prop type
Furnace.begin furnaceid, x, y, z Triggers when any smelting process starts. Parameters: Smelting ID, block position
Furnace.end furnaceid, x, y, z Triggers when any smelting process ends. Parameters: Smelting ID, block position
MiNiVip_1 eventobjid Triggers when a mini membership for 1 month is purchased. Parameter: Event player
MiNiVip_3 eventobjid Triggers when a mini membership for 3 months is purchased. Parameter: Event player
Plot.begin eventobjid, toobjid, plotid, targetactorid Triggers when any scenario starts. Parameters: Event object, target object, plot type, target creature type
Plot.end eventobjid, toobjid, plotid, targetactorid Triggers when any scenario ends. Parameters: Event object, target object, plot type, target creature type
QQMusic.PlayBegin eventobjid, qqMusicId Triggers when QQ Music starts playing. Parameters: Event player, music ID
developer_center/developer_editor/lua_event.txt · Last modified: 2024/05/26 03:50 by hhuxx1