Skip to content

Instantly share code, notes, and snippets.

View Kruithne's full-sized avatar
🚀
Go as far as you can take it

Kruithne Kruithne

🚀
Go as far as you can take it
View GitHub Profile
@Kruithne
Kruithne / winking.lua
Created June 20, 2014 02:32
Winking Creeper
local world = World:new('spawn');
local spot = Location:new(world, 30048.5, 82, 29986.5);
local minecartSpot = Location:new(world, 30063.5, 94, 29986.5);
local minecart = Entity:new(minecartSpot);
local openTimer = Timer:new("pub_close", 20 * 2);
local openBlocks = {
Location:new(world, 30059, 96, 29986),
Location:new(world, 30059, 95, 29986),
@Kruithne
Kruithne / loot.lua
Created June 20, 2014 02:34
Loot Game
local world = World:new('spawn');
local chestLocs = {
Location:new(world, 30018, 62, 29974),
Location:new(world, 30019, 62, 29974),
Location:new(world, 30020, 62, 29974),
Location:new(world, 30021, 62, 29974),
Location:new(world, 30018, 62, 29975),
Location:new(world, 30019, 62, 29975),
Location:new(world, 30020, 62, 29975),
function t_copy (t) -- shallow-copy a table
if type(t) ~= "table" then return t end
local meta = getmetatable(t)
local target = {}
for k, v in pairs(t) do target[k] = v end
setmetatable(target, meta)
return target
end
local world = World:new('survival_tournament');
<!DOCTYPE html>
<html>
<head>
<title>Result</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<img src="http://bit.ly/NnVbxt"/>
</body>
</html>
@Kruithne
Kruithne / gist:3160045661a31a1d5d9d
Created June 21, 2014 20:12
GoneFishing confi
stepCount: 6
stepLength: 600
startingMessage: '&3The fishing tournament at spawn is starting in <time> minutes!'
startedMessage: '&aThe fishing tournament at spawn has started! The first player to
catch 30 Tastyfish at spawn will win!'
eventLength: 3600
concludeNoWinnerMessage: '&3The fishing tournament has ended with no winner!'
concludeMessage: <player> &ahas won the fishing tournament!
lootDropChance: 1
eventDropChance: 70
if (ogre.isItching())
{
if (ogre.getItchStage() == 0)
{
boolean done = true;
if (rightarm.rotateAngleX > -2.96706F)
{
done = false;
rightarm.rotateAngleX -= 0.1F;
}
@Kruithne
Kruithne / gist:10331f989f1a9b21279c
Created February 9, 2015 21:10
Last Man Standing
function t_copy (t) -- shallow-copy a table
if type(t) ~= "table" then return t end
local meta = getmetatable(t)
local target = {}
for k, v in pairs(t) do target[k] = v end
setmetatable(target, meta)
return target
end
local world = World:new('lms');
@Kruithne
Kruithne / services.js
Last active January 22, 2016 17:23
Tiny ickle filter for remote endpoint services
$.poke = function(endpoint, parameters, callback)
{
var errorResponse = {
success: false,
error: "Internal Error"
};
var doAjax = false;
var doPost = false;
@Kruithne
Kruithne / time-machine.js
Last active January 22, 2016 18:16
Time Machine!
var timeMachine =
{
minute: 60,
hour: 3600,
day: 86400,
week: 604800,
month: 2419200,
year: 29030400,
negMinute: -60,
negHour: -3600,
@Kruithne
Kruithne / build.js
Last active March 18, 2016 01:21
Mini element builder
$.build = function(params)
{
if (!params.hasOwnProperty("type"))
return null;
var element = $("<" + params.type + "/>");
for (var propKey in params)
{
if (params.hasOwnProperty(propKey))
{