NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Blockaddcraftnite.io // @namespace http://tampermonkey.net/ // @version 1.0 // @description lol // @author KeineAhnung4u // @match https://craftnite.io/ // @grant none // @license MIT // @copyright 2025, KeineAhnung4u (https://openuserjs.org/users/KeineAhnung4u) // ==/UserScript== (function() { 'use strict'; // coordsToInsidePos fonksiyonu tanımı function coordsToInsidePos(worldCoords, chunkCoords) { const [chunkX, chunkY, chunkZ] = chunkCoords; const x = Math.floor(worldCoords.x / 5) - chunkX * 32; const y = Math.floor(worldCoords.y / 5) - chunkY * 32; const z = Math.floor(worldCoords.z / 5) - chunkZ * 32; const insidePos = x + y * 32 + z * 32 * 32; return insidePos; } // Blok ekleme fonksiyonu function addBlock(x, y, z, blockId) { let pkt = new a234(); pkt.i = Math.floor(x / 160); pkt.e = Math.floor(y / 160); pkt.o = Math.floor(z / 160); pkt.v = coordsToInsidePos({ x: x, y: y, z: z }, [pkt.i, pkt.e, pkt.o]); pkt.u = blockId; G.socket.send(pkt.a614()); } // Sayfaya menü ekleme fonksiyonu function createMenu() { const menu = document.createElement('div'); menu.id = 'blockMenu'; menu.style.position = 'fixed'; menu.style.top = '10px'; menu.style.left = '10px'; menu.style.padding = '10px'; menu.style.backgroundColor = '#fff'; menu.style.border = '1px solid #000'; menu.style.zIndex = 9999; const blockTypes = { "air": 0, "stone": 256, "stone_granite": 257, "stone_granite_smooth": 258, "stone_diorite": 259, "stone_diorite_smooth": 260, "stone_andesite": 261, "stone_andesite_smooth": 262, "grass": 512, "dirt": 770, "coarse_dirt": 769, "cobblestone": 1024, "planks_oak": 1280, "planks_spruce": 1281, "planks_birch": 1282, "planks_jungle": 1283, "planks_acacia": 1284, "planks_big_oak": 1285, "sapling_oak": 1536, "sapling_spruce": 1537, "sapling_birch": 1538, "sapling_jungle": 1539, "sapling_acacia": 1540, "sapling_roofed_oak": 1541, "bedrock": 1792, "flowing_water": 2048, "water": 2304, "flowing_lava": 2560, "lava": 2816, "sand": 3072, "red_sand": 3073, "gravel": 3328, "gold_ore": 3584, "iron_ore": 3840, "coal_ore": 4096, "log_oak": 4352, "log_spruce": 4353, "log_birch": 4354, "log_jungle": 4355, "leaves_oak": 4608, "leaves_spruce": 4609, "leaves_birch": 4610, "leaves_jungle": 4611, "sponge": 4864, "sponge_wet": 4865, "glass": 5120, "lapis_ore": 5376, "lapis_block": 5632, "dispenser": 5888, "sandstone_normal": 6144, "sandstone_carved": 6145, "sandstone_smooth": 6146, "noteblock": 6400, "bed": 6656, "golden_rail": 6912, "detector_rail": 7168, "sticky_piston": 7424, "web": 7680, "double_plant_grass": 7936, "fern": 7938, "deadbush": 8192, "piston": 8448, "piston_head": 8704, "wool_colored_white": 8960, "wool_colored_orange": 8961, "wool_colored_magenta": 8962, "wool_colored_light_blue": 8963, "wool_colored_yellow": 8964, "wool_colored_lime": 8965, "wool_colored_pink": 8966, "wool_colored_gray": 8967, "wool_colored_silver": 8968, "wool_colored_cyan": 8969, "wool_colored_purple": 8970 }; const selectBlockType = document.createElement('select'); for (const [name, id] of Object.entries(blockTypes)) { const option = document.createElement('option'); option.value = id; option.textContent = name; selectBlockType.appendChild(option); } menu.appendChild(selectBlockType); const selectDimensions = document.createElement('select'); const dimensionOptions = [10, 20, 30, 40, 50, 100, 200, 300]; dimensionOptions.forEach(dim => { const option = document.createElement('option'); option.value = `${dim}x${dim}x${dim}`; option.textContent = `${dim}x${dim}x${dim}`; selectDimensions.appendChild(option); }); menu.appendChild(selectDimensions); const shapeSelect = document.createElement('select'); shapeSelect.id = 'shapeSelect'; const cubeOption = document.createElement('option'); cubeOption.value = 'cube'; cubeOption.textContent = 'Küp'; const pyramidOption = document.createElement('option'); pyramidOption.value = 'pyramid'; pyramidOption.textContent = 'Pramit'; shapeSelect.appendChild(cubeOption); shapeSelect.appendChild(pyramidOption); menu.appendChild(shapeSelect); const closeButton = document.createElement('button'); closeButton.textContent = 'Close'; closeButton.addEventListener('click', () => { menu.style.display = 'none'; const openButton = document.getElementById('openMenuButton'); if (openButton) { openButton.style.display = 'block'; } }); menu.appendChild(closeButton); document.body.appendChild(menu); menu.dataset.selectedDimensions = selectDimensions.value; selectDimensions.addEventListener('change', () => { menu.dataset.selectedDimensions = selectDimensions.value; }); createProgressIndicator(); } function placeBlocks(dimensions, blockId, shape) { const [width, height, depth] = dimensions.split('x').map(Number); const currentPosition = GAME.a865.player.position.clone(); let blocksToPlace = []; if (shape === 'cube') { for (let y = 0; y < height; y++) { for (let x = 0; x < width; x++) { for (let z = 0; z < depth; z++) { blocksToPlace.push({ x: currentPosition.x + x * 5, y: currentPosition.y + y * 5, z: currentPosition.z + z * 5, blockId: blockId }); } } } } else if (shape === 'pyramid') { for (let y = 0; y < height; y++) { for (let x = y; x < width - y; x++) { for (let z = y; z < depth - y; z++) { blocksToPlace.push({ x: currentPosition.x + x * 5, y: currentPosition.y + y * 5, z: currentPosition.z + z * 5, blockId: blockId }); } } } } let blockIndex = 0; const totalBlocks = blocksToPlace.length; function placeNextBlock() { const block = blocksToPlace[blockIndex]; addBlock(block.x, block.y, block.z, block.blockId); blockIndex++; updateProgressIndicator(blockIndex, totalBlocks); if (blockIndex < blocksToPlace.length) { setTimeout(placeNextBlock, 0.25); // Çeyrek milisaniye } else { console.log(`${width}x${height}x${depth} deseni tamamlandı.`); } } placeNextBlock(); } function createProgressIndicator() { const progressIndicator = document.createElement('div'); progressIndicator.id = 'progressIndicator'; progressIndicator.style.position = 'fixed'; progressIndicator.style.top = '10px'; progressIndicator.style.left = '50%'; progressIndicator.style.transform = 'translateX(-50%)'; progressIndicator.style.backgroundColor = '#000'; progressIndicator.style.color = '#fff'; progressIndicator.style.padding = '5px 10px'; progressIndicator.style.border = '1px solid #fff'; progressIndicator.style.zIndex = 10000; progressIndicator.style.display = 'none'; document.body.appendChild(progressIndicator); } function updateProgressIndicator(current, total) { const progressIndicator = document.getElementById('progressIndicator'); const percentage = ((current / total) * 100).toFixed(2); progressIndicator.textContent = `İlerleme: %${percentage}`; progressIndicator.style.display = 'block'; } // Menü açma butonu oluştur function createOpenButton() { const openButton = document.createElement('button'); openButton.id = 'openMenuButton'; openButton.textContent = 'Menüyü Aç'; openButton.style.position = 'fixed'; openButton.style.top = '10px'; openButton.style.left = '10px'; openButton.style.zIndex = 9999; document.body.appendChild(openButton); openButton.addEventListener('click', () => { const menu = document.getElementById('blockMenu'); if (menu) { menu.style.display = 'block'; } openButton.style.display = 'none'; }); } window.addEventListener('keydown', (event) => { if (event.key === '9') { const menu = document.getElementById('blockMenu'); if (menu && menu.dataset.selectedDimensions && menu.querySelector('select').value) { const shape = document.getElementById('shapeSelect').value; placeBlocks(menu.dataset.selectedDimensions, menu.querySelector('select').value, shape); } } }); // Sayfa yüklendiğinde menüyü oluştur ve göster createMenu(); createOpenButton(); })();