Jump to content


Jan's Content

There have been 73 items by Jan (Search limited from 10-February 22)


By content type

See this member's


Sort by                Order  

#142426 The Ctrl+V Game

Posted by Jan on 30 August 2013 - 05:29 PM in Forum Games

View PostRatcheT2497, on 30 August 2013 - 02:42 PM, said:

--off topic Jan, why did you post nothing?
I tried to post nothing, but forums gave me an error.
So I posted 3 zero-width spaces instead:
https://en.wikipedia...ero-width_space



#142403 The Ctrl+V Game

Posted by Jan on 30 August 2013 - 02:18 PM in Forum Games

​​​



#133215 If then bug?

Posted by Jan on 13 July 2013 - 05:33 AM in Ask a Pro

In lua, when you compare two things, you should use == instead of =

if 1==1 then
print("ok")
end

setting variables is done with a single =



#116368 PHP screenshot generator v2 now with color!

Posted by Jan on 08 May 2013 - 02:05 PM in General

View Postdiegodan1893, on 08 May 2013 - 12:51 PM, said:

Nice! I was looking for something like this for my program.

Suggestion: can you increase the image size to be the same as ComputerCraft term?

View PostLeft4Cake, on 08 May 2013 - 01:00 PM, said:

Posted Image
Thanks :)
The size of the image is actually the same size as the monitor in-game (when you make the minecraftwindow smaller)
You probably meant scaling?



#116318 LuaIDE 1.0 - You Might Actually Like Editing In Game

Posted by Jan on 08 May 2013 - 10:07 AM in Programs

Looks very nice! Automatic end,) and " are cool. Plus I tested if screenshots would work here too:
Posted Image
Yes they do.
The only problem is that it crashes a lot. When I press PgUp/PgDown or when I open rom/programs/shell and scroll down.



#116304 PHP screenshot generator v2 now with color!

Posted by Jan on 08 May 2013 - 09:28 AM in General

View PostGravityScore, on 08 May 2013 - 08:54 AM, said:

View PostJan, on 08 May 2013 - 08:52 AM, said:

Oh and with decimal I meant it like 'not in hexadecimal'

Oh I see :P Also, read the edit about fonts :P
Good idea about the fonts, I implemented it.
Now I need to make it 'pixel perfect'. Also, some letters arent centered :/
EDIT: going to fix it...



#116279 PHP screenshot generator v2 now with color!

Posted by Jan on 08 May 2013 - 08:52 AM in General

View PostGravityScore, on 08 May 2013 - 08:49 AM, said:

View PostJan, on 07 May 2013 - 05:01 PM, said:

If you know the (RGB) values (decimal) of CC, please post them, thanks

Here you go, already formatted as Java strings, in RGB form, separated by commas:
colors = new String[16];
colors[15] = "255,255,255"; // White
colors[14] = "235,136,68";  // Orange
colors[13] = "195,84,205";  // Magenta
colors[12] = "102,137,211"; // Light blue
colors[11] = "222,222,108"; // Yellow
colors[10] = "65,205,52"; // Lime
colors[9] = "216,129,152";  // Pink
colors[8] = "67,67,67";  // Gray
colors[7] = "153,153,153";  // Light gray
colors[6] = "40,118,151";   // Cyan
colors[5] = "123,47,190";   // Purple
colors[4] = "37,49,146"; // Blue
colors[3] = "81,48,26";  // Brown
colors[2] = "59,81,26";  // Green
colors[1] = "179,49,44"; // Red
colors[0] = "0,0,0";  // Black

Not in decimal sorry, but you can just input these values, and divide them by 255.
Thank you very much! I am now inserting them in the PHP script.
Oh and with decimal I meant it like 'not in hexadecimal'



#116272 PHP screenshot generator v2 now with color!

Posted by Jan on 08 May 2013 - 08:43 AM in General

There appears to be a bug when using non-colored displays. It directly leaves the program...
To fix this,line 238 should be:
local buff = createRedirectBuffer(w,h,colors.white,colors.black)
instead of:
local buff = createRedirectBuffer(w,h,colors.white,colors.black,true)

there are probably other bugs so I'll wait with updating the program



#116256 PHP screenshot generator v2 now with color!

Posted by Jan on 08 May 2013 - 07:14 AM in General

Large update: added workaround for the forums, color support, and cursor rendering (it will always be rendered, even if blink is off)



#116128 PHP screenshot generator v2 now with color!

Posted by Jan on 07 May 2013 - 05:51 PM in General

View PostD3matt, on 07 May 2013 - 05:39 PM, said:

Awesome!

You should be able to use a .png extension for the file and still have it work. Just have it ignore .php at the end of the string and add it that way.
Yes i found a way using .htaccess to do so.
http://corz.org/serv...s/htaccess2.php
It transforms:
trick/51/19/text.png
to:
screenshot.php?w=51&h=19&t=text
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^trick/([^/]+)/([^/]+)/([^/]+).png screenshot.php?w=$1&h=$2&t=$3 [NC]
DirectoryIndex screenshot.php
i'll update the lua program tomorrow I think



#116113 PHP screenshot generator v2 now with color!

Posted by Jan on 07 May 2013 - 05:01 PM in General

Introduction
Today I made a screenshot generator using PHP and GD (an image libarary)
Currently you send the text, and the monitor width and height to my php script on my website, and then it generates an image with it.
It doesnt support color yet.

Screenshot of paint:
Posted Image

Long link:
http://janvanrosmalen.com/ccrender/color/51/19/+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++XX+++++++++++++++++++++++++++++++++++++++++++++++++++%5BSave%5D+Exit++++++++++++++++++++++++++++++++++++++++/888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888800888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888400004000000888888888888888888888888888888888888888/000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000033000000000000000000000000000000000000000000000000044000000000000000000000000000000000000000000000000055000000000000000000000000000000000000000000000000066000000000fff0fffffffffffff00000000000000000000000770000fff0f00000000ffff00000ffffff0000000000000000088fff000000000000fff00ff000000000ffff0000000000000099f00000000000000f00000f0000000000000ff000000000000aaf000000000000000fffffff00000000ffffff000000000000bbff00000000000fffff000fffffff0f0000000000000000000cc0fff00000000f0000ff00000ff000f0000000ff0000000000dd000fffff0000f00000ffff0f0fff000000000000000000000ee0000000fffffffff0000ff00000ff00000000000000000000ff0000000000000000ffffffffffffff0fff0fffff0000000000000000000000000000ffff0000000ff0000000000000000000f0888888888888888888888888888888888888888888888888888/13/19/0/8/false/screenshot.png
Now you are probably thinking: how did he generate the link?

How to make a screenshot
1. Install the lua program below
2. Run the screenshot program
3. Run the program you want to take a screenshot from
4. Press f1
5. leave CC, and open your computer files
6. Open screen.txt and copy the link
7. On these forums, click on Image, and paste the link
8. Done!

Posted Image

Lua program v2
It uses gophers buffer redirect API:
http://www.computerc...__hl__gopheratl

Lua code v2:
http://pastebin.com/BCbdfzsY

http://pastebin.com/uPJ066tJ old
pastebin get BCbdfzsY screenshot

Spoiler

For server hosts
Here are the files required to run the generator on your own site
Here is the PHP code (screenshot.php):
Spoiler

Here is the .htaccess (for magic links)
Spoiler


TODO
- color support
- workaround to let images work on these forums (priority!)
fixed! Now I need to update the lua program to produce links using the 'trick'.
- database. After making a screenshot, it will be send via http API.
then a shorter url is returned to minecraft. (will be hard, and needs to be done very secure, to prevent spam and code execution of SQL)

I will not make this probably
- Fix color bugs
Fixed, thanks to Gravity
- Work for non-colored terminals (next update)

License
You are free to use this program, edit it, or host it. You may also integrate it in your OS or whatever you want.
I would like you to post a link to this thread if you use screenshots generated with this :)

If you have any improvements, please post them. Have fun with the screenshots!



#114828 [1.53] Inventory Computers (turtles that can't move but can have more per...

Posted by Jan on 03 May 2013 - 04:28 PM in Suggestions

View PostBubba, on 24 April 2013 - 12:12 PM, said:

and if you need to do inventory operations then have a turtle next to the computer.
Yes, therefore I think the inventory computer is not needed.
The only problem is: the communication from turtle to computer
- you cant use wired modems
because they wont attach to turtles
- you could use redstone
which is very slow, and unreliable with timing if you have lag.
- you could use wireless modems
but that doesnt make sense for such a short distance, and in survival you would need enderpearls
- you could use a floppydrive inbetween
which is even stanger

So I think it should be possible to attach a modem to a turtle, that would solve computer-turtle problem in my opinion.



#114820 Pinned printer pages

Posted by Jan on 03 May 2013 - 03:48 PM in Suggestions

(this is an old thread, but I want to bump it)
It is a good idea, and here is an alternative if it is too hard to implement:
allow people to put a map in the printer, and print text on that.



#109755 Return multiple

Posted by Jan on 14 April 2013 - 01:29 AM in Ask a Pro

Yes it is.
seperate the variables with commas. for example:
local function hello()
return "hello","world"
end
local a,b = hello()
print(B)/>



#99376 MineBox-Inter Server Item Storage

Posted by Jan on 20 March 2013 - 09:41 AM in General

Maybe you should first try to make such system work on just one server, but it is a great idea!
For the Deposit/Withdraw machine, you could use the new /testfor command in commandblocks to verify that a person is who he says.



#99305 Don't [Crap] Your Pants

Posted by Jan on 20 March 2013 - 04:57 AM in General

View PostShnupbups100, on 18 March 2013 - 10:00 AM, said:

You forgot that when you type '[that word]' on the main menu in the game you shit your pants.
Oh yes xD

EDIT: Censored

View PostLyqyd, on 19 March 2013 - 02:37 AM, said:

Your topic title has been edited. This is a family-friendly forum. I'll leave the other references alone for now.
Oh sorry, English is not my first language. And yes, crap is a better word. But is 'to scap' a verb? And does 'To crap in your pants' make sense?

PS: If anyone plays the game and finds a command that is not recognised, please post them. I'll add more synonyms then. Also I need to fix the timer in the game



#98127 Don't [Crap] Your Pants

Posted by Jan on 17 March 2013 - 08:55 AM in General

A few years ago, I found this awesome game:
http://www.kongregat...shit-your-pants

It is a 'horror', command-line controlled game where you have to avoid shitting your pants.

Some of you may already know this game, but I thought: It would be perfect to port to computercraft!


Here is the beta.. I need feedback on more commands and synonyms:

Spoiler



#98119 Block API v0.7

Posted by Jan on 17 March 2013 - 08:44 AM in APIs and Utilities

View PostOmegaVest, on 17 March 2013 - 08:37 AM, said:

Just out of curiosity, what do you mean by call()?
It's a function in the peripheral API. for example to write hello on a screen: peripheral.call("left","write","hello")



#98020 Gopher's APIs - Old, and broken, but still good. Yah. Still good.

Posted by Jan on 17 March 2013 - 04:03 AM in APIs and Utilities

View PostGopherAtl, on 17 March 2013 - 03:00 AM, said:

But of course it has keyboard support! b&w support would be silly if it didn't :) And I actually plan on adding an on-screen keyboard for touch-screen monitors, but have not done so yet.

Focusable elements (currently buttons and text fields) are automatically added to a tab group in the order they're created, which you can cycle through with up/down, left/right (not with text fields, which capture these for cursor movement), and tab. You can also override this tab order, setting up a different tab order manually using functions - the redstone sample program demonstrates this.
Okay, great :D



#97952 Block API v0.7

Posted by Jan on 16 March 2013 - 11:23 PM in APIs and Utilities

I think there should be peripheral functions for the block object, such as isPresent(), getType(), getMethods(), call() and wrap()
Also compare, dig, place, attack if the computer is a turtle :)



#97951 Gopher's APIs - Old, and broken, but still good. Yah. Still good.

Posted by Jan on 16 March 2013 - 11:00 PM in APIs and Utilities

View PostGopherAtl, on 16 March 2013 - 07:59 AM, said:

...snip...
That looks very nice! But does it have keyboard support?
Best would be if you could be able to control the same program with a touch-monitor or a keyboard.
That an on-screen keyboard would show up if you are in a text-field, while the program is running on a monitor
And that you can use TAB or arrow keys to switch fields if you are running the same program on a grey computer

Maybe this hybrid-interface is not optimal for every type of program (paint i.e.), but it would be handy for the program-maker,
because he doesnt have to make a touch-monitor and keyboard version of his program.



#95264 CC Syntax Highlighting/Code Completions v1.2 - Sublime Text 2

Posted by Jan on 09 March 2013 - 10:36 PM in APIs and Utilities

View PostChrisJay, on 09 March 2013 - 12:29 PM, said:

The file "completions.sublime-completions" is missing a few commas at the end of line 29,31 and 32. Also, the API functions aren't working in autocomplete either. I'm using ST2.0.1 as well.
Oh ok good to hear I am not the only one having this problem. I'll try to add the missing commas



#94381 CC Syntax Highlighting/Code Completions v1.2 - Sublime Text 2

Posted by Jan on 08 March 2013 - 07:22 AM in APIs and Utilities

View PostJan, on 05 March 2013 - 04:47 AM, said:

It doesnt work for me, after I installed it, the code snippets were avaible, but not the APIs :(
I set the syntax to ComputerCraft
I tried CTRL+space but it didnt want to autocomplete.
my Sublime Text version is 2.0.1
I still havent figured out how to fix code completions, maybe it is because I downloaded version 1.1
Does anyone have a link to the old version?



#93487 CC Syntax Highlighting/Code Completions v1.2 - Sublime Text 2

Posted by Jan on 05 March 2013 - 04:47 AM in APIs and Utilities

It doesnt work for me, after I installed it, the code snippets were avaible, but not the APIs :(
I set the syntax to ComputerCraft
I tried CTRL+space but it didnt want to autocomplete.
my Sublime Text version is 2.0.1



#91911 Computer helmet with HUD

Posted by Jan on 28 February 2013 - 05:29 AM in Suggestions

This is an awesome idea!
I have another 'armor' idea:
A portable printer as backpack, which drops the printed paper when it is done. :)