if(!isObject($perlin)) $perlin = new ScriptObject() { class = Perlin; };function generate(%seed, %bg, %ox, %oy, %oz, %ix, %iy, %iz, %width, %length, %depth) { %iters = 3; for(%xd = 0; %xd < %width; %xd++) { for(%yd = 0; %yd < %length; %yd++) { for(%zd = 0; %zd < %depth; %zd++) { %quality = 2 + %seed; %density = 0; %x = %ix + %xd; %y = %iy + %yd; %z = %iz + %zd; for(%j = 0; %j < %iters; %j++) { %density += $perlin.noise((%x / %seed) / %quality, (%y / %seed) / %quality, (%z / %seed) / %quality) * %quality; %quality *= 4; } if(%density < 0) // air continue; %bx = %ox + (%x * 2); %by = %oy + (%y * 2); %bz = %oz + (%z * 2); %bpos = %bx SPC %by SPC %bz; %brick = new fxDTSBrick() { position = %bpos; datablock = brick4xCubeData; isPlanted = 1; client = %client; colorID = 2; }; %brick.setTrusted(1); %brick.plant(); %bg.add(%brick); } } }}function tweenGenerate(%seed, %bg, %ox, %oy, %oz, %gx, %gy, %width, %length, %depth) { cancel($tweenGenerate); generate(%seed, %bg, %ox, %oy, %oz, %gx, %gy, 0, 1, 1, %depth); %gx++; if(%gx == %width) %gy++; if(!(%gx == %width && %gy == %length)) { if(%gx == %width) %gx = 0; $tweenGenerate = schedule(20, 0, tweenGenerate, %seed, %bg, %ox, %oy, %oz, %gx, %gy, %width, %length, %depth); }}function serverCmdStopPerlinTest(%client) { if(!%client.isSuperAdmin) return; cancel($tweenGenerate);}function serverCmdPerlinTest(%client, %width, %length, %depth) { if(!%client.isSuperAdmin || !isObject(%client.player)) return; %player = %client.player; %pp = %player.getPosition(); %px = getWord(%pp, 0); %py = getWord(%pp, 1); %pz = getWord(%pp, 2); %seed = getRandom(); tweenGenerate(%seed, %client.brickGroup, %px, %py, %pz, 0, 0, %width, %length, %depth);}
that's perlin thoughisn't perlin the static one that doesn't allow minecraftian spread-as-you-go building/generating?
Oh, you're z0w0? Should have guessed (Zack0Wack0).