Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function setColorOutput(s,c,o)
- rs.setBundledOutput(s,c,o)
- end
- setBunOutput = rs.setBundledOutput
- function displaynum(side,num)
- num = tostring(num)
- local fn = string.sub(num,1,1)
- local sn = nil
- if(#num > 1)then
- sn = string.sub(num,1,1)
- fn = string.sub(num,2,2)
- sn = tonumber(sn)
- end
- fn = tonumber(fn)
- local nums = {
- [0]="111111000",
- "011000000",
- "110110100",
- "111100100",
- "011001100",
- "101101100",
- "101111100",
- "111000000",
- "111111100",
- "111001100",
- }
- local fullout = 0
- if(sn ~= nil)then
- for i = 1, #nums[sn] do
- local setn = tonumber(string.sub(nums[sn],i,i))
- if(setn == 1)then
- fullout = fullout + 2^(i+7)
- end
- end
- end
- for i = 1, #nums[fn] do
- local setn = tonumber(string.sub(nums[fn],i,i))
- if(setn == 1)then
- fullout = fullout + 2^(i-1)
- end
- end
- setBunOutput(side,fullout)
- end
- displaynum("back",36)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement