FECALITY.SHOP [API]
  • Overview
  • GETTING STARTED
    • Metadata
    • Creating scripts
    • Callbacks
    • Examples
    • Useful resources
  • DOCUMENTATION
    • Datatypes
      • entity
      • player_info
      • weapon_info
      • user_cmd
      • trace_t
      • vec3
      • cvar
      • timer
      • cfg_value
      • shot_info
      • game_event
      • material
      • material_var
      • zip
      • animator
    • Namespaces
      • Gui
      • Render
      • Engine
      • Math
      • Utilities
      • Entities
      • Database
      • Input
      • Panorama
      • Materials
      • Filesystem
      • Zip
    • Instances
      • Global Vars
      • Fecality
      • Gamerules
      • Server
Powered by GitBook
On this page
  • Random values
  • Memory
  • Timers
  • HTTP
  • Json
  • Trace ray
  • Console
  • Encryption
  • Miscellaneous
  1. DOCUMENTATION
  2. Namespaces

Utilities

utils namespace

Random values

random_int

utils.random_int(0, 100)

min

number

minimum number to generate

max

number

maximum number to generate

Returns:

random number

number

random_float

utils.random_float(0, 100)

min

number

minimum number to generate

max

number

maximum number to generate

Returns:

random number

number

Memory

find_interface

utils.find_interface("client.dll", "VClient018")

module_name

string

name of module

interface_name

string

name of interface followed by its version number

Returns:

interface address or nil on failure

number - nil

find_pattern

utils.find_pattern("client.dll", "8B 3D ? ? ? ? 85 FF 74 47") + 2

module_name

string

name of module

pattern

string

Returns:

pattern address or nil on failure

number - nil

flags

utils.flags(render.font_flag_outline, render.font_flag_shadow)

flag

number

...

number

any other flags

Timers

new_timer

local timer = utils.new_timer(100, function()print("This will be called every 100ms")end)timer:start()

rate

number

the rate in which the function will be called (in milliseconds)

function_to_call

function

function to be called

Returns:

timer object

run_delayed

utils.run_delayed(100, function()print("This will be called after 100ms")end)

delay

number

the delay to wait before calling the function (in milliseconds)

function_to_call

function

function to be called

HTTP

http_get

utils.http_get("https://pastebin.com/raw/FT1aRqq8", "Accept: */*", function(response)print(response)end)

url

string

url to send the request to

headers

string

function_to_call

function

callback with response

http_post

utils.http_post("https://reqbin.com/echo/post/json", "Content-Type: application/json",[[body: "{"id": 12345,}"]],function(response)print(response)end)

url

string

url to send the request to

headers

string

body

string

post body

function_to_call

function

callback with response

Json

json_decode

local json_data =[[{"value": 1,"color": "pink"}]]local json_decoded = utils.json_decode(json_data)

json_data

string

string of json data

Returns:

json data as lua table

table

json_encode

local table ={value = 1,color = "pink"}local json_string = utils.json_encode(table)

lua_table

table

a lua table to be encoded into json

Returns:

lua table as a json string

string

Trace ray

trace

utils.trace(math.vec3(0, 0, 0), math.vec3(100, 100, 100), -1)

from

starting point

to

ending point

skip_index

number

index to skip or -1 for all players

Returns

trace info

trace_bullet

utils.trace_bullet(7, math.vec3(0, 0, 0), math.vec3(100, 100, 100))

item_definition_index

number

weapon's item definition index to use for tracing

from

starting point

to

ending point

Returns:

damage

number

trace info

scale_damage

utils.scale_damage(30, 7, 0, player:get_prop("m_nArmor"), player:get_prop("m_bHasHeavyArmor"), player:get_prop("m_bHasHelmet"))

damage

number

damage to scale

item_definition_index

number

weapon's item definition index to use for calculating damage

hit_group

number

hit group to scale with

armor

number

their armor level

heavy_armor

boolean

do they have heavy armor

helmet

boolean

do they have a helmet

Returns:

damage

number

Console

print_console

utils.print_console("red text", render.color("#FF0000"))

text

string

text to print

❌

color

color

white

print_dev_console

utils.print_dev_console("text")

text

string

text to print

error_print

utils.error_print("error")

text

string

text to print

Encryption

aes256_encrypt

local encryption = utils.aes256_encrypt("abcdefg", "we woo we woo")

key

string

key to also used for decryption

data

string

string to encrypt

Returns:

encrypted data

string

aes256_decrypt

local encryption = utils.aes256_encrypt("abcdefg", "we woo we woo")local data = utils.aes256_decrypt("abcdefg", encryption)

key

string

key to also used for encryption

data

string

encrypted string

Returns:

data

string

base64_encode

local encoded = utils.base64_encode("AAAAAAA")

data

string

data to encode

Returns:

encoded data

string

base64_decode

local encoded = utils.base64_encode("AAAAAAA")local data = utils.base64_decode(encoded)

encoded data

string

data from base64_encode

Returns:

data

string

Miscellaneous

load_file

utils.load_file("path")

path

string

path to file

Returns:

file_contents

binary string

Note:

Path starts at csgo.exe's file location.

get_weapon_info

utils.get_weapon_info(1)

item_definition_index

number

Returns:

table with the weapons info

get_rtt

utils.get_rtt()

Returns:

round trip time to server

number

world_to_screen

local x, y = utils.world_to_screen(0, 0, 100)if x thenrender.rect_filled(x, y, 1, 1, render.color("#FFFFFF"))end

x

number

3D x world position

y

number

3D y world position

z

number

3D z world position

Returns:

x screen pos or nil on failure

number - nil

y screen pos or nil on failure

number - nil

Usage:

Converts world coordinates to screen coordinates.

set_clan_tag

utils.set_clan_tag("fatal")

new_tag

string

string to set clantag to

get_time

utils.get_time()

Returns:

time information

table

Table structure:

year

number

current year

month

number

month (1 - 12)

year_day

number

day (1 - 366)

month_day

number

day (1 - 31)

week_day

number

day (1 - 7)

hour

number

hour (1 - 23)

min

number

minute (1 - 59)

sec

number

second (0 - 60) including leap second

get_unix_time

utils.get_unix_time()

Returns:

number

PreviousMathNextEntities

Last updated 2 years ago

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​ style pattern. ? indicates wildcard

​​

​​

​​

​​

​​

flags to combine with the operator

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

weapons ​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
IDA
Value
Datatype
Parameter
Datatype
Description
bitwise OR
Parameter
Datatype
Description
Value
Datatype
utils.timer
Parameter
Datatype
Description
Parameter
Datatype
Description
http headers
Parameter
Datatype
Description
http headers
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
math.vec3
math.vec3
Value
Datatype
trace_t
Parameter
Datatype
Description
math.vec3
math.vec3
Value
Datatype
trace_t
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Default value
render.color
Parameter
Datatype
Description
Parameter
Datatype
Description
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
item definition index
Value
Datatype
utils.weapon_info
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Value
Datatype
Description
Value
Datatype
unix timestamp