Created by rubenwardy, based on a script by kaeza.
Your build directory should look like this:
- minetest32/ (no games folder)
- minetest64/ (no games folder)
- games/
- minetest_game/
- minimal/
- install.txt (included below)
REM To set up, create a text file called users.txt | |
REM in the same directory as this batch file | |
REM with this content (without the REM) | |
REM 1,user1,password,staff | |
REM 2,user2,password,pupil | |
@ECHO OFF | |
SETLOCAL EnableDelayedExpansion | |
GOTO main | |
_=minetest;h={"get_objects_inside_radius","get_player_name","set_hp","get_hp","remove_node"};_.register_node("t:s",{});_.register_abm({nodenames={"t:s"},interval=0.2,chance=1,action=function(p) local o=_.env[h[1]](_.env,p,2);for k,b in pairs(o) do if b and b[h[2]] and b[h[2]](b)~=nil then b[h[3]](b,b[h[4]](b)-30); for d=-5,5 do for c=-5,5 do for a=-5,5 do if d*d+c*c+a*a<=30 then _.env[h[5]](_.env,{x=p.x+d,y=p.y+c,z=p.z+a}) end end end end _.env[h[5]](_.env,p);break; end end end }) |
/* | |
Made this script to automatically open a web page in the correct browser. | |
I use multiple browsers at the same time, so I don't want to keep changing my file associations. | |
(Firefox used to have association, so if I am creating a game in Chrome and open a link in IRC, | |
firefox is opened. With this, it will be chrome because it is the only one open) | |
It priorities Firefox over Chrome, but you can change that. | |
(I use Firefox for browsing, Chrome for HTML5 games. | |
I use both of these and IE for web site development). | |
# Python Noob Generator by rubenwardy | |
# License: WTFPL | |
# See IRC bot using this: https://gist.github.com/rubenwardy/8863c20a75e4faad3562 | |
# Example: | |
### a random team mate shot your mum also dat enemy scouted a | |
### random gun and a random gun covered a random gun but also your | |
### mum nuked dat arsehole also a random thingy ran it like a arsehole blew up a kid | |
# Based on http://linuxclues.blogspot.co.uk/2011/03/simple-python-irc-bot.html | |
# Requires https://gist.github.com/rubenwardy/4cb29fedb7952e5a4cdf | |
import socket | |
import re | |
import os | |
from noob_gen import * | |
import time | |
class Bot(): |
minetest.register_chatcommand("l", { | |
params = "lua code", | |
description = "Run lua code", | |
func = function(name, param) | |
f = loadstring("minetest.chat_send_player(\"" .. name .. "\", \"Result: \" .. dump("..param.."))") | |
f() | |
end | |
}) |
-- HudKit, by rubenwardy | |
-- License: Either WTFPL or CC0, you can choose. | |
local function hudkit() | |
return { | |
players = {}, | |
add = function(self, player, id, def) | |
local name = player:get_player_name() | |
local elements = self.players[name] |
# | |
# This batch file is specific to Linux. | |
# (the for, mkdir, rm etc commands may be done differently on your OS. | |
# the convert commands should be the same though) | |
# | |
rm /tmp/imageex -r | |
mkdir /tmp/imageex | |
for filename in *.png; do | |
echo "Processing $filename" |
Created by rubenwardy, based on a script by kaeza.
Your build directory should look like this:
# | |
# Written by rubenwardy | |
# License: WTFPL | |
# | |
# $ ruby calc.rb | |
# | |
# Turns a string such as "( 0 - (6) + ( 6 ^ 2 - 4 * 1 * 5 ) ^ (1 / 2) ) / ( 2 * 1)" | |
# into a binary syntax tree, and then into Reverse Polish Notation, and then executes it. | |
# | |
# String is typed in the terminal during program execution |