Skip to content

Instantly share code, notes, and snippets.

require "https://gist.github.com/mkarneim/8deed890e0d92ef19506e889819b2e97"
-- Wand of equal Trade
function woet()
print("Starting Wand of equal Trade")
click = cursor.registerForEvents("RIGHT_CLICK", "LEFT_CLICK")
for event in click.next do
if event.item ~= nil
and event.item.name == 'minecraft:stick'
require 'https://gist.github.com/mkarneim/8deed890e0d92ef19506e889819b2e97'
function plot_books()
print('Starting Plot Books')
event = events.register('stop_plot_books')
while not event.hasNext() do
print('tick')
require "gist.a889319c844d68ca108c50bac53c4f10"
@Adrodoc
Adrodoc / enchantments-dev.lua
Last active April 23, 2017 19:18
enchantments
-- Beispiel: /give @p stick 1 0 {ANIMATION_HAND:"/tellraw @p {\"text\":\"You feel a strong aura while wielding this stick\",\"color\":\"blue\"}"}
if adrodoc55 == nil then
require "gist.5812f439642a1d4a9d89cdb75b38a13a.adrodoc55"
end
function adrodoc55.handleEnchantments()
spell:execute('tellraw @a {"text":"Enabling Item Enchantments!","color":"blue"}')
spell:execute('lua adrodoc55.handleEnchantment(ANIMATION_HAND)')
spell:execute('lua adrodoc55.handleEnchantment(CHAT)')
require "gist.a889319c844d68ca108c50bac53c4f10.basic-lib"
string.indentMultiline = function(str, count, char)
local endsWithNewline = str ~= '' and str:sub(1 - #str) == '\n'
local indent = string.rep(char or ' ', count)
local indented = indent .. str:gsub('\n', '\n' .. indent)
if endsWithNewline then
return indented:sub(0, 1 - #indent)
end
return indented
@Adrodoc
Adrodoc / adrodoc55.lua
Last active April 22, 2017 17:44
Adrodoc55's Common Spells for the Wizards Of Lua Server
adrodoc55 = {
author = "Adrodoc55",
version = "1.0",
module = "gist.5812f439642a1d4a9d89cdb75b38a13a.adrodoc55"
}
require "gist.a889319c844d68ca108c50bac53c4f10.basic-lib"
require "gist.5f2b7a64704338a6f6f9e601ebb88039.enchantments"
function adrodoc55.startup()
@Adrodoc
Adrodoc / chest-menu-dev.lua
Last active April 22, 2017 22:21
chest-menu
if adrodoc55 == nil then
require "gist.5812f439642a1d4a9d89cdb75b38a13a.adrodoc55"
end
function adrodoc55.chestMenu()
player2Inventory = {}
local q = Events.register(CLICK_WINDOW, )
for e in q.next do
if e.clickedItem ~= nil then
if e.clickedItem.displayName == 'Button' then
-- gist.a532a79bc8ceb459a21f23e4a17e084c.scribble
if adrodoc55 == nil then
require "gist.5812f439642a1d4a9d89cdb75b38a13a.adrodoc55"
end
function scribble(eventType)
local q = Events.register(eventType)
for e in q.next do
print(str(e))
@Adrodoc
Adrodoc / claiming.lua
Last active March 26, 2018 15:58
claiming.lua
-- adrodoc55/claiming.lua
require "mickkay.wol.Spell"
local setmultimap = require "adrodoc55.setmultimap"
local cities = require "mickkay.cities"
local datastore = require "mickkay.datastore"
local pkg = {}
local store
@Adrodoc
Adrodoc / SharedVar.lua
Last active January 14, 2018 13:50
SharedVar.lua
require 'adrodoc55.wol.EventQueue'
local requestEventName = 'SharedVarRequest-'
local updateEventName = 'SharedVarUpdate-'
declare('SharedVar')
local function createSharedVar(name)
Check.isString(name, 1)
local result = {