Tables
cheat

cheat

Functions

on

Register a callback.

ArgumentTypeRequired
namestring+
callbackfunction+

Available callbacks

  • lua.load
  • lua.unload
  • local.cast_spell
  • local.issue_order_attack
  • local.issue_order_move
  • champion.create
  • champion.delete
  • features.pre_run
  • features.run
  • features.orbwalker
  • features.prediction
  • features.entity_list
  • features.buff_cache
  • features.evade
  • features.target_selector
  • features.orbwalker.send_move_input
  • renderer.draw
-- Cancel all issue_order_move calls. Also works with "local.cast_spell", "local.issue_order_attack"
cheat.on("local.issue_order_move", function(e)
    e:cancel()
end)
 
cheat.on("features.run", function()
    -- replacement for cheat.register_callback("feature")
end)
 
cheat.on("renderer.draw", function()
    local target = features.target_selector:get_default_target()
 
    if target ~= nil and g_local ~= nil then
        -- Draw line from local to current target
        g_render:line_3d(g_local.position, target.position, color:new(255, 255, 255, 255), 1)
    end
end)

register_module

Register your own champion module.

ArgumentTypeRequired
moduletable+

Module input table structure:

KeyTypeReturn typeRequired
champion_namestringnil+
get_prioritiesfunctionstring+
on_drawfunctionnil+
spell_qfunction(spell)boolean+
spell_wfunction(spell)boolean+
spell_efunction(spell)boolean+
spell_rfunction(spell)boolean+
initializefunctionnil+

Data passed to all spell_* functions is of type champion_module_spell_data_t.

Functions for spells will only be called when the slot is ready.

-- example usage
-- `spell_w` will be called first, then `spell_q`, then `spell_e`, then `spell_r`
local registered = cheat.register_module({
    champion_name = "Ezreal",
    spell_q = function(data)
        return false
    end,
    spell_w = function(data)
        return false
    end,
    spell_e = function(data)
        return false
    end,
    spell_r = function(data)
        return false
    end,
    initialize = function()
        -- register menu components here
    end,
    on_draw = function()
        -- draw stuff here
    end,
    get_priorities = function()
        -- the return value of this table can also be changed dynamically
        return { "spell_w", "spell_q", "spell_e", "spell_r" }
    end,
})

get_module_by_champion

Get core champion module by champion name.

ArgumentTypeRequired
champion_namestring+
returnsc_module
-- example usage
local coreEzreal = cheat.get_module_by_champion("Ezreal")
 
if coreEzreal == nil then
  return
end
 
-- extend core champion module
cheat.register_module({
    champion_name = "Ezreal",
    spell_q = function(data)
        return coreEzreal:spell_q()
    end,
    spell_w = function(data)
       return coreEzreal:spell_w()
    end,
    spell_e = function(data)
        -- add custom e spell to module
        return g_input:cast_spell(e_spell_slot.e)
    end,
    spell_r = function(data)
       return coreEzreal:spell_r()
    end,
    get_priorities = function()
        return { "spell_w", "spell_q", "spell_e", "spell_r" }
    end,
})

get_resource_path

Get the path of the resource folder.

ArgumentTypeRequired
returnsstring

get_local_attack_cast_delay

ArgumentTypeRequired
returnsnumber

get_local_attack_delay

ArgumentTypeRequired
returnsnumber

get_default_target_selector

Get core target selector.

ArgumentTypeRequired
returnsc_target_selector