Peake_Dad avatar

HiveCraft - Hub Map

strangedad

Published: 08 Mar 2026 β€Ί Updated: 08 Mar 2026HiveCraft - Hub Map

HiveCraft - Hub Map

The server is running. If you're having any bugs or things aren't working correctly, comment here.

I am working on trying to code in a centralized hub that has all the things that we're working on as well.

I may add in other games and such that are Hive-associated. I might add Splinterlands... we'll see.

main.lua


-- HubWorld main.lua

local g_Config =
{
WorldName = "world",
Radius = 256,
WarningCooldownSeconds = 3,
CenterX = nil,
CenterY = nil,
CenterZ = nil,
}

local g_LastWarn = {}

local function LoadConfig()
local ini = cIniFile()
local cfgPath = "Plugins/HubWorld/HubWorld.ini"
if (ini:ReadFile(cfgPath)) then
g_Config.WorldName = ini:GetValue("HubWorld", "WorldName", g_Config.WorldName)
g_Config.Radius = ini:GetValueI("HubWorld", "Radius", g_Config.Radius)
g_Config.WarningCooldownSeconds = ini:GetValueI("HubWorld", "WarningCooldownSeconds", g_Config.WarningCooldownSeconds)
local cx = ini:GetValueI("HubWorld", "CenterX", 0)
local cy = ini:GetValueI("HubWorld", "CenterY", 0)
local cz = ini:GetValueI("HubWorld", "CenterZ", 0)
if (cx ~= 0 or cy ~= 0 or cz ~= 0) then
g_Config.CenterX = cx
g_Config.CenterY = cy
g_Config.CenterZ = cz
end
return
end

ini:SetValue("HubWorld", "WorldName", g_Config.WorldName)
ini:SetValueI("HubWorld", "Radius", g_Config.Radius)
ini:SetValueI("HubWorld", "WarningCooldownSeconds", g_Config.WarningCooldownSeconds)
ini:WriteFile(cfgPath)
end

local function GetCenter(a_World)
if (g_Config.CenterX ~= nil) then
return g_Config.CenterX, g_Config.CenterY, g_Config.CenterZ
end
return a_World:GetSpawnX(), a_World:GetSpawnY(), a_World:GetSpawnZ()
end

local function SaveCenter(a_World, a_X, a_Y, a_Z)
g_Config.CenterX = math.floor(a_X + 0.5)
g_Config.CenterY = math.floor(a_Y + 0.5)
g_Config.CenterZ = math.floor(a_Z + 0.5)

local ini = cIniFile()
local cfgPath = "Plugins/HubWorld/HubWorld.ini"
if (ini:ReadFile(cfgPath)) then
ini:SetValueI("HubWorld", "CenterX", g_Config.CenterX)
ini:SetValueI("HubWorld", "CenterY", g_Config.CenterY)
ini:SetValueI("HubWorld", "CenterZ", g_Config.CenterZ)
ini:WriteFile(cfgPath)
end
end

local function IsOutside(a_World, a_Pos)
local cx, cy, cz = GetCenter(a_World)
local dx = a_Pos.x - cx
local dz = a_Pos.z - cz
return ((dx * dx + dz * dz) > (g_Config.Radius * g_Config.Radius))
end

local function BouncePlayer(a_Player)
local world = a_Player:GetWorld()
local cx, cy, cz = GetCenter(world)
a_Player:TeleportToCoords(cx, cy, cz)
end

function HandleHubSetCenter(a_Split, a_Player)
local pos = a_Player:GetPosition()
SaveCenter(a_Player:GetWorld(), pos.x, pos.y, pos.z)
a_Player:SendMessageSuccess("Hub center updated.")
return true
end

function HandleHubStatus(a_Split, a_Player)
local world = a_Player:GetWorld()
local cx, cy, cz = GetCenter(world)
a_Player:SendMessageInfo("HubWorld: center=" .. cx .. "," .. cy .. "," .. cz .. " radius=" .. g_Config.Radius)
return true
end

function OnPlayerMoving(a_Player)
local world = a_Player:GetWorld()
if (world:GetName() ~= g_Config.WorldName) then
return false
end

local pos = a_Player:GetPosition()
if (not IsOutside(world, pos)) then
return false
end

local uid = a_Player:GetUniqueID()
local now = os.time()
local last = g_LastWarn[uid] or 0
if ((now - last) >= g_Config.WarningCooldownSeconds) then
a_Player:SendMessageFailure("You reached the hub boundary.")
g_LastWarn[uid] = now
end

BouncePlayer(a_Player)
return true
end

function Initialize(Plugin)
Plugin:SetName("HubWorld")
Plugin:SetVersion(1)
LoadConfig()

cPluginManager:Get():AddHook(cPluginManager.HOOK_PLAYER_MOVING, OnPlayerMoving)

LOG("HubWorld loaded")
return true
end


πŸͺ™ PeakeCoin Ecosystem

πŸ’± PeakeCoin USDT Bridge (Hive ↔ Polygon/MATIC)
Bridge SWAP.USDT from Hive Engine to USDT on Polygon (MATIC).
Whitelist access, documentation, and bridge status updates:
πŸ‘‰ https://geocities.ws/peakecoin


βš™οΈ HiveP.I.M.P. β€” PeakeCoin Intelligent Market Protector
Operated by hivepimp@hivepimp, P.I.M.P. focuses on stabilizing PEK markets and strengthening liquidity on Hive Engine.
Community participation supports long-term ecosystem health.


πŸ€– PeakeBot β€” Autonomous Trading System
Independent multi-token trading bot with RC-awareness, adaptive delay logic, and smart cycle control.
πŸ“Š Trading bot documentation:
πŸ‘‰ https://geocities.ws/p/e/peakecoin/trading-bot/peakebot_v0_01.html
πŸ’» Open-source repositories:
πŸ‘‰ https://github.com/paulmoon410


🎰 PeakeSino β€” The PeakeCoin Casino (Beta)
Blockchain-powered games using PEK as the native in-game currency.
Built on Hive with a focus on provable fairness and community-driven growth.
πŸƒ Play the beta games here:
πŸ‘‰ https://geocities.ws/peakecoin/pek_casino/beta_games/index.html


πŸ™ Acknowledgements

Thanks to and please follow:
enginewitty@enginewitty ecoinstant@ecoinstant neoxian@neoxian txracer@txracer thecrazygm@thecrazygm holdonia@holdonia aggroed@aggroed

For their continued support, guidance, and help expanding the PeakeCoin ecosystem.


Leave HiveCraft - Hub Map to:

Written by

Surviving the American Dream, and a father of 2.

Read more #pimp posts


Best Posts From Peake_Dad

We have not curated any of strangedad's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Peake_Dad