Skip to main content

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

ArgumentTypeDescription
beforeAttackOrbwalkerArgsBeforeAttackOrbwalkerArgs

Fired before orbwalker want to attack someone.


OnAfterAttack

CallbackType.OnAfterAttack(afterAttackOrbwalkerArgs: AfterAttackOrbwalkerArgs) void

ArgumentTypeDescription
afterAttackOrbwalkerArgsAfterAttackOrbwalkerArgs

Fired when orbwalker finishes an attack.


OnIssueOrder

CallbackType.OnIssueOrder(issueOrderArgs: IssueOrderArgs) void

ArgumentTypeDescription
issueOrderArgsIssueOrderArgs

Fired when issuing movement or attack order.


OnCastHud

CallbackType.OnCastHud(spellData: Spell, targetHandle: number) void

ArgumentTypeDescription
spellDataSpell - Spelldata Class
targetHandlenumber - integer

Fired on manual spell cast by the user (before OnSpellCast).


OnSpellCast

CallbackType.OnSpellCast(castSpellArgs: CastSpellArgs) void

ArgumentTypeDescription
castSpellArgsCastSpellArgs

Fired on client-side spell cast.


OnSpellAnimationStart

CallbackType.OnSpellAnimationStart(sender: AIBaseClient, castArgs: CastArgs) void

ArgumentTypeDescription
senderAIBaseClient
castArgsCastArgs

Fired when a spell cast is started.


OnSpellCastComplete

CallbackType.OnSpellCastComplete(sender: AIBaseClient, castArgs: CastArgs) void

ArgumentTypeDescription
senderAIBaseClient
castArgsCastArgs

Fired when a spell cast is finished.


OnSpellAnimationCancel

CallbackType.OnSpellAnimationCancel(sender: AIBaseClient, castArgs: CastArgs) void

ArgumentTypeDescription
senderAIBaseClient
castArgsCastArgs

Fired when a spell cast is stopped.


OnUpdateMissile

CallbackType.OnUpdateMissile(pos: Vector3) void

ArgumentTypeDescription
posVector3

Fired when missile is being updated. For example for Yuumi Q. You can edit the position.

Example: OnUpdateMissile example
Callback.Bind(CallbackType.OnUpdateMissile, function(pos)
pos.x = Game.GetCursorWorldPosition().x + 500
end)

OnChangeSlotSpellName

CallbackType.OnChangeSlotSpellName(sender: AIBaseClient, slot: SpellSlot, name: string) void

ArgumentTypeDescription
senderAIBaseClient
slotSpellSlot
namestring

Fired when a spell slot name change.


OnEvolve

CallbackType.OnEvolve(slot: SpellSlot) void

ArgumentTypeDescription
slotSpellSlot

Fired when evolving a spell.


OnObjectCreate

CallbackType.OnObjectCreate(sender: GameObject) void

ArgumentTypeDescription
senderGameObject

Fired when GameObject is created.


OnObjectRemove

CallbackType.OnObjectRemove(sender: GameObject) void

ArgumentTypeDescription
senderGameObject

Fired when GameObject is removed.


OnPrintChat

CallbackType.OnPrintChat(message: string, flags: number) void

ArgumentTypeDescription
messagestring
flagsnumber - integer

Fired when a message is printed to game chat.


OnNewPath

CallbackType.OnNewPath(
sender: AIbaseClient,
isDash: boolean,
dashSpeed: number,
path: Vector2[]
) void

ArgumentTypeDescription
senderAIbaseClient
isDashboolean
dashSpeednumber
pathVector2[] - std::vector<Vector2>Path

Fired when when unit gets a new path.

caution

I think sometimes this callback is not reliable. When Leesin R kick someone path may incorrect.

Example: OnNewPath Callback Example
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

ArgumentTypeDescription
buffScriptInstanceBuffScript
isGainboolean

Fired when unit gains or loses a buff.


OnUpdateBuff

CallbackType.OnUpdateBuff(sender: AIBaseClient, buffInstance: Buff) void

ArgumentTypeDescription
senderAIBaseClient
buffInstanceBuff

Fired when one of unit buffs is updated.


OnPlayAnimation

CallbackType.OnPlayAnimation(sender: AIBaseClient, animationName: string) void

ArgumentTypeDescription
senderAIBaseClient
animationNamestring

Fired when unit plays some animation.


OnNotify

CallbackType.OnNotify(
eventName: string,
eventID: number,
sourceNetworkID: #(integer) Source entity network ID
) void

ArgumentTypeDescription
eventNamestringEvent name string
eventIDnumber - integerEvent name ID
sourceNetworkID#(integer) Source entity network IDnil

Fired on various game events such as surrender vote.


OnSendPing

CallbackType.OnSendPing(pos: Vector3, targetNetworkID: number, type: PingType) void

ArgumentTypeDescription
posVector3Pinged position
targetNetworkIDnumber - integerPinged target network ID
typePingTypeUsed 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

ArgumentTypeDescription
posVector3Pinged position
targetHandlenumber - integerPinged target handle
sourceHandlenumber - integerSource handle
typePingTypeUsed ping type
isPlaySoundbooleanIs playing sound

Fired on any ping.


OnMinimapIconChange

CallbackType.OnMinimapIconChange(sender: AIBaseClient, name: string, type: string) void

ArgumentTypeDescription
senderAIBaseClientSender entity
namestringIcon name
typestringIcon type

Fired on minimap icon change.


OnEvade

CallbackType.OnEvade(position: Vector2, spellData?: SpellData) void

ArgumentTypeDescription
positionVector2Position where evade will try to dodge.
spellData?SpellDataSpell data of evading ability spell unless it was movement.

Fired when Evade takes action to dodge something.


OnSkillshotCreate

CallbackType.OnSkillshotCreate(skillshot: Skillshot) void

ArgumentTypeDescription
skillshotSkillshotSkillshot instance created by Evade.

Fired when Evade creates an instance of skillshot.