Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;=================================================================
- ; AHK Setting
- ;=================================================================
- #NoEnv
- SetBatchLines -1
- SetTitleMatchMode 2
- #SingleInstance off
- #Persistent
- SetWorkingDir %A_ScriptDir%
- SetKeyDelay, 100
- ;=================================================================
- ; Shortcuts
- ;=================================================================
- Hotkey !q, chunkbuilder ; Pressing alt + q will start function
- Return
- ;=================================================================
- ; Render Grid Setup:
- ;=================================================================
- ; |
- ; 4x4 of rRegion files | One Region File:
- ; = 128x128 Chunks | = 32x32 Chunks
- ; = 2048x2048 Blocks | = 512x512 Blocks
- ; #------##------##------##------# | #------#
- ; | || || || | | | |
- ; | || || || | | | |
- ; | || || || | | | |
- ; #------##------##------##------# | #------#
- ; #------##------##------##------# |
- ; | || || || | | With a renderdistande = 8
- ; | || || || | | That's a 4x4 grid of player postions
- ; | || || || | | To render one region file.
- ; #------##------##------##------# |
- ; #------##------##------##------# | each tp is: viewdistance x 16 x 2 = X blocks
- ; | || || || | | number of jumps/loops is: region grid x 32 = number of chunks / veiw distance = X loops
- ; | || || || | |
- ; | || || || | | Cord 0,0 is always the center in the grid
- ; #------##------##------##------# | And we always start the render in the lower left corner
- ; #------##------##------##------# | Eg at -X -Z and work our way towards +X +Z
- ; | || || || | |
- ; | || || || | |
- ; | || || || | |
- ; #------##------##------##------# |
- ;=================================================================
- ; The chunk builder function
- ;=================================================================
- chunkbuilder:
- {
- regionGrid := 8 ; Region file Grid: 4 = 4x4 Grid og Region files = 2048x2048 Blocks
- viewDist := 8 ; View distance in chunks on the server
- tpDelay := 1500 ; 10.000 = 10 Sec
- tpStart := Format("{:d}", SubStr((-1) * (regionGrid / 2) * 512, 1)) ; Calc Start Position (lower left corner)
- tpDist := SubStr(viewDist * 16 * 2, 1) ; Distance between positions
- totalLoops := Format("{:d}", SubStr((regionGrid * 32) / viewDist, 1)) ; Calc total number of player spots pr rows
- Sleep tpDelay ; Insert Delay
- Send t/minecraft:tp @p %tpStart% 192 %tpStart%{Enter} ; Tp to starting posistion
- Loop % totalLoops ; Start Loop for Z-axis
- {
- Loop % totalLoops ; Start Loop for X-axis
- {
- Sleep tpDelay ; Insert Delay
- Send t/minecraft:tp @p ~ {space} ~ {space} ~ {space} -90 20{Enter} ; Rotate 90 deg
- Sleep tpDelay ; Insert Delay
- Send t/minecraft:tp @p ~ {space} ~ {space} ~ {space} 0 20 {Enter} ; Rotate 90 deg
- Sleep tpDelay ; Insert Delay
- Send t/minecraft:tp @p ~ {space} ~ {space} ~ {space} 90 20{Enter} ; Rotate 90 deg
- Sleep tpDelay ; Insert Delay
- Send t/minecraft:tp @p ~ {space} ~ {space} ~ {space} 180 20{Enter} ; Rotate 90 deg
- Sleep tpDelay ; Insert Delay
- Send t/minecraft:tp @p ~%tpDist% ~ {space} ~ {Enter} ; Return to beginnig of the row
- }
- Sleep tpDelay ; Insert Delay
- Send t/minecraft:tp @p %tpStart% 192 {space} ~%tpDist%{Enter} ; TP one row up
- }
- }
- ;=================================================================
- ; Other Buttons
- ;=================================================================
- F8::Pause ; Pause Script
- F9::Reload ; Reload Script
- F10::Send t/minecraft:tp @p 0 200 0{Enter} ; TP back to 0,0
- Esc:
- ExitApp
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement