CallbackType
Callback Usage
Functions
OnDraw
CallbackType.OnDraw()
→ void
Fired every time the game renders a frame. Can be used to draw to the screen using renderer functions.
OnImguiDraw
CallbackType.OnImguiDraw()
→ void
Fired every time the game renders a frame with ImGui. Can be used to draw to the screen using ImGui functions.
OnTick
CallbackType.OnTick()
→ void
Fired every time the game update object. Can be used to run champion logic.
OnFastTick
CallbackType.OnFastTick()
→ void
Fired every time the game update object. Can be used to run champion logic. Faster than on tick, do not use if not necessary.
OnUnload
CallbackType.OnUnload()
→ void
Fired when script unload. Make sure to dispose of your objects and clean up with this callback.
OnBeforeAttack
CallbackType.OnBeforeAttack(beforeAttackOrbwalkerArgs: BeforeAttackOrbwalkerArgs)
→ void
Argument | Type | Description |
---|---|---|
beforeAttackOrbwalkerArgs | BeforeAttackOrbwalkerArgs |
Fired before orbwalker want to attack someone.
OnAfterAttack
CallbackType.OnAfterAttack(afterAttackOrbwalkerArgs: AfterAttackOrbwalkerArgs)
→ void
Argument | Type | Description |
---|---|---|
afterAttackOrbwalkerArgs | AfterAttackOrbwalkerArgs |
Fired when orbwalker finishes an attack.
OnIssueOrder
CallbackType.OnIssueOrder(issueOrderArgs: IssueOrderArgs)
→ void
Argument | Type | Description |
---|---|---|
issueOrderArgs | IssueOrderArgs |
Fired when issuing movement or attack order.
OnCastHud
CallbackType.OnCastHud(spellData: Spell, targetHandle: number)
→ void
Argument | Type | Description |
---|---|---|
spellData | Spell - Spelldata Class | |
targetHandle | number - integer |
Fired on manual spell cast by the user (before OnSpellCast).
OnSpellCast
CallbackType.OnSpellCast(castSpellArgs: CastSpellArgs)
→ void
Argument | Type | Description |
---|---|---|
castSpellArgs | CastSpellArgs |
Fired on client-side spell cast.
OnSpellAnimationStart
CallbackType.OnSpellAnimationStart(sender: AIBaseClient, castArgs: CastArgs)
→ void
Argument | Type | Description |
---|---|---|
sender | AIBaseClient | |
castArgs | CastArgs |
Fired when a spell cast is started.
OnSpellCastComplete
CallbackType.OnSpellCastComplete(sender: AIBaseClient, castArgs: CastArgs)
→ void
Argument | Type | Description |
---|---|---|
sender | AIBaseClient | |
castArgs | CastArgs |
Fired when a spell cast is finished.
OnSpellAnimationCancel
CallbackType.OnSpellAnimationCancel(sender: AIBaseClient, castArgs: CastArgs)
→ void
Argument | Type | Description |
---|---|---|
sender | AIBaseClient | |
castArgs | CastArgs |
Fired when a spell cast is stopped.
OnUpdateMissile
CallbackType.OnUpdateMissile(pos: Vector3)
→ void
Argument | Type | Description |
---|---|---|
pos | Vector3 |
Fired when missile is being updated. For example for Yuumi Q. You can edit the position.
Callback.Bind(CallbackType.OnUpdateMissile, function(pos)
pos.x = Game.GetCursorWorldPosition().x + 500
end)
OnChangeSlotSpellName
CallbackType.OnChangeSlotSpellName(sender: AIBaseClient, slot: SpellSlot, name: string)
→ void
Argument | Type | Description |
---|---|---|
sender | AIBaseClient | |
slot | SpellSlot | |
name | string |
Fired when a spell slot name change.
OnEvolve
CallbackType.OnEvolve(slot: SpellSlot)
→ void
Argument | Type | Description |
---|---|---|
slot | SpellSlot |
Fired when evolving a spell.
OnObjectCreate
CallbackType.OnObjectCreate(sender: GameObject)
→ void
Argument | Type | Description |
---|---|---|
sender | GameObject |
Fired when GameObject is created.
OnObjectRemove
CallbackType.OnObjectRemove(sender: GameObject)
→ void
Argument | Type | Description |
---|---|---|
sender | GameObject |
Fired when GameObject is removed.
OnPrintChat
CallbackType.OnPrintChat(message: string, flags: number)
→ void
Argument | Type | Description |
---|---|---|
message | string | |
flags | number - integer |
Fired when a message is printed to game chat.
OnNewPath
CallbackType.OnNewPath(
sender: AIbaseClient,
isDash: boolean,
dashSpeed: number,
path: Vector2[]
)
→ void
Argument | Type | Description |
---|---|---|
sender | AIbaseClient | |
isDash | boolean | |
dashSpeed | number | |
path | Vector2[] - std::vector<Vector2> | Path |
Fired when when unit gets a new path.
I think sometimes this callback is not reliable. When Leesin R kick someone path may incorrect.
Callback.Bind(CallbackType.OnNewPath,function(sender,isDash,dashSpeed,path)
for i, v in path:pairs() do
PrintChat(tostring(i))
PrintChat(tostring(v))
end
end)
OnGainLoseBuff
CallbackType.OnGainLoseBuff(buffScriptInstance: BuffScript, isGain: boolean)
→ void
Argument | Type | Description |
---|---|---|
buffScriptInstance | BuffScript | |
isGain | boolean |
Fired when unit gains or loses a buff.
OnUpdateBuff
CallbackType.OnUpdateBuff(sender: AIBaseClient, buffInstance: Buff)
→ void
Argument | Type | Description |
---|---|---|
sender | AIBaseClient | |
buffInstance | Buff |
Fired when one of unit buffs is updated.
OnPlayAnimation
CallbackType.OnPlayAnimation(sender: AIBaseClient, animationName: string)
→ void
Argument | Type | Description |
---|---|---|
sender | AIBaseClient | |
animationName | string |
Fired when unit plays some animation.
OnNotify
CallbackType.OnNotify(
eventName: string,
eventID: number,
sourceNetworkID: #(integer) Source entity network ID
)
→ void
Argument | Type | Description |
---|---|---|
eventName | string | Event name string |
eventID | number - integer | Event name ID |
sourceNetworkID | #(integer) Source entity network ID | nil |
Fired on various game events such as surrender vote.
OnSendPing
CallbackType.OnSendPing(pos: Vector3, targetNetworkID: number, type: PingType)
→ void
Argument | Type | Description |
---|---|---|
pos | Vector3 | Pinged position |
targetNetworkID | number - integer | Pinged target network ID |
type | PingType | Used ping type |
Fired when player pings something. This event can be cancelled similar to OnSpellCast or OnIssueOrder.
OnShowPing
CallbackType.OnShowPing(
pos: Vector3,
targetHandle: number,
sourceHandle: number,
type: PingType,
isPlaySound: boolean
)
→ void
Argument | Type | Description |
---|---|---|
pos | Vector3 | Pinged position |
targetHandle | number - integer | Pinged target handle |
sourceHandle | number - integer | Source handle |
type | PingType | Used ping type |
isPlaySound | boolean | Is playing sound |
Fired on any ping.
OnMinimapIconChange
CallbackType.OnMinimapIconChange(sender: AIBaseClient, name: string, type: string)
→ void
Argument | Type | Description |
---|---|---|
sender | AIBaseClient | Sender entity |
name | string | Icon name |
type | string | Icon type |
Fired on minimap icon change.
OnEvade
CallbackType.OnEvade(position: Vector2, spellData?: SpellData)
→ void
Argument | Type | Description |
---|---|---|
position | Vector2 | Position where evade will try to dodge. |
spellData? | SpellData | Spell data of evading ability spell unless it was movement. |
Fired when Evade takes action to dodge something.
OnSkillshotCreate
CallbackType.OnSkillshotCreate(skillshot: Skillshot)
→ void
Argument | Type | Description |
---|---|---|
skillshot | Skillshot | Skillshot instance created by Evade. |
Fired when Evade creates an instance of skillshot.