Siga-nos em...
Follow us on Twitter Follow us on Facebook Watch us on YouTube
Registro


HGIDC
Resultados 1 a 1 de 1
  1. #1

    Avatar de flaiter
    Data de Ingresso
    Jan 2012
    Localização
    Olinda
    Idade
    23
    Posts
    2
    Agradecido
    0
    Agradeceu
    0
    Peso da Avaliação
    0

    Padrão [MOD]Annuncio PvP And PK

    index: /trunk/l2j-mack_il/config/pvp.propierties
    ================================================== =================
    --- /trunk/l2j-mack_il/config/pvp.propierties (revision 1156)
    +++ /trunk/l2j-mack_il/config/pvp.propierties (working copy)
    @@ -29,3 +29,11 @@
    pvpvsnormaltime = 40000
    # length one stays in pvp mode after hitting a purple player (in ms)
    pvpvspvptime = 20000
    +
    +# announces when a player pk another player. Default - false
    +announcepkkill = false
    +# announces when a player pvp another player. Default - false
    +announcepvpkill = false
    +# announces when a player kill another player. Default - false
    +# note: If announcekill is enabled, announcepk and announcepvp will be disabled.
    +announceallkill = false

    index: /trunk/l2j-mack_il/l2j-mack_gameserver/java/com/l2dot/config.java
    ================================================== =================
    --- /trunk/l2j-mack_il/l2j-mack_gameserver/java/com/l2dot/config.java (revision 1156)
    +++ /trunk/l2j-mack_il/l2j-mack_gameserver/java/com/l2dot/config.java (working copy)
    @@ -777,7 +777,13 @@
    public static int pvp_normal_time;
    - public static int pvp_pvp_time;
    + public static int pvp_pvp_time;
    + public static boolean announce_pvp_kill;
    + public static boolean announce_pk_kill;
    + public static boolean announce_all_kill;

    // karma punishment
    /** allow player with karma to be killed in peace zone ? */
    @@ -1926,6 +1932,18 @@

    pvp_normal_time = integer.parseint(pvpsettings.getproperty("pvpvsnor maltime", "15000"));
    pvp_pvp_time = integer.parseint(pvpsettings.getproperty("pvpvspvp time", "30000"));
    + announce_all_kill = boolean.parseboolean(pvpsettings.getproperty("anno unceallkill", "false")); // get the announceallkill, announcepvpkill and announcepkkill values
    + if ( !announce_all_kill )
    + {
    + announce_pvp_kill = boolean.parseboolean(pvpsettings.getproperty("anno uncepvpkill", "false"));
    + announce_pk_kill = boolean.parseboolean(pvpsettings.getproperty("anno uncepkkill", "false"));
    + }
    + else
    + {
    + announce_pvp_kill = false;
    + announce_pk_kill = false;
    + }
    +
    }
    catch (exception e)
    {
    @@ -2323,6 +2341,9 @@

    else if (pname.equalsignorecase("pvpvsnormaltime")) pvp_normal_time = integer.parseint(pvalue);
    else if (pname.equalsignorecase("pvpvspvptime")) pvp_pvp_time = integer.parseint(pvalue);
    + else if (pname.equalsignorecase("announcepvpkill") && !announce_all_kill ) announce_pvp_kill = boolean.valueof(pvalue); // set announce pvp value
    + else if (pname.equalsignorecase("announcepkkill") && !announce_all_kill ) announce_pk_kill = boolean.valueof(pvalue); // set announce pk value
    + else if (pname.equalsignorecase("announceallkill") && !announce_pvp_kill && !announce_pk_kill ) announce_all_kill = boolean.valueof(pvalue); // set announce kill value
    else if (pname.equalsignorecase("globalchat")) default_global_chat = pvalue;
    else if (pname.equalsignorecase("tradechat")) default_trade_chat = pvalue;
    else if (pname.equalsignorecase("menustyle")) gm_admin_menu_style = pvalue;
    index: /trunk/l2j-mack_il/l2j-mack_gameserver/java/com/l2dot/gameserver/announcements.java
    ================================================== =================
    --- /trunk/l2j-mack_il/l2j-mack_gameserver/java/com/l2dot/gameserver/announcements.java (revision 5)
    +++ /trunk/l2j-mack_il/l2j-mack_gameserver/java/com/l2dot/gameserver/announcements.java (revision 69)
    @@ -240,3 +240,11 @@
    }
    }
    +
    + public void announcetoplayers(string message)
    + {
    + // get all players
    + for (l2pcinstance player : L2world.getinstance().getallplayers()) {
    + player.sendmessage(message);
    + }
    + }
    }
    index: /trunk/l2j-mack_il/l2j-mack_gameserver/java/com/l2dot/gameserver/model/actor/instance/l2pcinstance.java
    ================================================== =================
    --- /trunk/l2j-mack_il/l2j-mack_gameserver/java/com/l2dot/gameserver/model/actor/instance/l2pcinstance.java (revision 1156)
    +++ /trunk/l2j-mack_il/l2j-mack_gameserver/java/com/l2dot/gameserver/model/actor/instance/l2pcinstance.java (working copy)
    @@ -35,6 +35,7 @@
    import javolution.util.fastmap;
    import net.sf.l2j.config;
    import net.sf.l2j.l2databasefactory;
    +import net.sf.l2j.gameserver.announcements;
    import net.sf.l2j.gameserver.gametimecontroller;
    import net.sf.l2j.gameserver.geodata;
    import net.sf.l2j.gameserver.gmlisttable;
    @@ -4446,6 +4447,9 @@
    )
    {
    increasepvpkills();
    + if ( target instanceof l2pcinstance && config.announce_pvp_kill ) // announces a pvp kill
    + announcements.getinstance().announcetoplayers("pla yer "+this.getname()+" hunted player "+target.getname());
    + return;
    }
    else // target player doesn't have pvp flag set
    {
    @@ -4458,6 +4462,10 @@
    {
    // 'both way war' -> 'pvp kill'
    increasepvpkills();
    + if ( target instanceof l2pcinstance && config.announce_pvp_kill ) // announces a pvp kill
    + announcements.getinstance().announcetoplayers("pla yer "+this.getname()+" hunted player "+target.getname());
    + else if ( target instanceof l2pcinstance && config.announce_all_kill ) // announces a kill
    + announcements.getinstance().announcetoplayers("pla yer "+this.getname()+" killed player "+target.getname());
    return;
    }
    }
    @@ -4469,13 +4477,19 @@
    if ( config.karma_award_pk_kill )
    {
    increasepvpkills();
    + if ( target instanceof l2pcinstance && config.announce_pvp_kill ) // announces a pvp kill
    + announcements.getinstance().announcetoplayers("pla yer "+this.getname()+" hunted player "+target.getname());
    }
    }
    else if (targetplayer.getpvpflag() == 0) // target player doesn't have karma
    {
    increasepkkillsandkarma(targetplayer.getlevel());
    + if ( target instanceof l2pcinstance && config.announce_pk_kill ) // announces a pk kill
    + announcements.getinstance().announcetoplayers("pla yer "+this.getname()+" has assassinated player "+target.getname());
    }
    }
    + if ( target instanceof l2pcinstance && config.announce_all_kill ) // announces a kill
    + announcements.getinstance().announcetoplayers("pla yer "+this.getname()+" killed player "+target.getname());
    }

    /**


    creditos : L2jfree
    Última edição por flaiter; 01-02-2012 às 04:12 AM. Razão: Erro

 

 

Informações de Tópico

Usuários Navegando neste Tópico

Há 1 usuários navegando neste tópico. (0 registrados e 1 visitantes)

Marcadores

Permissões de Postagem

  • Você não pode iniciar novos tópicos
  • Você não pode enviar respostas
  • Você não pode enviar anexos
  • Você não pode editar suas mensagens
  •