Jump to content

Recommended Posts

Posted

Don't know if it was shared before...sharing one of vampir-es tasks in this topic:

http://maxcheaters.com/forum/index.php?topic=247368.0

 

Whenever character dies add +1 death to it and send message "You already died x times".

On restart deaths counter setting to 0.

 

Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 4)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -460,6 +460,8 @@
	private long _lastRecomUpdate;
	private final List<Integer> _recomChars = new FastList<Integer>();

+	private int _deaths; // how many times died character after login
+	
	private final PcInventory _inventory = new PcInventory(this);
	private PcWarehouse _warehouse;
	private PcFreight _freight;
@@ -1874,7 +1876,23 @@
		return _recomLeft;
	}

+	public int getDeaths()
+	{
+		return _deaths;
+	}
	/**
+	 * Increase the deaths
+	 */
+	public void increaseDeaths()
+	{
+		setDeaths(getDeaths() + 1);
+	}
+
+	public void setDeaths(int deaths)
+	{
+		_deaths = deaths;
+	}	
+	/**
	 * Increment the number of recommandation that the L2PcInstance can give.
	 */
	protected void decRecomLeft()
@@ -4629,6 +4647,10 @@
		// Clear the pvp flag
		setPvpFlag(0);

+		//increase deaths count
+		increaseDeaths();
+		sendMessage("You already died "+getDeaths()+" times");
+		
		// Unsummon Cubics
		if (!_cubics.isEmpty())
		{
Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(revision 7)
+++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(working copy)
@@ -177,6 +178,9 @@

		activeChar.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ());

+		//Set deaths counter 0
+		activeChar.setDeaths(0);
+		
		// buff and status icons
		if (Config.STORE_SKILL_COOLTIME)
			activeChar.restoreEffects();

 

don't tested. if some1 will test please feedback and give screens.

Posted

it would be better if you would saved them in db,and set them 0 when someone logs in.

 

i know that since you wanna 0 on login it's better through the way you did it,but..

Posted

Don't know if it was shared before...sharing one of vampir-es tasks in this topic:

http://maxcheaters.com/forum/index.php?topic=247368.0

 

Whenever character dies add +1 death to it and send message "You already died x times".

On restart deaths counter setting to 0.

 

Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 4)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -460,6 +460,8 @@
	private long _lastRecomUpdate;
	private final List<Integer> _recomChars = new FastList<Integer>();

+	private int _deaths; // how many times died character after login
+	
	private final PcInventory _inventory = new PcInventory(this);
	private PcWarehouse _warehouse;
	private PcFreight _freight;
@@ -1874,7 +1876,23 @@
		return _recomLeft;
	}

+	public int getDeaths()
+	{
+		return _deaths;
+	}
	/**
+	 * Increase the deaths
+	 */
+	public void increaseDeaths()
+	{
+		setDeaths(getDeaths() + 1);
+	}
+
+	public void setDeaths(int deaths)
+	{
+		_deaths = deaths;
+	}	
+	/**
	 * Increment the number of recommandation that the L2PcInstance can give.
	 */
	protected void decRecomLeft()
@@ -4629,6 +4647,10 @@
		// Clear the pvp flag
		setPvpFlag(0);

+		//increase deaths count
+		increaseDeaths();
+		sendMessage("You already died "+getDeaths()+" times");
+		
		// Unsummon Cubics
		if (!_cubics.isEmpty())
		{
Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(revision 7)
+++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(working copy)
@@ -177,6 +178,9 @@

		activeChar.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ());

+		//Set deaths counter 0
+		activeChar.setDeaths(0);
+		
		// buff and status icons
		if (Config.STORE_SKILL_COOLTIME)
			activeChar.restoreEffects();

 

don't tested. if some1 will test please feedback and give screens.

i already did it :) its a death manager but it got the death counter too :) http://pastebin.com/vJNw6dU7
Posted

i will test it and i give you later a Feedback for this code but i think he shares again i waiting for another link if he shared. via pm Thanks.

 

And GJ Lekino For your Awesome Work and Awesome Shares.

Posted
http://maxcheaters.com/forum/index.php?topic=228733.0

 

anyway lekino if you will "touch" your code it can be a smart way to make a system like : "today deaths"  and simple you can make a voice with .mydeaths  and a message activeChar.sendMessage(acticeChar.getName() + "You have killed" + activeChar.getDeaths() + "today"); 

 

you know why its smart?because it no need database connection and its fast :) simple and easy :)

Posted

http://maxcheaters.com/forum/index.php?topic=228733.0

 

anyway lekino if you will "touch" your code it can be a smart way to make a system like : "today deaths"  and simple you can make a voice with .mydeaths  and a message activeChar.sendMessage(acticeChar.getName() + "You have killed" + activeChar.getDeaths() + "today"); 

 

you know why its smart?because it no need database connection and its fast :) simple and easy :)

it'll need db connections somehow,if you want it more advanced.

in order to 0 the deaths every X specific time(e.g 21:00) everyday.

 

edit: i had smth else in my mind anyway.

Posted

it'll need db connections somehow,if you want it more advanced.

in order to 0 the deaths every X specific time(e.g 21:00) everyday.

 

edit: i had smth else in my mind anyway.

he have this in enterworld: setDeaths(0); so the deaths will be reset when a char make's rr.... or he can schedule it for a specific time like you say :) it no need dp connection because he got setDeaths(getDeaths() + 1); <- this... and it will be ok with out dp connection :) the dp connection will be safe the deaths but no needs... or he can make a intiger list and he can clear it when a player log out or rr.
Posted

he have this in enterworld: setDeaths(0); so the deaths will be reset when a char make's rr.... or he can schedule it for a specific time like you say :) it no need dp connection because he got setDeaths(getDeaths() + 1); <- this... and it will be ok with out dp connection :) the dp connection will be safe the deaths but no needs... or he can make a intiger list and he can clear it when a player log out or rr.

yes,i know.

i had something else in my mind anyway

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Good evening, I have a problem with the items+ when I enchant, for example, the armors, the weapons, all the stats are normal. When I put them on my inventory, the +4+5 etc. that I have done do not appear. The project is h5 with the salvation protocol. Can any expert help me fix it? Thanks in advance. some screens... this items is +12   https://prnt.sc/fh2i0pjCHDY_ https://prnt.sc/qc1kLl-S4hn6 https://prnt.sc/CTFw3HOdZDPz  
    • GRAND OPENING TODAY !!!  FROM - 10 OCTOBER 2025, FRIDAY, 20:00 +2GMT.
    • Grand Opening On 08/10/2025 Server Rates: Exp: x3 Sp: x3 Adena: x3 Items: x3 Spoil: x4 Quests Drop: x3 Rate in some quests: x2-x6 ENCHANT Weapons / Armor / Jewelry: Safe +3 Max +21/+20/+20 Rates of Enchant: Normal 70% Bless 80%, from +15 Normal 55% Bless 65% Server Commands: .menu .vote .npcinfo Augmentation: NGS : 5% Mid : 8% High: 10% Top: 15% Other: According to the concept of a Olympiad NCSoft. No Donate things affect the game balance. Bonuses for voting on TOP sites. / unstuck 2 minutes. Free Tp until lvl 40. According to the concept of a castle siege NCSoft. The maximum number of windows from one PC is 4 Buffs  Number of slots: 25 Number of debuff slots: 6 Duration of the buffs: Retail RAID/GRAND BOSSES Retail like. Rate Raid Drop Items = x2 Seven Signs: According to the concept of NCSoft. GM Donate Shop All items you need are there One shop all items B-A-S grade for Donation Coins Finery / Misc / Recipes / Quest and much more. Offline Shops Just exit your client when you have shop. Offline Max Days: 7 Offline Place: Only in Peace Zone Custom Vip / Hero for: 3, 10, 30 Days Vip Benefits Exp: x8 Sp: x8 Adena: x8 Items: x8 Spoil: x10 Quests: x8 Raid Drop Items: x3 Rate in some quests: x2-x6 And more in Vip Manager Join us and discover many more features in our server! https://l2doll.com/
    • Results don’t come instantly   Sometimes it feels like nothing is moving. You take small steps, and the results barely show. But it’s exactly these steps that build your tomorrow. Every day, every effort is an investment in yourself and your success. Patience isn’t about sitting and waiting for miracles—it’s about moving forward with confidence. Real victories take time, effort, and your constant determination. Don’t rush the process-the journey itself is valuable, and it’s what shapes results that last.   …The right energy always comes back. 💫 VibeSMS Website: https://vibe-sms.net/ Telegram channel: https://t.me/vibe_sms
    • 10-09-2025 - OUR TOPIC IS RELEVANT! CONTACT US BY THE CONTACTS BELOW
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock