Skip to content

Instantly share code, notes, and snippets.

@zach2good
zach2good / aoc2022_d01.py
Created December 1, 2022 16:53
aoc2022_d01.py
input = """
INPUT HERE
"""
totals = {}
index = 0
amounts = input.split("\n\n")
for elf in amounts:
calories = elf.split("\n")
@zach2good
zach2good / npc_renamer.py
Last active November 10, 2022 16:56
NPC DAT Renamer script for FFXI
#!/usr/bin/env python
# npc_renamer by zach2good, use as you please!
#
# For use on the NPC DATs listed here:
# https://www.reddit.com/r/ffximodding/comments/9ndg2d/complete_list_of_zone_dats_by_zone_id/
#
# Usage: npc_renamer.py <input file to read>
# : If the input file is .DAT, a corresponding .json file will be made.
# : If the input file is .json, a corresponding .new.DAT file will be made.
@zach2good
zach2good / campaign_battle.lua
Created July 20, 2021 19:24
campaign_battle.lua
-----------------------------------
-- Campaign Battle global (Grauberg [S])
-----------------------------------
xi = xi or {}
xi.campaignBattle = xi.campaignBattle or {}
local startPos = {
x = 799.256,
y = 72.21,
z = 748.53,
@zach2good
zach2good / configurator.py
Created May 18, 2021 09:35
LandSandBoat Configurator
# ===================
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
@zach2good
zach2good / ffxi_auto_login.py
Last active May 22, 2021 15:47
ffxi_auto_login.py
# Get requirements:
# pip install keyboard pywinauto
# You can wrap this script up as a Windows shortcut:
# Have python.exe in your PATH
# - Make a new shortcut, target: python.exe C:\FFXI\autologin\autologin.py
# - Shortcut Properties > Advanced > Run as administrator
# Change these:
your_password = 'YOUR_PASSWORD_HERE'
@zach2good
zach2good / version_updater.py
Last active July 9, 2021 10:18
version_updater.py
############################
#
# MIT License
#
# version_updater.py
# Copyright (c) 2021 Zach Toogood
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
-- Original code
tpz = {}
tpz.mob = {}
tpz.mob.onAttack = function(amount)
return amount
end
print('Original call: ', tpz.mob.onAttack(100))
-- Prints 100