Jump to content

sember

Members
  • Posts

    58
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by sember

  1. Hello guys. Please Help me find clean (eng) L2C4 system folder with 660 protocol. I have off eng client with 656 protocol, but this protocol is not supported by server. Im use the last L2jServer C4 pack.

     

    server.cfg:

     

    # Minimum and maximum protocol revision that server allow to connect.

    # You must keep MinProtocolRevision <= MaxProtocolRevision.

    MinProtocolRevision = 660

    MaxProtocolRevision = 665

     

    I tried to change these values to min=656​​, and GS produces an error:

    "session key is not correct. closing connection"

     

  2. Hello guys. I have a problem with patching in eclipse IDE. I try to past this patch (http://www.maxcheaters.com/forum/index.php?topic=155067.0) in my sources, and have an errors:

     

    14bb6c37ed58.jpg

     

    adapted for my sources patch file: _http://jaffa.clan.su/PC_bangs.txt

     

    everything would be fine (or not =\ ), but any additional questions:

     

    if im try patching with my hands, what to do with the ways, which does not exist?

    for example:

     

    +import com.it.br.gameserver.PcPoint;
    import com.it.br.gameserver.ai.special.manager.AILoader;
    import com.it.br.gameserver.powerpak.PowerPak;
    import com.it.br.gameserver.util.sql.SQLQueue;
    
    import src.com.l2jserver.mmocore.network.*;

     

    and:

     

    /GSFolder/java/com/it/br/gameserver/PcPoint.java

     

    please help me. thx to all!

     

    sry for my bad english.

     

  3. im check all files, all files is exists!

     

    here in expanded form:

     

    e8af3cbe728b.png

     

    and my code:

     

    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/services/FService.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/services/FService.java (revision 2928)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/services/FService.java (revision 2031)
    @@ -72,5 +72,5 @@
    
    +	public static final String EVENT_PC_BANG_POINT_FILE = "./config/custom/pcBang.properties";
    
    
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/PcPoint.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/PcPoint.java (revision 2031)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/PcPoint.java (revision `2031)
    @@ -0,0 +1,78 @@
    +package com.it.br.gameserver;
    +
    +import java.util.logging.Logger;
    +
    +import com.it.br.Config;
    +import com.it.br.gameserver.model.L2World;
    +import com.it.br.gameserver.model.actor.instance.L2PcInstance;
    +import com.it.br.gameserver.network.SystemMessageId;
    +import com.it.br.gameserver.network.serverpackets.SystemMessage;
    +import com.it.br.util.Rnd;
    +
    +
    +/**
    + * @author Anumis
    + */
    +
    +public class PcPoint implements Runnable
    +{
    +	Logger _log = Logger.getLogger(PcPoint.class.getName());
    +	private static PcPoint _instance;
    +
    +	public static PcPoint getInstance()
    +	{
    +		if(_instance == null)
    +		{
    +			_instance = new PcPoint();
    +		}
    +
    +		return _instance;
    +	}
    +
    +	private PcPoint()
    +	{
    +		_log.info("PcBang point event started.");
    +	}
    +
    +	@Override
    +	public void run()
    +	{
    +
    +		int score = 0;
    +		for(L2PcInstance activeChar: L2World.getInstance().getAllPlayers().values())
    +		{
    +
    +			if(activeChar.getLevel() > Config.PCB_MIN_LEVEL )
    +			{
    +				score = Rnd.get(Config.PCB_POINT_MIN, Config.PCB_POINT_MAX);
    +
    +				if(Rnd.get(100) <= Config.PCB_CHANCE_DUAL_POINT)
    +				{
    +					score *= 2;
    +
    +					activeChar.addPcBangScore(score);
    +
    +					SystemMessage sm = new SystemMessage(SystemMessageId.DOUBLE_POINTS_YOU_GOT_$51_GLASSES_PC);
    +					sm.addNumber(score);
    +					activeChar.sendPacket(sm);
    +					sm = null;
    +
    +					activeChar.updatePcBangWnd(score, true, true);
    +				}
    +				else
    +				{
    +					activeChar.addPcBangScore(score);
    +
    +					SystemMessage sm = new SystemMessage(SystemMessageId.YOU_RECEVIED_$51_GLASSES_PC);
    +					sm.addNumber(score);
    +					activeChar.sendPacket(sm);
    +					sm = null;
    +
    +					activeChar.updatePcBangWnd(score, true, false);
    +				}
    +			}
    +
    +			activeChar = null;
    +		} 
    +	}
    +}
    Index: /L2JBrasil_CORE/java/com/it/br/Config.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/Config.java (revision 2028)
    +++ /L2JBrasil_CORE/java/com/it/br/Config.java (revision 2031)
    @@ -1687,55 +1687,48 @@
    	public static int HPH_INTERVALOFDOOROFALTER;
    	public static int HPH_TIMEOFLOCKUPDOOROFALTAR;
    +		//============================================================
    +	public static boolean PCB_ENABLE;
    +	public static int PCB_MIN_LEVEL;
    +	public static int PCB_POINT_MIN;
    +	public static int PCB_POINT_MAX;
    +	public static int PCB_CHANCE_DUAL_POINT;
    +	public static int PCB_INTERVAL;
    
    	//============================================================
    +	public static void loadPCBPointConfig()
    	{
    
    +		final String PCB_POINT = FService.EVENT_PC_BANG_POINT_FILE;
    
    +		_log.info("Loading: " + PCB_POINT + ".");
    +		try
    +		{
    +			Properties pcbpSettings = new Properties();
    +			InputStream is = new FileInputStream(new File(PCB_POINT));
    +			pcbpSettings.load(is);
    +			is.close();
    
    +			PCB_ENABLE = Boolean.parseBoolean(pcbpSettings.getProperty("PcBangPointEnable", "true"));
    +			PCB_MIN_LEVEL = Integer.parseInt(pcbpSettings.getProperty("PcBangPointMinLevel", "20"));
    +			PCB_POINT_MIN = Integer.parseInt(pcbpSettings.getProperty("PcBangPointMinCount", "20"));
    +			PCB_POINT_MAX = Integer.parseInt(pcbpSettings.getProperty("PcBangPointMaxCount", "1000000"));
    
    +			if(PCB_POINT_MAX < 1)
    +			{
    +				PCB_POINT_MAX = Integer.MAX_VALUE;
    +			}
    
    +			PCB_CHANCE_DUAL_POINT = Integer.parseInt(pcbpSettings.getProperty("PcBangPointDualChance", "20"));
    +			PCB_INTERVAL = Integer.parseInt(pcbpSettings.getProperty("PcBangPointTimeStamp", "900"));
    +		}
    +		catch(Exception e)
    +		{
    +			e.printStackTrace();
    +			throw new Error("Failed to Load " + PCB_POINT + " File.");
    +		}
    
    +	}
    +	//============================================================
    +	
    
    
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/MultiSellChoose.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/MultiSellChoose.java (revision 107)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/MultiSellChoose.java (revision 2031)
    @@ -200,4 +200,9 @@
    				{
    					player.sendPacket(new SystemMessage(SystemMessageId.THE_CLAN_REPUTATION_SCORE_IS_TOO_LOW));
    +					return;
    +				}
    +				if(e.getItemId() == 65436 && e.getItemCount() * _amount > player.getPcBangScore())
    +				{
    +					player.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS));
    					return;
    				}
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/EnterWorld.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/EnterWorld.java (revision 1726)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/EnterWorld.java (revision 2031)
    @@ -144,4 +144,5 @@
    			// activeChar.closeNetConnection();
    		}
    +	
    		if (activeChar.isGM())
    		{
    @@ -373,4 +374,5 @@
    			activeChar.checkAllowedSkills();
    		}
    +		
    		// send user info again .. just like the real client sendPacket(ui);
    		if ((activeChar.getClanId() != 0) && (activeChar.getClan() != null))
    @@ -396,4 +398,8 @@
    		notifyCastleOwner(activeChar);
    		activeChar.onPlayerEnter();
    +		if(Config.PCB_ENABLE)
    +		{
    +			activeChar.showPcBangWindow();
    +		}
    		TvTEvent.onLogin(activeChar);
    		PcColorTable.getInstance().process(activeChar);
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/network/serverpackets/ExPCCafePointInfo.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/network/serverpackets/ExPCCafePointInfo.java (revision 7)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/network/serverpackets/ExPCCafePointInfo.java (revision 2031)
    @@ -15,4 +15,6 @@
    package com.it.br.gameserver.network.serverpackets;
    
    +import com.it.br.gameserver.model.actor.instance.L2PcInstance;
    +
    
    
    @@ -25,13 +27,36 @@
    {
    	private static final String _S__FE_31_EXPCCAFEPOINTINFO = "[s] FE:31 ExPCCafePointInfo";
    -	private int _unk1, _unk2, _unk3, _unk4, _unk5 = 0;
    
    -	public ExPCCafePointInfo(int val1, int val2, int val3, int val4, int val5)
    +	private L2PcInstance _character;
    +	private int m_AddPoint;
    +	private int m_PeriodType;
    +	private int RemainTime;
    +	private int PointType;
    +
    +	public ExPCCafePointInfo(L2PcInstance user, int modify, boolean add, int hour, boolean _double)
    	{
    -		_unk1 = val1;
    -		_unk2 = val2;
    -		_unk3 = val3;
    -		_unk4 = val4;
    -		_unk5 = val5;
    +		_character = user;
    +		m_AddPoint = modify;
    +
    +		if(add)
    +		{
    +			m_PeriodType = 1;
    +			PointType = 1;
    +		}
    +		else
    +		{
    +			if(add && _double)
    +			{
    +				m_PeriodType = 1;
    +				PointType = 0;
    +			}
    +			else
    +			{
    +				m_PeriodType = 2;
    +				PointType = 2;
    +			}
    +		}
    +
    +		RemainTime = hour;
    	}
    
    @@ -41,9 +66,9 @@
    		writeC(0xFE);
    		writeH(0x31);
    -		writeD(_unk1);
    -		writeD(_unk2);
    -		writeC(_unk3);
    -		writeD(_unk4);
    -		writeC(_unk5);
    +		writeD(_character.getPcBangScore());
    +		writeD(m_AddPoint);
    +		writeC(m_PeriodType);
    +		writeD(RemainTime);
    +		writeC(PointType);
    	}
    
    @@ -56,3 +81,4 @@
    		return _S__FE_31_EXPCCAFEPOINTINFO;
    	}
    +
    }
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/network/SystemMessageId.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/network/SystemMessageId.java (revision 1926)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/network/SystemMessageId.java (revision 2031)
    @@ -3873,5 +3873,7 @@
    	DEATH_PENALTY_LIFTED(1917),
    	DUNGEON_EXPIRES_IN_S1_MINUTES(1918), 
    -	S1(3000);
    +	S1(3000), 
    +	DOUBLE_POINTS_YOU_GOT_$51_GLASSES_PC(3001), 
    +	YOU_RECEVIED_$51_GLASSES_PC(3002);
    
    	private int _id;
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/model/actor/instance/L2PcInstance.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/model/actor/instance/L2PcInstance.java (revision 2029)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/model/actor/instance/L2PcInstance.java (revision 2031)
    @@ -93,5 +93,4 @@
    import com.it.br.gameserver.model.L2Clan;
    import com.it.br.gameserver.model.L2ClanMember;
    import com.it.br.gameserver.model.L2Effect;
    import com.it.br.gameserver.model.L2Fishing;
    @@ -152,4 +151,5 @@
    import com.it.br.gameserver.network.L2GameClient;
    import com.it.br.gameserver.network.SystemMessageId;
    +import com.it.br.gameserver.network.serverpackets.ExPCCafePointInfo;
    import com.it.br.gameserver.network.serverpackets.L2GameServerPacket;
    import com.it.br.gameserver.network.serverpackets.ActionFailed;
    @@ -234,6 +234,6 @@
    	private static final String RESTORE_SKILL_SAVE = "SELECT skill_id,skill_level,effect_count,effect_cur_time, reuse_delay FROM character_skills_save WHERE char_obj_id=? AND class_index=? AND restore_type=? ORDER BY buff_index ASC";
    	private static final String DELETE_SKILL_SAVE = "DELETE FROM character_skills_save WHERE char_obj_id=? AND class_index=?";
    -	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,event_points=?,coupon=?,donator=?,death_penalty_level=?,koof=?,noob=?,idiot=? WHERE obj_id=?";
    -	private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,event_points,coupon,donator,death_penalty_level,koof,noob,idiot FROM characters WHERE obj_id=?";
    +	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,event_points=?,coupon=?,donator=?,death_penalty_level=?,koof=?,noob=?,idiot=?,pc_point=? WHERE obj_id=?";
    +	private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,event_points,coupon,donator,death_penalty_level,koof,noob,idiot,pc_point FROM characters WHERE obj_id=?";
    	private static final String RESTORE_CHAR_SUBCLASSES = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE char_obj_id=? ORDER BY class_index ASC";
    	private static final String ADD_CHAR_SUBCLASS = "INSERT INTO character_subclasses (char_obj_id,class_id,exp,sp,level,class_index) VALUES (?,?,?,?,?,?)";
    @@ -382,4 +382,6 @@
    	/** The Experience of the L2PcInstance before the last Death Penalty */
    	private long _expBeforeDeath;
    +	/** PC BANG POINT */
    +	private int pcBangPoint = 0;
    	/**
    	 * The Karma of the L2PcInstance (if higher than 0, the name of the L2PcInstance appears in red)
    @@ -6722,4 +6724,5 @@
    				player.setCoupon(rset.getInt("coupon"));
    				player.setDeathPenaltyBuffLevel(rset.getInt("death_penalty_level"));
    +				player.pcBangPoint = rset.getInt("pc_point");
    				// Add the L2PcInstance object in _allObjects
    				// L2World.getInstance().storeObject(player);
    @@ -7105,5 +7108,6 @@
    			statement.setInt(61, isNoob() ? 1 : 0);
    			statement.setInt(62, isIdiot() ? 1 : 0);
    -			statement.setInt(63, getObjectId());
    +			statement.setInt(63, getPcBangScore());
    +			statement.setInt(64, getObjectId());
    
    
    @@ -13002,9 +13006,32 @@
    		return (DM._started && _inEventDM) || (CTF._started && _inEventCTF) || (VIP._started && _inEventVIP) (Zombie._started && _ZombieZ) || && !isGM();
    	}*/
    
    +		public int getPcBangScore()
    +		{
    +			return pcBangPoint;
    +		}
    +
    +		public void reducePcBangScore(int to)
    +		{
    +			pcBangPoint -= to;
    +			updatePcBangWnd(to, false, false);
    +		}
    +
    +		public void addPcBangScore(int to)
    +		{
    +			pcBangPoint += to;
    +		}
    +
    +		public void updatePcBangWnd(int score, boolean add, boolean duble)
    +		{
    +			ExPCCafePointInfo wnd = new ExPCCafePointInfo(this, score, add, 24, duble);
    +			sendPacket(wnd);
    +		}
    +
    +		public void showPcBangWindow()
    +		{
    +			ExPCCafePointInfo wnd = new ExPCCafePointInfo(this, 0, false, 24, false);
    +			sendPacket(wnd);
    +		}
    }
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/GameServer.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/GameServer.java (revision 1999)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/GameServer.java (revision 2031)
    @@ -24,7 +24,9 @@
    import java.util.logging.Logger;
    
    +import com.it.br.gameserver.PcPoint;
    import com.it.br.gameserver.ai.special.manager.AILoader;
    import com.it.br.gameserver.powerpak.PowerPak;
    import com.it.br.gameserver.util.sql.SQLQueue;
    +
    
    import com.l2jserver.mmocore.network.*;
    
    @@ -575,4 +572,9 @@
    		{
    			OnlinePlayers.getInstance();
    +		}
    +		if(Config.PCB_ENABLE)
    +		{
    +			System.out.println("############PCB_ENABLE################");
    +			ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(PcPoint.getInstance(), Config.PCB_INTERVAL * 1000, Config.PCB_INTERVAL * 1000);
    		}
    		Util.printSection("L2JJustice EventManager");
    @@ -612,4 +614,5 @@
    		// Initialize config
    		Config.load();
    +		Config.loadPCBPointConfig();
    		ExternalConfig.loadconfig();
    		gameServer = new GameServer();
    Index: /L2JBrasil_CORE/java/config/Custom/pcBang.properties
    ===================================================================
    --- /L2JBrasil_CORE/java/config/Custom/pcBang.properties (revision 2031)
    +++ /L2JBrasil_CORE/java/config/Custom/pcBang.properties (revision 2031)
    @@ -0,0 +1,17 @@                            
    +#============================================================#
    +# PC Bang Point                                        -#
    +#-------------------------------------------------------------#
    +BangPointEnable = True
    +
    +cBangPointMinLevel = 20
    +
    +PcBangPointMinCount = 20
    +PcBangPointMaxCount = 1000000
    +
    +PcBangPointDualChance = 20
    +
    +PcBangPointTimeStamp = 900

  4. im try setups this patch (by this manual http://www.maxcheaters.com/forum/index.php?topic=155067.0), and i have a many problems = > Eclipse give me some errors:

     

    19307615858f.png

     

    please help me.

     

    I do not understand that the mistakes I made.

     

    i use L2jbrasil-1485, Interlude.

     

    im check all files, all files is exists!

     

    here in expanded form:

     

    e8af3cbe728b.png

     

    and my code:

     

    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/services/FService.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/services/FService.java (revision 2928)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/services/FService.java (revision 2031)
    @@ -72,5 +72,5 @@
    
    +	public static final String EVENT_PC_BANG_POINT_FILE = "./config/custom/pcBang.properties";
    
    
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/PcPoint.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/PcPoint.java (revision 2031)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/PcPoint.java (revision `2031)
    @@ -0,0 +1,78 @@
    +package com.it.br.gameserver;
    +
    +import java.util.logging.Logger;
    +
    +import com.it.br.Config;
    +import com.it.br.gameserver.model.L2World;
    +import com.it.br.gameserver.model.actor.instance.L2PcInstance;
    +import com.it.br.gameserver.network.SystemMessageId;
    +import com.it.br.gameserver.network.serverpackets.SystemMessage;
    +import com.it.br.util.Rnd;
    +
    +
    +/**
    + * @author Anumis
    + */
    +
    +public class PcPoint implements Runnable
    +{
    +	Logger _log = Logger.getLogger(PcPoint.class.getName());
    +	private static PcPoint _instance;
    +
    +	public static PcPoint getInstance()
    +	{
    +		if(_instance == null)
    +		{
    +			_instance = new PcPoint();
    +		}
    +
    +		return _instance;
    +	}
    +
    +	private PcPoint()
    +	{
    +		_log.info("PcBang point event started.");
    +	}
    +
    +	@Override
    +	public void run()
    +	{
    +
    +		int score = 0;
    +		for(L2PcInstance activeChar: L2World.getInstance().getAllPlayers().values())
    +		{
    +
    +			if(activeChar.getLevel() > Config.PCB_MIN_LEVEL )
    +			{
    +				score = Rnd.get(Config.PCB_POINT_MIN, Config.PCB_POINT_MAX);
    +
    +				if(Rnd.get(100) <= Config.PCB_CHANCE_DUAL_POINT)
    +				{
    +					score *= 2;
    +
    +					activeChar.addPcBangScore(score);
    +
    +					SystemMessage sm = new SystemMessage(SystemMessageId.DOUBLE_POINTS_YOU_GOT_$51_GLASSES_PC);
    +					sm.addNumber(score);
    +					activeChar.sendPacket(sm);
    +					sm = null;
    +
    +					activeChar.updatePcBangWnd(score, true, true);
    +				}
    +				else
    +				{
    +					activeChar.addPcBangScore(score);
    +
    +					SystemMessage sm = new SystemMessage(SystemMessageId.YOU_RECEVIED_$51_GLASSES_PC);
    +					sm.addNumber(score);
    +					activeChar.sendPacket(sm);
    +					sm = null;
    +
    +					activeChar.updatePcBangWnd(score, true, false);
    +				}
    +			}
    +
    +			activeChar = null;
    +		} 
    +	}
    +}
    Index: /L2JBrasil_CORE/java/com/it/br/Config.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/Config.java (revision 2028)
    +++ /L2JBrasil_CORE/java/com/it/br/Config.java (revision 2031)
    @@ -1687,55 +1687,48 @@
    	public static int HPH_INTERVALOFDOOROFALTER;
    	public static int HPH_TIMEOFLOCKUPDOOROFALTAR;
    +		//============================================================
    +	public static boolean PCB_ENABLE;
    +	public static int PCB_MIN_LEVEL;
    +	public static int PCB_POINT_MIN;
    +	public static int PCB_POINT_MAX;
    +	public static int PCB_CHANCE_DUAL_POINT;
    +	public static int PCB_INTERVAL;
    
    	//============================================================
    +	public static void loadPCBPointConfig()
    	{
    
    +		final String PCB_POINT = FService.EVENT_PC_BANG_POINT_FILE;
    
    +		_log.info("Loading: " + PCB_POINT + ".");
    +		try
    +		{
    +			Properties pcbpSettings = new Properties();
    +			InputStream is = new FileInputStream(new File(PCB_POINT));
    +			pcbpSettings.load(is);
    +			is.close();
    
    +			PCB_ENABLE = Boolean.parseBoolean(pcbpSettings.getProperty("PcBangPointEnable", "true"));
    +			PCB_MIN_LEVEL = Integer.parseInt(pcbpSettings.getProperty("PcBangPointMinLevel", "20"));
    +			PCB_POINT_MIN = Integer.parseInt(pcbpSettings.getProperty("PcBangPointMinCount", "20"));
    +			PCB_POINT_MAX = Integer.parseInt(pcbpSettings.getProperty("PcBangPointMaxCount", "1000000"));
    
    +			if(PCB_POINT_MAX < 1)
    +			{
    +				PCB_POINT_MAX = Integer.MAX_VALUE;
    +			}
    
    +			PCB_CHANCE_DUAL_POINT = Integer.parseInt(pcbpSettings.getProperty("PcBangPointDualChance", "20"));
    +			PCB_INTERVAL = Integer.parseInt(pcbpSettings.getProperty("PcBangPointTimeStamp", "900"));
    +		}
    +		catch(Exception e)
    +		{
    +			e.printStackTrace();
    +			throw new Error("Failed to Load " + PCB_POINT + " File.");
    +		}
    
    +	}
    +	//============================================================
    +	
    
    
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/MultiSellChoose.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/MultiSellChoose.java (revision 107)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/MultiSellChoose.java (revision 2031)
    @@ -200,4 +200,9 @@
    				{
    					player.sendPacket(new SystemMessage(SystemMessageId.THE_CLAN_REPUTATION_SCORE_IS_TOO_LOW));
    +					return;
    +				}
    +				if(e.getItemId() == 65436 && e.getItemCount() * _amount > player.getPcBangScore())
    +				{
    +					player.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS));
    					return;
    				}
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/EnterWorld.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/EnterWorld.java (revision 1726)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/EnterWorld.java (revision 2031)
    @@ -144,4 +144,5 @@
    			// activeChar.closeNetConnection();
    		}
    +	
    		if (activeChar.isGM())
    		{
    @@ -373,4 +374,5 @@
    			activeChar.checkAllowedSkills();
    		}
    +		
    		// send user info again .. just like the real client sendPacket(ui);
    		if ((activeChar.getClanId() != 0) && (activeChar.getClan() != null))
    @@ -396,4 +398,8 @@
    		notifyCastleOwner(activeChar);
    		activeChar.onPlayerEnter();
    +		if(Config.PCB_ENABLE)
    +		{
    +			activeChar.showPcBangWindow();
    +		}
    		TvTEvent.onLogin(activeChar);
    		PcColorTable.getInstance().process(activeChar);
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/network/serverpackets/ExPCCafePointInfo.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/network/serverpackets/ExPCCafePointInfo.java (revision 7)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/network/serverpackets/ExPCCafePointInfo.java (revision 2031)
    @@ -15,4 +15,6 @@
    package com.it.br.gameserver.network.serverpackets;
    
    +import com.it.br.gameserver.model.actor.instance.L2PcInstance;
    +
    
    
    @@ -25,13 +27,36 @@
    {
    	private static final String _S__FE_31_EXPCCAFEPOINTINFO = "[s] FE:31 ExPCCafePointInfo";
    -	private int _unk1, _unk2, _unk3, _unk4, _unk5 = 0;
    
    -	public ExPCCafePointInfo(int val1, int val2, int val3, int val4, int val5)
    +	private L2PcInstance _character;
    +	private int m_AddPoint;
    +	private int m_PeriodType;
    +	private int RemainTime;
    +	private int PointType;
    +
    +	public ExPCCafePointInfo(L2PcInstance user, int modify, boolean add, int hour, boolean _double)
    	{
    -		_unk1 = val1;
    -		_unk2 = val2;
    -		_unk3 = val3;
    -		_unk4 = val4;
    -		_unk5 = val5;
    +		_character = user;
    +		m_AddPoint = modify;
    +
    +		if(add)
    +		{
    +			m_PeriodType = 1;
    +			PointType = 1;
    +		}
    +		else
    +		{
    +			if(add && _double)
    +			{
    +				m_PeriodType = 1;
    +				PointType = 0;
    +			}
    +			else
    +			{
    +				m_PeriodType = 2;
    +				PointType = 2;
    +			}
    +		}
    +
    +		RemainTime = hour;
    	}
    
    @@ -41,9 +66,9 @@
    		writeC(0xFE);
    		writeH(0x31);
    -		writeD(_unk1);
    -		writeD(_unk2);
    -		writeC(_unk3);
    -		writeD(_unk4);
    -		writeC(_unk5);
    +		writeD(_character.getPcBangScore());
    +		writeD(m_AddPoint);
    +		writeC(m_PeriodType);
    +		writeD(RemainTime);
    +		writeC(PointType);
    	}
    
    @@ -56,3 +81,4 @@
    		return _S__FE_31_EXPCCAFEPOINTINFO;
    	}
    +
    }
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/network/SystemMessageId.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/network/SystemMessageId.java (revision 1926)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/network/SystemMessageId.java (revision 2031)
    @@ -3873,5 +3873,7 @@
    	DEATH_PENALTY_LIFTED(1917),
    	DUNGEON_EXPIRES_IN_S1_MINUTES(1918), 
    -	S1(3000);
    +	S1(3000), 
    +	DOUBLE_POINTS_YOU_GOT_$51_GLASSES_PC(3001), 
    +	YOU_RECEVIED_$51_GLASSES_PC(3002);
    
    	private int _id;
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/model/actor/instance/L2PcInstance.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/model/actor/instance/L2PcInstance.java (revision 2029)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/model/actor/instance/L2PcInstance.java (revision 2031)
    @@ -93,5 +93,4 @@
    import com.it.br.gameserver.model.L2Clan;
    import com.it.br.gameserver.model.L2ClanMember;
    import com.it.br.gameserver.model.L2Effect;
    import com.it.br.gameserver.model.L2Fishing;
    @@ -152,4 +151,5 @@
    import com.it.br.gameserver.network.L2GameClient;
    import com.it.br.gameserver.network.SystemMessageId;
    +import com.it.br.gameserver.network.serverpackets.ExPCCafePointInfo;
    import com.it.br.gameserver.network.serverpackets.L2GameServerPacket;
    import com.it.br.gameserver.network.serverpackets.ActionFailed;
    @@ -234,6 +234,6 @@
    	private static final String RESTORE_SKILL_SAVE = "SELECT skill_id,skill_level,effect_count,effect_cur_time, reuse_delay FROM character_skills_save WHERE char_obj_id=? AND class_index=? AND restore_type=? ORDER BY buff_index ASC";
    	private static final String DELETE_SKILL_SAVE = "DELETE FROM character_skills_save WHERE char_obj_id=? AND class_index=?";
    -	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,event_points=?,coupon=?,donator=?,death_penalty_level=?,koof=?,noob=?,idiot=? WHERE obj_id=?";
    -	private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,event_points,coupon,donator,death_penalty_level,koof,noob,idiot FROM characters WHERE obj_id=?";
    +	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,event_points=?,coupon=?,donator=?,death_penalty_level=?,koof=?,noob=?,idiot=?,pc_point=? WHERE obj_id=?";
    +	private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,event_points,coupon,donator,death_penalty_level,koof,noob,idiot,pc_point FROM characters WHERE obj_id=?";
    	private static final String RESTORE_CHAR_SUBCLASSES = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE char_obj_id=? ORDER BY class_index ASC";
    	private static final String ADD_CHAR_SUBCLASS = "INSERT INTO character_subclasses (char_obj_id,class_id,exp,sp,level,class_index) VALUES (?,?,?,?,?,?)";
    @@ -382,4 +382,6 @@
    	/** The Experience of the L2PcInstance before the last Death Penalty */
    	private long _expBeforeDeath;
    +	/** PC BANG POINT */
    +	private int pcBangPoint = 0;
    	/**
    	 * The Karma of the L2PcInstance (if higher than 0, the name of the L2PcInstance appears in red)
    @@ -6722,4 +6724,5 @@
    				player.setCoupon(rset.getInt("coupon"));
    				player.setDeathPenaltyBuffLevel(rset.getInt("death_penalty_level"));
    +				player.pcBangPoint = rset.getInt("pc_point");
    				// Add the L2PcInstance object in _allObjects
    				// L2World.getInstance().storeObject(player);
    @@ -7105,5 +7108,6 @@
    			statement.setInt(61, isNoob() ? 1 : 0);
    			statement.setInt(62, isIdiot() ? 1 : 0);
    -			statement.setInt(63, getObjectId());
    +			statement.setInt(63, getPcBangScore());
    +			statement.setInt(64, getObjectId());
    
    
    @@ -13002,9 +13006,32 @@
    		return (DM._started && _inEventDM) || (CTF._started && _inEventCTF) || (VIP._started && _inEventVIP) (Zombie._started && _ZombieZ) || && !isGM();
    	}*/
    
    +		public int getPcBangScore()
    +		{
    +			return pcBangPoint;
    +		}
    +
    +		public void reducePcBangScore(int to)
    +		{
    +			pcBangPoint -= to;
    +			updatePcBangWnd(to, false, false);
    +		}
    +
    +		public void addPcBangScore(int to)
    +		{
    +			pcBangPoint += to;
    +		}
    +
    +		public void updatePcBangWnd(int score, boolean add, boolean duble)
    +		{
    +			ExPCCafePointInfo wnd = new ExPCCafePointInfo(this, score, add, 24, duble);
    +			sendPacket(wnd);
    +		}
    +
    +		public void showPcBangWindow()
    +		{
    +			ExPCCafePointInfo wnd = new ExPCCafePointInfo(this, 0, false, 24, false);
    +			sendPacket(wnd);
    +		}
    }
    Index: /L2JBrasil_CORE/java/com/it/br/gameserver/GameServer.java
    ===================================================================
    --- /L2JBrasil_CORE/java/com/it/br/gameserver/GameServer.java (revision 1999)
    +++ /L2JBrasil_CORE/java/com/it/br/gameserver/GameServer.java (revision 2031)
    @@ -24,7 +24,9 @@
    import java.util.logging.Logger;
    
    +import com.it.br.gameserver.PcPoint;
    import com.it.br.gameserver.ai.special.manager.AILoader;
    import com.it.br.gameserver.powerpak.PowerPak;
    import com.it.br.gameserver.util.sql.SQLQueue;
    +
    
    import com.l2jserver.mmocore.network.*;
    
    @@ -575,4 +572,9 @@
    		{
    			OnlinePlayers.getInstance();
    +		}
    +		if(Config.PCB_ENABLE)
    +		{
    +			System.out.println("############PCB_ENABLE################");
    +			ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(PcPoint.getInstance(), Config.PCB_INTERVAL * 1000, Config.PCB_INTERVAL * 1000);
    		}
    		Util.printSection("L2JJustice EventManager");
    @@ -612,4 +614,5 @@
    		// Initialize config
    		Config.load();
    +		Config.loadPCBPointConfig();
    		ExternalConfig.loadconfig();
    		gameServer = new GameServer();
    Index: /L2JBrasil_CORE/java/config/Custom/pcBang.properties
    ===================================================================
    --- /L2JBrasil_CORE/java/config/Custom/pcBang.properties (revision 2031)
    +++ /L2JBrasil_CORE/java/config/Custom/pcBang.properties (revision 2031)
    @@ -0,0 +1,17 @@                            
    +#============================================================#
    +# PC Bang Point                                        -#
    +#-------------------------------------------------------------#
    +BangPointEnable = True
    +
    +cBangPointMinLevel = 20
    +
    +PcBangPointMinCount = 20
    +PcBangPointMaxCount = 1000000
    +
    +PcBangPointDualChance = 20
    +
    +PcBangPointTimeStamp = 900

  5. translate #1:

     

    I need to write the script. (AI)

     

    Spawn a mob(#1), => kill this mob(#1), wait 20 seconds and automatically this AI spawn another mob(#2), kill it (#2), wait else 20 seconds and at the same place spawn another mob(#3), and when we kill it, wait 20 seconds and gets(spawn) at the same place the first mob (mob #1) and then everything goes in a circle, and so indefinitely.

     

    example:

     

    1 mob = Fox

    2 mob = Goblin

    3 mob = Marsh Zombie

     

    not same. different

     

    translate #2:

     

    spawn fox, if any player kill this fox -> wait 20 sec. -> spawn Goblin on same place (loc) of fox -> if any player kill this Goblin -> spawn Marsh Zombie on same place (loc) of fox and Goblin -> if any player kill this Marsh Zombie -> again wait 20 sec -> spawn fox (first mob)(at this place/loc of mob 1 and mob 2 and 3) - > and everything is repeated, on a circle.

     

    spawn loc1 = spawn loc2 = spawn loc3.

     

    spawn only occurs when they kill a mob, if not continue to kill the system will wait until they kill a mob that would be another spawn.

  6. spawn fox, if any player kill this fox -> wait 20 sec. -> spawn Goblin on same place (loc) of fox -> if any player kill this Goblin -> spawn Marsh Zombie on same place (loc) of fox and Goblin -> if any player kill this Marsh Zombie -> again wait 20 sec -> spawn fox (first mob)(at this place/loc of mob 1 and mob 2 and 3) - > and everything is repeated, on a circle.

     

    spawn loc1 = spawn loc2 = spawn loc3.

     

    spawn only occurs when they kill a mob, if not continue to kill the system will wait until they kill a mob that would be another spawn.

     

    understand me?(  :'(

  7. im use the google translate:

     

    I need to write the script. (AI)

     

    Spawn a mob(#1), => kill this mob(#1), wait 20 seconds and automatically this AI spawn another mob(#2), kill it (#2), wait else 20 seconds and at the same place spawn another mob(#3), and when we kill it, wait 20 seconds and gets(spawn) at the same place the first mob (mob #1) and then everything goes in a circle, and so indefinitely.

  8. look.

     

    go to 1 mob.=> kill this mob(1) => after 20 sec. automatically another mob spawned (on this loc of first mob)=> kill this mob(2) => 20 sec passed automatically spawned else another mob (on this loc of first mob)=> kill this mob(3) => 20 sec passed automatically spawn first mob (on this loc of first mob), and everything is repeated around the circle.

     

    How to create this script? (AI, maybe)

     

    understand?

  9. english:

     

    Good mornin' to all, How to do that after killing a mob appeared (in seconds of a 20 - or as a standard spawn mobs, I do not remember how much this time) the next mob, the mob then another, and after one more show up that which was in the beginning and the 3 mobs like to appear after they have kills in a circle?

     

    everlasting on another, that would be less confusing:

     

    It is worth mob => kill him => appears (via a routine spawn) another mob =>

    => Kill this mob => appears again after the usual time. spawn another mob =>

    => Kill it => there is one that was in the beginning, and then everything goes again, in a circle.

     

    sorry of my bad english, i am russian.

     

    rus:

     

    Добрый день, как сделать чтобы после убийства 1 моба появлялся (через секунд 20 - или как стандартный респаун у мобов, не помню сколько это времени) следующий моб, после этого моба еще один, а после еще одного появлялся тот, который был в самом начале, и эти 3 моба как бы появлялись после их киллов по кругу.

     

    обьясню по другому, что бы менее запутанней было:

     

    Стоит моб => убиваешь его => появляется (через время обычного респауна) другой моб =>

    => убиваем этого моба => появляется опять таки через время обыч. респа еще один моб =>

    => убиваем его => появляется тот, который был в самом начале, и далее все идет заново, по кругу.

  10. english:

     

    Good mornin' to all, How to do that after killing a mob appeared (in seconds of a 20 - or as a standard spawn mobs, I do not remember how much this time) the next mob, the mob then another, and after one more show up that which was in the beginning and the 3 mobs like to appear after they have kills in a circle?

     

    everlasting on another, that would be less confusing:

     

    It is worth mob => kill him => appears (via a routine spawn) another mob =>

    => Kill this mob => appears again after the usual time. spawn another mob =>

    => Kill it => there is one that was in the beginning, and then everything goes again, in a circle.

     

    sorry of my bad english, i am russian.

     

    rus:

     

    Добрый день, как сделать чтобы после убийства 1 моба появлялся (через секунд 20 - или как стандартный респаун у мобов, не помню сколько это времени) следующий моб, после этого моба еще один, а после еще одного появлялся тот, который был в самом начале, и эти 3 моба как бы появлялись после их киллов по кругу.

     

    обьясню по другому, что бы менее запутанней было:

     

    Стоит моб => убиваешь его => появляется (через время обычного респауна) другой моб =>

    => убиваем этого моба => появляется опять таки через время обыч. респа еще один моб =>

    => убиваем его => появляется тот, который был в самом начале, и далее все идет заново, по кругу.

     

×
×
  • Create New...