Jump to content

[Share]OverEnchant Fix! (Anti-Hacker)


Nefer

Recommended Posts

Hi boys,

 

I don't post most in this Forum, but is very good and i decided to post a little fix that can be very very usefull.

 

Maybe other people are post this fix, but i didn't see it.

 

This is my fix:

 

In Enterworld.java

 

add all this:

 

(Update if (i.isEquipable()))

 

	for (L2ItemInstance i : activeChar.getInventory().getItems())
	{
		if (!activeChar.isGM())
		{	
if (i.isEquipable())
{
		   if (i.getEnchantLevel() > Config.ENCHANT_MAX_WEAPON || i.getEnchantLevel() > Config.ENCHANT_MAX_ARMOR || i.getEnchantLevel() > Config.ENCHANT_MAX_JEWELRY)
		   {
			//Delete Item Over enchanted
			activeChar.getInventory().destroyItem(null, i, activeChar, null);
			//Message to Player
                                activeChar.sendMessage("[server]:You have Items over enchanted you will be kikked!");
			//If Audit is only a Kick, with this the player goes in Jail for 1.200 minutes
			activeChar.setPunishLevel(L2PcInstance.PunishLevel.JAIL, 1200);
                                //Punishment e log in audit
			Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " have item Overenchanted ", Config.DEFAULT_PUNISH);
                        //Log in console
			_log.info("#### ATTENCTION ####");
			_log.info(i+" item has been removed from player.");
                }
		}
	}
}

 

Update!

 

Add this in gameserver.network.clientpackets.UseItem.java

if (item.isEquipable())
		{


+			 if (!activeChar.isGM() && item.getEnchantLevel() > Config.ENCHANT_MAX_WEAPON || item.getEnchantLevel() > Config.ENCHANT_MAX_ARMOR || item.getEnchantLevel() > Config.ENCHANT_MAX_JEWELRY)
+             {				
+                    activeChar.sendMessage("You have been kicked for using an item overenchanted!");
+                    activeChar.closeNetConnection();
+                    return;
+             }

 

This is simple code but very good.

 

If a player (not gm) logs in the server with item enchanted over the Max enchant, he will be kicked, the item over enchanted will be deleted and he will put in Jail for 1.200 minutes.

 

Update!

 

This Update is very important because with this new code if a player creates an item overenchanted and not log out, he will be kicked if he equips the Item, and when he re logs he will be jailed, kikked ecc ecc... ;)

 

Sry for my english :D

 

Ps: All Credits to me  :-*

 

 

Bye

Link to comment
Share on other sites

Yes all credits to me :)

 

 

Update!

 

Add this in gameserver.network.clientpackets.UseItem.java

if (item.isEquipable())
		{


+			 if (!activeChar.isGM() && item.getEnchantLevel() > Config.ENCHANT_MAX_WEAPON || item.getEnchantLevel() > Config.ENCHANT_MAX_ARMOR || item.getEnchantLevel() > Config.ENCHANT_MAX_JEWELRY)
+             {				
+                    activeChar.sendMessage("You have been kicked for using an item overenchanted!");
+                    activeChar.closeNetConnection();
+                    return;
+             }

 

 

 

This Update is very important because with this new code if a player creates an item overenchanted and not log out, he will be kicked if he equips the Item, and when he re logs he will be jailed, kikked ecc ecc... ;)

 

 

 

Bye

Link to comment
Share on other sites

can u make a code for vips too? to not get dc/remove the weapon if he have an overenchanted item. Because theres a phx code that can give u the enchant level that u want (for example 19) if server max is +19 and i want for vips only to wear these weapons. Max enchant rate=16 and for vips +19. if i change the code to

 

if (item.isEquipable())
		{


+			 if (!activeChar.isGM() && item.getEnchantLevel(19) > Config.ENCHANT_MAX_WEAPON || item.getEnchantLevel(8) > Config.ENCHANT_MAX_ARMOR || item.getEnchantLevel(8) > Config.ENCHANT_MAX_JEWELRY)
+             {				
+                    activeChar.sendMessage("You have been kicked for using an item overenchanted!");
+                    activeChar.closeNetConnection();
+                    return;
+             }

Then normal players that can use phx will get a +19 weapon without dc.

Link to comment
Share on other sites

can u make a code for vips too? to not get dc/remove the weapon if he have an overenchanted item. Because theres a phx code that can give u the enchant level that u want (for example 19) if server max is +19 and i want for vips only to wear these weapons. Max enchant rate=16 and for vips +19. if i change the code to

 

if (item.isEquipable())
		{


+			 if (!activeChar.isGM() && item.getEnchantLevel(19) > Config.ENCHANT_MAX_WEAPON || item.getEnchantLevel(8) > Config.ENCHANT_MAX_ARMOR || item.getEnchantLevel(8) > Config.ENCHANT_MAX_JEWELRY)
+             {				
+                    activeChar.sendMessage("You have been kicked for using an item overenchanted!");
+                    activeChar.closeNetConnection();
+                    return;
+             }

Then normal players that can use phx will get a +19 weapon without dc.

 

Is vip an Event?

 

I don't know this event, but i can do an exaple with TvT Event:

 

if (!TvTEvent.startFight() || !TvTEvent.startParticipation())
			{	

			 if (!activeChar.isGM() && item.getEnchantLevel() > Config.ENCHANT_MAX_WEAPON || item.getEnchantLevel() > Config.ENCHANT_MAX_ARMOR || item.getEnchantLevel() > Config.ENCHANT_MAX_JEWELRY)
             {				
                    activeChar.sendMessage("You have been kicked for using an item overenchanted!");
                    activeChar.closeNetConnection();
                    return;
             }
			}

 

Do you want know this?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.



  • Posts

    • Well my friend, I'm not going to stay here arguing anymore, because you won't give up and much less have the humility to accept something you did wrong, as you saw, I value the work of others, I know who really creates or even takes a block of code and does something better and different, but the subject here was about a guy, nicknamed Vraekar, who steals and SELLS interfaces as if they were his, and is that within your beliefs?, belief that if the guy creates something it has to be stolen and whoever stole it can profit from it?, that's what I'm talking about, you've fought a lot against this, and today you help a guy like that to do wrong, but anyway, you know what you're doing, I hope you reflect, the community knows who does and who helps the wrong. Stay with God, because six of the problems that go around.
    • You claim you thought I was a "serious" person before. Well, maybe you just never took the time to actually know me. People evolve, but I stay true to what I do and believe in. If you’re that hung up on what I’ve been doing, maybe it's time to stop speculating and start focusing on yourself. 🙂
    • Well, at least it's clear that you don't respect the work of others. Secondly, everyone knows that you code nothing. Your group has devs. known that you've asked for a lot of help and code exchange with some well-known BRs. there are chats and I can prove it, then don't come playing the good guy because you're not. So, Celestine, I'm not judging you. I'm saying that I know that your group helped vraekar steal the codes, and I have proof. In the past, I thought you were a serious, good-natured guy, but lately, you're a different person. Your text above speaks for you.
    • What I do or who I work with is none of your concern, and honestly, I couldn't care less. Lately, I've seen a lot of people trying to make a quick buck off scams, so let's not even mention names you wouldn't want them getting upset, right? 🙂  As for the projects I've been involved with, there's a server about to launch that I’m personally waiting for, and when it does, I’ll release the work publicly for free because people deserve better than what these so called "developers" are pushing. I’m not here to defend anyone, but if you had any real knowledge, you’d see how poorly written some of these scripts are. I’ve worked with Vraekar in the past, and I know for a fact he’s never sold anything I’ve created. So before you start running your mouth, ask yourself: why are you even juding me?
    • I didn't even want to touch on your name Celestine, but it took a while to want to protect it, right? But then I say, everyone knows that you and your group helped Vraekar in deobfuscating the interfaces, do you want me to post here the dates and videos of the releases of the OMG and Silence interfaces?, and then see Vraekar's?, do you want?, a blatant copy, even their variable names, the theft is blatant, and you who are an admin here at Max and say you are the right one, helped him decrypt and remove the code obfuscation, everyone knows that, and now you come and tell me that his code is not copied?, if you want I can put all the evidence here and this will be very ugly even for you, since those you helped Vraekar and the interface dev community know this, they know about the thefts, very ugly indeed my friend that you still come and tell such a lie.   ps. And just one more thing, did you say that all the code he wrote? you became a joker? Vraekar doesn't program a single line of code, the guy works as a data analyst, what he learned was to copy and paste ready-made codes, but he doesn't write a single line of code.
  • Topics

×
×
  • Create New...