*Atualizado 04/04/14
*Suporta qualquer tipo de [banco de dados]
*Suporta qualquer versao de ot server
- Team Balance Por Tile
- O Sistema se Basea em um Balanceamente Por Escolha.
- Voce Pode Escolher que Time Vai Entrar e Pode Criar Varios Times ex: [Rosa,preto,branco,azul,vermelho......]
- Team Storages:
- Red: 6666
- Blue: 6667
- Vai em moveevents/Team1.lua e add isso:
XML: <movevent type="StepIn" actionid="8888" event="script" value="Team1.lua"/>
function onStepIn(cid, item, position, fromPosition)
end
- Vai em moveevents/Team2.lua e add isso:
XML: <movevent type="StepIn" actionid="8888" event="script" value="Team2.lua"/>
function onStepIn(cid, item, position, fromPosition)
end
- Em Moveevents cria um Arquivo chamado TileTeam.lua:
XML: <movevent type="StepIn" actionid="14999-15000" event="script" value="TileTeam.lua"/>
local config = {
end
- Depois vai em creaturescripts/Logout.lua e add isso:
function onLogout(cid)
if getPlayerStorageValue(cid,6666) >= 1 then
setPlayerStorageValue(cid,6666,0)
doBroadcastMessage("O Jogador "..getCreatureName(cid).. " Saiu do Time Red!",22)
end
if getPlayerStorageValue(cid,6667) >= 1 then
setPlayerStorageValue(cid,6667,0)
doBroadcastMessage("O Jogador "..getCreatureName(cid).. " Saiu do Time Blue!",22)
end
return true
end
XML: <event type="logout" name="logar" event="script" value="Logout.lua"/>
Registra no Login.lua:
registerCreatureEvent(cid, "logar")
- Depois Cria um Arquivo chamado Death.lua:
function onDeath(cid, corpse, killer)
if getPlayerStorageValue(cid,6666) >= 1 then
setPlayerStorageValue(cid,6666,0)
doBroadcastMessage("O Jogador "..getCreatureName(cid).. " Morreu e Saiu do Time Red!",22)
end
if getPlayerStorageValue(cid,6667) >= 1 then
setPlayerStorageValue(cid,6667,0)
doBroadcastMessage("O Jogador "..getCreatureName(cid).. " Morreu e Saiu do Time Blue!",22)
end
return true
end
XML: <event type="death" name="deathtime" event="script" value="Death.lua"/>
Registra no Login.lua:
registerCreatureEvent(cid, "deathtime")
- Depois talkactions/online.lua
function onSay(cid, words, param, channel)
local players = getPlayersOnline()
local x = 0
local y = 0
local z = 0
local adm = 0
for i, pid in ipairs(players) do
if getPlayerStorageValue(pid,6666) == 1 and getPlayerGroupId(pid) <= 1 then
x = x + 1
elseif getPlayerStorageValue(pid,6667) == 1 and getPlayerGroupId(pid) <= 1 then
y = y + 1
elseif getPlayerGroupId(pid) >= 5 then
adm = adm + 1
end
z = z + 1
end
local strings, i, position, added, showGamemasters = {""}, 1, 1, false, getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand'))
for _, pid in ipairs(getPlayersOnline()) do
if(added) then
if(i > (position * 7)) then
strings[position] = strings[position] .. ","
position = position + 1
strings[position] = ""
else
strings[position] = i == 1 and "" or strings[position] .. ", "
end
end
added = false
if((showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then
strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. ":" .. getPlayerVocationName(pid) .. "]"
i = i + 1
added = true
end
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player" .. (i > 1 and "s" or "") .. " online:")
for i, str in ipairs(strings) do
if(str:sub(str:len()) ~= ",") then
str = str .. "."
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str)
end
minutes,seconds = getTime(getGlobalStorageValue(501) - os.time())
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,"".. x .." Jogadores do time Red online!")
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,"".. y .." Jogadores do time Blue online!")
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,"".. adm .." Admins online!")
return true
end
xml: <talkaction words="!online" event="script" value="online.lua"/>
- Team Balance Por Login
*ATUALIZADO [06/10/13]
*Suport [Mysql]
*Suporta qualquer tipo de [banco de dados]
*Suporta qualquer versao de ot server
*Favor trocar todos os scripts e nao reaproveitar os Antigos scripts
*Download Mapa ja configurado:
http://www.4shared.com/rar/glPqSHjG/world.html?
Eae Galera , eu vi muita gente querendo o Script de Team balance e nao os que tem na Net para baixar
Eu vou ensinar a instalar o sistema em qualquer Servidor de War:
*Primeiro vai na sua Lib e cria um arquivo chamado War.Lib:
-- config --
end
Depois vai na cria um arquivo chamado data.lib
ass essa linha dentro do arquivo data.lib
dofile(getDataDir() .. "lib/WAR.lua")
*Depois vai em data/creaturescripts/loginwar.lua
function onThink(interval, lastExecution)
broadcastMessage("Auto-Kick for Map change in 10 second.", MESSAGE_STATUS_CONSOLE_BLUE)
addEvent(onThink2, 1000)
return TRUE
end
function onThink2(interval, lastExecution)
broadcastMessage("Auto-Kick for Map change in 9 seconds.", MESSAGE_STATUS_CONSOLE_BLUE)
addEvent(onThink3, 1000)
return TRUE
end
function onThink3(interval, lastExecution)
broadcastMessage("Auto-Kick for Map change in 8 seconds.", MESSAGE_STATUS_CONSOLE_BLUE)
addEvent(onThink4, 1000)
return TRUE
end
function onThink4(interval, lastExecution)
broadcastMessage("Auto-Kick for Map change in 7 seconds.", MESSAGE_STATUS_CONSOLE_BLUE)
addEvent(onThink5, 1000)
return TRUE
end
function onThink5(interval, lastExecution)
broadcastMessage("Auto-Kick for Map change in 6 seconds.", MESSAGE_STATUS_CONSOLE_BLUE)
addEvent(onThink6, 1000)
return TRUE
end
function onThink6(interval, lastExecution)
broadcastMessage("Auto-Kick for Map change in 5 seconds.", MESSAGE_STATUS_CONSOLE_BLUE)
addEvent(onThink7, 1000)
return TRUE
end
function onThink7(interval, lastExecution)
broadcastMessage("Auto-Kick for Map change in 4 seconds.", MESSAGE_STATUS_CONSOLE_BLUE)
addEvent(onThink8, 1000)
return TRUE
end
function onThink8(interval, lastExecution)
broadcastMessage("Auto-Kick for Map change in 3 seconds.", MESSAGE_STATUS_CONSOLE_BLUE)
addEvent(onThink9, 1000)
return TRUE
end
function onThink9(interval, lastExecution)
broadcastMessage("Auto-Kick for Map change in 2 seconds.", MESSAGE_STATUS_CONSOLE_BLUE)
addEvent(onThink10, 1000)
return TRUE
end
function onThink10(interval, lastExecution)
broadcastMessage("Auto-Kick for Map change in 1 seconds.", MESSAGE_STATUS_CONSOLE_BLUE)
addEvent(onThink11, 1000)
return TRUE
end
function onThink11(interval)
setMap(getNextMapId())
return TRUE
end
<globalevent name="mudarmapa" interval="2400" event="script" value="changemap.lua"/>
function onSay(cid, words, param, channel)
function onSay(cid, words, param)
setMap(getNextMapId())
return true
end
<talkaction log="yes" access="5" words="/changemap" event="script" value="changemap.lua"/>











