This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
integer ID2Chan( string id ) | |
{ | |
integer mainkey = 921; | |
string tempkey = llGetSubString( ( string )id, 0, 7 ); | |
integer hex2int = ( integer )( "0x" + tempkey ); | |
return hex2int + mainkey; | |
} | |
NETWORK_CHANNEL = ID2Chan( llMD5String( llGetObjectDesc(), 0 ) ); | |
listenhandle = llListen( NETWORK_CHANNEL, "", "", "" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local term = require("term") | |
local gpu = term.gpu() | |
local seri = require("serialization") | |
local p_set = "^set%s+(-?%d+)%s+(-?%d+)%s+(%d+)$" | |
local p_setStr = "^set%s+(-?%d+)%s+(-?%d+)%s+([%a%s]+)$" | |
local p_get = "^get%s+(-?%d+)%s+(-?%d+)$" | |
local p_quit = "^quit$" | |
local p_save = "^save$" | |
local p_load = "^load$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local component = require("component") | |
local shell = require("shell") | |
local timeapi = require("timeapi") | |
local op = component.openprinter | |
local args, options = shell.parse(...) | |
local player = options.player | |
local amt = options.amount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local component = require("component") | |
local event = require("event") | |
local m = component.modem | |
local args, options = shell.parse(...) | |
function testSend(a,b,c) | |
component.modem.broadcast(a,b,c) | |
local _,_,from,port,_,message = event.pull("modem_message") | |
return from,message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net.minecraft.world.{IBlockAccess, World} | |
@Override | |
public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) | |
{ | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function str2hex(a) return a:gsub(".",function(a) return string.format("%02x",a:byte()) end) end | |
function hex2str(a) return a:gsub("..",function(a) return string.char(tonumber(a,16)) end) end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i = 0,115 do print(i .. " + " .. 115 - i .. " = 115") end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local component = require("component") | |
local os = require("os") | |
local term = require("term") | |
local gpu = component.gpu | |
local lamp = component.colorful_lamp -- As of right now, a Computronics Lamp is required. | |
-- I may take another stab at making it optional later on, | |
-- but for now, it's required or the program will not run. | |
orange = 25984 | |
yellow = 32736 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function round(num, idp) local mult = 10^(idp or 0) return math.floor(num * mult + 0.5) / mult end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rgbto15(r,g,b) return (b%32)+((g%32)*32)+((r%32)*1024) end | |
function rgbToHex(r,g,b) return string.format("0x%02X%02X%02X",r,g,b) end | |
function hexToRGB(a) a=tonumber(a) return math.floor(a/65536)%256,math.floor(a/256)%256,a%256 end |
NewerOlder