Skip to content

Instantly share code, notes, and snippets.

View supersaiyansubtlety's full-sized avatar
💭

Will supersaiyansubtlety

💭
  • @gooogles
View GitHub Profile
@supersaiyansubtlety
supersaiyansubtlety / player-interact-air.zs
Created February 16, 2020 18:33
Detects when a player interacts with air, regardless of what block they're standing on.
import crafttweaker.event.PlayerInteractEvent;
import crafttweaker.event.PlayerInteractBlockEvent;
import crafttweaker.event.PlayerInteractEntityEvent;
import crafttweaker.event.EntityLivingUseItemEvent.Start;
import crafttweaker.entity.IEntityLiving;
import crafttweaker.entity.IEntityEquipmentSlot as slots;
import crafttweaker.server.IServer;
import crafttweaker.block.IBlock;
import crafttweaker.entity.IEntity;
import crafttweaker.world.IFacing;
@supersaiyansubtlety
supersaiyansubtlety / slabs.zs
Created November 7, 2019 01:56
Attempts to find and replace all slab recipes using CraftTweaker's ZenScript
import crafttweaker.recipes.ICraftingRecipe;
import crafttweaker.item.IIngredient;
var slabRecipes = recipes.all;
for recipe in slabRecipes
{
if (recipe.output.name.toLowerCase has "slab")
{
var ingredients = recipe.ingredients1D as IIngredient[];
var i = 0;
@supersaiyansubtlety
supersaiyansubtlety / Radio.lua
Created March 23, 2019 01:39
Cheat Engine Radio Buttons
function RadioSelect(parent)
-----This function makes it so that for its calling script, only one of its child scripts
-----can be active at a time.
-----It does this by making it so that, for each child,
-----when that child is activated, that child deactivates all other children.
--if this script has children
if parent.Count then
--for every child
for i = 0,parent.Count-1 do
@supersaiyansubtlety
supersaiyansubtlety / invisible.MD
Last active April 17, 2019 22:36
Run processes from Windows command line without a new terminal window opening

invisible

Run commands on Windows invisibly

This is a very simple vbs script that runs the batch script or command passed to it without anything appearing on screen. If you put it in a folder and add the folder to you user PATH, you can use it as follows:

invisible assoc
invisible echo hello
invisible <command> <with> <args> <"as you'd usually enter it in command line">

You can also do:

#SingleInstance force ;if there's already an instance of the script, replace it
#NoTrayIcon
;use name of executable or any other window title mentioned here https://autohotkey.com/docs/misc/WinTitle.htm
targetProcess := "ahk_exe atom.exe"
;Hotkey to capture here. As far as I can tell you have to use this method of specifying hotkeys here (! + ^ # Space Enter etc...)
;https://autohotkey.com/docs/Hotkeys.htm
$!Space::
if (WinActive(targetProcess))