Ir para conteúdo

Featured Replies

Postado
  • Este é um post popular.

Mapa BattleField Feito Por AnneMotta :

Mapa Battlefield.rar

Scan: https://www.virustot...sis/1346548669/


Imagens do mapa

Spoiler


Q4aZO.jpg
dOw71.jpg
TrSjG.jpg
j56bb.jpg
Ueb5E.jpg
3ASZd.jpg




Descrição:

- O evento é automático e acontece em determinado dia e hora da semana
- Logo após é aberto um teleport então apenar um número limitado de players entra no evento
- São formados por dois times, os "Black Assassins" e os "Red Barbarians"
- Os times são balanceados automaticamente, quando o último jogador entra, esse teleport é fechado e depois de 5 minutos o evento começa, os 5 minutos são para os players ter tempo de planejar um ataque.
- O sistema tem por finalidade matar todos do time inimigo, e os players que sobreviverem recebem um prêmio.

Bônus:

- Durante o evento é mostrado na tela somente dos jogadores que estão no evento um placar de times.
PekRM.png
- Até o último player entrar no evento, ficam mandando broadcast dizendo quanto players faltam para dar inicio ao jogo.
uaQ7s.png
- Se o evento abrir e não atingir a meta de players colocada, o evento é finalizado e os players voltam para o templo.
1mHkC.png



Lembre-se:

- De colocar Pvp Tool na área
- De colocar área NoLogout


Imagens:

Spoiler


Z1p1X.png
--
v5UJw.png
--
lEGrn.png
--
aH5rL.png
--
UMasK.png
--
DiGSk.png





Instalação:

 

Data > Lib
 
Spoiler
BattleLib.lua

_Lib_Battle_Info = {
Reward = {
exp = {true, 100}, items = {true, 2160, 10}, premium_days = {true, 2}
},
TeamOne = {name = "Black Assassins", storage = 140120, pos = {x=164,y=54,z=7}},
TeamTwo = {name = "Red Barbarians",storage = 140121,pos = {x=163,y=50,z=7}},
storage_count = 180400,
tpPos = {x=182, y=56, z=7},
limit_Time = 10 -- limite de tempo para adentrar o evento
}
function resetBattle()
setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, 0)
setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, 0)
end
function OpenWallBattle()
local B = {
{1543,{x=186, y=54, z=7, stackpos = 1}},
{1543,{x=186, y=55, z=7, stackpos = 1}},
{1543,{x=186, y=56, z=7, stackpos = 1}},
{1543,{x=186, y=57, z=7, stackpos = 1}}
}
for i = 1, #B do
if getTileItemById(B[i][2], B[i][1]).uid == 0 then
doCreateItem(B[i][1], 1, B[i][2])
else
doRemoveItem(getThingfromPos(B[i][2]).uid,1)
end
end
end
function doBroadCastBattle(type, msg)
for _, cid in pairs(getPlayersOnline()) do
if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) >= 1 or getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) >= 1 then
doPlayerSendTextMessage(cid,type,msg)
end
end
end
function removeBattleTp()
local t = getTileItemById(_Lib_Battle_Info.tpPos, 1387).uid
return t > 0 and doRemoveItem(t) and doSendMagicEffect(_Lib_Battle_Info.tpPos, CONST_ME_POFF)
end
function getWinnersBattle(storage)
local str, c = "" , 0
for _, cid in pairs(getPlayersOnline()) do
if getPlayerStorageValue(cid, storage) == 1 then
if _Lib_Battle_Info.Reward.exp[1] == true then doPlayerAddExperience(cid, _Lib_Battle_Info.Reward.exp[2]) end
if _Lib_Battle_Info.Reward.items[1] == true then doPlayerAddItem(cid, _Lib_Battle_Info.Reward.items[2], _Lib_Battle_Info.Reward.items[3]) end
if _Lib_Battle_Info.Reward.premium_days[1] == true then doPlayerAddPremiumDays(cid, _Lib_Battle_Info.Reward.premium_days[2]) end
doRemoveCondition(cid, CONDITION_OUTFIT)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
setPlayerStorageValue(cid, storage, -1)
c = c+1 
end
end
str = str .. ""..c.." Player"..(c > 1 and "s" or "").." from team "..(getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == 0 and _Lib_Battle_Info.TeamTwo.name or _Lib_Battle_Info.TeamOne.name).." won the event battlefield!"
resetBattle()
OpenWallBattle()
return doBroadcastMessage(str)
end
function CheckEvent(delay)
if delay > 0 and getGlobalStorageValue(_Lib_Battle_Info.storage_count) > 0 then
doBroadcastMessage("[BattleField Event] We are waiting "..getGlobalStorageValue(_Lib_Battle_Info.storage_count).." players to Battlefield starts")
elseif delay == 0 and getGlobalStorageValue(_Lib_Battle_Info.storage_count) > 0 then
for _, cid in pairs(getPlayersOnline()) do
if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) >= 1 or getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) >= 1 then
doRemoveCondition(cid, CONDITION_OUTFIT)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
setPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage, -1)
setPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage, -1)
end
end
doBroadcastMessage("The event cannot be started because not had enough players.")
setGlobalStorageValue(_Lib_Battle_Info.storage_count, 0)
resetBattle()
removeBattleTp()
end
addEvent(CheckEvent, 60000, delay-1)
end
 
 
Data > CreatureScript > Script
 
Spoiler
BattleCreatureScript.lua

function onLogin(cid)
registerCreatureEvent(cid, "BattleTeam")
registerCreatureEvent(cid, "BattleDeath")
if getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == -1 then
setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, 0)
setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, 0)
setGlobalStorageValue(_Lib_Battle_Info.storage_count, 0)
end
if getPlayerStorageValue(cid,_Lib_Battle_Info.TeamOne.storage) >= 1 or getPlayerStorageValue(cid,_Lib_Battle_Info.TeamTwo.storage) >= 1 then
setPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage, -1)
setPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage, -1)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
end
return true
end
function onCombat(cid, target)
if isPlayer(cid) and isPlayer(target) then
if getPlayerStorageValue(cid,_Lib_Battle_Info.TeamOne.storage) >= 1 and getPlayerStorageValue(target,_Lib_Battle_Info.TeamOne.storage) >= 1 or getPlayerStorageValue(cid,_Lib_Battle_Info.TeamTwo.storage) >= 1 and getPlayerStorageValue(target,_Lib_Battle_Info.TeamTwo.storage) >= 1 then 
return false
end
return true
end
return true
end
function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller)
if isPlayer(cid) and getPlayerStorageValue(cid,_Lib_Battle_Info.TeamOne.storage) >= 1 or getPlayerStorageValue(cid,_Lib_Battle_Info.TeamTwo.storage) >= 1 then
local MyTeam = getPlayerStorageValue(cid,_Lib_Battle_Info.TeamOne.storage) >= 1 and _Lib_Battle_Info.TeamOne.storage or _Lib_Battle_Info.TeamTwo.storage
local EnemyTeam = getPlayerStorageValue(cid,_Lib_Battle_Info.TeamOne.storage) >= 1 and _Lib_Battle_Info.TeamTwo.storage or _Lib_Battle_Info.TeamOne.storage
setGlobalStorageValue(MyTeam, (getGlobalStorageValue(MyTeam)-1))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Battle Field] You Are Dead!")
setPlayerStorageValue(cid, MyTeam, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
if getGlobalStorageValue(MyTeam) == 0 then
getWinnersBattle(EnemyTeam)
else
doBroadCastBattle(23,"[BattleField Information] ".._Lib_Battle_Info.TeamOne.name.." "..getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage).." VS "..getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage).." " .._Lib_Battle_Info.TeamTwo.name)
end
end
return true
end
 
creaturescript.xml

 <event type="login" name="BattleLogin" event="script" value="BattleCreatureScript.lua"/>
<event type="PrepareDeath" name="BattleDeath" event="script" value="BattleCreatureScript.lua"/>
<event type="combat" name="BattleTeam" event="script" value="BattleCreatureScript.lua"/>
 
 
 
Data > GlobalEvents > Scripts
 
Spoiler
BattleGlobalEvents.lua

function onThink(interval, lastExecution)
_Lib_Battle_Days = {
["Tuesday"] = {
["16:00"] = {players = 30},
["18:19"] = {players = 2}
},
["Wednesday"] = {
["19:00"] = {players = 16}
},
["Thursday"] = {
["11:26"] = {players = 4},
["20:30"] = {players = 10}
}
}
if _Lib_Battle_Days[os.date("%A")] then
hours = tostring(os.date("%X")):sub(1, 5)
tb = _Lib_Battle_Days[os.date("%A")][hours]
if tb and (tb.players % 2 == 0) then
local tp = doCreateItem(1387, 1, _Lib_Battle_Info.tpPos)
doItemSetAttribute(tp, "aid", 45000)
CheckEvent(_Lib_Battle_Info.limit_Time)
doBroadcastMessage("The event BattleField was opened and We are waiting "..tb.players.." Players! Team divided into "..((tb.players)/2).." VS "..((tb.players)/2))
return setGlobalStorageValue(_Lib_Battle_Info.storage_count, tb.players)
end
end
return true
end
 
BattleGlobalStart.lua

function onStartup()
 
setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, 0)
setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, 0)
setGlobalStorageValue(_Lib_Battle_Info.storage_count, 0)
return true
end
 
 
globalevents.xml
 

 <globalevent name="GlobalBattle" interval="60" event="script" value="BattleGlobalEvents.lua"/>
<globalevent name="GlobalStart" type="start" event="script" value="BattleGlobalStart.lua"/>
 
obs: Lembre-sem caso o seu servidor seja em mileseconed mude 60 por 60000
 
 
 
Data > Movements > Script
 
Spoiler
BattleMovements.lua

local conditionBlack = createConditionObject(CONDITION_OUTFIT)
setConditionParam(conditionBlack, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(conditionBlack, {lookType = 134, lookHead = 114, lookBody = 114, lookLegs = 114, lookFeet = 114})
local conditionRed = createConditionObject(CONDITION_OUTFIT)
setConditionParam(conditionRed, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(conditionRed, {lookType = 143, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94})
function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) then return true end
if getPlayerAccess(cid) > 3 then
return doTeleportThing(cid, _Lib_Battle_Info.TeamOne.pos)
end
if getGlobalStorageValue(_Lib_Battle_Info.storage_count) > 0 then
local getMyTeam = getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) < getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage) and {_Lib_Battle_Info.TeamOne.storage,_Lib_Battle_Info.TeamOne.pos,_Lib_Battle_Info.TeamOne.name,conditionBlack}  or {_Lib_Battle_Info.TeamTwo.storage,_Lib_Battle_Info.TeamTwo.pos, _Lib_Battle_Info.TeamTwo.name, conditionRed}
doAddCondition(cid, getMyTeam[4])
setPlayerStorageValue(cid,getMyTeam[1], 1)
setGlobalStorageValue(getMyTeam[1], getGlobalStorageValue(getMyTeam[1])+1)
doTeleportThing(cid, getMyTeam[2])
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You will join the team " .. getMyTeam[3] .. "!")
setGlobalStorageValue(_Lib_Battle_Info.storage_count, getGlobalStorageValue(_Lib_Battle_Info.storage_count)-1)
end
if getGlobalStorageValue(_Lib_Battle_Info.storage_count) == 0 then
removeBattleTp()
doBroadcastMessage("Battlefield will start in 2 minutes, please create your strategy!")
addEvent(doBroadcastMessage, 2*60*1000-500, "BattleField will begin now!")
addEvent(OpenWallBattle, 2*60*1000)
end
return true
end
 
Movements.xml

<movevent type="StepIn" actionid="45000" event="script" value="BattleMovements.lua"/>
 
 
 
 
 
 
Configurações do evento
Spoiler
Em data > Lib > BattleLib.lua vai ter esta tabela:
 

_Lib_Battle_Info = {
Reward = {
exp = {true, 100}, items = {true, 2160, 10}, premium_days = {true, 2}
},
TeamOne = {name = "Black Assassins", storage = 140120, pos = {x=164,y=54,z=7}},
TeamTwo = {name = "Red Barbarians",storage = 140121,pos = {x=163,y=50,z=7}},
storage_count = 180400,
tpPos = {x=182, y=56, z=7},
limit_Time = 2 -- limite de tempo para adentrar o evento
}
 
Nesta linha true para receber e false para não receber a premiação!
 

exp = {true, 100}, items = {true, 2160, 10}, premium_days = {true, 2}
 
por exemplo vai receber 100 de exp, 10 item com id 2160 e 2 premium days
 

TeamOne = {name = "Black Assassins", storage = 140120, pos = {x=164,y=54,z=7}},
TeamTwo = {name = "Red Barbarians",storage = 140121,pos = {x=163,y=50,z=7}}
 
Está é a configuração do time,
 
Name -- Nome do time
storage -- n mexa
pos -- para onde o jogador vai ser teleportado, cada time tem um lado do mapa.
 

tpPos = {x=182, y=56, z=7},
 
é a posição onde o teleport irá aparecer
 
 
-----------------------------------------------------
nessa outra tabela:
 

local B = {
{1543,{x=186, y=54, z=7, stackpos = 1}},
{1543,{x=186, y=55, z=7, stackpos = 1}},
{1543,{x=186, y=56, z=7, stackpos = 1}},
{1543,{x=186, y=57, z=7, stackpos = 1}}
}
 
vc configura:
 
{ID DA SUA PAREDE, E A POS DELA}
 
PODE AUMENTAR O NÚMERO DE PAREDES E OS ID DELAS.
 
 
 
-----------------
Em data/globalevents/script/BattleGlobalEvents.lua vai ter essa tabela:
 

_Lib_Battle_Days = {
["Monday"] = {
["16:00"] = {players = 30},
["21:30"] = {players = 20}
},
["Wednesday"] = {
["19:00"] = {players = 16}
},
["Thursday"] = {
["11:26"] = {players = 4},
["20:30"] = {players = 10}
}
}
 
["DIA DA SEMANA"] = {
 
["HORARIO"] = {players = QUANTOS JOGADORES IRÃO PARTICIPAR}
 
 
Regra: Sempre coloque números pares para os jogadores, do contrário o evento não irá iniciar.
 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

  • Respostas 184
  • Visualizações 37.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • sim, isso mesmo. Mas no caso você tem que colocar no mapper editor as paredes pq qndo o evento abrir elas serão removidas, e quando o evento acabar elas voltam a ser criadas! infelizm

  • eu posso fazer o mapa, depois falo com o vod pra ver certinho como tem que fazer o mapa pro evento.

  • Então está fechado, vou falar com a anne e depois que ela terminar eu anexo o mapa aqui no tópico! abraços

Posted Images

Postado

REP+ ,,

function OpenWallBattle()

local B = {

{1543,{x=622, y=803, z=7, stackpos = 1}},

{1543,{x=622, y=804, z=7, stackpos = 1}},

{1543,{x=622, y=805, z=7, stackpos = 1}},

{1543,{x=622, y=806, z=7, stackpos = 1}}

}

for i = 1, #B do

if getTileItemById(B[i][2], B[i][1]).uid == 0 then

doCreateItem(B[i][1], 1, B[i][2])

else

doRemoveItem(getThingfromPos(B[i][2]).uid,1)

end

end

end

é a posição das paredes e a id das paredes usadas? que vão se abrir? ;3

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

Sign's


r6z42f.png
Feito por: Anne Motta

dxo51e.png
Feito por: Mim! kk ' Primeira Sign *-*




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