Ir para conteúdo

Featured Replies

Postado

Opa gente, alguém poderia me ajudar a arrumar esse script?

Ele sempre fica dando mesmo resultado mais não da erro nenhum no distro.

function onSay(cid, words, param)
        local player = Player(cid)
        local param = string.lower(param)
        local guild = player:getGuild()

        if guild == false then
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are not in a guild!")
        return true
        end
        
        if ((player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT)) and (not player:getTile():hasFlag(TILESTATE_PROTECTIONZONE))) then -- Verifica a Battle
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Lose your battle symbol first!')
        return true
        end
        
        
        local guildName, guildId = guild:getName(), guild:getId()
                emptyWAR = false
                for i = 1, #WAR_SYSTEM do
                    if guild:getId() == Game.getStorageValue(WAR_SYSTEM[i].Team1Storage) or guild:getId() == Game.getStorageValue(WAR_SYSTEM[i].Team2Storage) then
                        emptyWAR = true
                        break
                    else
                        emptyWAR = false
                    end
                end
                if emptyWAR then
                    for i = 1, #WAR_SYSTEM do
                        if guildId == Game.getStorageValue(WAR_SYSTEM[i].Team1Storage) then
                                player:teleportTo(WAR_SYSTEM[i].Team1Pos)
                                player:setStorageValue(warPrivate_storage, 1)
                                player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Fight bravely!")
                        elseif guildId == Game.getStorageValue(WAR_SYSTEM[i].Team2Storage) then
                                player:teleportTo(WAR_SYSTEM[i].Team2Pos)
                                player:setStorageValue(warPrivate_storage, 1)
                                player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Fight bravely!")
                        end
                    end
                else
                player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Your guild has not been invited to any wars.")
                end
return false
end

Sempre da esse "Your guild has not been invited to any wars." quando eu uso o comando.

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.9k

Informação Importante

Confirmação de Termo