CCTP (1.18.2)

Post your coolest Hexcasting creations here.

New topics are NOT for chatting or asking help, put those in the comments of a post or in a different forum.
yoyotam3
Posts: 1
Joined: Sat Mar 11, 2023 9:59 am

CCTP (1.18.2)

Post by yoyotam3 »

A spell+setup+Computercraft program that uses computercraft and stacks of pumpkin pies to let you teleport with one block precision within ~8 million blocks of world origin, wireless from a pocket computer (just keep the chunk loaded)
Note that i have NOT ENCRYPTED the things being sent with computercraft, and people could spoof them to teleport you to random places. If on a server with untrustworthy people, probably add that.
also you will need to change the first argument for rednet.send (by default 4) in the pocket computer program to whatever the id of the turtle computer is.
Both computers (turtle and pocket) need ender modems
To actually teleport, use the pocket computer and type "cctp x y z", replacing x y z with the coordinates you want.
Also, this uses block coordinates, so if you teleport to a negative x or z coordinate f3 will show you being in the block that is -1 from what you typed, but if you look at the block coordinates you reached the right block, this isn't a bug.
Tell me if there's anything in the setup i need to add clarification for.
The set up you need: turtle pointing towards positive z
imgonline-com-ua-CompressToSize-y7z0hcn7eCCT2oQ.jpg
imgonline-com-ua-CompressToSize-y7z0hcn7eCCT2oQ.jpg (187.01 KiB) Viewed 1459 times
imgonline-com-ua-CompressToSize-yrOJdWzrxAjgqB.jpg
imgonline-com-ua-CompressToSize-yrOJdWzrxAjgqB.jpg (190.96 KiB) Viewed 1459 times
The cc programs:
cctpserver(on the turtle):

Code: Select all

function pieConvert(innum)
    local digit1 = innum%64+1
    innum = math.floor(innum/64)
    local digit10 = innum%64+1
    innum = math.floor(innum/64)
    local digit100 = innum%64+1
    innum = math.floor(innum/64)
    local digit1000 = innum%64+1
    return digit1,digit10,digit100,digit1000
end
rednet.open("right")

while true do
local id,xyz,protocol=rednet.receive("hexdontspoof")
local x,y,z=xyz[1],xyz[2],xyz[3]
x=x+8388608
z=z+8388608
y=y+64
local y64={pieConvert(y)}
local l = {}
l[1], l[2], l[3], l[4]=pieConvert(x)
l[5], l[6], l[7], l[8]=pieConvert(z)
l[9], l[10]=y64[1],y64[2]
for i,c in ipairs(l) do
turtle.select(i)
turtle.drop(c)
end
redstone.setOutput("bottom",true)
sleep(0.5)
redstone.setOutput("bottom",false)
sleep(5)
turtle.select(1)
turtle.suckUp() turtle.suckUp() turtle.suckUp() turtle.suckUp() turtle.suckUp() turtle.suckUp() turtle.suckUp() turtle.suckUp() turtle.suckUp() turtle.suckUp()
end
cctp (on the pocket computer)

Code: Select all

local args = {...}
if #args~=3 then
    error("3 arguments!")
end
local xyz={tonumber(args[1])}
xyz[2]=tonumber(args[2])
xyz[3]=tonumber(args[3])
x,y,z=xyz[1],xyz[2],xyz[3]
if x==nil or y==nil or z==nil then
    error("not a number")
elseif math.abs(x)>8388600 or y<-64 or math.abs(z)>8388600 then
    error("out of range")
end
rednet.open("back")
rednet.send(4,xyz,"hexdontspoof")
rednet.close("back")
and the big one, the hex:

Code: Select all

Numerical Reflection: 1
Zone Distillation: Item
Gemini Decomposition
Huginn's Gambit
{
  Chronicler's Purification
  Arc's Reflection
  Division Distillation
  Numerical Reflection: 1
  Subtractive Distillation
}
Jester's Gambit
Thoth's Gambit
Speaker's Decomposition
Jester's Gambit
Speaker's Decomposition
Numerical Reflection: 64
Multiplicative Distillation
Jester's Gambit
Speaker's Decomposition
Numerical Reflection: 2
Numerical Reflection: 12
Power Distillation
Multiplicative Distillation
Jester's Gambit
Speaker's Decomposition
Numerical Reflection: 2
Numerical Reflection: 18
Power Distillation
Multiplicative Distillation
Jester's Gambit
Speaker's Decomposition
Jester's Gambit
Speaker's Decomposition
Numerical Reflection: 64
Multiplicative Distillation
Jester's Gambit
Speaker's Decomposition
Numerical Reflection: 2
Numerical Reflection: 12
Power Distillation
Multiplicative Distillation
Jester's Gambit
Speaker's Decomposition
Numerical Reflection: 2
Numerical Reflection: 18
Power Distillation
Multiplicative Distillation
Jester's Gambit
Flock's Disintegration
Numerical Reflection: 64
Multiplicative Distillation
Additive Distillation
Numerical Reflection: 5
Flock's Gambit
Retrograde Purification
Flock's Disintegration
Additive Distillation
Additive Distillation
Additive Distillation
Numerical Reflection: 6
Flock's Gambit
Retrograde Purification
Flock's Disintegration
Additive Distillation
Additive Distillation
Additive Distillation
Numerical Reflection: 5
Swindler's Gambit
Vector Exaltation
Numerical Reflection: 2
Numerical Reflection: 23
Power Distillation
Gemini Decomposition
Numerical Reflection: 64
Jester's Gambit
Vector Exaltation
Subtractive Distillation
Numerical Reflection: 0.5
Gemini Decomposition
Gemini Decomposition
Vector Exaltation
Additive Distillation
Mind's Reflection
Compass' Purification
{
  (0.00, -1.12, 0.00)
}
Flock's Disintegration
Additive Distillation
Subtractive Distillation
Mind's Reflection
Jester's Gambit
Greater Teleport
{
  Vector Reflection +Y
  Impulse
}
Muninn's Reflection
Thoth's Gambit