Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado
  • Autor

a  e tem outro evento [CTF] Capture The Flag 2.0(Automático)

 

ai tem esse event 

 

<event type="combat" name="CTFCombat" event="script" value="CTFMax.lua"/>      <!-- CTF by MaXwELlDeN -->

 

 

--[[

Capture The Flag System
Author: Maxwell Denisson(MaXwEllDeN)
Version: 2.0
]]
 
 
local CTF = CTF_LIB
 
function onStatsChange(cid, attacker, type, combat, value)
if getPlayerStorageValue(cid, 16700) ~= -1 and type == 1 and getCreatureHealth(cid) - value <= 0 then
if getPlayerStorageValue(cid, 16702) ~= -1 then
CTF.returnFlag(cid, 1)
end
 
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid))
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
return false
end
 
return true
end
 
function onLogout(cid)
if getPlayerStorageValue(cid, 16700) ~= -1 then
CTF.removePlayer(cid)
end
 
   return true
end
 
function onCombat(cid, target)
if getPlayerStorageValue(cid, 16700) ~= -1 then
if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then
return false
end
end
 
return true
end
 
function onAttack(cid, target)
if getPlayerStorageValue(cid, 16700) ~= -1 then
if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then
return false
end
end
 
return true
end

  • Respostas 13
  • Visualizações 2.6k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • mano eu axo que encontrei o erro eu axo que é aki eu vo marca de vermelho   esse script é do sistema  Battlefield Event!    e tem isso la creaturescripts.xml   <event type="combat" name="Batt

Postado

Olá, bom dia.

 

Colega, penso que a questão é outra.

 

Funciona da Seguinte Maneira:
 

PvP:

 worldType = "pvp"

No-PvP

worldType = "Optional"

PvP-Enforced

worldType = "Hardcore"

Confira se funciona e volte aqui.

Ah, confira se os "players" não estão em uma área no-pvp também.

 

Abraço.

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

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

  • 6 months later...
Postado

OLHE A SETA QUE E FIZ .... TROQUE PARA TRUE  PARA PODER ATACAR !!!

 

 

function onLogin(cid)
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
registerCreatureEvent(cid, "BattleTeam")
registerCreatureEvent(cid, "BattleDeath")
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 then
doPlayerSendCancel(cid, "You may not attack your team mates.") return false     <-------------------------------------------------------------------- troque para true
end
if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) == 1 and getPlayerStorageValue(target, _Lib_Battle_Info.TeamTwo.storage) == 1 then
doPlayerSendCancel(cid, "You may not attack your team mates.") return false     <--------------------------------------------------------------------- troque para true
end
return true
end
return true
end
function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller)
if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) >= 1 then
setPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage, -1)
setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage)-1)
doRemoveCondition(cid, CONDITION_OUTFIT)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[battle Field] You Are Dead!")
if getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == 0 then
getWinnersBattle(_Lib_Battle_Info.TeamTwo.storage)
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
elseif getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) >= 1 then
setPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage, -1)
setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage)-1)
doRemoveCondition(cid, CONDITION_OUTFIT)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[battle Field] You Are Dead!")
if getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage) == 0 then
getWinnersBattle(_Lib_Battle_Info.TeamOne.storage)
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

 

 

 

SE AJUDEI REP+  :)

  • 6 years later...

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