Skip to content

Instantly share code, notes, and snippets.

View nefftd's full-sized avatar

Anthony Eadicicco nefftd

View GitHub Profile
<Neffi_> ~whalenuke Semlar
-*- purl dons her radiation cloak and tinted glasses while a highly intelligent whale named Ray precipitates critical mass for uncontrolled nuclear fission around Semlar with his mind powers.
local grandparent = { a = 1, b = 2, c = 3 }
local parent = { a = 4, b = 5 }
setmetatable(parent, { __index = grandparent })
local child = { a = 7 }
setmetatable(child, { __index = parent })
local function mpairs(t)
local returned = {}
pokemonList = {
{name='Bulbasaur',DexNo=001,Sprites={"k8GbIZ5","jhhTsRD"},Offsets={x=5,y=0},Type={"Grass","Posion"}},
{name='Charmander',dexNo=004,Sprites={"Shc9ksb","eAqbN8o"},Offsets={x=0, y=0},Type={"Fire"}},
{name='Squirtle',dexNo=007, Sprites={"fWAk1vE","Xxappnf"},Offsets={x=0, y=0},Type={"Water"}},
}
print(pokemonList[math.random(#pokemonList)])
local sizer = CreateFrame('Frame',nil,WorldFrame,'SecureHandlerStateTemplate')
sizer:SetAllPoints(true)
sizer:Execute('children = newtable()')
sizer:SetAttribute('_onstate-mousestate',[[
wipe(children)
self:GetParent():GetChildList(children)
local f,c
for i = 1,#children do
f = children[i]
if strmatch((f:GetName() or ''),'^NamePlate%d+$') then
local function merge2into1(a,b)
local c = {}
for i = 1,#a do
c[#c+1] = a[i]
end
for i = 1,#b do
c[c#+1] = b[i]
end
return c
end
local suf = {'k','M','B','T'}
local function clean_format(val)
local m = math.min(#suf,math.floor(math.log10(val)/3))
local n = val / 1000 ^ m
local fmt = (m == 0 or n >= 10) and '%d%s' or '%.1f%s'
return fmt:format(n,suf[m] or '')
end
local function DCF(self)
FlipCameraYaw(-0.005)
self:SetScript('OnUpdate',nil)
end
sizer:HookScript('OnAttributeChanged',function(self)
FlipCameraYaw(0.005)
self:SetScript('OnUpdate',DCF)
end)
if not psize then return end
local scaler = CreateFrame('frame', nil, WorldFrame, 'SecureHandlerStateTemplate')
scaler:SetAllPoints()
scaler:Execute('Children = newtable()')
scaler:SetFrameRef('PlayerFrame', PlayerFrame)
scaler:SetAttribute('_onstate-mousestate', ([[ -- Resizes clickable area of all nameplates on mouseover
if newstate == 'on' then
local prevNum = #Children
wipe(Children)
local scaler = CreateFrame('frame', nil, WorldFrame, 'SecureHandlerStateTemplate')
scaler:SetAllPoints()
scaler:Execute('Children = newtable()')
scaler:SetFrameRef('PlayerFrame', PlayerFrame)
scaler:SetAttribute('_onstate-mousestate', ([[ -- Resizes clickable area of all nameplates on mouseover
print('RUN')
if newstate == 'on' then
local prevNum = #Children
wipe(Children)
local PlayerFrame = self:GetFrameRef('PlayerFrame')
local sizer = CreateFrame('Frame',nil,WorldFrame,'SecureHandlerStateTemplate')
sizer:SetAllPoints(true)
sizer:Execute('Children = newtable()')
sizer:SetAttribute('_onstate-mousestate',
([[
--if newstate == 'on' then
local prevNum = #Children
wipe(Children)
self:GetParent():GetChildList(Children)