Skip to content

Instantly share code, notes, and snippets.

View m4xc4v413r4's full-sized avatar
🧻

m4xc4v413r4 m4xc4v413r4

🧻
View GitHub Profile
-------- Macro 1 ------------
/run for b = 0,4 do for s = 1, GetContainerNumSlots(b) do local l = GetContainerItemLink(b, s) if not l then BuyMerchantItem(26) end end end
-------- Macro 2 ------------ NOT TESTED YET -------
/run for b = 0,4 do for s = 1, GetContainerNumSlots(b) do local l = GetContainerItemLink(b, s) if not l then C_Timer.After(0.1, function() BuyMerchantItem(26)) end end end
/run for b = 0,4 do for s = 1, GetContainerNumSlots(b) do local l = GetContainerItemLink(b, s) if l then local n = GetItemInfo(l) if n == "Bloody Gold Purse" then UseContainerItem(b, s) end end end end
@m4xc4v413r4
m4xc4v413r4 / heart.py
Created February 9, 2019 12:21 — forked from falsz/heart.py
#!python3
import sys
import random
from PIL import ImageFont
import itertools
NONE = 0
NORM = 1
REV = 2
@m4xc4v413r4
m4xc4v413r4 / pointsBot.py
Created February 8, 2019 21:09 — forked from anonymous/pointsBot.py
Twitch Python points bot example by xangold
import urllib2
import json
import time
import threading
import socket
import string
import os
import random
import traceback
import sys
@m4xc4v413r4
m4xc4v413r4 / basic_bot.py
Created February 2, 2019 14:26
discord.py's basic_bot.py converted to use "cogs". (with automatic finding of extensions)
from discord.ext import commands
from os import listdir
from os.path import isfile, join
description = '''An example bot to showcase the discord.ext.commands extension
module.
There are a number of utility commands being showcased here.'''
@m4xc4v413r4
m4xc4v413r4 / bot_example.py
Created January 31, 2019 17:41 — forked from EvieePy/bot_example.py
A Cogs Example for the rewrite version of - discord.py
import discord
from discord.ext import commands
import sys, traceback
"""This is a multi file example showcasing many features of the command extension and the use of cogs.
These are examples only and are not intended to be used as a fully functioning bot. Rather they should give you a basic
understanding and platform for creating your own bot.
These examples make use of Python 3.6.2 and the rewrite version on the lib.
local dropData = {}
local dropdown = CreateFrame("Button", "m4xArtifactDropDown")
dropdown.displayMode = "MENU"
dropdown.initialize = function(self, dropLevel)
if not dropLevel then return end
wipe(dropData)
local function FormatValue(arg)
local formatedValue = "|cff00ff00%.2f|r|cffff7f00%s|r"
if arg >= 1e9 then
return string.format(formatedValue, arg / 1e9, "B")
elseif arg >= 1e6 then
return string.format(formatedValue, arg / 1e6, "M")
elseif arg >= 1e3 then
return string.format(formatedValue, arg / 1e3, "K")
else
return string.format(formatedValue, arg, "")
----- Macro 1 ----
/run local v=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do local _,c,_,_,_,_,l=GetContainerItemInfo(b,s) if c and c>0 then local p=TSMAPI:GetItemValue(l,"DBMarket") or 0 if p>0 then v=v+p*c end end end end print("Total Value: ",v/10000)
------------------
-------------------------------------------- Starts on line 9919 of v7.3.31 -------------------------------------------------
if not LeaPlusLC.grid then
LeaPlusLC.grid = CreateFrame('FRAME')
LeaPlusLC.grid:Hide()
LeaPlusLC.grid:SetAllPoints(UIParent)
local w, h = GetScreenWidth() * UIParent:GetEffectiveScale(), GetScreenHeight() * UIParent:GetEffectiveScale()
local ratio = w / h
local sqsize = w / 30
local wline = floor(sqsize - (sqsize % 2))
local hline = floor(sqsize / ratio - ((sqsize / ratio) % 2))