Skript Auto TP for chunk loading

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

Gameitall

Member
Jun 4, 2026
1
0
1
Updating Existing Chunks in a Custom World
If you're using a custom world generator or importing a single-player world and need existing chunks to be updated automatically, this scanner is a great solution.
Important: Run Chunky first to pre-generate your world. This greatly reduces lag and ensures the scanner only needs to visit already-generated chunks.
Set the scanner boundaries to match the radius you used in Chunky:

In this example, Chunky was used to generate a world with a 12,000 block radius (24,000 blocks wide).
The scanner will:
  1. Start at X -12000, Z -12000 (top-left corner).
  2. Move across the map from left to right.
  3. Once it reaches the end of a row, move down and begin the next row.
  4. Continue until the entire area has been scanned.

Think of it like reading a page of text—left to right, then moving down to the next line.

This method is useful for:
  • Updating chunks after changing world generation settings.
  • Converting imported single-player worlds.
  • Triggering chunk upgrades after Minecraft version changes.
  • Ensuring all chunks are loaded and processed by the server.

Single-Player Worlds​

If you're importing a world from single-player Minecraft, I've also included a PowerShell version that works with vanilla Minecraft and requires no mods or plugins.

While it is slower than running the scanner directly on a server, it provides a simple way to automate chunk loading and upgrading in a standard Minecraft installation.

SKRIPT CODE!!!!

Code:
###########################################################
# AUTO TELEPORT SCANNER
#
# This script teleports a player in a grid pattern across
# the world. It is commonly used for:
#
# - Chunk generation
# - Map pre-loading
# - Searching large areas
# - World border scans
#
# Commands:
#   /tpstart   = Start scan from beginning
#   /tpstop    = Pause scan
#   /tpcont    = Continue scan from current position
#   /tpreset   = Reset position back to start
#   /tpstatus  = Show current coordinates
#
###########################################################


###########################################################
# CONFIGURATION SECTION
#
# Change these values to control how the scanner works.
###########################################################

options: 
    # Player that will be teleported around the world.
    # This MUST match an online player.
    scanPlayer: Miss_Cats
    #######################################################
    # Scan Area
    #
    # The scanner starts at startX/startZ and moves until
    # it reaches endX/endZ.
    #######################################################
    startX: -12000
    startZ: -12000

    endX: 12000
    endZ: 12000

    #######################################################
    # Height to teleport at
    #
    # Make sure in creative! NOT SPECTATOR!
    # Recommend leaving at 100
    #######################################################

    yLevel: 100
    #######################################################
    # Movement amount per teleport
    #
    # stepX = move east/west
    # stepZ = move north/south
    #
    # Example:
    #   X = -12000
    #   X = -11990
    #   X = -11980
    #   etc...
    #######################################################
    stepX: 10
    stepZ: 50
    #######################################################
    # Direction the player faces
    #
    # Common Yaw Values:
    #   0   = South
    #   90  = West
    #   180 = North
    #   -90 = East
    #
    # Pitch:
    #   0 = Straight ahead
    #   90 = Looking down
    #  -90 = Looking up
    #######################################################
    yaw: -90
    pitch: 0
    #######################################################
    # Delay between teleports
    #
    # IMPORTANT:
    # Delay is measured in TICKS.
    #
    # Minecraft runs at 20 ticks per second.
    #
    # Examples:
    #   1 tick  = 0.05 seconds
    #   2 ticks = 0.10 seconds
    #   3 ticks = 0.15 seconds
    #   20 ticks = 1 second
    #
    # Increase this if:
    # - TPS drops
    # - Chunks don't load
    # - Server lags
    #
    # 3 is recomeneded for most OP computers/Servers
    #######################################################
    delay: 3


###########################################################
# SCRIPT STARTUP
#
# Runs once when Skript loads.
###########################################################
on load:
    set {TP_name} to "&bAuto TP"
    set {tpstat} to "stop"
###########################################################
# /tpstart
#
# Starts a NEW scan from the beginning.
###########################################################
command /tpstart:
    trigger:
        set {_scanner} to "{@scanPlayer}" parsed as player

        if {_scanner} is not online:
            send "&cPlayer {@scanPlayer} is not online."
            stop

        set {tpx} to {@startX}
        set {tpz} to {@startZ}
        delete {tpstat}

        teleport {_scanner} to location({tpx}, {@yLevel}, {tpz}, world "{@worldName}", {@yaw}, {@pitch})

        send "&aAuto TP started for {@scanPlayer}."
        send "&7Starting at X:%{tpx}% Z:%{tpz}%"

###########################################################
# /tpstop
#
# Pauses the scanner.
#
# Position is NOT lost.
###########################################################
command /tpstop:
    trigger:
        set {tpstat} to "stop"
        send "&cAuto TP stopped."
###########################################################
# /tpcont
#
# Continues from the last saved position.
###########################################################
command /tpcont:
    trigger:
        set {_scanner} to "{@scanPlayer}" parsed as player

        if {_scanner} is not online:
            send "&cPlayer {@scanPlayer} is not online."
            stop

        delete {tpstat}
        teleport {_scanner} to location({tpx}, {@yLevel}, {tpz}, world "{@worldName}", {@yaw}, {@pitch})

        send "&aAuto TP resumed."
###########################################################
# /tpreset
#
# Moves scan position back to the beginning.
#
# Does NOT start the scan.
###########################################################
command /tpreset:
    trigger:
        set {tpx} to {@startX}
        set {tpz} to {@startZ}
        send "&aScan position reset."
        send "&7X:%{tpx}% Z:%{tpz}%"
###########################################################
# /tpstatus
#
# Shows current progress. Good for if using Bots
###########################################################
command /tpstatus:
    trigger:
        send "&6----- Auto TP Status -----"
        send "&eScanner: &f{@scanPlayer}"
        send "&eState: &f%{tpstat}%"
        send "&eX: &f%{tpx}%"
        send "&eZ: &f%{tpz}%"
###########################################################
# MAIN SCANNER LOOP
#
# Runs every {@delay} ticks.
###########################################################

every {@delay} ticks:
    #######################################################
    # Get scanner player
    #######################################################
    set {_scanner} to "{@scanPlayer}" parsed as player

    if {_scanner} is not online:
        stop
    #######################################################
    # Stop if scanner paused
    #######################################################
    if {tpstat} = "stop":
        stop
    #######################################################
    # End Condition
    #
    # Once Z reaches the maximum scan range,
    # the entire scan is finished.
    #######################################################
    if {tpz} >= {@endZ}:
        set {tpstat} to "stop"
        teleport {_scanner} to location(0, {@yLevel}, 0, world "{@worldName}", {@yaw}, {@pitch})
        broadcast "&aAuto TP completed."
        stop
    #######################################################
    # Move X forward
    #######################################################
    add {@stepX} to {tpx}

    #######################################################
    # Reached end of row?
    #
    # Example:
    #
    # Row 1:
    # X=-12000 -> X=12000
    #
    # Then:
    # Z moves forward
    # X resets back to start
    #######################################################
    if {tpx} >= {@endX}:
    # Move down to next row
        add {@stepZ} to {tpz}
    # Return X back to left side
        set {tpx} to {@startX}
    #######################################################
    # Create destination location
    #######################################################
    set {blue::spawn} to location({tpx}, {@yLevel}, {tpz}, world "{@worldName}", {@yaw}, {@pitch})
    #######################################################
    # Teleport player
    #######################################################
    teleport {_scanner} to {blue::spawn}
    #######################################################
    # Show progress
    #######################################################

    send "%{tpx}%, {@yLevel}, %{tpz}%" to "{@scanPlayer}" parsed as player


POWERSHELL ISE CODE

Code:
<#
Minecraft TP Paste Grid
- Click into Minecraft chat/window when prompted.
- Script pastes /tp commands using clipboard paste, then presses Enter.
- Starts at X=12000, Z=12000.
- Z decreases by 100 each teleport.
- When Z reaches below -12000, X decreases by 100 and Z resets to 12000.
- Stops if X or Z would go below -12000.
#>

# =========================
# CONFIG
# =========================
$NpcName = "@a"

$StartX = -10350
$StartZ = 12000
$MinX   = -12000
$MinZ   = -12000

$Y = 100
$FacingDirection = 180   # 90 = West # 0= South # 180 = North
$LookUpDown = 0         # 0 = flat

$Step = 50

# Delay before starting so you can click Minecraft
$StartDelaySeconds = 5

# Delay between teleports. Increase if chunks/server lag.
$DelayBetweenCommandsMs = 50

# Safety pause after each full Z row
$DelayBetweenRowsMs = 20

# Set to $true to show commands only without pasting
$PreviewOnly = $false

# =========================
# SCRIPT
# =========================
Add-Type -AssemblyName System.Windows.Forms

Write-Host "Minecraft TP Paste Grid" -ForegroundColor Cyan
Write-Host "Starting in $StartDelaySeconds seconds... click into your Minecraft chat/window now." -ForegroundColor Yellow
Start-Sleep -Seconds $StartDelaySeconds

$x = $StartX
$z = $StartZ
$count = 0

while ($true) {
    if ($x -lt $MinX) {
        Write-Host "Stopped: X went below $MinX" -ForegroundColor Red
        break
    }

    if ($z -lt $MinZ) {
        $x -= $Step
        $z = $StartZ

        if ($x -lt $MinX) {
            Write-Host "Stopped: X went below $MinX" -ForegroundColor Red
            break
        }

        Write-Host "Next row: X=$x, Z reset to $z" -ForegroundColor DarkYellow
        Start-Sleep -Milliseconds $DelayBetweenRowsMs
    }

    $command = "/tp $NpcName $x $Y $z $FacingDirection $LookUpDown"
    $count++

    Write-Host "[$count] $command"

    if (-not $PreviewOnly) {

        [System.Windows.Forms.SendKeys]::SendWait("t")
        Start-Sleep -Milliseconds 250
        Set-Clipboard -Value $command
        [System.Windows.Forms.SendKeys]::SendWait('^v')
        Start-Sleep -Milliseconds 50
        [System.Windows.Forms.SendKeys]::SendWait('{ENTER}')
        # Open chat

    }

    $z -= $Step
    Start-Sleep -Milliseconds $DelayBetweenCommandsMs
}

Write-Host "Done. Total commands pasted: $count" -ForegroundColor Green