Skip to content

Instantly share code, notes, and snippets.

@Choonster
Choonster / GenerateBindingIDs.lua
Created July 18, 2013 21:23
A Lua script to generate a list of World of Warcraft BindingIDs from the extracted FrameXML Bindings.xml file.
local PATH_TO_BINDINGS_XML = [[G:\Documents\WoW Art&Code\50300 (build 16992)\BlizzardInterfaceCode\Interface\FrameXML\Bindings.xml]]
local OUTPUT_FILE = [[G:\Documents\bindings.txt]]
local bindings = assert(io.open(PATH_TO_BINDINGS_XML))
local output = assert(io.open(OUTPUT_FILE, "w"))
for line in bindings:lines() do
local name = line:match([[<Binding.-name="(.-)"]])
if name then
output:write("*", name, "\n")
@Choonster
Choonster / VerifyDateFormat.lua
Last active December 22, 2015 09:59
This is a function (with supporting code) that attempts to verify a format string for Lua's `os.date` function. It receives the format string as its sole argument and returns `true` plus a formatted date string if it's valid or `false` plus an error message if its invalid. This implementation is designed for World of Warcraft's embedded Lua, but…
local verifyDateFormat
do
local specifiers = { -- ANSI C strftime conversion specifiers (usable on Windows and Mac)
a = true, A = true, b = true,
B = true, c = true, d = true,
H = true, I = true, j = true,
m = true, M = true, p = true,
S = true, U = true, w = true,
W = true, x = true, X = true,
y = true, Y = true, Z = true,
@Choonster
Choonster / WoW_Graphics_CVars.lua
Created September 29, 2013 08:57
A Lua script that takes the WoW FrameXML file GraphicsQualityLevels.lua and outputs a list of CVars with their values and the labels of the quality levels that use each value. Designed to be run from regular Lua (5.1, 5.2 or LuaJIT), but can be run within WoW if you replace dofile[[...]] with loadstring[[...]] (with the contents of GraphicsQuali…
VideoData = {}
VIDEO_OPTIONS_16XANISOTROPIC = "16x Anisotropic";
VIDEO_OPTIONS_2XANISOTROPIC = "2x Anisotropic";
VIDEO_OPTIONS_4XANISOTROPIC = "4x Anisotropic";
VIDEO_OPTIONS_8XANISOTROPIC = "8x Anisotropic";
VIDEO_OPTIONS_BILINEAR = "Bilinear";
VIDEO_OPTIONS_DISABLED = "Disabled";
VIDEO_OPTIONS_ENABLED = "Enabled";
VIDEO_OPTIONS_FAIR = "Fair";
if not LNR then
LNR={}
LibStub("LibNameplateRegistry-1.0"):Embed(LNR)
end
LNR:LNR_UnregisterAllCallbacks()
function LNR:PrintCallback(...)
print("LNR:",...)
end
This file has been truncated, but you can view the full file.
2014-06-11 17:59:07 [INFO] Starting minecraft server version 1.6.4
2014-06-11 17:59:07 [INFO] [MobiusCore] Found
2014-06-11 17:59:07 [INFO] cpw.mods.fml.common.FMLCommonHandler
2014-06-11 17:59:07 [INFO] with checksum
2014-06-11 17:59:07 [INFO] 15ED353B87DFB0115BD74CED13B8DAEA
2014-06-11 17:59:07 [INFO]
2014-06-11 17:59:07 [INFO] [MobiusCore] Successful injection in
2014-06-11 17:59:07 [INFO] tickStart
2014-06-11 17:59:07 [INFO]
@Choonster
Choonster / ForgeModLoader-server-0.log
Last active August 29, 2015 14:02
Minecraft server log
2014-06-14 16:49:16 [INFO] [ForgeModLoader] Forge Mod Loader version 6.4.49.965 for Minecraft 1.6.4 loading
2014-06-14 16:49:16 [INFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_45, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
2014-06-14 16:49:16 [FINE] [ForgeModLoader] Java classpath at launch is mcpc-plus-1.6.4-R2.1-forge965-B269.jar
2014-06-14 16:49:16 [FINE] [ForgeModLoader] Java library path at launch is C:\Windows\system32;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Lua\LuaJIT\bin;C:\Lua\5.1\bin;C:\Lua\5.2\bin;C:\Lua\lua-wow;C:\Lua\LuaJIT_VS2010\bin;C:\Lua\MoonScript;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Micros
--[[
globals.lua (FindGlobals), a useful script to find global variable access in
.lua files, placed in the public domain by Mikk in 2009.
Adapted to Lua 5.2 by Choonster. Original version can be found at the site below:
http://www.wowace.com/addons/findglobals/
HOW TO INVOKE:
2014-07-26 06:46:42 [INFO] [ForgeModLoader] Forge Mod Loader version 6.99.19.964 for Minecraft 1.6.4 loading
2014-07-26 06:46:42 [INFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_45, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
2014-07-26 06:46:42 [FINE] [ForgeModLoader] Java classpath at launch is C:\Users\USERNAME\Documents\Minecraft\ChiselFacades\bin;C:\Users\USERNAME\.gradle\caches\artifacts-26\filestore\net.minecraft\launchwrapper\1.8\jar\d4c0895977dd7f0b3f56281cee53a64d4c0c0322\launchwrapper-1.8.jar;C:\Users\USERNAME\.gradle\caches\artifacts-26\filestore\org.ow2.asm\asm-debug-all\4.1\jar\dd6ba5c392d4102458494e29f54f70ac534ec2a2\asm-debug-all-4.1.jar;C:\Users\USERNAME\.gradle\caches\artifacts-26\filestore\org.scala-lang\scala-library\2.10.2\jar\6ba65d12cd09d441083262d6f73d2257fec7c663\scala-library-2.10.2.jar;C:\Users\USERNAME\.gradle\caches\artifacts-26\filestore\org.scala-lang\scala-compiler\2.10.2\jar\64c8b1380cc53d6850823d6e4e7ae984aa44ef9c\sc
>gradlew build
****************************
Powered By MCP:
http://mcp.ocean-labs.de/
Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn
MCP Data version : unknown
****************************
:downloadClient SKIPPED
@Choonster
Choonster / WoW_CascExtract.lua
Last active August 29, 2015 14:07
Script to extract some files from WoW's CASC system. Dependencies: Penlight, LuaCASC (http://www.townlong-yak.com/casc/).
-- Script to extract some files from WoW's CASC system
-- Dependencies: Penlight, LuaCASC (http://www.townlong-yak.com/casc/)
local SAVE_PATH = "C:/Users/MyUser/Documents/NewWoWSounds/"
local dir = require("pl.dir")
local path = require("pl.path")
local casc = require("casc")
local buildKey, cdnBase, cdnKey = casc.localbuild("C:/Users/Public/Games/World of Warcraft/.build.info", casc.selectActiveBuild)