Skip to content

Instantly share code, notes, and snippets.

View SalatielSauer's full-sized avatar
🇧🇷
Salatiel#5274

Salatiel SalatielSauer

🇧🇷
Salatiel#5274
View GitHub Profile
@SalatielSauer
SalatielSauer / DGKminer.md
Last active March 24, 2022 17:28
NodeJS for mining Discord Gift keys.

Some Important Informations

  • This kind of mining is not illegal.
  • This is far from a "hacking script".
  • Keys are valid for a few minutes after a user action, so the chances of getting a valid one are minimal.
  • A key is generated every 2.5 seconds, it can not be less than this to avoid a "block" coming from discord api.
    • Even with this delay, sometimes the block will happen ("You are being rate limited."), but it will only last a few seconds.
  • Although not illegal, if you are lucky enough to get a valid key, be aware that someone else will have this key stolen if you claim it (and this is not cool xD).
  • Everything was done for study proposals, use at your own risk!!1

How it works

@SalatielSauer
SalatielSauer / octaedit.cpp
Last active June 28, 2019 12:17
src/engine/octaedit.cpp
VARP(editinview, 0, 1, 1);
bool noedit(bool view, bool msg)
{
if(!editmode) { if(msg) conoutf(CON_ERROR, "operation only allowed in edit mode"); return true; }
if(view || haveselent()) return false;
float r = 1.0f;
vec o = sel.o.tovec(), s = sel.s.tovec();
s.mul(float(sel.grid) / 2.0f);
o.add(s);
r = float(max(s.x, max(s.y, s.z)));
@SalatielSauer
SalatielSauer / calcario.alg
Last active March 23, 2023 23:43
Converte binário para decimal em Portugol
Algoritmo "Binario-Para-Decimal"
//Feito por Salatiel S.
//a lógica é simples: leia cada digito do binário individualmente da direita
//para a esquerda, se o digito for 1, o valor "imáginario" do digito atual será
//somado para o resultado final.
Var binarioInput: caractere //valor em binário
i: inteiro //digito indivudal do binário
valorImaginario: inteiro //valores de soma 1 2 4 8 16 32 64..
binarioInvertido: caractere //binário invertido para a soma ficar coerente
valorDecimal: inteiro //resultado final
@SalatielSauer
SalatielSauer / 3dgui.cpp
Last active January 21, 2020 03:08
Sauerbraten: Guiskin, Guisliderskin & Guialpha
//MOD: Guiskin, Guisliderskin, Guialpha
char* cguiskin = "data/guiskin.png";
FVARP(guiskin, "", {cguiskin = guiskin;});
char* cguisliderskin = "data/guislider.png";
FVARP(guisliderskin, "", {cguisliderskin = guisliderskin;});
FVARP(guialpha, 0, 0.5, 1);
//END
void line_(int size, float percent = 1.0f)
{
@SalatielSauer
SalatielSauer / A_smc_guide.md
Last active August 27, 2020 19:08
Sauerbraten/Blender SMC Guide (octaedit.cpp / io_export_smc.py)
@SalatielSauer
SalatielSauer / stdlib.cfg
Created March 26, 2020 12:36
List of useful CubeScript functions
// generates a string of tabs
// i.e. echo (concatword (gentabs 2) "hello" (gentabs 5) "world")
gentabs = [
_gtabs = ""
loop t $arg1 [_gtabs = (concatword $_gtabs "^t")]
result $_gtabs
]
// moves a gui item to any position
// i.e. guiitemmove 0 -5 -15 [guititle "Hi"]
@SalatielSauer
SalatielSauer / discord-country.cfg
Last active April 25, 2020 15:25
Country name list for discord emoticons (Remod Sauerbraten)
//by Salatiel (salatielsauer.github.io)
getflag = [
pcountry = (getcountry (getip $arg1)) ;
countries = ["undefined" "United Arab Emirates" "Afghanistan" "Armenia" "Angola" "Antarctica" "Argentina" "American Samoa" "Austria" "Australia" "Barbados" "Belgium" "Bangladesh" "Bulgaria" "Bermuda" "Bolivia" "Brazil" "Bahamas" "Canada" "Switzerland" "Chile" "Cameroon" "Colombia" "Costa Rica" "Cuba" "Cape Verde" "Christmas Island" "Germany" "Dominican Republic" "Algeria" "Ecuador" "Estonia" "Egypt" "Spain" "Ethiopia" "Finland" "France" "Georgia" "Guinea" "Greece" "Guatemala" "Hong Kong" "Haiti" "Hungary" "Indonesia" "Israel" "India" "Iraq" "Italy" "Jamaica" "Japan" "Cayman Islands" "Lithuania" "Madagascar" "Mexico" "Nigeria" "Netherlands" "Nepal" "Peru" "Poland" "Puerto Rico" "Portugal" "Paraguay" "Romania" "Serbia" "Russian Federation" "Sudan" "Slovenia" "Turkey" "Ukraine" "Venezuela" "South Africa" "United States" "Norway" "United Kingdom" "Moldova, Republic of" "Kenya" "Iraq" "Liberia" "Pakistan" "Palestine" "
@SalatielSauer
SalatielSauer / console.cpp
Created December 16, 2020 14:06
Sauerbraten top console background (src/engine/console.cpp)
int renderconsole(int w, int h, int abovehud) // render buffer taking into account time & scrolling
{
int conpad = fullconsole ? 0 : FONTH/4,
conoff = fullconsole ? FONTH : FONTH/3,
conheight = min(fullconsole ? ((h*fullconsize/100)/FONTH)*FONTH : FONTH*consize, h - 2*(conpad + conoff)),
conwidth = w - 2*(conpad + conoff) - (fullconsole ? 0 : game::clipconsole(w, h));
// console background
extern void bgquad(float x, float y, float w, float h, float tx, float ty, float tw, float th);
if(!fullconsole)
@SalatielSauer
SalatielSauer / rendergl.cpp
Last active December 16, 2020 14:53
Sauerbraten vignette effect (src/engine/rendergl.cpp)
void gl_drawhud()
{
// (...)
// Line 2229
if(!mainmenu)
{
drawdamagescreen(w, h);
drawdamagecompass(w, h);
hudshader->set();
@SalatielSauer
SalatielSauer / Sauer Vertex.md
Last active May 5, 2024 03:50
Blender python script to export object vertices to Sauerbraten

Blender + OGZ-Editor = beauty

This is a simple Blender script that exports the positions of an object's vertices to the format used by OGZ-Editor to generate .ogz (map) files.