Skip to main content

CallbackSignatures

Callback Usage

note

Not all callbacks utilize CallbackResult return.

Functions​

OnDraw​

CallbackSignatures.OnDraw() → CallbackResult

Fired every time the game renders a frame. Can be used to draw to the screen using renderer functions.


OnImguiDraw​

CallbackSignatures.OnImguiDraw() → CallbackResult

Fired every time the game renders a frame with ImGui. Can be used to draw to the screen using ImGui functions.


OnTick​

CallbackSignatures.OnTick() → CallbackResult

Fired every time the game update object. Can be used to run champion logic.


OnFastTick​

CallbackSignatures.OnFastTick() → CallbackResult

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​

CallbackSignatures.OnUnload() → CallbackResult

Fired when script unload. Make sure to dispose of your objects and clean up with this callback.


OnBeforeAttack​

CallbackSignatures.OnBeforeAttack(
  beforeAttackOrbwalkerArgs: BeforeAttackOrbwalkerArgs
) → CallbackResult

ArgumentTypeDescription
beforeAttackOrbwalkerArgsBeforeAttackOrbwalkerArgs

Fired before orbwalker want to attack someone.


OnAfterAttack​

CallbackSignatures.OnAfterAttack(
  afterAttackOrbwalkerArgs: AfterAttackOrbwalkerArgs
) → CallbackResult

ArgumentTypeDescription
afterAttackOrbwalkerArgsAfterAttackOrbwalkerArgs

Fired when orbwalker finishes an attack.


OnIssueOrder​

CallbackSignatures.OnIssueOrder(
  issueOrderArgs: IssueOrderArgs
) → CallbackResult

ArgumentTypeDescription
issueOrderArgsIssueOrderArgs

Fired when issuing movement or attack order.

Example: Example: Cancel any IssueOrder
Callback.Bind(CallbackType.OnIssueOrder, function(issueOrderArgs)
return CallbackResult.Cancel -- Read more about CallbackResult and alternative options
end)

OnCastHud​

CallbackSignatures.OnCastHud(
  spellData: Spell - Spelldata Class,
  targetHandle: number - integer
) → CallbackResult

ArgumentTypeDescription
spellDataSpell - Spelldata Class
targetHandlenumber - integer

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


OnSpellCast​

CallbackSignatures.OnSpellCast(
  castSpellArgs: CastSpellArgs
) → CallbackResult

ArgumentTypeDescription
castSpellArgsCastSpellArgs

Fired on client-side spell cast.


OnSpellCast2​

CallbackSignatures.OnSpellCast2(
  castSpellArgs: CastSpellArgs
) → CallbackResult

ArgumentTypeDescription
castSpellArgsCastSpellArgs

Fired on client-side spell cast 2 (alternate).


OnValidateInput​

CallbackSignatures.OnValidateInput(
  hweicastArgs: hweicast_args
) → CallbackResult

ArgumentTypeDescription
hweicastArgshweicast_args

Fired on input validate (Hwei).


OnSpellAnimationStart​

CallbackSignatures.OnSpellAnimationStart(
  sender: AIBaseClient,
  castArgs: CastArgs
) → CallbackResult

ArgumentTypeDescription
senderAIBaseClient
castArgsCastArgs

Fired when a spell cast is started.


OnSpellCastComplete​

CallbackSignatures.OnSpellCastComplete(
  sender: AIBaseClient,
  castArgs: CastArgs
) → CallbackResult

ArgumentTypeDescription
senderAIBaseClient
castArgsCastArgs

Fired when a spell cast is finished.


OnSpellAnimationCancel​

CallbackSignatures.OnSpellAnimationCancel(
  sender: AIBaseClient,
  castArgs: CastArgs
) → CallbackResult

ArgumentTypeDescription
senderAIBaseClient
castArgsCastArgs

Fired when a spell cast is stopped.


OnUpdateMissile​

CallbackSignatures.OnUpdateMissile(
  pos: Vector3
) → CallbackResult

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)

OnUpdateChargeableSpell​

CallbackSignatures.OnUpdateChargeableSpell(
  spellBook: SpellBook,
  spellBookEntry: SpellBookEntry,
  slot: SpellSlot,
  pos: Vector3,
  isRelease: boolean
) → CallbackResult

ArgumentTypeDescription
spellBookSpellBook
spellBookEntrySpellBookEntry
slotSpellSlot
posVector3
isReleaseboolean

Fired when chargeable spell is updated.


OnChangeSlotSpellName​

CallbackSignatures.OnChangeSlotSpellName(
  sender: AIBaseClient,
  slot: SpellSlot,
  name: string
) → CallbackResult

ArgumentTypeDescription
senderAIBaseClient
slotSpellSlot
namestring

Fired when a spell slot name change.


OnEvolve​

CallbackSignatures.OnEvolve(
  slot: SpellSlot
) → CallbackResult

ArgumentTypeDescription
slotSpellSlot

Fired when evolving a spell.


OnObjectCreate​

CallbackSignatures.OnObjectCreate(
  sender: GameObject
) → CallbackResult

ArgumentTypeDescription
senderGameObject

Fired when GameObject is created.


OnObjectRemove​

CallbackSignatures.OnObjectRemove(
  sender: GameObject
) → CallbackResult

ArgumentTypeDescription
senderGameObject

Fired when GameObject is removed.


OnPrintChat​

CallbackSignatures.OnPrintChat( message: string, flags: number - integer ) → CallbackResult

ArgumentTypeDescription
messagestring
flagsnumber - integer

Fired when a message is printed to game chat.


OnNewPath​

CallbackSignatures.OnNewPath(
  sender: AIbaseClient,
  isDash: boolean,
  dashSpeed: number,
  path: Vector3[] - std::vector<Vector3>
) → CallbackResult

ArgumentTypeDescription
senderAIbaseClient
isDashboolean
dashSpeednumber
pathVector3[] - std::vector<Vector3>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​

CallbackSignatures.OnGainLoseBuff(
  buffScriptInstance: BuffScript,
  isGain: boolean
) → CallbackResult

ArgumentTypeDescription
buffScriptInstanceBuffScript
isGainboolean

Fired when unit gains or loses a buff.


OnUpdateBuff​

CallbackSignatures.OnUpdateBuff(
  sender: AIBaseClient,
  buffInstance: Buff
) → CallbackResult

ArgumentTypeDescription
senderAIBaseClient
buffInstanceBuff

Fired when one of unit buffs is updated.


OnPlayAnimation​

CallbackSignatures.OnPlayAnimation(
  sender: AIBaseClient,
  animationName: string
) → CallbackResult

ArgumentTypeDescription
senderAIBaseClient
animationNamestring

Fired when unit plays some animation.


OnNotify​

CallbackSignatures.OnNotify(
  eventName: string,
  eventID: number - integer,
  sourceNetworkID: number - integer
) → CallbackResult

ArgumentTypeDescription
eventNamestringEvent name string
eventIDnumber - integerEvent name ID
sourceNetworkIDnumber - integerSource entity network ID

Fired on various game events such as surrender vote.


OnSendPing​

CallbackSignatures.OnSendPing(
  pos: Vector3,
  targetNetworkID: number - integer,
  type: PingType
) → CallbackResult

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​

CallbackSignatures.OnShowPing(
  pos: Vector3,
  targetHandle: number - integer,
  sourceHandle: number - integer,
  type: PingType,
  isPlaySound: boolean
) → CallbackResult

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

Fired on any ping.


OnMinimapIconChange​

CallbackSignatures.OnMinimapIconChange(
  sender: AIBaseClient,
  name: string,
  type: string
) → CallbackResult

ArgumentTypeDescription
senderAIBaseClientSender entity
namestringIcon name
typestringIcon type

Fired on minimap icon change.


OnPacketReceive​

CallbackSignatures.OnPacketReceive( opcode: string, networkID: number ) → CallbackResult

ArgumentTypeDescription
opcodestring
networkIDnumber

Fired when we receive packet from server.


OnWndProc​

CallbackSignatures.OnWndProc(
  hwnd: string,
  message: string,
  wParam: string,
  lParam: string
) → CallbackResult

ArgumentTypeDescription
hwndstring
messagestring
wParamstring
lParamstring

Fired on user keyboard or mouse input.


OnEvade​

CallbackSignatures.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​

CallbackSignatures.OnSkillshotCreate(
  skillshot: Skillshot
) → void

ArgumentTypeDescription
skillshotSkillshotSkillshot instance created by Evade.

Fired when Evade creates an instance of skillshot.