Anyone have the code for the <ip [000.000.0.000] hosting mesh?> block?
Offline
I could do it but you would need 2 blocks...
Offline
Well I could do it for 1 if I could alter the coding of Scratch but 2 other wise...
Offline
I will do it in Panther (easier to edit) then port it to scratch...
Offline
Not for use in mods unless told by me!
Panther CYOB code:
Name:
IP $String$ is hosting mesh?
type:
-b
code:
| var1 sFrame server inmesh time timers |
self leaveMesh.
time_ self timer.
self joinMesh: (t1).
(sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNil: [sFrame _ (self ownerThatIsA: OffscreenWorldMorph) frame].
(server _ sFrame workPane scratchServer) ifNil: [inmesh_ false.].
inmesh_ server.
var1_ false.
inmesh = false
ifFalse: [
var1_ true.
].
self leaveMesh.
timers_ self timer.
time_ timers - time.
time < 0.5
ifTrue: [
^ var1.
]
ifFalse: [
^ false.
].
Last edited by johnnydean1 (2010-07-25 16:03:32)
Offline
Oh it does require that you are not connected to a mesh already...
Offline
That's fine.
And can I use it in RAGE? I'll put your name in the credits/sources window.
Offline
What do you need it for? It seems kinda strange... but then I geuss it would avoid the attempting to join a mesh and it failing...
Offline
waveOSBeta wrote:
That's fine.
And can I use it in RAGE? I'll put your name in the credits/sources window.
Yes
Offline
waveOSBeta wrote:
unknown variable: sFrame
try removing the space before the _ on the first part of the script, you should be able to find what I'm meaning.
Offline
doesn't work. I might be doing it wrong.
Offline
Umm I tried it in CYOB and it works..
I will make it into Scratch soon...
Offline
Try that (Still in CYOB)
| var1 Frame server inmesh time timers |
self leaveMesh.
time_ self timer.
self joinMesh: (t1).
(Frame _ self ownerThatIsA: ScratchFrameMorph) ifNil: [Frame _ (self ownerThatIsA: OffscreenWorldMorph) frame].
(server _ Frame workPane scratchServer) ifNil: [inmesh_ false.].
inmesh_ server.
var1_ false.
inmesh = false
ifFalse: [
var1_ true.
].
self leaveMesh.
timers_ self timer.
time_ timers - time.
time < 0.5
ifTrue: [
^ var1.
]
ifFalse: [
^ false.
].
Offline
Couldn't that block be abused?
Just leave it running with random numbers for a while until it finds one, joins it, and now its in someone elses mesh.
Offline
colorfusion wrote:
Couldn't that block be abused?
Just leave it running with random numbers for a while until it finds one, joins it, and now its in someone elses mesh.
Yes but it would have to be on the same network...
Offline
Well I made a project to do just that (abusing) took 5 minutes to find 1 IP.
Offline
johnnydean1 wrote:
Well I made a project to do just that (abusing) took 5 minutes to find 1 IP.
<put * clapping smiley here>
Offline
ThePCKid wrote:
johnnydean1 wrote:
Well I made a project to do just that (abusing) took 5 minutes to find 1 IP.
<put * clapping smiley here>

Last edited by HD123 (2010-08-10 13:35:20)
Offline