Jump to content

L2jfrozen 1132 + Mods + Source


fleck

Recommended Posts

/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package net.sf.l2j.gameserver.l2spike;
 
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
import net.sf.l2j.gameserver.ThreadPoolManager;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 
/**
 * @author Anarchy
 *
 */
public class PvpProtection
{
    private Map<KillStats, Long> killStats = null;
    private Map<Integer, List<Integer>> protections = null;
   
    protected PvpProtection()
    {
        killStats = new HashMap<>();
        protections = new HashMap<>();
    }
   
    public void checkKill(L2PcInstance killer, L2PcInstance victim)
    {
        if (killer.isGM())
            return;
       
        KillStats ks = null;
        for (KillStats k : killStats.keySet())
        {
            if (k.getKiller() == killer.getObjectId() && k.getVictim() == victim.getObjectId())
            {
                ks = k;
                break;
            }
        }
       
        if (ks != null)
        {
            if (System.currentTimeMillis() - killStats.get(ks) < 10*1000)
            {
                ks.addKill();
                killStats.put(ks, System.currentTimeMillis());
            }
            else
            {
                ks.removeKills();
                ks.addKill();
            }
           
            if (ks.getKills() >= 4)
                addNewProtection(killer, victim, ks);
        }
        else
        {
            final KillStats nfks = new KillStats(killer.getObjectId(), victim.getObjectId(), 1);
            killStats.put(nfks, System.currentTimeMillis());
        }
    }
   
    public void addNewProtection(L2PcInstance killer, L2PcInstance victim, KillStats ks)
    {
        killStats.remove(ks);
       
        if (protections.containsKey(victim))
            protections.get(victim).add(killer.getObjectId());
        else
        {
            List<Integer> temp = new ArrayList<>();
            temp.add(killer.getObjectId());
            protections.put(victim.getObjectId(), temp);
        }
       
        killer.sendMessage("Killing protection enabled. You may not be rewarded for killing "+victim+" for 15 minutes.");
        ThreadPoolManager.getInstance().scheduleGeneral(() -> protections.get(victim.getObjectId()).remove(killer.getObjectId()), 1000*60*15);
    }
   
    public boolean protectionExists(L2PcInstance killer, L2PcInstance victim)
    {
        if (!killer.isGM() && ((killer.getClan() != null && killer.getClan() == victim.getClan()) || (killer.getClan() != null && victim.getClan() != null && killer.getClan().getAllyName() != "" && killer.getClan().getAllyName() != null && killer.getClan().getAllyName().equals(victim.getClan().getAllyName())) || (killer.getClient().getConnection().getInetAddress().getHostAddress().equals(victim.getClient().getConnection().getInetAddress().getHostAddress()))))
            return true;
       
        if (protections.containsKey(victim.getObjectId()))
            if (protections.get(victim.getObjectId()).contains(killer.getObjectId()))
                return true;
       
        return false;
    }
   
    public static PvpProtection getInstance()
    {
        return SingletonHolder.instance;
    }
   
    private static class SingletonHolder
    {
        protected static final PvpProtection instance = new PvpProtection();
    }
   
    private class KillStats
    {
        private int killer;
        private int victim;
        private int kills;
       
        public KillStats(int killer, int victim, int kills)
        {
            this.killer = killer;
            this.victim = victim;
            this.kills = kills;
        }
       
        public void removeKills()
        {
            kills = 0;
        }
       
        public void addKill()
        {
            kills++;
        }
       
        public int getKills()
        {
            return kills;
        }
       
        public int getKiller()
        {
            return killer;
        }
       
        public int getVictim()
        {
            return victim;
        }
    }
}

Also, in L2PcInstance, find setPvpKills(getPvpKills()+1) and ABOVE it add:

		if (PvpProtection.getInstance().protectionExists(this, targetPlayer))
		{
			sendMessage("You did not get any rewards from this kill.");
			return;
		}
		PvpProtection.getInstance().checkKill(this, targetPlayer);

And in GameServer add:

PvpProtection.getInstance();

 

 

 

 

esse codigo bloqueia o ponto de pvp para

quem matar mesmo char 4x, matou as 4 bloqueia por 15min

bloqueia mesmo clan e ally

bloqueia ponto quando mata admin gm

e da mesma pt

e não deixa de entregar so o ponto

não entrega qualquer reward configurada como pvp point item

 

é só colocar o code em qualquer lugar da source

eu vou adicionar e deixar pra vcs testarem, blz

vou colocar aqui

com.l2jfrozen.gameserver

 

code aqui tmb

https://pastebin.com/hV9gqeE1

Edited by Gabrieljdb

Em breve novidades...

Link to comment
Share on other sites


Bom, informo a vocês que estavam esperando pela 1ª versão do servidor que eu estou configurando que fiz uns testes aqui é contem muitos erros em alguns mods, e não vou ter tempo de resolve los antes de sair de ferias e hoje a noite ja estou saindo, então vai ter que ficar pra muito mais alem que planejamos.

 

Lado bom: 

  • Vamos ter mais tempo pra ter ideia novas.
  • Vamos poder planejar melhor tudo.
  • Quando eu voltar vou estar de cabeça limpa.

Lado nem tão bom:

  • Vou ficar fora 15 dias.
  • Vai demorar mais pra sair a 1ª versão
  • Quem queria pra agora vai ter que esperar.

 

Concluirmos então meus amiguinhos que vamos ter que esperar muito mais e depois ficaremos felizes pela espera.

Espero a compreensão de todos.

Vou deixar a data prevista no tópico.

Um abraço!

Em breve novidades...

Link to comment
Share on other sites

 

Bom, informo a vocês que estavam esperando pela 1ª versão do servidor que eu estou configurando que fiz uns testes aqui é contem muitos erros em alguns mods, e não vou ter tempo de resolve los antes de sair de ferias e hoje a noite ja estou saindo, então vai ter que ficar pra muito mais alem que planejamos.

 

Lado bom: 

  • Vamos ter mais tempo pra ter ideia novas.
  • Vamos poder planejar melhor tudo.
  • Quando eu voltar vou estar de cabeça limpa.

Lado nem tão bom:

  • Vou ficar fora 15 dias.
  • Vai demorar mais pra sair a 1ª versão
  • Quem queria pra agora vai ter que esperar.

 

Concluirmos então meus amiguinhos que vamos ter que esperar muito mais e depois ficaremos felizes pela espera.

Espero a compreensão de todos.

Vou deixar a data prevista no tópico.

Um abraço!

Não se váaaa, não nos abandone pf, pois sem vc vou ficar louc♫

Link to comment
Share on other sites

Lembra de por esse mod aqui:

https://www.l2jbrasil.com/index.php?/topic/119189-dressme-interlude-acis-l2jfrozen/

coloca ele pra poder usar pelo .menu tbm
e se possível adiciona essa config nele:

# Custom List Armor
EventChests = Draconic_Suit,19510;DarkKiller_Suit,19511;Light_Assasin,19512;Dark_Assassin,19513;Beleth_Suit,19514;
EventLegs = 0,0;0,0;0,0;0,0;
EventBoots = 0,0;0,0;0,0;0,0;
EventGloves = 0,0;0,0;0,0;0,0;
EventHair = Draconic_Suit,19515;DarkKiller_Suit,19516;Light_Assasin,19517;Dark_Assassin,19518;Beleth_Suit,19519;

Lembra de separar o golden scroll, entre grade B , A e S ao invés de um só pra todas as grades!

 

Coloca tbm no .menu a opção color name, pra poder alterar a cor do nome e titulo e pra poder usar é necessario ter X Item com X Quantia - Configuravel,
no caso o item que o player recebe ao matar outro player no pvp!

Edited by Kallisto
  • Like 1

RawbUVC.jpgEstá com medo Ptista Safada?
É A NOVA ERA!qB2L169.jpg

Link to comment
Share on other sites

 

O cara disse que dia 15 voltava,
hoje ja é 18 e nem as caras deu..
affs,  pq todo cara que começa um desenvolvimento bom de rev aqui no forum some ou para.. sinceramente ?

Paciência cara, deve ter acontecido algum imprevisto !!

vamos esperar para ver relaxe..

Posso todas as coisas naquele que me fortalece.

Filipenses 4:13 😀

Saimon Cordeiro.gif

Link to comment
Share on other sites

 

A pedido do membro @Kallisto por uma Source L2jFrozen com alguns Mods da preferencia dele iniciarei aqui um desenvolvimento.

Peguei a Source limpa da jFrozen deste link: SVN

 

PROGRAMAS USADOS:

  1. Java: JDK 7 Update 2
  2. MySQL: 5.7
  3. Navicat: 8.0
  4. Eclipse: SDK 3.7.1
  5. Slik Subversion: 1.7.2
  6. Winrar

 

O QUE  FOI FEITO:

 Proteções:

  • No Trade in Combate
  • Aio no use gatekeeper
  • Aio no use class master
  • Aio no participe events
  • aio no use vip status item
  • vip no use aio status item
  •  

Modificações:

  • Days to Siege Config
  • Server Credits Config
  • replaces for welcome.htm
  • Banking System full edit config
  • Enchant System full edit config
  • New Propertie Status system
  • New Propertie Items handler
  • New Propertie Npcs core
  • Announce Obtained Status: Noble, Aio, Vip, Hero
  • Announce Login Status: Staff, Noble, Aio, Vip, Hero, Lord
  • Last Login in welcome.htm
  • Skills for Aio & Vip
  • Effects for Aio & Vip
  • Name / Title Color for Aio & Vip
  • Items Reward for Aio & Vip
  • Firework effect + ExScreenMsg use items handler
  •  

Zonas:

  • Newbie Zone
  • Hero Zone
  • Donator Zone
  • Multifuncional Zone
  • PvP Flag Zone
  • Clan War Zone
  •  

Npcs:

  • NPC Smart Shop
  • NPC Skill Seller
  • NPC Bug Report 
  • NPC Item Marketer
  • NPC Fast Augment
  • NPC Macro Buffer
  •  

Items:

  • Universal Enchant
  • Golden Enchant
  • Clan Full Item
  • Clan Skill Item
  • Clan Level Item
  • Clan Reputation Item
  • Change Sex Item
  • Change Name Item
  • Change Base Class Item
  • Aio Status Item
  • Vip Status Item
  • Noble Status Item
  • Hero Status Item
  • PvP Reward Item
  • Pk Reward Item
  •  

Comandos:

  • .menu
  • .info
  • .ctfjoin, leave, info
  • .tvtjoin, leave, info
  • .dmjoin, leave, info
  • .deposit
  • .withdraw
  • .aioinfo
  • .vipinfo
  • //mashero
  • //masrecal
  • //send donate
  • //setvip char days
  • //setaio char days
  •  

Sistemas:

  • Aio System
  • Vip System
  • Hero System
  • Noble System
  • Donator System
  • Auto Restart System
  • Bot Protection System
  • PvP / Pk Color System
  •  

Eventos:

  • Achievements
  • Trivia
  • Hitman
  • Arena 2x2
  • CTF
  • TVT
  • DM
  • TW
  • Pc Bang Points
  • Wedding
  • Champion Mobs

 

DOWNLOADS:

Patch:


====================================================
itemname-e.dat
====================================================

10000	Donator Scroll: Enchant Weapon		A scroll of enchantment that empowers a weapon. 	-1					0	0	0	
10001	Donator Scroll: Enchant Armor		A scroll of enchantment that empowers a armor 	-1					0	0	0	
10002	Donator Coin		Currency used to purchase valuable items.	-1					0	0	0	
10003	Gold Coin		Currency used to purchase valuable items.	-1					0	0	0	
10004	Gold Bar		Currency used to purchase valuable items.	-1					0	0	0	
10005	Noble Status Item			-1					0	0	0	
10006	Aio Status Item			-1					0	0	0	
10007	Vip Status Item			-1					0	0	0	
10008	Hero Status Item			-1					0	0	0	
10009	PvP Point			-1					0	0	0	
10010	Pk Point			-1					0	0	0	
10011	Clan Full			-1					0	0	0	
10012	Clan Skill			-1					0	0	0	
10013	Clan Level			-1					0	0	0	
10014	Clan Reputation			-1					0	0	0	

====================================================
etcitemgrp.dat
====================================================

2	10000	0	3	6	3	0	dropitems.drop_scroll_m00			dropitemstex.drop_scroll_t00			icon.Item_CanUse31					0	120	18	0	0	1		1		ItemSound.itemdrop_scroll		0	0	0
2	10001	0	3	6	3	0	dropitems.drop_scroll_m00			dropitemstex.drop_scroll_t00			icon.Item_CanUse30					0	120	18	0	0	1		1		ItemSound.itemdrop_scroll		0	0	0
2	10002	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.etc_coin_of_fair_i00					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0
2	10003	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.etc_coins_gold_i00					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0
2	10004	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.etc_lump_yellow_i00					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0
2	10005	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.etc_l2_i00					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0
2	10006	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.etc_l2_i00					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0
2	10007	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.etc_l2_i00					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0
2	10008	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.etc_l2_i00					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0
2	10009	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.skill1502					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0
2	10010	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.skill1501					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0
2	10011	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.etc_l2_i00					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0
2	10012	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.etc_l2_i00					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0
2	10013	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.etc_l2_i00					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0
2	10014	0	3	2	5	0	dropitems.drop_sack_m00			dropitemstex.drop_sack_t00			icon.etc_l2_i00					0	0	18	0	0	1		1		ItemSound.itemdrop_sack		2	0	0

====================================================


PRINTS:

Aqui o primeiro álbum de fotos = https://imgur.com/a/tNg05Qb

ANDAMENTO: 65%

 

Créditos: @Gabrieljdb @L2JBRASIL FORUM

OBS: Se for para adicionar mais mods cole abaixo o link 

Se souber de algum Erro ou má configuração relate tambem.

O QUE ESTIVER AO ALCANCE DO MEU HUMILDE CONHECIMENTO ,FAREI.

 

 

 

Previsão para termino? DOM, 27/01/2019

 

Poderia forcecer teu mod de dias de siege e hero? To querendo colocar siege acada 7 dias e hero a cada 30.

 

Não acho como

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
Guest
This topic is now closed to further replies.



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.