callst

.ac

lua

Information

    Libraries/Engines Included

    lua 5.1 | package | coroutine | string | table | math | bit32 | jit | ffi | utf8

    Scripts Folder

    %temp%/callst.ac/lua/scripts

Global

    vec2f / vec2d

    fields: x (int), y (int)

                                            
    local my_vec2 = vec2d.new(100, 500) --creates a new vec2d object
    print(my_vec2) --prints x: 100, y: 500
    print(my_vec2.x) --prints 100
    print(my_vec2.y) --prints 500
                                            
                                        
    vec3f / vec3d

    fields: x (int), y (int), z (int)

                                            
    local my_vec3 = vec3f.new(400, 200, 740) -- creates a new vec3f object
    local my_other_vec3 = vec3f.new(100, 300, 520)
    
    print(my_vec3) -- prints x: 400, y: 200, z: 740
    print(my_vec3.x) -- prints 400
    print(my_vec3.y) -- prints 200
    print(my_vec3.z) -- prints 740
                                                
    --[[
        functions:
        length: returns the euclidean length of your vec3f
        length_2d: returns the length of x and y in your vec3f
        length_2d_sqr: returns the squared length of x and y in your vec3f
        length_sqr: returns the squared length of your vec3f
        dist_to: returns the euclidean distance between your vec3f and the other vec3f
        dist_to_sqr: returns the squared distance of your vec3f and the other vec3f
        normalize: normalizes your vec3f
    ]]
                                                
    print(my_vec3:length()) -- prints 864.638671875
    print(my_vec3:length_2d()) -- prints 447.2135925293
    print(my_vec3:length_2d_sqr()) -- prints 200000
    print(my_vec3:length_sqr()) -- prints 747600
    print(my_vec3:dist_to(my_other_vec3)) -- prints 385.22720336914
    print(my_vec3:dist_to_sqr(my_other_vec3)) -- prints 148400
                                                
    my_vec3:normalize() --normalizes your vec3f
    print(my_vec3) -- prints x: 400, y: 160, z: 0
                                            
                                        
    vec4f / vec4d

    fields: x (int), y (int), z (int), w (int)

                                            
    local my_vec4 = vec4f.new(100, 500, 700, 200) --creates a new vec4f object
    print(my_vec4) --prints x: 100, y: 500, z: 700, w: 200
    print(my_vec4.x) --prints 100
    print(my_vec4.y) --prints 500
    print(my_vec4.z) --prints 700
    print(my_vec4.w) --prints 200
                                            
                                        
    img

    fields: texture (uint64_t), width (int), height (int)

                                            
    local cat_img = render.load_image("C:\\Users\\jake\\Downloads\\cat.jpg")
    print(cat_img) --prints texture: {texture addr}, width {width}, height {height}
    print(cat_img.width) --prints 100
    print(cat_img.height) --prints 500
                                            
                                        
    color

    fields: r (int), g (int), b (int), a (int)

                                            
    local my_color = color.new(255, 255, 0, 255)
                                            
                                        
    ue4_ftransform

    fields: rotation (vec4f), translation (vec3f), scale_3d (vec3f)

                                            
    local player_head_transform = memory.read_ue4_ftransform(player.bone_array + (11 * 0x30));
    
    print(player_head_transform.rotation.x)
    print(player_head_transform.translation.w)
    print(player_head_transform.scale_3d.y)
                                            
                                        

Client

    get_screen_size

    returns: vec2f

    local screen_size = client.get_screen_size()
    time_since_epoch

    args: (optional) return ms (bool) | returns: int

    local time_ms = client.time_since_epoch(true)
    get_fps

    returns: int

    local fps = client.get_fps()
    is_key_held

    args: virtual key (int) | returns: bool

    local x_held = client.is_key_held(0x58)
    is_key_toggled

    args: virtual key (int) | returns: bool

    local l_toggled = client.is_key_toggled(0x4c)
    screen_log

    args: text (string)

    client.screen_log("hello world")
    mouse_move

    args: move_x (int), move_y (int)

    client.mouse_move(-1, 5)
    mouse_left_click

    args: none

    client.mouse_left_click()

Memory

    setup_process

    args: process name (string)

    memory.setup_process("HLL-Win64-Shipping.exe")
    find_pattern

    args: ida-style pattern (string) | returns: uint64_t

    local g_world = memory.find_pattern("48 8B 1D ? ? ? ? 48 85 DB 74 3B")
    get_base

    args: none | returns: uint64_t

    local base_address = memory.get_base()
    get_dtb

    args: base address (uint64_t) | returns: uint64_t

    local cr3 = memory.get_dtb(base_address)
    set_dtb

    args: directory table base / cr3 (uint64_t)

    memory.set_dtb(new_cr3)
    read_vec2f

    args: address (uint64_t) | returns: vec2f

    local my_vec2f = memory.read_vec2f(addr)
    read_vec3f

    args: address (uint64_t) | returns: vec3f

    local player_pos = memory.read_vec3f(player_addr + 0x50)
    read_vec4f

    args: address (uint64_t) | returns: vec4f

    local my_vec4f = memory.read_vec4f(addr)
    read_vec2d

    args: address (uint64_t) | returns: vec2d

    local my_vec2d = memory.read_vec2d(addr)
    read_vec3d

    args: address (uint64_t) | returns: vec3d

    local player_pos = memory.read_vec3d(player_addr + 0x50)
    read_vec4d

    args: address (uint64_t) | returns: vec4d

    local my_vec4d = memory.read_vec4d(addr)
    read_char

    args: address (uint64_t) | returns: char

    local is_dead = memory.read_char(player_addr + 0x30)
    read_bool

    args: address (uint64_t) | returns: bool

    local is_dead = memory.read_bool(player_addr + 0x30)
    read_float

    args: address (uint64_t) | returns: float

    local player_health = memory.read_float(health_comp + 0x20)
    read_double

    args: address (uint64_t) | returns: double

    local player_health = memory.read_double(health_comp + 0x20)
    read_int8

    args: address (uint64_t) | returns: 8 byte integer

    local my_int8 = memory.read_int8(addr)
    read_int16

    args: address (uint64_t) | returns: 16 byte integer

    local my_int16 = memory.read_int16(addr)
    read_int32

    args: address (uint64_t) | returns: 32 byte integer

    local my_int32 = memory.read_int32(addr)
    read_int64

    args: address (uint64_t) | returns: 64 byte integer

    local my_int64 = memory.read_int64(addr)
    read_uint8

    args: address (uint64_t) | returns: 8 byte unsigned integer

    local my_uint8 = memory.read_uint8(addr)
    read_uint16

    args: address (uint64_t) | returns: 16 byte unsigned integer

    local my_uint16 = memory.read_uint16(addr)
    read_uint32

    args: address (uint64_t) | returns: 32 byte unsigned integer

    local my_uint32 = memory.read_uint32(addr)
    read_uint64

    args: address (uint64_t) | returns: 64 byte unsigned integer

    local my_uint64 = memory.read_uint64(addr)
    read_string

    args: address (uint64_t) | returns: string

    local player_name = memory.read_string(player_addr + 0x78)
    read_wide_string

    args: address (uint64_t) | returns: string

    local player_name = memory.read_wide_string(player_addr + 0x78)
    read_ue4_ftransform

    args: address (uint64_t) | returns: ue4_ftransform

    local player_head_transform = memory.read_ue4_ftransform(player.bone_array + (11 * 0x30));

Render

    load_image

    args: path (string) | returns: img

    local cat_img = render.load_image("C:\\Users\\jake\\Downloads\\cat.jpg")
    text_size

    args: font (int, 0 = small; 1 = medium), text (string) | returns: vec2f

    local text_sz = render.text_size(0, "hello world")
    text

    args: font (int, 0 = small; 1 = medium), position (vec2f), color (color), text (string) | optional args: outline (bool), centered (bool), dropshadow (bool)

    render.text(0, vec2f.new(100, 135), color.new(255, 255, 255, 255), "some text", true, true)
    rect

    args: position (vec2f), size (vec2f), color (color) | optional args: rounding (int), thickness (int)

    render.rect(vec2f.new(100, 150), vec2f.new(100, 50), color.new(255, 255, 0, 255))
    rect_filled

    args: position (vec2f), size (vec2f), color (color) | optional args: rounding (int)

    render.rect_filled(vec2f.new(100, 150), vec2f.new(100, 50), color.new(255, 255, 0, 255), 5)
    rect_gradient

    args: position (vec2f), size (vec2f), left color (color), right color (color) | optional args: vertical gradient (bool)

    render.rect_gradient(vec2f.new(100, 270), vec2f.new(100, 50), color.new(255, 0, 255, 255), color.new(0, 255, 255, 255))
    circle

    args: position (vec2f), radius (int), color (color) | optional args: segments (int), thickness (int)

    render.circle(vec2f.new(150, 360), 30, color.new(0, 255, 0, 255))
    circle_filled

    args: position (vec2f), radius (int), color (color) | optional args: segments (int)

    render.circle_filled(vec2f.new(150, 430), 30, color.new(255, 0, 0, 255))
    triangle

    args: pos1 (vec2f), pos2 (vec2f), pos3 (vec2f), color (color) | optional args: thickness (int)

    render.triangle(vec2f.new(150, 550), vec2f.new(100, 470), vec2f.new(200, 470), color.new(255, 255, 255, 255), 2)
    triangle_filled

    args: pos1 (vec2f), pos2 (vec2f), pos3 (vec2f), color (color)

    render.triangle_filled(vec2f.new(150, 650), vec2f.new(100, 570), vec2f.new(200, 570), color.new(0, 255, 255, 255))
    polygon

    args: points (vec2f array), color (color) | optional args: thickness (int)

    render.polygon({vec2f.new(100, 670), vec2f.new(150, 670), vec2f.new(200, 720), vec2f.new(100, 720), vec2f.new(100, 670)}, color.new(255, 255, 255, 255), 2)
    polygon_filled

    args: points (vec2f array), color (color)

    render.polygon_filled({vec2f.new(100, 770), vec2f.new(150, 770), vec2f.new(200, 820), vec2f.new(100, 820), vec2f.new(100, 770)}, color.new(255, 165, 0, 255))
    line

    args: start (vec2f), end (vec2f), color (color) | optional args: thickness (int)

    render.line(vec2f.new(100, 500), vec2f.new(200, 500), color.new(255, 255, 255, 255), 3)
    arc

    args: pos (vec2f), min angle (int), max angle (int), radius (int), color (color) | optional args: thickness (int)

    render.arc(vec2f.new(150, 500), 60, 180, 30, color.new(255, 255, 255, 255), 2)
    image

    args: image (image obj), position (vec2f) | optional args: center (bool)

    render.image(cat_img, vec2f.new(50, 500))

Callbacks

    add

    args: event (string), function (func)

    callbacks.add("render", my_function)
    remove

    args: event (string)

    callbacks.remove("render")

Events

    render

    called every frame

                                            
    callbacks.add("render", function()
        render.rect(vec2f.new(100, 150), vec2f.new(100, 50), color.new(255, 255, 0, 255))
    end)