Boa tarde pessoal , alguem me ajuda a configurar o BootSystem ?
segue o arquivo em txt
alguem pode me mostrar onde devo mexer para colocar a conta para logar sozinha ?
--[[ BootSystem ]]--
BootSystem = {}
BOOT_SYSTEM_SWITCH = 1
--[[
Sobre o sistema:
Esse sistema apenas coloca personagens online, ele vai ficar logado no lugar onde a conta esta registrada na Character, caso tenha item vai aparecer etc...
E um sistema de "Boot", você precisa colocar contas existentes na "InjectPlayers", você pode configurar as contas com itens etc e colocar para logar no mesmo.
O limite de contas e o limite de usuários online da licença.
O sistema aceita /move, caso você esteja com o char STAFF e utilizar o move nele vai funcionar...
--]]
--Obs: Adicione aqui apenas personagens que exista na Character, AccountCharacter etc...
InjectPlayers = {{Account = "teste", Password = "1", Character = "testes"},}
local BotHandles = {}
function BootSystem.Add(index, account, password, name)
    gObjAdd(0, "127.0.0.1", index)
   
    AccountInfoSend(index, account, password)
    Timer.TimeOut(2, BootSystem.AddCharacter, index, account, password, name)
    BotHandles[index] = {aIndex = index}
end
function BootSystem.AddCharacter(index, account, password, name)
    if UserGetConnected(index) ~= 2
    then
        gObjDel(index)
        BotHandles[index] = nil
        LogAddC(2, string.format("Não foi possível criar o Boot [%s]", name))
        return
    end
    CharacterInfoSend(index, name, account)
end
function BootSystem.GetSlot()
    return SearchIndex(0, "127.0.0.1")
end
function BootSystem.Checking()
    for i = 6400, 7399 do
        if UserGetConnected(i) == 3
        then
            if BotHandles
            then
                UserSetCheckSumTime(i, GetTick())
                UserSetConnectCheckTime(i, GetTick())
            end
        end
    end
end
function BootSystem.CharacterMove(aIndex, map, x, y)
    if BotHandles[aIndex]
    then
        UserSetX(aIndex, x)
       
        UserSetTX(aIndex, x)
       
        UserSetY(aIndex, y)
       
        UserSetTY(aIndex, y)
       
        UserSetMapNumber(aIndex, map)
       
        UserSetTeleport(aIndex, 0)
       
        UserSetPathCount(aIndex, 0)
       
        UserSetRegenMapNumber(aIndex, map)
       
        UserSetRegenMapX(aIndex, x)
       
        UserSetRegenMapY(aIndex, y)
       
        UserSetRegen(aIndex, 0)
       
        ViewportCreate(aIndex)
        return 1
    end
   
    return
end
function BootSystem.ClearBoot()
    for i = 6400, 7399 do
        if UserGetConnected(i) ~= 0
        then
            for n in ipairs(InjectPlayers) do
                if InjectPlayers[n].Account == UserGetAccountID(i)
                then
                    gObjDel(i)
                end
            end
        end
    end
end
function BootSystem.CreateBoot()
    Timer.Interval(1, BootSystem.Checking)
    for i in ipairs(InjectPlayers) do
        local index = BootSystem.GetSlot()
   
        if index ~= -1
        then
            BootSystem.Add(index, InjectPlayers.Account, InjectPlayers.Password, InjectPlayers.Character)
        end
    end
end
function BootSystem.IsBoot(aIndex)
    for i in pairs(BotHandles) do
        if BotHandles.aIndex == aIndex
        then
            return 1
        end
    end
   
    return -1
end
function BootSystem.Start()
    if BOOT_SYSTEM_SWITCH == 0
    then
        return
    end
    BootSystem.ClearBoot()
    BootSystem.CreateBoot()
end
Timer.TimeOut(2, BootSystem.Start)
GameServerFunctions.CharacterMove(BootSystem.CharacterMove)
return BootSystem