Ir para conteúdo

Featured Replies

Postado

Tente tirar a apóstrofe que fica entre "player" e "s" nas seguintes linhas de globalevents/scripts/hunger.lua:

 

function Player:removeAllItems() -- function to clear the player's inventory
    local depotpos = Tile(Position(depotbox.x, depotbox.y, depotbox.z)):getItemByType(ITEM_TYPE_DEPOT)
    local depotid = getDepotId(depotpos:getUniqueId())
    local depot = self:getDepotChest(depotid,true)
    local box = depot:addItem(1988)
    box:setAttribute(ITEM_ATTRIBUTE_NAME,"player gear box")
    for i=1,10 do
        local item = self:getSlotItem(i)
        if item then
            item:moveTo(box)
        end
    end
end

function Player:getBackItems() -- function to clear the player's inventory
    local depotpos = Tile(Position(depotbox.x, depotbox.y, depotbox.z)):getItemByType(ITEM_TYPE_DEPOT)
    local depotid = getDepotId(depotpos:getUniqueId())
    local depot = self:getDepotChest(depotid,true)
    local box = depot:getItem()
    for i= box:getSize()-1, , -1 do
        local item = box:getItem(i)
        if item then
            item:moveTo(self)
        end
    end
    --box:remove()
end

 

Ficando assim: 

 

function Player:removeAllItems() -- function to clear the players inventory
    local depotpos = Tile(Position(depotbox.x, depotbox.y, depotbox.z)):getItemByType(ITEM_TYPE_DEPOT)
    local depotid = getDepotId(depotpos:getUniqueId())
    local depot = self:getDepotChest(depotid,true)
    local box = depot:addItem(1988)
    box:setAttribute(ITEM_ATTRIBUTE_NAME,"player gear box")
    for i=1,10 do
        local item = self:getSlotItem(i)
        if item then
            item:moveTo(box)
        end
    end
end

function Player:getBackItems() -- function to clear the players inventory
    local depotpos = Tile(Position(depotbox.x, depotbox.y, depotbox.z)):getItemByType(ITEM_TYPE_DEPOT)
    local depotid = getDepotId(depotpos:getUniqueId())
    local depot = self:getDepotChest(depotid,true)
    local box = depot:getItem(0)
    for i= box:getSize()-1, 0, -1 do
        local item = box:getItem(i)
        if item then
            item:moveTo(self)
        end
    end
    --box:remove()
end

Editado por Talesigorvr (veja o histórico de edições)

  • Respostas 23
  • Visualizações 852
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado
  • Autor

No chat no game apareceu isso:

17:10 Sorry, There is not enough players to start Hunger Games Arena 1
17:10 Sorry, There is not enough players to start Hunger Games Arena 2
17:10 Sorry, There is not enough players to start Hunger Games Arena 3

 

mas estou logado com 3 players e dei o comando para entrar no game, a arena 2 ao menos era para entrar.

 

Pareceu uma coisa no log, je edito

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo