Skip to content

Instantly share code, notes, and snippets.

Avatar

Niclas xDeda

  • CPH
View GitHub Profile
@xDeda
xDeda / hangman.lua
Created Jan 2, 2020
transformice hangman
View hangman.lua
tfm.exec.disableAfkDeath(true)
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoScore(true)
tfm.exec.disableAutoTimeLeft(true)
chars = {"&","é","~","\"","{","|","è","`","_","à","@","]","+","=","}","¨","ë","ä","ü","ö","£","<",">","0","1","2","3","4","5","6","7","8","9"}
lang = {}
@xDeda
xDeda / colorify.php
Last active Nov 5, 2019
Finding color in TFM chat
View colorify.php
<?
function Colorify($q) {
$q = explode("<br />", $q);
foreach ($q as $qq) {
if (strpos($qq, "just connected.") || strpos($qq, "has disconnected.") || strpos($qq, "No cheese for you! ^_^") !== false) {
echo "<span class=\"connect\">" . $qq . "</span><br />";
} elseif (strpos($qq, "< [") !== false) {
echo "<span class=\"wout\">" . $qq . "</span><br />";
} elseif (strpos($qq, "is now your shaman, follow her!") !== false) {
echo "<span class=\"bluesham\">" . $qq . "</span><br />";
View colorify.php
function Colorify($q) {
$q = explode("<br />", $q);
foreach ($q as $qq) {
if (strpos($qq, "just connected.") || strpos($qq, "has disconnected.") || strpos($qq, "No cheese for you! ^_^") !== false) {
echo "<span class=\"connect\">" . $qq . "</span><br />";
} elseif (strpos($qq, "< [") !== false) {
echo "<span class=\"wout\">" . $qq . "</span><br />";
} elseif (strpos($qq, "is now your shaman, follow her!") !== false) {
echo "<span class=\"bluesham\">" . $qq . "</span><br />";
} elseif (strpos($qq, "name is already taken") !== false) {
View ballshooter.lua
toDespawn={} -- define a table variable that you can put spawned items into
--
function eventMouse(name,xco,yco) -- name = name of clicker, xco = x cord of click, yco = y cord of click
ax = tfm.get.room.playerList[name].x -- x cord of mouse that clicked
by = tfm.get.room.playerList[name].y -- y cord of mouse that clicked
x = ax - xco -- x cord of mouse minus x cord of click
y = by - yco -- y cord of mouse minus y cord of click
View anvilshooty.lua
toDespawn={} -- define a table variable that you can put spawned items into
--
function eventMouse(name,xco,yco) -- name = name of clicker, xco = x cord of click, yco = y cord of click
ax = tfm.get.room.playerList[name].x -- x cord of mouse that clicked
by = tfm.get.room.playerList[name].y -- y cord of mouse that clicked
x = ax - xco -- x cord of mouse minus x cord of click
y = by - yco -- y cord of mouse minus y cord of click
@xDeda
xDeda / lettercoordinates.py
Created Dec 31, 2016
how to write letters via coordinates
View lettercoordinates.py
A = [3,22] , [10,0] , [18,22] , [15,14] , [4,14]
B = [3,1] , [11,1] , [16,5] , [12,10] , [3,11] , [12,10] , [17,16] , [10,22] , [3, 22] , [3,1]
C = [17,4] , [10,0] , [4,4] , [1,12] , [4,19] , [10,22] , [17,18]
D = [3,0] , [11,1] , [15,4] , [17,11] , [16,18] , [13,21] , [6,23] , [3,23] , [3,0]
E = [3,0] , [16,0] , [3,0] , [3,10] , [14,10] , [3,10] , [3,22] , [16,22]
F = [3,0] , [15,0] , [3,0] , [3,10] , [14,10] , [3,10] , [3,22]
G = [16,3] , [9,0] , [3,3] , [1,10] , [4,20] , [10,22] , [16,20] , [16,11] , [10,11]
H = [3,0] , [3,22] , [3,10] , [15,10] , [15,0] , [15,22]
I = [3,0] , [15,0] , [9,0] , [9,22] , [3,22] , [15,22]
J = [4,0] , [15,0] , [15,18] , [12,21] , [8,23] , [5,22] , [3,19]
View gist:4b8c1026b69b7f11b98d7335de34b43e
p = peripheral.wrap("right")
i = 0
while true do
info = p.getPlayers()
if #info > 0 then
redstone.setBundledOutput("left", color.white)
@xDeda
xDeda / ysearch.py
Created Sep 24, 2016
python script to fetch first youtube result from search with arg string
View ysearch.py
#!/usr/bin/env python
import urllib
import urllib.request
import clipboard
import sys
import gi
gi.require_version('Notify', '0.7')
from gi.repository import Notify
from urllib.parse import quote
View love.lua
tfm.exec.newGame(6445588)
tfm.exec.setNameColor("Imaginist",0xFFFFFF)
tfm.exec.setNameColor("Dedax",0xFFFFFF)
tfm.exec.setUIMapName("I Love You")
tfm.exec.setGameTime(8000,true)
function eventLoop(timeRemaining,timeRemaining)
imax = tfm.get.room.playerList.Imaginist.x
imay = tfm.get.room.playerList.Imaginist.y
You can’t perform that action at this time.