Postado Abril 4, 2014 11 anos 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 Contact: [email protected] ]] 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
Postado Abril 11, 2014 11 anos 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 Abril 11, 2014 11 anos por Xagah (veja o histórico de edições) The Last Man Standing - 100% funcional
Postado Outubro 26, 2014 10 anos 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+
Postado Dezembro 3, 2020 4 anos POR QUE QUANDO EU COLOCO OPTIONAL OU HARDCORE FICA DANDO SAVE TODA HORA ?
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.