KilGPT update

Posts 1–6 of 6 · Page 1 of 1
@Sadand instead of that, just post the text so we can update it
Quote Originally Posted by Garkon View Post
@Sadand instead of that, just post the text so we can update it
updating it is easy bro it doesn’t need anything you can use this tool here to update it every time

https://www.mpgh.net/forum/showthread.php?t=1586476

Code:
while getOpenedProcessID() == 0 do
      openProcess("Trove.exe")
      Sleep(1000)
end
local processName = "Trove.exe"
local fixedBase = processName .. "+10B60AC"
local OffsetsChain = {Skip = {0xC, 0x28, 0x54, 0x88, 0xAC, 0x04}, Fly = {0x04, 0x24, 0x84, 0x00}}
local SpeedOffsets = {0xC, 0x28, 0x54, 0x88, 0xAC, 0x2DC, 0x1E4}
local function buildChainString(base, offsets)
  local chain = base
  for i = 1, #offsets do
    chain = "[" .. chain .. "]+" .. string.format("%X", offsets[i])
  end
  return "[" .. chain .. "]"
end
local skipChainString = buildChainString(fixedBase, OffsetsChain.Skip)
local flyChainString = buildChainString(fixedBase, OffsetsChain.Fly)
local function getVKCode(key)
  local vk = {
    ["0"] = 0x30, ["1"] = 0x31, ["2"] = 0x32, ["3"] = 0x33, ["4"] = 0x34,
    ["5"] = 0x35, ["6"] = 0x36, ["7"] = 0x37, ["8"] = 0x38, ["9"] = 0x39,
    A = 0x41, B = 0x42, C = 0x43, D = 0x44, E = 0x45, F = 0x46, G = 0x47,
    H = 0x48, I = 0x49, J = 0x4A, K = 0x4B, L = 0x4C, M = 0x4D, N = 0x4E,
    O = 0x4F, P = 0x50, Q = 0x51, R = 0x52, S = 0x53, T = 0x54, U = 0x55,
    V = 0x56, W = 0x57, X = 0x58, Y = 0x59, Z = 0x5A,
    F1 = 0x70, F2 = 0x71, F3 = 0x72, F4 = 0x73, F5 = 0x74, F6 = 0x75,
    F7 = 0x76, F8 = 0x77, F9 = 0x78, F10 = 0x79, F11 = 0x7A, F12 = 0x7B
  }
  return vk[key]
end
local function xor(a, b)
  if not a or not b then return 0 end
  local r = 0
  for i = 0, 31 do
    r = r + (((a % 2) ~ (b % 2)) << i)
    a = a >> 1
    b = b >> 1
  end
  return r
end
local function floatToInt(value)
  local m = allocateMemory(4)
  writeFloat(m, value)
  local r = readInteger(m)
  deAlloc(m)
  return r
end
local function ensureProcessAttached()
  if getProcessIDFromProcessName(processName) == 0 then
    openProcess(processName)
    return false
  end
  return true
end
local patches = {
  Collision = [[
aobscanmodule(noclip, Trove.exe, DC 67 68 C6)
registersymbol(noclip)
noclip:
    db DC 47
]],
  disableCollision = [[
noclip:
    db DC 67
]],
  AntiAFK = [[
aobscanmodule(AntiAFK, Trove.exe, 55 8B EC 83 E4 F8 D9 EE 83 EC 58)
alloc(newmem, $1000)
label(code)
label(return)
newmem:
    movss xmm0, [AntiAFK]
    movss [ebp-04], xmm0
    jmp return
AntiAFK:
    jmp newmem
    nop
return:
registersymbol(AntiAFK)
]],
  disableAfk = [[
AntiAFK:
    db 55 8B EC 83 E4 F8
unregistersymbol(AntiAFK)
dealloc(newmem)
]]
}
local function patch(name, enable)
  autoAssemble(enable and patches[name] or patches["disable" .. name])
end
local function resolvePointer(base, offsets)
  local ptr = readPointer(base)
  for i = 1, #offsets - 1 do
    if not ptr then return nil end
    ptr = readPointer(ptr + offsets[i])
  end
  return ptr and (ptr + offsets[#offsets]) or nil
end
local defaultSpeedEncoded = nil
local defaultSpeedRestored = false
local function initDefaultSpeed()
  local bp = getAddressSafe(fixedBase)
  if bp then
    local addr = resolvePointer(bp, SpeedOffsets)
    if addr then defaultSpeedEncoded = readInteger(addr) end
  end
end
local globalSpeedKey = 0x8E41D83C
local function applySpeedXOR()
  local bp = getAddressSafe(fixedBase)
  if not bp then return end
  local spd = resolvePointer(bp, SpeedOffsets)
  if not speedRow or not speedRow.enabled.Checked then
    if spd and defaultSpeedEncoded and not defaultSpeedRestored then
      writeInteger(spd, defaultSpeedEncoded)
      defaultSpeedRestored = true
    end
    if speedRow and speedRow.state then
      speedRow.state.Caption = "Off"
      speedRow.state.Fon*****lor = 0x0000EE
    end
    return
  end
  local sVal = tonumber(speedRow.power.Text) or 400
  local encoded = xor(floatToInt(sVal), globalSpeedKey)
  writeInteger(spd, encoded)
  speedRow.state.Caption = "On"
  speedRow.state.Fon*****lor = 0x00FF00
  defaultSpeedRestored = false
end
local function simulateForeground()
  local h = getWindow(processName)
  if h then
    SetForegroundWindow(h)
    Sleep(20)
    SetForegroundWindow(main.Handle)
  end
end
local function styleText(c)
  c.Fon*****lor = 0x00FF00
  c.Font.Size = 8
  c.Font.Style = "fsBold"
end
local function styleBox(e)
  e.Color = 0x1C1C1C
  e.BorderStyle = bsSingle
end
local main = createForm(true)
main.Caption = ""
main.Width = 240
main.Height = 140
main.BorderStyle = "bsNone"
main.Left = getScreenWidth() - main.Width
main.Top = 0
main.Color = 0x1C1C1C
main.Font.Name = "Segoe UI"
main.Font.Size = 9
local head = createPanel(main)
head.Width = main.Width
head.Height = 25
head.Color = 0x00FF00
local isDragging, dragOffsetX, dragOffsetY = false, 0, 0
head.OnMouseDown = function(s, b, x, y) if b == 0 then isDragging = true; dragOffsetX = x; dragOffsetY = y end end
head.OnMouseMove = function(s, x, y) if isDragging then main.Left = main.Left + (x - dragOffsetX); main.Top = main.Top + (y - dragOffsetY) end end
head.OnMouseUp = function(s, b, x, y) if b == 0 then isDragging = false end end
local title = createLabel(head)
title.Caption = "KIL GPT"
title.Left = 5
title.Top = 5
styleText(title)
title.Fon*****lor = 0x1C1C1C
title.Transparent = true
title.OnMouseDown = function(s, b, x, y) head.OnMouseDown(head, b, x, y) end
title.OnMouseMove = function(s, x, y) head.OnMouseMove(head, x, y) end
title.OnMouseUp = function(s, b, x, y) head.OnMouseUp(head, b, x, y) end
local closeBtn = createButton(head)
closeBtn.Caption = "X"
closeBtn.setPosition(head.Width - 25, 0)
closeBtn.Width = 25
closeBtn.Height = 25
closeBtn.Fon*****lor = 0xFF0000
closeBtn.Font.Style = "fsBold"
closeBtn.OnClick = function() closeCE() return caFree end
local headers = {"Use", "Power", "Timer", "Key", "On"}
local xPos = {12, 62, 102, 147, 197}
for i, text in ipairs(headers) do
  local lbl = createLabel(main)
  lbl.Caption = text
  lbl.Left = xPos[i]
  lbl.Top = 30
  styleText(lbl)
end
local rows = {}
function addRow(label, key, delay, power, callback, enabled)
  local y = 48 + (#rows * 25)
  local row = {}
  row.label = createLabel(main)
  row.label.Caption = label
  row.label.Left = 12
  row.label.Top = y + 3
  styleText(row.label)
  row.power = createEdit(main)
  row.power.Text = tostring(power)
  row.power.Left = 62
  row.power.Top = y
  row.power.Width = 30
  styleText(row.power)
  styleBox(row.power)
  row.timer = createEdit(main)
  row.timer.Text = tostring(delay)
  row.timer.Left = 102
  row.timer.Top = y
  row.timer.Width = 35
  styleText(row.timer)
  styleBox(row.timer)
  row.key = createEdit(main)
  row.key.Text = key
  row.key.Left = 147
  row.key.Top = y
  row.key.Width = 35
  styleText(row.key)
  styleBox(row.key)
  row.enabled = createCheckBox(main)
  row.enabled.Left = 197
  row.enabled.Top = y + 2
  row.enabled.Checked = enabled or false
  row.enabled.Fon*****lor = row.enabled.Checked and 0x00FF00 or 0xAAAAAA
  row.lastTick = 0
  row.callback = callback
  table.insert(rows, row)
end
local function getPlayerCoordinates()
  if not base then return nil, nil, nil end
  local x = readFloat(base + 0x80)
  local y = readFloat(base + 0x84)
  local z = readFloat(base + 0x88)
  return x, y, z
end
function skipMove_Row(row)
  if not base or not dir_base then return end
  local dist = tonumber(row.power.Text) or 3
  local x, y, z = getPlayerCoordinates() if not x then return end
  local dx = readFloat(dir_base + 0x100)
  local dy = readFloat(dir_base + 0x104)
  local dz = readFloat(dir_base + 0x108)
  if x and dx then skipBuffer = {x = x + dx * dist, y = y + dy * dist, z = z + dz * dist} end
end
function flyMove_Row(row)
  if not base or not dir_base then return end
  local spd = tonumber(row.power.Text) or 50
  local dx = readFloat(dir_base + 0x100)
  local dy = readFloat(dir_base + 0x104)
  local dz = readFloat(dir_base + 0x108)
  if dx then flyBuffer = {vx = dx * spd, vy = dy * spd, vz = dz * spd} end
end
addRow("Skip", "4", 20, 4, skipMove_Row, true)
addRow("Fly", "3", 50, 50, flyMove_Row, true)
local speedY = 48 + (#rows * 25)
speedRow = {}
speedRow.label = createLabel(main)
speedRow.label.Caption = "Speed"
speedRow.label.Left = 12
speedRow.label.Top = speedY + 3
styleText(speedRow.label)
speedRow.power = createEdit(main)
speedRow.power.Text = "400"
speedRow.power.Left = 62
speedRow.power.Top = speedY
speedRow.power.Width = 30
styleText(speedRow.power)
styleBox(speedRow.power)
speedRow.state = createLabel(main)
speedRow.state.Caption = "Off"
speedRow.state.Left = 106
speedRow.state.Top = speedY
speedRow.state.Font.Size = 11
speedRow.state.Font.Style = "fsBold"
speedRow.state.Fon*****lor = 0x0000EE
speedRow.key = createEdit(main)
speedRow.key.Text = "F5"
speedRow.key.Left = 147
speedRow.key.Top = speedY
speedRow.key.Width = 35
styleText(speedRow.key)
styleBox(speedRow.key)
speedRow.enabled = createCheckBox(main)
speedRow.enabled.Left = 197
speedRow.enabled.Top = speedY + 2
speedRow.enabled.Checked = false
speedRow.enabled.Fon*****lor = 0xFF0000
speedRow.lastTick = 0
speedRow.timer = {Text = "100"}
table.insert(rows, speedRow)
local togglesY = speedY + 25
bpAlwaysOn = createCheckBox(main)
bpAlwaysOn.Left = 45
bpAlwaysOn.Top = togglesY
bpAlwaysOn.Checked = true
local superLbl = createLabel(main)
superLbl.Caption = "SuperMan"
superLbl.Left = 65
superLbl.Top = togglesY
superLbl.Fon*****lor = 0x00FF00
superLbl.Font.Style = "fsBold"
afkCheck = createCheckBox(main)
afkCheck.Left = 125
afkCheck.Top = togglesY
afkCheck.Checked = true
local afkLbl = createLabel(main)
afkLbl.Caption = "AntiAFK"
afkLbl.Left = 145
afkLbl.Top = togglesY
afkLbl.Fon*****lor = 0x00FF00
afkLbl.Font.Style = "fsBold"

bpAlwaysOn.Checked = true
superLbl.Fon*****lor = 0x00FF00

autoAssemble(patches.Collision)

createThread(function()
    while true do
        if bpAlwaysOn.Checked then

            Sleep(7 * 60 * 1000)
            if bpAlwaysOn.Checked then
                autoAssemble(patches.disableCollision)
                Sleep(1000)
                if bpAlwaysOn.Checked then
                    autoAssemble(patches.Collision)
                end
            end
        else

            Sleep(100)
        end
    end
end)

bpAlwaysOn.OnClick = function()
    if bpAlwaysOn.Checked then
        autoAssemble(patches.Collision)
        superLbl.Fon*****lor = 0x00FF00
    else
        autoAssemble(patches.disableCollision)
        superLbl.Fon*****lor = 0x0000FF
    end
end

local scriptSymbols = [[
aobscanmodule(worldScan, Trove.exe, A1 ?? ?? ?? ?? 85 C0 74 07 C6 80 59 01 00 00 01 5D C2 04 00)
registersymbol(worldScan)
]]
autoAssemble(scriptSymbols)
local coordScript = [[
aobscanmodule(ptrScan, Trove.exe, A1 ?? ?? ?? ?? 8B 40 ?? 85 C0 74 ?? 0F 28 ?? ?? EB 07 0F 28 05 ?? ?? ?? ?? 80)
registersymbol(ptrScan)
]]
autoAssemble(coordScript)
local Base = getAddressSafe("Trove.exe")
if not Base then error("Base address not found!") end
local ptrScanAddr = nil
repeat
  ptrScanAddr = getAddressSafe("ptrScan")
  Sleep(100)
until ptrScanAddr
if not ptrScanAddr then error("'ptrScan' non trouvé") end
local pointerAddr = readInteger(ptrScanAddr + 1)
if not pointerAddr then error("Impossible de lire pointerAddr à ptrScan+1") end
local offset = pointerAddr - Base
local basePtrForCoord = string.format("Trove.exe+%X", offset)
local coordAddress = string.format("[[[[%s]+0]+28]+C4]+4", basePtrForCoord)
xCoordAddr = string.format("[%s]+80", coordAddress)
yCoordAddr = string.format("[%s]+84", coordAddress)
zCoordAddr = string.format("[%s]+88", coordAddress)
local worldScanAddr = getAddressSafe("worldScan")
if not worldScanAddr then error("worldScan non trouvé") end
local worldPointerAddr = readInteger(worldScanAddr + 1)
if not worldPointerAddr then error("Impossible de lire worldPointerAddr") end
local worldOffset = worldPointerAddr - Base
worldBasePtr = string.format("Trove.exe+%X", worldOffset)
plrCountAddr = string.format("[[%s]+FC]+2C", worldBasePtr)
function setPlayerCoordinates_list(x, y, z)
  pcall(function() writeFloat(xCoordAddr, x); writeFloat(yCoordAddr, y); writeFloat(zCoordAddr, z) end)
end
_G.setPlayerCoordinates_list = setPlayerCoordinates_list
function setPlayerCoordinates(x, y, z)
  pcall(function() writeFloat(xCoordAddr, x); writeFloat(yCoordAddr, y); writeFloat(zCoordAddr, z) end)
end
_G.setPlayerCoordinates = setPlayerCoordinates
function getPlayerInfo(index, localWorldBasePtr)
  local basePlrPtr = string.format("[[[%s]+FC]+00]+%X", localWorldBasePtr, index * 4)
  local name_addr = getAddressSafe(string.format("[[%s]+1D0]+00", basePlrPtr))
  local x_addr = getAddressSafe(string.format("[[[%s]+C4]+04]+80", basePlrPtr))
  local y_addr = getAddressSafe(string.format("[[[%s]+C4]+04]+84", basePlrPtr))
  local z_addr = getAddressSafe(string.format("[[[%s]+C4]+04]+88", basePlrPtr))
  if not name_addr then return "N/A", 0, 0, 0 end
  local success, n, xx, yy, zz = pcall(function() return readString(name_addr), readFloat(x_addr), readFloat(y_addr), readFloat(z_addr) end)
  if not success then return "N/A", 0, 0, 0 end
  return n or "N/A", xx or 0, yy or 0, zz or 0
end
function updateFollowTargetCoordinates()
  local newWorldPointerAddr = readInteger(worldScanAddr + 1)
  if not newWorldPointerAddr then return end
  local newWorldOffset = newWorldPointerAddr - Base
  local localWorldBasePtr = string.format("Trove.exe+%X", newWorldOffset)
  local plrCountAddrLocal = string.format("[[%s]+FC]+2C", localWorldBasePtr)
  local totalPlayerCount = readInteger(plrCountAddrLocal) or 0
  for i = 0, totalPlayerCount - 1 do
    local name, tx, ty, tz = getPlayerInfo(i, localWorldBasePtr)
    if name and globalFollowTargetName and string.lower(name) == string.lower(globalFollowTargetName) then
      globalDestX, globalDestY, globalDestZ = tx, ty, tz
      break
    end
  end
end
local defaultStepSize = 4
local defaultStepDelay = 25
globalMovementMode = nil
globalDestX, globalDestY, globalDestZ = nil, nil, nil
globalFollowTargetName = nil
function startMovement(mode, targetName, targetX, targetY, targetZ)
  globalMovementMode = mode
  if mode == "teleport" then
    globalDestX, globalDestY, globalDestZ = targetX, targetY, targetZ
    globalFollowTargetName = nil
  elseif mode == "follow" then
    globalMovementMode = "follow"
    globalFollowTargetName = targetName
    globalDestX, globalDestY, globalDestZ = targetX, targetY, targetZ
  end
end
function stopMovement()
  globalMovementMode = nil
  globalFollowTargetName = nil
end
if not globalMovementThread then
  globalMovementThread = createThread(function()
    local lastSim = 0
    while true do
      if globalMovementMode then
        local now = getTickCount()
        if now - lastSim >= 100 then simulateForeground() lastSim = now end
        if _G.globalPlayerListPowerEdit then local np = tonumber(_G.globalPlayerListPowerEdit.Text) if np then defaultStepSize = np end end
        if _G.globalPlayerListDelayEdit then local nd = tonumber(_G.globalPlayerListDelayEdit.Text) if nd then defaultStepDelay = nd end end
        local x, y, z = getPlayerCoordinates()
        if not x or not (globalDestX and globalDestY and globalDestZ) then stopMovement() Sleep(defaultStepDelay)
        else
          if globalMovementMode == "follow" and globalFollowTargetName then updateFollowTargetCoordinates() end
          local dx = globalDestX - x; local dy = globalDestY - y; local dz = globalDestZ - z
          local dist = math.sqrt(dx * dx + dy * dy + dz * dz)
          local factor = dist > 2 * defaultStepSize and defaultStepSize / dist or 0.5
          if dist > defaultStepSize then
            local newX = x + (globalDestX - x) * factor
            local newY = y + (globalDestY - y) * factor
            local newZ = z + (globalDestZ - z) * factor
            setPlayerCoordinates(newX, newY, newZ)
          else
            setPlayerCoordinates(globalDestX, globalDestY, globalDestZ)
            if globalMovementMode == "teleport" then stopMovement() end
          end
          Sleep(defaultStepDelay)
        end
      else Sleep(50) end
    end
  end)
end
function openPlayerListInterface()
  controls = {}
  lastWorldBasePtr = nil
  local pform = createForm()
  pform.Caption = "Player List"
  pform.Width = 425
  pform.Height = 500
  pform.FormStyle = 'fsSystemStayOnTop'
  pform.ShowInTaskBar = 'stAlways'
  pform.BorderStyle = 'bsSizeable'
  pform.AlphaBlend = true
  pform.AlphaBlendValue = 230
  pform.Left = main.Left - 193
  pform.Top = main.Top + main.Height
  local playerCountLabel = createLabel(pform)
  playerCountLabel.Caption = "Player Count: "
  playerCountLabel.Left = 10
  playerCountLabel.Top = 0
  playerCountLabel.Fon*****lor = 0x00FF00
  local labelPower = createLabel(pform)
  labelPower.Caption = "Power"
  labelPower.Left = 110
  labelPower.Top = 3
  labelPower.Fon*****lor = 0x00FF00
  local editPower = createEdit(pform)
  editPower.Left = 145
  editPower.Top = 0
  editPower.Width = 40
  editPower.Text = tostring(defaultStepSize)
  _G.globalPlayerListPowerEdit = editPower
  local labelDelay = createLabel(pform)
  labelDelay.Caption = "MS"
  labelDelay.Left = 195
  labelDelay.Top = 3
  labelDelay.Fon*****lor = 0x00FF00
  local editDelay = createEdit(pform)
  editDelay.Left = 215
  editDelay.Top = 0
  editDelay.Width = 50
  editDelay.Text = tostring(defaultStepDelay)
  _G.globalPlayerListDelayEdit = editDelay
  local stopGlobalBtn = createButton(pform)
  stopGlobalBtn.Caption = "Stop"
  stopGlobalBtn.Width = 150
  stopGlobalBtn.Height = 25
  stopGlobalBtn.Left = playerCountLabel.Left + 265
  stopGlobalBtn.Top = 0
  stopGlobalBtn.Fon*****lor = 0xFF0000
  stopGlobalBtn.Font.Style = "fsBold"
  stopGlobalBtn.OnClick = function() stopMovement() end
  local function updatePlayerList(pform, playerCountLabel)
    if not pform.Visible then return end
    local newWorldPointerAddr = readInteger(worldScanAddr + 1)
    if not newWorldPointerAddr then
      playerCountLabel.Caption = "Player Count: 0"
      controls = {}
      lastWorldBasePtr = nil
      return
    end
    local newWorldOffset = newWorldPointerAddr - Base
    local localWorldBasePtr = string.format("Trove.exe+%X", newWorldOffset)
    if not getAddressSafe(localWorldBasePtr) then
      playerCountLabel.Caption = "Player Count: 0"
      controls = {}
      lastWorldBasePtr = nil
      return
    end
    if lastWorldBasePtr and lastWorldBasePtr ~= localWorldBasePtr then controls = {} end
    lastWorldBasePtr = localWorldBasePtr
    local plrCountAddrLocal = string.format("[[%s]+FC]+2C", localWorldBasePtr)
    local totalPlayerCount = readInteger(plrCountAddrLocal) or 0
    for i = 0, totalPlayerCount - 1 do
      local name, x, y, z = getPlayerInfo(i, localWorldBasePtr)
      if name and globalFollowTargetName and string.lower(name) == string.lower(globalFollowTargetName) then
        globalDestX, globalDestY, globalDestZ = x, y, z
        break
      end
    end
    local playersInfo = {}
    local refName, refX, refY, refZ = getPlayerInfo(0, localWorldBasePtr)
    for i = 0, totalPlayerCount - 1 do
      local name, x, y, z = getPlayerInfo(i, localWorldBasePtr)
      if name ~= refName then
        local dx = x - refX
        local dy = y - refY
        local dz = z - refZ
        local dist = math.sqrt(dx * dx + dy * dy + dz * dz)
        table.insert(playersInfo, {name = name, x = x, y = y, z = z, distance = dist})
      end
    end
    table.sort(playersInfo, function(a, b) return a.distance < b.distance end)
    local displayCount = #playersInfo
    playerCountLabel.Caption = "Player Count: " .. displayCount
    while #controls < displayCount * 4 do
      table.insert(controls, createLabel(pform))
      table.insert(controls, createLabel(pform))
      table.insert(controls, createButton(pform))
      table.insert(controls, createButton(pform))
    end
    for i = 1, displayCount do
      local info = playersInfo[i]
      local yPos = 30 + (i - 1) * 30
      local idx = (i - 1) * 4
      local nameCtrl = controls[idx + 1]
      if nameCtrl and nameCtrl.Font then
        nameCtrl.Caption = info.name
        nameCtrl.Fon*****lor = 0x00FF00
        nameCtrl.Left = 10
        nameCtrl.Top = yPos
        nameCtrl.Visible = true
      end
      local coordCtrl = controls[idx + 2]
      if coordCtrl and coordCtrl.Font then
        coordCtrl.Caption = string.format("X:%d Y:%d Z:%d", math.floor(info.x), math.floor(info.y), math.floor(info.z))
        coordCtrl.Left = 140
        coordCtrl.Top = yPos
        coordCtrl.Fon*****lor = 0x00FF00
        coordCtrl.Visible = true
      end
      local teleportBtn = controls[idx + 3]
      if teleportBtn then
        teleportBtn.Caption = "Teleport"
        teleportBtn.Left = 275
        teleportBtn.Top = yPos - 5
        teleportBtn.Visible = true
        teleportBtn.OnClick = function() stopMovement(); startMovement("teleport", nil, info.x, info.y, info.z) end
      end
      local followBtn = controls[idx + 4]
      if followBtn then
        followBtn.Caption = "Follow"
        followBtn.Left = 350
        followBtn.Top = yPos - 5
        followBtn.Visible = true
        followBtn.OnClick = function() stopMovement(); startMovement("follow", info.name, info.x, info.y, info.z) end
      end
    end
    for i = (displayCount * 4) + 1, #controls do
      if controls[i] then controls[i].Visible = false end
    end
  end
  local updateTimer = createTimer(pform, true)
  updateTimer.Interval = 100
  updateTimer.OnTimer = function() updatePlayerList(pform, playerCountLabel) end
  pform.OnClose = function(form) updateTimer.destroy(); stopMovement(); _G.globalPlayerListPowerEdit = nil; _G.globalPlayerListDelayEdit = nil; return caFree end
  pform.Show()
end
local playerListBtn = createButton(main)
playerListBtn.Caption = "Player"
playerListBtn.Width = 42
playerListBtn.Height = 20
playerListBtn.Left = 197
playerListBtn.Top = 120
playerListBtn.OnClick = function() openPlayerListInterface() end
function applyMovementBuffers()
  if skipBuffer then
    writeFloat(base + 0x80, skipBuffer.x)
    writeFloat(base + 0x84, skipBuffer.y)
    writeFloat(base + 0x88, skipBuffer.z)
    skipBuffer = nil
  end
  if flyBuffer then
    writeFloat(base + 0xB0, flyBuffer.vx)
    writeFloat(base + 0xB4, flyBuffer.vy)
    writeFloat(base + 0xB8, flyBuffer.vz)
    flyBuffer = nil
  end
end
_G.applyMovementBuffers = applyMovementBuffers
local function handleHotkeys()
  local now = getTickCount()
  local speedKey = getVKCode(speedRow.key.Text:upper())
  if isKeyPressed(speedKey) and now - (speedRow.lastTick or 0) > tonumber(speedRow.timer.Text or "100") then
    speedRow.enabled.Checked = not speedRow.enabled.Checked
    speedRow.lastTick = now
    applySpeedXOR()
    speedRow.state.Caption = speedRow.enabled.Checked and "On" or "Off"
    speedRow.state.Fon*****lor = speedRow.enabled.Checked and 0x00FF00 or 0x0000EE
    if not speedRow.enabled.Checked then
      local bp = getAddressSafe(fixedBase)
      local spd = resolvePointer(bp, SpeedOffsets)
      if spd and defaultSpeedEncoded then local enc = xor(floatToInt(80), globalSpeedKey); writeInteger(spd, enc) end
    end
  end
  for _, row in ipairs(rows) do
    local key = getVKCode(row.key.Text:upper())
    local delay = tonumber(row.timer.Text) or 100
    row.lastTick = row.lastTick or 0
    if row.enabled.Checked then
      row.enabled.Fon*****lor = 0x00FF00
      if isKeyPressed(key) and (now - row.lastTick >= delay) then row.callback(row); row.lastTick = now end
    else
      row.enabled.Fon*****lor = 0xAAAAAA
    end
  end
end
initDefaultSpeed()
local mainTimer = createTimer(nil)
mainTimer.Interval = 30
mainTimer.OnTimer = function()
  if not ensureProcessAttached() then return end
  base = getAddressSafe(skipChainString)
  dir_base = getAddressSafe(flyChainString)
  if not base or not dir_base then return end
  simulateForeground()
  handleHotkeys()
  applyMovementBuffers()
end
local speedTimer = createTimer(nil)
speedTimer.Interval = 20
speedTimer.OnTimer = applySpeedXOR
main.OnClose = function()
  mainTimer.destroy()
  speedTimer.destroy()
  superCheckTimer.destroy()
  closeCE()
  return caFree
end
HOW TO USE??
Quote Originally Posted by FAISAL32 View Post
updating it is easy bro it doesn’t need anything you can use this tool here to update it every time

https://www.mpgh.net/forum/showthread.php?t=1586476

Code:
while getOpenedProcessID() == 0 do
      openProcess("Trove.exe")
      Sleep(1000)
end
local processName = "Trove.exe"
local fixedBase = processName .. "+10B60AC"
local OffsetsChain = {Skip = {0xC, 0x28, 0x54, 0x88, 0xAC, 0x04}, Fly = {0x04, 0x24, 0x84, 0x00}}
local SpeedOffsets = {0xC, 0x28, 0x54, 0x88, 0xAC, 0x2DC, 0x1E4}
local function buildChainString(base, offsets)
  local chain = base
  for i = 1, #offsets do
    chain = "[" .. chain .. "]+" .. string.format("%X", offsets[i])
  end
  return "[" .. chain .. "]"
end
local skipChainString = buildChainString(fixedBase, OffsetsChain.Skip)
local flyChainString = buildChainString(fixedBase, OffsetsChain.Fly)
local function getVKCode(key)
  local vk = {
    ["0"] = 0x30, ["1"] = 0x31, ["2"] = 0x32, ["3"] = 0x33, ["4"] = 0x34,
    ["5"] = 0x35, ["6"] = 0x36, ["7"] = 0x37, ["8"] = 0x38, ["9"] = 0x39,
    A = 0x41, B = 0x42, C = 0x43, D = 0x44, E = 0x45, F = 0x46, G = 0x47,
    H = 0x48, I = 0x49, J = 0x4A, K = 0x4B, L = 0x4C, M = 0x4D, N = 0x4E,
    O = 0x4F, P = 0x50, Q = 0x51, R = 0x52, S = 0x53, T = 0x54, U = 0x55,
    V = 0x56, W = 0x57, X = 0x58, Y = 0x59, Z = 0x5A,
    F1 = 0x70, F2 = 0x71, F3 = 0x72, F4 = 0x73, F5 = 0x74, F6 = 0x75,
    F7 = 0x76, F8 = 0x77, F9 = 0x78, F10 = 0x79, F11 = 0x7A, F12 = 0x7B
  }
  return vk[key]
end
local function xor(a, b)
  if not a or not b then return 0 end
  local r = 0
  for i = 0, 31 do
    r = r + (((a % 2) ~ (b % 2)) << i)
    a = a >> 1
    b = b >> 1
  end
  return r
end
local function floatToInt(value)
  local m = allocateMemory(4)
  writeFloat(m, value)
  local r = readInteger(m)
  deAlloc(m)
  return r
end
local function ensureProcessAttached()
  if getProcessIDFromProcessName(processName) == 0 then
    openProcess(processName)
    return false
  end
  return true
end
local patches = {
  Collision = [[
aobscanmodule(noclip, Trove.exe, DC 67 68 C6)
registersymbol(noclip)
noclip:
    db DC 47
]],
  disableCollision = [[
noclip:
    db DC 67
]],
  AntiAFK = [[
aobscanmodule(AntiAFK, Trove.exe, 55 8B EC 83 E4 F8 D9 EE 83 EC 58)
alloc(newmem, $1000)
label(code)
label(return)
newmem:
    movss xmm0, [AntiAFK]
    movss [ebp-04], xmm0
    jmp return
AntiAFK:
    jmp newmem
    nop
return:
registersymbol(AntiAFK)
]],
  disableAfk = [[
AntiAFK:
    db 55 8B EC 83 E4 F8
unregistersymbol(AntiAFK)
dealloc(newmem)
]]
}
local function patch(name, enable)
  autoAssemble(enable and patches[name] or patches["disable" .. name])
end
local function resolvePointer(base, offsets)
  local ptr = readPointer(base)
  for i = 1, #offsets - 1 do
    if not ptr then return nil end
    ptr = readPointer(ptr + offsets[i])
  end
  return ptr and (ptr + offsets[#offsets]) or nil
end
local defaultSpeedEncoded = nil
local defaultSpeedRestored = false
local function initDefaultSpeed()
  local bp = getAddressSafe(fixedBase)
  if bp then
    local addr = resolvePointer(bp, SpeedOffsets)
    if addr then defaultSpeedEncoded = readInteger(addr) end
  end
end
local globalSpeedKey = 0x8E41D83C
local function applySpeedXOR()
  local bp = getAddressSafe(fixedBase)
  if not bp then return end
  local spd = resolvePointer(bp, SpeedOffsets)
  if not speedRow or not speedRow.enabled.Checked then
    if spd and defaultSpeedEncoded and not defaultSpeedRestored then
      writeInteger(spd, defaultSpeedEncoded)
      defaultSpeedRestored = true
    end
    if speedRow and speedRow.state then
      speedRow.state.Caption = "Off"
      speedRow.state.Fon*****lor = 0x0000EE
    end
    return
  end
  local sVal = tonumber(speedRow.power.Text) or 400
  local encoded = xor(floatToInt(sVal), globalSpeedKey)
  writeInteger(spd, encoded)
  speedRow.state.Caption = "On"
  speedRow.state.Fon*****lor = 0x00FF00
  defaultSpeedRestored = false
end
local function simulateForeground()
  local h = getWindow(processName)
  if h then
    SetForegroundWindow(h)
    Sleep(20)
    SetForegroundWindow(main.Handle)
  end
end
local function styleText(c)
  c.Fon*****lor = 0x00FF00
  c.Font.Size = 8
  c.Font.Style = "fsBold"
end
local function styleBox(e)
  e.Color = 0x1C1C1C
  e.BorderStyle = bsSingle
end
local main = createForm(true)
main.Caption = ""
main.Width = 240
main.Height = 140
main.BorderStyle = "bsNone"
main.Left = getScreenWidth() - main.Width
main.Top = 0
main.Color = 0x1C1C1C
main.Font.Name = "Segoe UI"
main.Font.Size = 9
local head = createPanel(main)
head.Width = main.Width
head.Height = 25
head.Color = 0x00FF00
local isDragging, dragOffsetX, dragOffsetY = false, 0, 0
head.OnMouseDown = function(s, b, x, y) if b == 0 then isDragging = true; dragOffsetX = x; dragOffsetY = y end end
head.OnMouseMove = function(s, x, y) if isDragging then main.Left = main.Left + (x - dragOffsetX); main.Top = main.Top + (y - dragOffsetY) end end
head.OnMouseUp = function(s, b, x, y) if b == 0 then isDragging = false end end
local title = createLabel(head)
title.Caption = "KIL GPT"
title.Left = 5
title.Top = 5
styleText(title)
title.Fon*****lor = 0x1C1C1C
title.Transparent = true
title.OnMouseDown = function(s, b, x, y) head.OnMouseDown(head, b, x, y) end
title.OnMouseMove = function(s, x, y) head.OnMouseMove(head, x, y) end
title.OnMouseUp = function(s, b, x, y) head.OnMouseUp(head, b, x, y) end
local closeBtn = createButton(head)
closeBtn.Caption = "X"
closeBtn.setPosition(head.Width - 25, 0)
closeBtn.Width = 25
closeBtn.Height = 25
closeBtn.Fon*****lor = 0xFF0000
closeBtn.Font.Style = "fsBold"
closeBtn.OnClick = function() closeCE() return caFree end
local headers = {"Use", "Power", "Timer", "Key", "On"}
local xPos = {12, 62, 102, 147, 197}
for i, text in ipairs(headers) do
  local lbl = createLabel(main)
  lbl.Caption = text
  lbl.Left = xPos[i]
  lbl.Top = 30
  styleText(lbl)
end
local rows = {}
function addRow(label, key, delay, power, callback, enabled)
  local y = 48 + (#rows * 25)
  local row = {}
  row.label = createLabel(main)
  row.label.Caption = label
  row.label.Left = 12
  row.label.Top = y + 3
  styleText(row.label)
  row.power = createEdit(main)
  row.power.Text = tostring(power)
  row.power.Left = 62
  row.power.Top = y
  row.power.Width = 30
  styleText(row.power)
  styleBox(row.power)
  row.timer = createEdit(main)
  row.timer.Text = tostring(delay)
  row.timer.Left = 102
  row.timer.Top = y
  row.timer.Width = 35
  styleText(row.timer)
  styleBox(row.timer)
  row.key = createEdit(main)
  row.key.Text = key
  row.key.Left = 147
  row.key.Top = y
  row.key.Width = 35
  styleText(row.key)
  styleBox(row.key)
  row.enabled = createCheckBox(main)
  row.enabled.Left = 197
  row.enabled.Top = y + 2
  row.enabled.Checked = enabled or false
  row.enabled.Fon*****lor = row.enabled.Checked and 0x00FF00 or 0xAAAAAA
  row.lastTick = 0
  row.callback = callback
  table.insert(rows, row)
end
local function getPlayerCoordinates()
  if not base then return nil, nil, nil end
  local x = readFloat(base + 0x80)
  local y = readFloat(base + 0x84)
  local z = readFloat(base + 0x88)
  return x, y, z
end
function skipMove_Row(row)
  if not base or not dir_base then return end
  local dist = tonumber(row.power.Text) or 3
  local x, y, z = getPlayerCoordinates() if not x then return end
  local dx = readFloat(dir_base + 0x100)
  local dy = readFloat(dir_base + 0x104)
  local dz = readFloat(dir_base + 0x108)
  if x and dx then skipBuffer = {x = x + dx * dist, y = y + dy * dist, z = z + dz * dist} end
end
function flyMove_Row(row)
  if not base or not dir_base then return end
  local spd = tonumber(row.power.Text) or 50
  local dx = readFloat(dir_base + 0x100)
  local dy = readFloat(dir_base + 0x104)
  local dz = readFloat(dir_base + 0x108)
  if dx then flyBuffer = {vx = dx * spd, vy = dy * spd, vz = dz * spd} end
end
addRow("Skip", "4", 20, 4, skipMove_Row, true)
addRow("Fly", "3", 50, 50, flyMove_Row, true)
local speedY = 48 + (#rows * 25)
speedRow = {}
speedRow.label = createLabel(main)
speedRow.label.Caption = "Speed"
speedRow.label.Left = 12
speedRow.label.Top = speedY + 3
styleText(speedRow.label)
speedRow.power = createEdit(main)
speedRow.power.Text = "400"
speedRow.power.Left = 62
speedRow.power.Top = speedY
speedRow.power.Width = 30
styleText(speedRow.power)
styleBox(speedRow.power)
speedRow.state = createLabel(main)
speedRow.state.Caption = "Off"
speedRow.state.Left = 106
speedRow.state.Top = speedY
speedRow.state.Font.Size = 11
speedRow.state.Font.Style = "fsBold"
speedRow.state.Fon*****lor = 0x0000EE
speedRow.key = createEdit(main)
speedRow.key.Text = "F5"
speedRow.key.Left = 147
speedRow.key.Top = speedY
speedRow.key.Width = 35
styleText(speedRow.key)
styleBox(speedRow.key)
speedRow.enabled = createCheckBox(main)
speedRow.enabled.Left = 197
speedRow.enabled.Top = speedY + 2
speedRow.enabled.Checked = false
speedRow.enabled.Fon*****lor = 0xFF0000
speedRow.lastTick = 0
speedRow.timer = {Text = "100"}
table.insert(rows, speedRow)
local togglesY = speedY + 25
bpAlwaysOn = createCheckBox(main)
bpAlwaysOn.Left = 45
bpAlwaysOn.Top = togglesY
bpAlwaysOn.Checked = true
local superLbl = createLabel(main)
superLbl.Caption = "SuperMan"
superLbl.Left = 65
superLbl.Top = togglesY
superLbl.Fon*****lor = 0x00FF00
superLbl.Font.Style = "fsBold"
afkCheck = createCheckBox(main)
afkCheck.Left = 125
afkCheck.Top = togglesY
afkCheck.Checked = true
local afkLbl = createLabel(main)
afkLbl.Caption = "AntiAFK"
afkLbl.Left = 145
afkLbl.Top = togglesY
afkLbl.Fon*****lor = 0x00FF00
afkLbl.Font.Style = "fsBold"

bpAlwaysOn.Checked = true
superLbl.Fon*****lor = 0x00FF00

autoAssemble(patches.Collision)

createThread(function()
    while true do
        if bpAlwaysOn.Checked then

            Sleep(7 * 60 * 1000)
            if bpAlwaysOn.Checked then
                autoAssemble(patches.disableCollision)
                Sleep(1000)
                if bpAlwaysOn.Checked then
                    autoAssemble(patches.Collision)
                end
            end
        else

            Sleep(100)
        end
    end
end)

bpAlwaysOn.OnClick = function()
    if bpAlwaysOn.Checked then
        autoAssemble(patches.Collision)
        superLbl.Fon*****lor = 0x00FF00
    else
        autoAssemble(patches.disableCollision)
        superLbl.Fon*****lor = 0x0000FF
    end
end

local scriptSymbols = [[
aobscanmodule(worldScan, Trove.exe, A1 ?? ?? ?? ?? 85 C0 74 07 C6 80 59 01 00 00 01 5D C2 04 00)
registersymbol(worldScan)
]]
autoAssemble(scriptSymbols)
local coordScript = [[
aobscanmodule(ptrScan, Trove.exe, A1 ?? ?? ?? ?? 8B 40 ?? 85 C0 74 ?? 0F 28 ?? ?? EB 07 0F 28 05 ?? ?? ?? ?? 80)
registersymbol(ptrScan)
]]
autoAssemble(coordScript)
local Base = getAddressSafe("Trove.exe")
if not Base then error("Base address not found!") end
local ptrScanAddr = nil
repeat
  ptrScanAddr = getAddressSafe("ptrScan")
  Sleep(100)
until ptrScanAddr
if not ptrScanAddr then error("'ptrScan' non trouvé") end
local pointerAddr = readInteger(ptrScanAddr + 1)
if not pointerAddr then error("Impossible de lire pointerAddr à ptrScan+1") end
local offset = pointerAddr - Base
local basePtrForCoord = string.format("Trove.exe+%X", offset)
local coordAddress = string.format("[[[[%s]+0]+28]+C4]+4", basePtrForCoord)
xCoordAddr = string.format("[%s]+80", coordAddress)
yCoordAddr = string.format("[%s]+84", coordAddress)
zCoordAddr = string.format("[%s]+88", coordAddress)
local worldScanAddr = getAddressSafe("worldScan")
if not worldScanAddr then error("worldScan non trouvé") end
local worldPointerAddr = readInteger(worldScanAddr + 1)
if not worldPointerAddr then error("Impossible de lire worldPointerAddr") end
local worldOffset = worldPointerAddr - Base
worldBasePtr = string.format("Trove.exe+%X", worldOffset)
plrCountAddr = string.format("[[%s]+FC]+2C", worldBasePtr)
function setPlayerCoordinates_list(x, y, z)
  pcall(function() writeFloat(xCoordAddr, x); writeFloat(yCoordAddr, y); writeFloat(zCoordAddr, z) end)
end
_G.setPlayerCoordinates_list = setPlayerCoordinates_list
function setPlayerCoordinates(x, y, z)
  pcall(function() writeFloat(xCoordAddr, x); writeFloat(yCoordAddr, y); writeFloat(zCoordAddr, z) end)
end
_G.setPlayerCoordinates = setPlayerCoordinates
function getPlayerInfo(index, localWorldBasePtr)
  local basePlrPtr = string.format("[[[%s]+FC]+00]+%X", localWorldBasePtr, index * 4)
  local name_addr = getAddressSafe(string.format("[[%s]+1D0]+00", basePlrPtr))
  local x_addr = getAddressSafe(string.format("[[[%s]+C4]+04]+80", basePlrPtr))
  local y_addr = getAddressSafe(string.format("[[[%s]+C4]+04]+84", basePlrPtr))
  local z_addr = getAddressSafe(string.format("[[[%s]+C4]+04]+88", basePlrPtr))
  if not name_addr then return "N/A", 0, 0, 0 end
  local success, n, xx, yy, zz = pcall(function() return readString(name_addr), readFloat(x_addr), readFloat(y_addr), readFloat(z_addr) end)
  if not success then return "N/A", 0, 0, 0 end
  return n or "N/A", xx or 0, yy or 0, zz or 0
end
function updateFollowTargetCoordinates()
  local newWorldPointerAddr = readInteger(worldScanAddr + 1)
  if not newWorldPointerAddr then return end
  local newWorldOffset = newWorldPointerAddr - Base
  local localWorldBasePtr = string.format("Trove.exe+%X", newWorldOffset)
  local plrCountAddrLocal = string.format("[[%s]+FC]+2C", localWorldBasePtr)
  local totalPlayerCount = readInteger(plrCountAddrLocal) or 0
  for i = 0, totalPlayerCount - 1 do
    local name, tx, ty, tz = getPlayerInfo(i, localWorldBasePtr)
    if name and globalFollowTargetName and string.lower(name) == string.lower(globalFollowTargetName) then
      globalDestX, globalDestY, globalDestZ = tx, ty, tz
      break
    end
  end
end
local defaultStepSize = 4
local defaultStepDelay = 25
globalMovementMode = nil
globalDestX, globalDestY, globalDestZ = nil, nil, nil
globalFollowTargetName = nil
function startMovement(mode, targetName, targetX, targetY, targetZ)
  globalMovementMode = mode
  if mode == "teleport" then
    globalDestX, globalDestY, globalDestZ = targetX, targetY, targetZ
    globalFollowTargetName = nil
  elseif mode == "follow" then
    globalMovementMode = "follow"
    globalFollowTargetName = targetName
    globalDestX, globalDestY, globalDestZ = targetX, targetY, targetZ
  end
end
function stopMovement()
  globalMovementMode = nil
  globalFollowTargetName = nil
end
if not globalMovementThread then
  globalMovementThread = createThread(function()
    local lastSim = 0
    while true do
      if globalMovementMode then
        local now = getTickCount()
        if now - lastSim >= 100 then simulateForeground() lastSim = now end
        if _G.globalPlayerListPowerEdit then local np = tonumber(_G.globalPlayerListPowerEdit.Text) if np then defaultStepSize = np end end
        if _G.globalPlayerListDelayEdit then local nd = tonumber(_G.globalPlayerListDelayEdit.Text) if nd then defaultStepDelay = nd end end
        local x, y, z = getPlayerCoordinates()
        if not x or not (globalDestX and globalDestY and globalDestZ) then stopMovement() Sleep(defaultStepDelay)
        else
          if globalMovementMode == "follow" and globalFollowTargetName then updateFollowTargetCoordinates() end
          local dx = globalDestX - x; local dy = globalDestY - y; local dz = globalDestZ - z
          local dist = math.sqrt(dx * dx + dy * dy + dz * dz)
          local factor = dist > 2 * defaultStepSize and defaultStepSize / dist or 0.5
          if dist > defaultStepSize then
            local newX = x + (globalDestX - x) * factor
            local newY = y + (globalDestY - y) * factor
            local newZ = z + (globalDestZ - z) * factor
            setPlayerCoordinates(newX, newY, newZ)
          else
            setPlayerCoordinates(globalDestX, globalDestY, globalDestZ)
            if globalMovementMode == "teleport" then stopMovement() end
          end
          Sleep(defaultStepDelay)
        end
      else Sleep(50) end
    end
  end)
end
function openPlayerListInterface()
  controls = {}
  lastWorldBasePtr = nil
  local pform = createForm()
  pform.Caption = "Player List"
  pform.Width = 425
  pform.Height = 500
  pform.FormStyle = 'fsSystemStayOnTop'
  pform.ShowInTaskBar = 'stAlways'
  pform.BorderStyle = 'bsSizeable'
  pform.AlphaBlend = true
  pform.AlphaBlendValue = 230
  pform.Left = main.Left - 193
  pform.Top = main.Top + main.Height
  local playerCountLabel = createLabel(pform)
  playerCountLabel.Caption = "Player Count: "
  playerCountLabel.Left = 10
  playerCountLabel.Top = 0
  playerCountLabel.Fon*****lor = 0x00FF00
  local labelPower = createLabel(pform)
  labelPower.Caption = "Power"
  labelPower.Left = 110
  labelPower.Top = 3
  labelPower.Fon*****lor = 0x00FF00
  local editPower = createEdit(pform)
  editPower.Left = 145
  editPower.Top = 0
  editPower.Width = 40
  editPower.Text = tostring(defaultStepSize)
  _G.globalPlayerListPowerEdit = editPower
  local labelDelay = createLabel(pform)
  labelDelay.Caption = "MS"
  labelDelay.Left = 195
  labelDelay.Top = 3
  labelDelay.Fon*****lor = 0x00FF00
  local editDelay = createEdit(pform)
  editDelay.Left = 215
  editDelay.Top = 0
  editDelay.Width = 50
  editDelay.Text = tostring(defaultStepDelay)
  _G.globalPlayerListDelayEdit = editDelay
  local stopGlobalBtn = createButton(pform)
  stopGlobalBtn.Caption = "Stop"
  stopGlobalBtn.Width = 150
  stopGlobalBtn.Height = 25
  stopGlobalBtn.Left = playerCountLabel.Left + 265
  stopGlobalBtn.Top = 0
  stopGlobalBtn.Fon*****lor = 0xFF0000
  stopGlobalBtn.Font.Style = "fsBold"
  stopGlobalBtn.OnClick = function() stopMovement() end
  local function updatePlayerList(pform, playerCountLabel)
    if not pform.Visible then return end
    local newWorldPointerAddr = readInteger(worldScanAddr + 1)
    if not newWorldPointerAddr then
      playerCountLabel.Caption = "Player Count: 0"
      controls = {}
      lastWorldBasePtr = nil
      return
    end
    local newWorldOffset = newWorldPointerAddr - Base
    local localWorldBasePtr = string.format("Trove.exe+%X", newWorldOffset)
    if not getAddressSafe(localWorldBasePtr) then
      playerCountLabel.Caption = "Player Count: 0"
      controls = {}
      lastWorldBasePtr = nil
      return
    end
    if lastWorldBasePtr and lastWorldBasePtr ~= localWorldBasePtr then controls = {} end
    lastWorldBasePtr = localWorldBasePtr
    local plrCountAddrLocal = string.format("[[%s]+FC]+2C", localWorldBasePtr)
    local totalPlayerCount = readInteger(plrCountAddrLocal) or 0
    for i = 0, totalPlayerCount - 1 do
      local name, x, y, z = getPlayerInfo(i, localWorldBasePtr)
      if name and globalFollowTargetName and string.lower(name) == string.lower(globalFollowTargetName) then
        globalDestX, globalDestY, globalDestZ = x, y, z
        break
      end
    end
    local playersInfo = {}
    local refName, refX, refY, refZ = getPlayerInfo(0, localWorldBasePtr)
    for i = 0, totalPlayerCount - 1 do
      local name, x, y, z = getPlayerInfo(i, localWorldBasePtr)
      if name ~= refName then
        local dx = x - refX
        local dy = y - refY
        local dz = z - refZ
        local dist = math.sqrt(dx * dx + dy * dy + dz * dz)
        table.insert(playersInfo, {name = name, x = x, y = y, z = z, distance = dist})
      end
    end
    table.sort(playersInfo, function(a, b) return a.distance < b.distance end)
    local displayCount = #playersInfo
    playerCountLabel.Caption = "Player Count: " .. displayCount
    while #controls < displayCount * 4 do
      table.insert(controls, createLabel(pform))
      table.insert(controls, createLabel(pform))
      table.insert(controls, createButton(pform))
      table.insert(controls, createButton(pform))
    end
    for i = 1, displayCount do
      local info = playersInfo[i]
      local yPos = 30 + (i - 1) * 30
      local idx = (i - 1) * 4
      local nameCtrl = controls[idx + 1]
      if nameCtrl and nameCtrl.Font then
        nameCtrl.Caption = info.name
        nameCtrl.Fon*****lor = 0x00FF00
        nameCtrl.Left = 10
        nameCtrl.Top = yPos
        nameCtrl.Visible = true
      end
      local coordCtrl = controls[idx + 2]
      if coordCtrl and coordCtrl.Font then
        coordCtrl.Caption = string.format("X:%d Y:%d Z:%d", math.floor(info.x), math.floor(info.y), math.floor(info.z))
        coordCtrl.Left = 140
        coordCtrl.Top = yPos
        coordCtrl.Fon*****lor = 0x00FF00
        coordCtrl.Visible = true
      end
      local teleportBtn = controls[idx + 3]
      if teleportBtn then
        teleportBtn.Caption = "Teleport"
        teleportBtn.Left = 275
        teleportBtn.Top = yPos - 5
        teleportBtn.Visible = true
        teleportBtn.OnClick = function() stopMovement(); startMovement("teleport", nil, info.x, info.y, info.z) end
      end
      local followBtn = controls[idx + 4]
      if followBtn then
        followBtn.Caption = "Follow"
        followBtn.Left = 350
        followBtn.Top = yPos - 5
        followBtn.Visible = true
        followBtn.OnClick = function() stopMovement(); startMovement("follow", info.name, info.x, info.y, info.z) end
      end
    end
    for i = (displayCount * 4) + 1, #controls do
      if controls[i] then controls[i].Visible = false end
    end
  end
  local updateTimer = createTimer(pform, true)
  updateTimer.Interval = 100
  updateTimer.OnTimer = function() updatePlayerList(pform, playerCountLabel) end
  pform.OnClose = function(form) updateTimer.destroy(); stopMovement(); _G.globalPlayerListPowerEdit = nil; _G.globalPlayerListDelayEdit = nil; return caFree end
  pform.Show()
end
local playerListBtn = createButton(main)
playerListBtn.Caption = "Player"
playerListBtn.Width = 42
playerListBtn.Height = 20
playerListBtn.Left = 197
playerListBtn.Top = 120
playerListBtn.OnClick = function() openPlayerListInterface() end
function applyMovementBuffers()
  if skipBuffer then
    writeFloat(base + 0x80, skipBuffer.x)
    writeFloat(base + 0x84, skipBuffer.y)
    writeFloat(base + 0x88, skipBuffer.z)
    skipBuffer = nil
  end
  if flyBuffer then
    writeFloat(base + 0xB0, flyBuffer.vx)
    writeFloat(base + 0xB4, flyBuffer.vy)
    writeFloat(base + 0xB8, flyBuffer.vz)
    flyBuffer = nil
  end
end
_G.applyMovementBuffers = applyMovementBuffers
local function handleHotkeys()
  local now = getTickCount()
  local speedKey = getVKCode(speedRow.key.Text:upper())
  if isKeyPressed(speedKey) and now - (speedRow.lastTick or 0) > tonumber(speedRow.timer.Text or "100") then
    speedRow.enabled.Checked = not speedRow.enabled.Checked
    speedRow.lastTick = now
    applySpeedXOR()
    speedRow.state.Caption = speedRow.enabled.Checked and "On" or "Off"
    speedRow.state.Fon*****lor = speedRow.enabled.Checked and 0x00FF00 or 0x0000EE
    if not speedRow.enabled.Checked then
      local bp = getAddressSafe(fixedBase)
      local spd = resolvePointer(bp, SpeedOffsets)
      if spd and defaultSpeedEncoded then local enc = xor(floatToInt(80), globalSpeedKey); writeInteger(spd, enc) end
    end
  end
  for _, row in ipairs(rows) do
    local key = getVKCode(row.key.Text:upper())
    local delay = tonumber(row.timer.Text) or 100
    row.lastTick = row.lastTick or 0
    if row.enabled.Checked then
      row.enabled.Fon*****lor = 0x00FF00
      if isKeyPressed(key) and (now - row.lastTick >= delay) then row.callback(row); row.lastTick = now end
    else
      row.enabled.Fon*****lor = 0xAAAAAA
    end
  end
end
initDefaultSpeed()
local mainTimer = createTimer(nil)
mainTimer.Interval = 30
mainTimer.OnTimer = function()
  if not ensureProcessAttached() then return end
  base = getAddressSafe(skipChainString)
  dir_base = getAddressSafe(flyChainString)
  if not base or not dir_base then return end
  simulateForeground()
  handleHotkeys()
  applyMovementBuffers()
end
local speedTimer = createTimer(nil)
speedTimer.Interval = 20
speedTimer.OnTimer = applySpeedXOR
main.OnClose = function()
  mainTimer.destroy()
  speedTimer.destroy()
  superCheckTimer.destroy()
  closeCE()
  return caFree
end
How to use this code?
how do you use this code? pls help
elseif mode == "follow" then
globalMovementMode = "follow"
globalFollowTargetName = targetName
globalDestX, globalDestY, globalDestZ = targetX, targetY, targetZ
end
end
function stopMovement()
globalMovementMode = nil
globalFollowTargetName = nil
end
if not globalMovementThread then
globalMovementThread = createThread(function()
local lastSim = 0
while true do
if globalMovementMode then
local now = getTickCount()
if now - lastSim >= 100 then simulateForeground() lastSim = now end
if _G.globalPlayerListPowerEdit then local np = tonumber(_G.globalPlayerListPowerEdit.Text) if np then defaultStepSize = np end end
if _G.globalPlayerListDelayEdit then local nd = tonumber(_G.globalPlayerListDelayEdit.Text) if nd then defaultStepDelay = nd end end
local x, y, z = getPlayerCoordinates()
if not x or not (globalDestX and globalDestY and globalDestZ) then stopMovement() Sleep(defaultStepDelay)
else
if globalMovementMode == "follow" and globalFollowTargetName then updateFollowTargetCoordinates() end
local dx = globalDestX - x; local dy = globalDestY - y; local dz = globalDestZ - z
local dist = math.sqrt(dx * dx + dy * dy + dz * dz)
local factor = dist > 2 * defaultStepSize and defaultStepSize / dist or 0.5
if dist > defaultStepSize then
local newX = x + (globalDestX - x) * factor
local newY = y + (globalDestY - y) * factor
local newZ = z + (globalDestZ - z) * factor
setPlayerCoordinates(newX, newY, newZ)
else
setPlayerCoordinates(globalDestX, globalDestY, globalDestZ)
if globalMovementMode == "teleport" then stopMovement() end
end
Sleep(defaultStepDelay)
end
else Sleep(50) end
end
end)
end
function openPlayerListInterface()
controls = {}
lastWorldBasePtr = nil
local pform = createForm()
pform.Caption = "Player List"
pform.Width = 425
pform.Height = 500
pform.FormStyle = 'fsSystemStayOnTop'
pform.ShowInTaskBar = 'stAlways'
pform.BorderStyle = 'bsSizeable'
pform.AlphaBlend = true
pform.AlphaBlendValue = 230
pform.Left = main.Left - 193
pform.Top = main.Top + main.Height
local playerCountLabel = createLabel(pform)
playerCountLabel.Caption = "Player Count: "
playerCountLabel.Left = 10
playerCountLabel.Top = 0
playerCountLabel.Fon*****lor = 0x00FF00
local labelPower = createLabel(pform)
labelPower.Caption = "Power"
labelPower.Left = 110
labelPower.Top = 3
labelPower.Fon*****lor = 0x00FF00
local editPower = createEdit(pform)
editPower.Left = 145
editPower.Top = 0
editPower.Width = 40
editPower.Text = tostring(defaultStepSize)
_G.globalPlayerListPowerEdit = editPower
local labelDelay = createLabel(pform)
labelDelay.Caption = "MS"
labelDelay.Left = 195
labelDelay.Top = 3
labelDelay.Fon*****lor = 0x00FF00
local editDelay = createEdit(pform)
editDelay.Left = 215
editDelay.Top = 0
editDelay.Width = 50
editDelay.Text = tostring(defaultStepDelay)
_G.globalPlayerListDelayEdit = editDelay
local stopGlobalBtn = createButton(pform)
stopGlobalBtn.Caption = "Stop"
stopGlobalBtn.Width = 150
stopGlobalBtn.Height = 25
stopGlobalBtn.Left = playerCountLabel.Left + 265
stopGlobalBtn.Top = 0
stopGlobalBtn.Fon*****lor = 0xFF0000
stopGlobalBtn.Font.Style = "fsBold"
stopGlobalBtn.OnClick = function() stopMovement() end
local function updatePlayerList(pform, playerCountLabel)
if not pform.Visible then return end
local newWorldPointerAddr = readInteger(worldScanAddr + 1)
if not newWorldPointerAddr then
playerCountLabel.Caption = "Player Count: 0"
controls = {}
lastWorldBasePtr = nil
return
end
local newWorldOffset = newWorldPointerAddr - Base
local localWorldBasePtr = string.format("Trove.exe+%X", newWorldOffset)
if not getAddressSafe(localWorldBasePtr) then
playerCountLabel.Caption = "Player Count: 0"
controls = {}
lastWorldBasePtr = nil
return
end
if lastWorldBasePtr and lastWorldBasePtr ~= localWorldBasePtr then controls = {} end
lastWorldBasePtr = localWorldBasePtr
local plrCountAddrLocal = string.format("[[%s]+FC]+2C", localWorldBasePtr)
local totalPlayerCount = readInteger(plrCountAddrLocal) or 0
for i = 0, totalPlayerCount - 1 do
local name, x, y, z = getPlayerInfo(i, localWorldBasePtr)
if name and globalFollowTargetName and string.lower(name) == string.lower(globalFollowTargetName) then
globalDestX, globalDestY, globalDestZ = x, y, z
break
end
end
local playersInfo = {}
local refName, refX, refY, refZ = getPlayerInfo(0, localWorldBasePtr)
for i = 0, totalPlayerCount - 1 do
local name, x, y, z = getPlayerInfo(i, localWorldBasePtr)
if name ~= refName then
local dx = x - refX
local dy = y - refY
local dz = z - refZ
local dist = math.sqrt(dx * dx + dy * dy + dz * dz)
table.insert(playersInfo, {name = name, x = x, y = y, z = z, distance = dist})
end
end
table.sort(playersInfo, function(a, b) return a.distance < b.distance end)
local displayCount = #playersInfo
playerCountLabel.Caption = "Player Count: " .. displayCount
while #controls < displayCount * 4 do
table.insert(controls, createLabel(pform))
table.insert(controls, createLabel(pform))
table.insert(controls, createButton(pform))
table.insert(controls, createButton(pform))
end
for i = 1, displayCount do
local info = playersInfo[i]
local yPos = 30 + (i - 1) * 30
local idx = (i - 1) * 4
local nameCtrl = controls[idx + 1]
if nameCtrl and nameCtrl.Font then
nameCtrl.Caption = info.name
nameCtrl.Fon*****lor = 0x00FF00
nameCtrl.Left = 10
nameCtrl.Top = yPos
nameCtrl.Visible = true
end
local coordCtrl = controls[idx + 2]
if coordCtrl and coordCtrl.Font then
coordCtrl.Caption = string.format("X:%d Y:%d Z:%d", math.floor(info.x), math.floor(info.y), math.floor(info.z))
coordCtrl.Left = 140
coordCtrl.Top = yPos
coordCtrl.Fon*****lor = 0x00FF00
coordCtrl.Visible = true
end
local teleportBtn = controls[idx + 3]
if teleportBtn then
teleportBtn.Caption = "Teleport"
teleportBtn.Left = 275
teleportBtn.Top = yPos - 5
teleportBtn.Visible = true
teleportBtn.OnClick = function() stopMovement(); startMovement("teleport", nil, info.x, info.y, info.z) end
end
local followBtn = controls[idx + 4]
if followBtn then
followBtn.Caption = "Follow"
followBtn.Left = 350
followBtn.Top = yPos - 5
followBtn.Visible = true
followBtn.OnClick = function() stopMovement(); startMovement("follow", info.name, info.x, info.y, info.z) end
end
end
for i = (displayCount * 4) + 1, #controls do
if controls[i] then controls[i].Visible = false end
end
end
local updateTimer = createTimer(pform, true)
updateTimer.Interval = 100
updateTimer.OnTimer = function() updatePlayerList(pform, playerCountLabel) end
pform.OnClose = function(form) updateTimer.destroy(); stopMovement(); _G.globalPlayerListPowerEdit = nil; _G.globalPlayerListDelayEdit = nil; return caFree end
pform.Show()
end
local playerListBtn = createButton(main)
playerListBtn.Caption = "Player"
playerListBtn.Width = 42
playerListBtn.Height = 20
playerListBtn.Left = 197
playerListBtn.Top = 120
playerListBtn.OnClick = function() openPlayerListInterface() end
function applyMovementBuffers()
if skipBuffer then
writeFloat(base + 0x80, skipBuffer.x)
writeFloat(base + 0x84, skipBuffer.y)
writeFloat(base + 0x88, skipBuffer.z)
skipBuffer = nil
end
if flyBuffer then
writeFloat(base + 0xB0, flyBuffer.vx)
writeFloat(base + 0xB4, flyBuffer.vy)
writeFloat(base + 0xB8, flyBuffer.vz)
flyBuffer = nil
end
end
_G.applyMovementBuffers = applyMovementBuffers
local function handleHotkeys()
local now = getTickCount()
local speedKey = getVKCode(speedRow.key.Text:upper())
if isKeyPressed(speedKey) and now - (speedRow.lastTick or 0) > tonumber(speedRow.timer.Text or "100") then
speedRow.enabled.Checked = not speedRow.enabled.Checked
speedRow.lastTick = now
applySpeedXOR()
speedRow.state.Caption = speedRow.enabled.Checked and "On" or "Off"
speedRow.state.Fon*****lor = speedRow.enabled.Checked and 0x00FF00 or 0x0000EE
if not speedRow.enabled.Checked then
local bp = getAddressSafe(fixedBase)
local spd = resolvePointer(bp, SpeedOffsets)
if spd and defaultSpeedEncoded then local enc = xor(floatToInt(80), globalSpeedKey); writeInteger(spd, enc) end
end
end
for _, row in ipairs(rows) do
local key = getVKCode(row.key.Text:upper())
local delay = tonumber(row.timer.Text) or 100
row.lastTick = row.lastTick or 0
if row.enabled.Checked then
row.enabled.Fon*****lor = 0x00FF00
if isKeyPressed(key) and (now - row.lastTick >= delay) then row.callback(row); row.lastTick = now end
else
row.enabled.Fon*****lor = 0xAAAAAA
end
end
end
initDefaultSpeed()
local mainTimer = createTimer(nil)
mainTimer.Interval = 30
mainTimer.OnTimer = function()
if not ensureProcessAttached() then return end
base = getAddressSafe(skipChainString)
dir_base = getAddressSafe(flyChainString)
if not base or not dir_base then return end
simulateForeground()
handleHotkeys()
applyMovementBuffers()
end
local speedTimer = createTimer(nil)
speedTimer.Interval = 20
speedTimer.OnTimer = applySpeedXOR
main.OnClose = function()
mainTimer.destroy()
speedTimer.destroy()
superCheckTimer.destroy()
closeCE()
return caFree
end
[/CODE][/QUOTE]
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?