- ComputerCraft | Programmable Computers for Minecraft
- → ReBraLaCC's Content
ReBraLaCC's Content
There have been 76 items by ReBraLaCC (Search limited from 10-February 22)
#260789 WOS
Posted by
ReBraLaCC
on 19 October 2016 - 06:02 PM
in
Operating Systems
#259766 width and heigth
Posted by
ReBraLaCC
on 22 September 2016 - 05:15 PM
in
Suggestions
#259760 width and heigth
Posted by
ReBraLaCC
on 22 September 2016 - 02:47 PM
in
Suggestions
but it would be easier to do it like this
string.rep("-",term.getWidth)
than to do it like
w,h = term.getSize()
string.rep("-",w)
#259230 While true do help!
Posted by
ReBraLaCC
on 11 September 2016 - 04:18 PM
in
Ask a Pro
X = true
while X do
st = read()
m = peripheral.wrap("left")
rednet.open("right")
id, message = rednet.receive()
m.setTextScale(1)
m.setCursorPos(1,1)
m.write(message)
if st == "end" then
X = false
end
end
Like that, or you just use break instead of X = false
#263143 upload files to pastebin
Posted by
ReBraLaCC
on 28 December 2016 - 05:00 PM
in
Ask a Pro
I know how to get something of pastebin without using the pastebin program..
and if you want to know my account is attached with my twitter profile if that is important
-- thanks ReBraLa
#260312 TT.OS - The ultimate OS in CC!
Posted by
ReBraLaCC
on 06 October 2016 - 07:09 PM
in
Operating Systems
#257894 Scoreboard Program
Posted by
ReBraLaCC
on 12 August 2016 - 03:43 PM
in
APIs and Utilities
#257891 Scoreboard Program
Posted by
ReBraLaCC
on 12 August 2016 - 02:29 PM
in
APIs and Utilities
A Lot of people are looking for a scoreboard program.
but those use monitors..
Ánd doesn't it look way better on the side of the screen?
Well that's what i thought!
So I've been working on a command program that creates a sidebar with what ever you want on it!
Screenshots:
maybe for a map?

in a list

Some information you need to know!
When using this program first run it as 'scoreboard init'
that will create all the things needed to run this properly
Wanna remove all the things it created? use 'scoreboard de-init'
Loading a scoreboard file is the simplest thing in the world! just use 'scoreboard load <file>'
Formatting the file is a bit harder... See this example G31x0vAb
A list of all the colors
"black", "dark_blue", "dark_green", "dark_aqua", "dark_red", "dark_purple", "gold", "gray", "dark_gray", "blue", "green", "aqua", "red", "light_purple", "yellow", "white"
Type them with the _ otherwise they won't work!
Okay now the fun part.... DOWNLOAD!!!!
pastebin get 11P0AHK4 scoreboard
and remember first 'scoreboard init'!!! Have fun!
CAUTION: The names as in Balance and such can't have spaces in between if you want spaces download a recourse pack that removes a letter as a space and use that letter!
#267291 Scoreboard API?
Posted by
ReBraLaCC
on 30 May 2017 - 04:50 AM
in
Ask a Pro
http://www.computerc...363#entry261363
#255173 [SOLVED] Weird Bug
Posted by
ReBraLaCC
on 30 June 2016 - 03:57 PM
in
Ask a Pro
And the second time I do it, it renders the cubes in black color (if i reboot the computer it works again)
Maybe there is something wrong with the code so that's why i've posted it here
w,h = term.getSize()
colors = {colors.white,colors.green,colors.yellow,colors.red,colors.blue,colors.orange}
local function renderCube(side)
for k,v in pairs(cube[side]) do
drawPiece(cube[side][k],k)
end
end
function drawPiece(var,nPiece)
if nPiece == 1 then
paintutils.drawFilledBox(w/2-2-5,h/2-2-2,w/2-2-2,h/2-2,var)
elseif nPiece == 2 then
paintutils.drawFilledBox(w/2-2,h/2-2-2,w/2-2+3,h/2-2,var)
elseif nPiece == 3 then
paintutils.drawFilledBox(w/2-2+5,h/2-2-2,w/2-2+8,h/2-2,var)
elseif nPiece == 4 then
paintutils.drawFilledBox(w/2-2-5,h/2-2+2,w/2-2-2,h/2-2+4,var)
end
end
for a = 1,100 do
drawPiece(colors[math.random(1,6)],1)
drawPiece(colors[math.random(1,6)],2)
drawPiece(colors[math.random(1,6)],3)
drawPiece(colors[math.random(1,6)],4)
sleep(0.04)
end
#254793 [SOLVED] Problem with math.random()
Posted by
ReBraLaCC
on 25 June 2016 - 06:21 PM
in
Ask a Pro
test.lua:5: bad argument #2: interval is emptyI've checked the code enough times and i dont get the problem...
function fire(x,y,height,spreadRad,frames,nLines,colors_back) for a = 1,frames do for e = 1,nLines do g = math.random(x-1,x-spreadRad) j = math.random(y-1,y-height) paintutils.drawLine(x,y,g,j,colors.red) end sleep(0.003) term.setBackgroundColor(colors_back) term.clear() end end fire(35,19,5,5,13,6,colors.black)
hope I'll get an answer that I'll understand because.... dafruq
#254847 [SOLVED] Problem with math.random()
Posted by
ReBraLaCC
on 26 June 2016 - 01:31 PM
in
Ask a Pro
Dog, on 25 June 2016 - 08:31 PM, said:
math.random(math.min(x - 1, x - spreadRad), math.max(x - 1, x - spreadRad))
NanoBob, on 25 June 2016 - 08:21 PM, said:
ReBraLaCC, on 25 June 2016 - 07:46 PM, said:
math.random(x-1,x-spreadRad)
The first parameter, x is 35. And spreadRad (third parameter) is 5.
fire(35,19,5,5,13,6,colors.black)
So your math random is basicly
math.random(35-1,35-5)Which results in
math.random(34,30)Which is not valid since 30 is lower than 34. The second argument has to be higher in math.random()
Oh my gosh, you're totally right xD thanks!
#258390 [FIXED] Cannot serialize type function?
Posted by
ReBraLaCC
on 25 August 2016 - 12:27 PM
in
Ask a Pro
But I ran in to this error
Cannot serialize type function
And I have no idea why this happens
So if you guys could see what I'm doing wrong
API: -- called Utils..
buttons = {}
local len = string.len
local sub = string.sub
local width,height = term.getSize()
function reset()
buttons = {}
end
function drawButtons()
if len(textutils.serialise(buttons)) > 0 then
for k,v in pairs(buttons) do
term.setTextColor(v.textC)
term.setBackgroundColor(v.backC)
term.setCursorPos(v.pos.x,v.pos.y)
term.write(" "..v.text.." ")
end
end
end
function addButton(label,name,px,py,func,tC,bC,r) -- Button Management
if px == "mid" then
a = width-len(" "..name.." ")
px = a/2
end
local tries = 0
defLabel = label
while buttons[label] ~= nil and not r do
tries = tries+1
label = defLabel..""..tries
end
buttons[label] = {
["text"] = name,
["func"] = func,
["pos"] = {
["x"] = px,
["y"] = py,
},
["textC"] = tC,
["backC"] = bC,
}
return label
end
function removeButton(label)
found = false
for k,v in pairs(buttons) do
r = 1
if k == label then
found = true
end
r = r+1
if found then
buttons[label] = nil
break
end
end
return found
end
function checkClick(x,y)
for k,v in pairs(buttons) do
if x >= v.pos.x and x <= v.pos.x+len(v.text)+1 and y == v.pos.y then
v.func()
end
end
end
function clear(c)
c = c or colors.black
term.setBackgroundColor(c)
term.clear()
end
Program itself:
os.loadAPI("Utils")
test = function()
print("works")
end
---------------- Label name x y function textcolor backcolor
Utils.addButton("clrScrn", "Clear", "mid", 3, test, colors.white, colors.purple)
Utils.drawButtons()
while true do
_, button, x, y = os.pullEvent("mouse_click")
Utils.checkClick(x, y)
end
I've added the thing at Utils.addButton (in the program not API) because i think somewhere these is the problem
Thanks already for taking a look
-- ReBraLa
#261363 [COMMAND-PC] Scoreboard API
Posted by
ReBraLaCC
on 03 November 2016 - 09:08 AM
in
Command Programs
The first release of my ScoreBoardAPI (a.k.a SAPI)
Download: SAPI
Documentation: Pastebin
NOTE:
If you find any bugs tell me, and dont go into the code your self..
And every world you need to run [apiname].init() per world not every progam..
Also, if you have any ideas also tell me!
EDIT added "simple" documentation
- ComputerCraft | Programmable Computers for Minecraft
- → ReBraLaCC's Content


