I don't know who did it, but I love the edit to the statistics page with the blue edit number!
I've made an update to the homepage just underneath the library logo! I hope it looks ok, feel free to move it. It shouldn't be too hard to edit the numbers, each character is a different image so you have s0-9, p0-9 and b0-9 .gif, the rest stays the same!
~Sparks
Offline
A New Panther block (Can anyone test for me)
Name: friend of $string$
Type: r
Code:
| t2 t3 t4 t5 t6 t7 t8 | t3 _ 'http://scratch.mit.edu/api/getfriendsbyusername/' , t1. t2 _ self readFromUrl: t3. t8 _ t2 size. t2 _ self letters: 4 through: t8 of: t2. t5 _ {} as: OrderedCollection. t4 _ 0. t6 _ ''. t3 _ t2 size. t3 timesRepeat: [t4 _ t4 + 1. t7 _ self letter: t4 of: t2. t7 = ':' ifTrue: [t5 add: t6. t6 _ ''] ifFalse: [t6 _ t6 , t7]]. t3 _ t5 size. t3 > 0 ifFalse: [^ '']. t6 _ self randomFrom: 1 to: t3. t6 _ t6 asNumber. t7 _ t5 at: t6. t3 _ 'http://scratch.mit.edu/api/getusernamebyid/' , t7. t2 _ self readFromUrl: t3. t2 _ t2 asString. t3 _ t2 size. t4 _ self letters: 4 through: t3 of: t2. ^ t4 asString
Last edited by johnnydean1 (2011-04-10 11:05:15)
Offline
This reports a random friend when I test it!
When I follow the interesting path http://scratch.mit.edu/api/getfriendsbyusername/sparks I just get a load of numbers!
It's a good block though, though there appears to be no way of choosing a friend or listing all friends with this block? How about modifying it to be a "friend $Number$ of Scratcher $String$" block?
I've been experimenting with it a bit, it's great! I would add something to this line:
t3 _ 'http://scratch.mit.edu/api/getfriendsbyusername/' , t1 [color=red]asString[/color].
As this allows you to drop reporters such as variables into a block without an error being caused! Because of a Panther glitch where if you drop a reporter into an argument and take it away again that argument is turned into a number argument for that copy of the block.
Last edited by sparks (2011-04-10 10:42:22)
Offline
Offline
Ok here:
Name: friend no $Number$ of $String$
Type: r
Code:
| t3 t4 t5 t6 t7 t8 | t4 _ 'http://scratch.mit.edu/api/getfriendsbyusername/' , t2. t3 _ self readFromUrl: t4. t8 _ t3 size. t3 _ self letters: 4 through: t8 of: t3. t5 _ t3. t6 _ {} as: OrderedCollection. t5 _ 0. t7 _ ''. t4 _ t3 size. t4 timesRepeat: [t5 _ t5 + 1. t8 _ self letter: t5 of: t3. t8 = ':' ifTrue: [t6 add: t7. t7 _ ''] ifFalse: [t7 _ t7 , t8]]. t4 _ t6 size. t4 > 0 ifFalse: [^ '']. t7 _ t1. t7 _ t7 asNumber. t7 > 0 ifFalse: [^ '']. t7 - 1 < t4 ifFalse: [^ '']. t8 _ t6 at: t7. t8 _ t8 asString. t4 _ 'http://scratch.mit.edu/api/getusernamebyid/' , t8. t3 _ self readFromUrl: t4. t3 _ t3 asString. t4 _ t3 size. t5 _ self letters: 4 through: t4 of: t3. ^ t5
Offline
Sorry just saw your posts, change it accordinly.
I'm using the blocks in Claw, (my mod) which when I made I named all the meathods to the same name as the Panther ones, so I could use Panther CYOB as standard blocks on Claw. So all of the code may need slight tweaks to work but nothing major.
EDIT:
Fixed a glitch on both blocks, it couldn't load up friend 1 due to some random spaces.
EDIT 2:
Go for it, add both.
Last edited by johnnydean1 (2011-04-10 11:25:51)
Offline
YourLocalBlockLib wrote:
I've made an update to the homepage just underneath the library logo! I hope it looks ok, feel free to move it. It shouldn't be too hard to edit the numbers, each character is a different image so you have s0-9, p0-9 and b0-9 .gif, the rest stays the same!
~Sparks
Couldn't you do that by PHP and have the block libary website make the image, and then display it here. Like what someone did with the project stats in sig thing.
Last edited by johnnydean1 (2011-04-10 11:10:09)
Offline
johnnydean1 wrote:
YourLocalBlockLib wrote:
I've made an update to the homepage just underneath the library logo! I hope it looks ok, feel free to move it. It shouldn't be too hard to edit the numbers, each character is a different image so you have s0-9, p0-9 and b0-9 .gif, the rest stays the same!
~SparksCouldn't you do that by PHP and have the block libary website make the image, and then display it here. Like what someone did with the project stats in sig thing.
I thought about it when I made it. The website isn't finished, the blocks aren't on it and nor are the stats
Offline
sparks wrote:
johnnydean1 wrote:
YourLocalBlockLib wrote:
I've made an update to the homepage just underneath the library logo! I hope it looks ok, feel free to move it. It shouldn't be too hard to edit the numbers, each character is a different image so you have s0-9, p0-9 and b0-9 .gif, the rest stays the same!
~SparksCouldn't you do that by PHP and have the block libary website make the image, and then display it here. Like what someone did with the project stats in sig thing.
I thought about it when I made it. The website isn't finished, the blocks aren't on it and nor are the stats
Coolio (Wow Ive got to use that word more often ) The new friend blocks should be fast, but not brilliant. It is a improvement to my old friend blocks however which were VERY slow.
@Sparks
Do you know anyway of linking Scratch (or a mod) to a server (maybe through PHP) for a online mesh?
Offline
Any mod with a url reading capabilities can use a website as a "server" using php and MySQL. The php can be placed in a block request like so:
contents of file at URL:(http://examplewebsite.com/playerstatus.php?username=jd1&password=pass&status=feeling%20bored!)
this would send the information of username, password and status to the php page when it reads it. Panther appears to read back the html but it triggers the php code at the same time. This way MySQL can now add that status to a MySQL table in the status space next to your username where other people can read it through something along the lines of /statuses.php?username=jd1. A message can even be sent back to Panther through html saying if the update was sucessful or not!
Offline
Can you code that?
Move Conversation about this here. Keep on topic!!
Last edited by johnnydean1 (2011-04-10 11:41:24)
Offline
.
Panther blocks added: [2]
[38] by johnnydean1
[39] by johnnydean1
Update carried out by block librarian: Sparks
________________________________________________________________________________
^home
^updates archive
Last edited by YourLocalBlockLib (2011-04-21 14:11:32)
Offline
YourLocalBlockLib wrote:
Panther blocks added: [2]
[38] by johnnydean1
[39] by johnnydean1
Thank you!
Last edited by johnnydean1 (2011-04-10 11:44:31)
Offline
Pecola1 wrote:
danwoodski wrote:
Sorry if this is the wrong place to put this, but...
the <received?> block for scratch isn't working for me...first off, you may want to add the first ' to the block spec, and it is coming up with error messages for me...
this is VERY IMPORTANT to fix because it messes up all of the block specs after it.
error message:
http://dl.dropbox.com/u/12506914/untitled.bmpIs that from my, exe creator? It worked fine for me. Let me try again, it may be because I am using windows 7 rather than windows.
Win 7 is Windows, same as Vista is Windows.
I think I'm going to move the block stats.
EDIT: Done.
EDIT2: 1600th post!
Last edited by scimonster (2011-04-10 13:50:16)
Offline
scimonster wrote:
Win 7 is Windows, same as Vista is Windows.
But it is a different Version of Windows. Try running a piece of software made for Vista in XP, it might work. Try running it in Windows 98 it almost certainly won't. Windows 7 is a relatively new operating system so a lot of hardware and software still does not work with it! I find that a lot in my job, where I have to make sure that the hardware and software works with windows 7 if that's the OS they have. It would, therefore, be quite likely that the fact it was being run in win7 was the reason it was not working.
The block stats look a lot better where you've put them, but why did you change them to single images?
EDIT: I take that back... The image is still in several parts, but I can pick up and drag all of them as a single image... How odd.
Last edited by sparks (2011-04-10 14:28:05)
Offline
scimonster wrote:
Pecola1 wrote:
danwoodski wrote:
Sorry if this is the wrong place to put this, but...
the <received?> block for scratch isn't working for me...first off, you may want to add the first ' to the block spec, and it is coming up with error messages for me...
this is VERY IMPORTANT to fix because it messes up all of the block specs after it.
error message:
http://dl.dropbox.com/u/12506914/untitled.bmpIs that from my, exe creator? It worked fine for me. Let me try again, it may be because I am using windows 7 rather than windows.
Win 7 is Windows, same as Vista is Windows.
I think I'm going to move the block stats.
EDIT: Done.
EDIT2: 1600th post!
I meant because I hAve 7 he has xp, I think.
Offline
sparks wrote:
scimonster wrote:
Win 7 is Windows, same as Vista is Windows.
But it is a different Version of Windows. Try running a piece of software made for Vista in XP, it might work. Try running it in Windows 98 it almost certainly won't. Windows 7 is a relatively new operating system so a lot of hardware and software still does not work with it! I find that a lot in my job, where I have to make sure that the hardware and software works with windows 7 if that's the OS they have. It would, therefore, be quite likely that the fact it was being run in win7 was the reason it was not working.
The block stats look a lot better where you've put them, but why did you change them to single images?
EDIT: I take that back... The image is still in several parts, but I can pick up and drag all of them as a single image... How odd.
Whoa, that's weird! I didn't even realize.
Offline
I can't upload the image to a website, but i have a looks block for you guys. it goes under the Scratch Blocks category.
blockspecs:
('hidden?' #b #isHidden)
no code needed
What it does:
It states true if the block has been hidden with the hide block.
Offline
A load of new scratch blocks i made for variables!
EDIT: now has the descriptions. Sorry i forgot earlier XD
NOTE: These only work on variables that belong to the sprite who is using the block.
None of these need codes.
Make new variable with name ___ block:
('make new variable with name %s' #- #addVariable:)
What it does: Creates a new variable with a certain name.
Make new variable with name ___ and value ___ block:
('make new variable with name %s and value %s' #- #addVariable:value:)
What it does: Creates a new variable with a certain name and value.
2 Delete variable ___ blocks:
('delete variable %v' #- #deleteVariable:)
('delete variable %s' #- #deleteVariable:)
What they do: Deletes the specified variable.
Thanks to Hardmath123 for the idea.
Last edited by Scratchycat123 (2011-04-11 09:16:49)
Offline
Request: Grab costume from X:|| Y:|| to X:|| Y:||
Grabs a costume from the stage useing the co-ordinates given.
Last edited by johnnydean1 (2011-04-11 04:02:18)
Offline
I tried adding a block, it wouldn't upload the transparent version.
~~Scimonster
Offline
It happened again!
The title pic got removed.
Try it on weebly.
Oh, and I'm having a hard time with weebly. How do you upload the images?
Offline