lua 5.1 | package | coroutine | string | table | math | bit32 | jit | ffi | utf8
%temp%/callst.ac/lua/scripts
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
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
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
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
fields: r (int), g (int), b (int), a (int)
local my_color = color.new(255, 255, 0, 255)
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)
returns: vec2f
local screen_size = client.get_screen_size()
args: (optional) return ms (bool) | returns: int
local time_ms = client.time_since_epoch(true)
returns: int
local fps = client.get_fps()
args: virtual key (int) | returns: bool
local x_held = client.is_key_held(0x58)
args: virtual key (int) | returns: bool
local l_toggled = client.is_key_toggled(0x4c)
args: text (string)
client.screen_log("hello world")
args: move_x (int), move_y (int)
client.mouse_move(-1, 5)
args: none
client.mouse_left_click()
args: process name (string)
memory.setup_process("HLL-Win64-Shipping.exe")
args: ida-style pattern (string) | returns: uint64_t
local g_world = memory.find_pattern("48 8B 1D ? ? ? ? 48 85 DB 74 3B")
args: none | returns: uint64_t
local base_address = memory.get_base()
args: base address (uint64_t) | returns: uint64_t
local cr3 = memory.get_dtb(base_address)
args: directory table base / cr3 (uint64_t)
memory.set_dtb(new_cr3)
args: address (uint64_t) | returns: vec2f
local my_vec2f = memory.read_vec2f(addr)
args: address (uint64_t) | returns: vec3f
local player_pos = memory.read_vec3f(player_addr + 0x50)
args: address (uint64_t) | returns: vec4f
local my_vec4f = memory.read_vec4f(addr)
args: address (uint64_t) | returns: vec2d
local my_vec2d = memory.read_vec2d(addr)
args: address (uint64_t) | returns: vec3d
local player_pos = memory.read_vec3d(player_addr + 0x50)
args: address (uint64_t) | returns: vec4d
local my_vec4d = memory.read_vec4d(addr)
args: address (uint64_t) | returns: char
local is_dead = memory.read_char(player_addr + 0x30)
args: address (uint64_t) | returns: bool
local is_dead = memory.read_bool(player_addr + 0x30)
args: address (uint64_t) | returns: float
local player_health = memory.read_float(health_comp + 0x20)
args: address (uint64_t) | returns: double
local player_health = memory.read_double(health_comp + 0x20)
args: address (uint64_t) | returns: 8 byte integer
local my_int8 = memory.read_int8(addr)
args: address (uint64_t) | returns: 16 byte integer
local my_int16 = memory.read_int16(addr)
args: address (uint64_t) | returns: 32 byte integer
local my_int32 = memory.read_int32(addr)
args: address (uint64_t) | returns: 64 byte integer
local my_int64 = memory.read_int64(addr)
args: address (uint64_t) | returns: 8 byte unsigned integer
local my_uint8 = memory.read_uint8(addr)
args: address (uint64_t) | returns: 16 byte unsigned integer
local my_uint16 = memory.read_uint16(addr)
args: address (uint64_t) | returns: 32 byte unsigned integer
local my_uint32 = memory.read_uint32(addr)
args: address (uint64_t) | returns: 64 byte unsigned integer
local my_uint64 = memory.read_uint64(addr)
args: address (uint64_t) | returns: string
local player_name = memory.read_string(player_addr + 0x78)
args: address (uint64_t) | returns: string
local player_name = memory.read_wide_string(player_addr + 0x78)
args: address (uint64_t) | returns: ue4_ftransform
local player_head_transform = memory.read_ue4_ftransform(player.bone_array + (11 * 0x30));
args: path (string) | returns: img
local cat_img = render.load_image("C:\\Users\\jake\\Downloads\\cat.jpg")
args: font (int, 0 = small; 1 = medium), text (string) | returns: vec2f
local text_sz = render.text_size(0, "hello world")
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)
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))
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)
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))
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))
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))
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)
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))
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)
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))
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)
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)
args: image (image obj), position (vec2f) | optional args: center (bool)
render.image(cat_img, vec2f.new(50, 500))
args: event (string), function (func)
callbacks.add("render", my_function)
args: event (string)
callbacks.remove("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)