|
Você não é registrado, por favor registre-se para ter acesso ao conteúdo completo. Caso seja registrado, efetue login. Esqueceu sua senha? Clique aqui Recomendamos o uso do Mozilla Firefox para uma melhor visualização. |
|
| Início | Postados Hoje | Marcar Fóruns Como Lidos | Álbums | Banidos | SE Team | Medalhas |
|
|||||||
| Registrar | Loteria VIP | Staff SE | Regras do fórum | Comunidade | Arcade | Postados Hoje | Pesquisar | Experience |
|
|
|
||||||||||||||||||||||||||||||||||||||
|
|
|
|
Ferramentas do Tópico | Modos de Exibição |
|
|
#1 | ||||||||||||||
|
Membro - Soldado
![]() Registrado em: Feb 2010
Localização: Cachoeiro de Itapemirim
Posts: 15
Agradeceu: 11
Agradecido 24 Vezes em 11 Posts
Nome Real: Leandro Cândido da Silva
|
Ao se registrar nas Olimpiadas, é requerido determinada quantidade de pvp/pk ou ambos (isto é configurável).
Como usar? Em OlympiadParticipationRelated define-se como none (Para desativar), pvp, pk ou all (para ambos). Em OlympiadPartipationCount definirá a quantidade necessária para o que você escolheu na primeira configuração. Código Código:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
### Eclipse Workspace Patch 1.0
#P L2jFanatic_GameServer
Index: head-src/com/l2jfrozen/gameserver/model/entity/olympiad/Olympiad.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/entity/olympiad/Olympiad.java (revision 26)
+++ head-src/com/l2jfrozen/gameserver/model/entity/olympiad/Olympiad.java (working copy)
@@ -420,6 +420,21 @@
}
/** Begin Olympiad Restrictions */
+ if(Config.OLY_PARTICIPATION_BY_PVP || Config.OLY_PARTICIPATION_BY_PK)
+ {
+ String count = String.valueOf(Config.OLY_PARTICIPATION_COUNT);
+ if(Config.OLY_PARTICIPATION_BY_PVP && noble.getPvpKills() <= Config.OLY_PARTICIPATION_COUNT)
+ {
+ noble.sendMessage("Cant register when you have less than " + count + " Pvp Kills.");
+ return false;
+ }
+ else if(Config.OLY_PARTICIPATION_BY_PK && noble.getPkKills() <= Config.OLY_PARTICIPATION_COUNT)
+ {
+ noble.sendMessage("Cant register when you have less than " + count + " Pk Kills.");
+ return false;
+ }
+ }
+
if (noble.getBaseClass() != noble.getClassId().getId())
{
sm = new SystemMessage(SystemMessageId.YOU_CANT_JOIN_THE_OLYMPIAD_WITH_A_SUB_JOB_CHARACTER);
Index: config/head/olympiad.properties
===================================================================
--- config/head/olympiad.properties (revision 26)
+++ config/head/olympiad.properties (working copy)
@@ -100,4 +100,11 @@
# es. 2weeks-->AltOlyPeriod=WEEK and AltOlyPeriodMultiplier=2
AltOlyUseCustomPeriodSettings = False
AltOlyPeriod = MONTH
-AltOlyPeriodMultiplier = 1
\ No newline at end of file
+AltOlyPeriodMultiplier = 1
+
+# Basic requirements to participate in the Olympic game
+# Options: None, All, Pvp, PK
+OlympiadParticipationRelated = None
+# Sets the amount required to participate in the Olympics game.
+# Note: Only Works if OlympiadParticipationRelated equals All, Pvp or PK!
+OlympiadPartipationCount = 100
Index: head-src/com/l2jfrozen/Config.java
===================================================================
--- head-src/com/l2jfrozen/Config.java (revision 29)
+++ head-src/com/l2jfrozen/Config.java (working copy)
@@ -2584,6 +2584,10 @@
public static boolean ALT_OLY_USE_CUSTOM_PERIOD_SETTINGS;
public static OlympiadPeriod ALT_OLY_PERIOD;
public static int ALT_OLY_PERIOD_MULTIPLIER;
+
+ public static boolean OLY_PARTICIPATION_BY_PVP;
+ public static boolean OLY_PARTICIPATION_BY_PK;
+ public static int OLY_PARTICIPATION_COUNT;
//============================================================
public static void loadOlympConfig()
@@ -2640,7 +2644,9 @@
ALT_OLY_PERIOD = OlympiadPeriod.valueOf(OLYMPSetting.getProperty("AltOlyPeriod", "MONTH"));
ALT_OLY_PERIOD_MULTIPLIER = Integer.parseInt(OLYMPSetting.getProperty("AltOlyPeriodMultiplier", "1"));
-
+ OLY_PARTICIPATION_BY_PVP = OLYMPSetting.getProperty("OlympiadParticipationRelated", "All").equalsIgnoreCase("pvp") || OLYMPSetting.getProperty("OlympiadParticipationRelated", "All").equalsIgnoreCase("all");
+ OLY_PARTICIPATION_BY_PK = OLYMPSetting.getProperty("OlympiadParticipationRelated", "All").equalsIgnoreCase("pk") || OLYMPSetting.getProperty("OlympiadParticipationRelated", "All").equalsIgnoreCase("all");
+ OLY_PARTICIPATION_COUNT = Integer.parseInt(OLYMPSetting.getProperty("OlympiadPartipationCount", "100"));
}
catch(Exception e)
{
Créditos: Meus (Código) |
||||||||||||||
|
|
|||||||||||||||
| O seguinte membro ao lado disse Obrigado(a) a : RedHoT por gostar deste Post : |
OzzyOsbourne (30-09-2013)
|
| Links Patrocinados |