Jump to content

[Guide-Updated]How To Fix SubClass Exploits On L2J Free!


Recommended Posts

HeLLo Folks

Today I Show You How To Fix Subclass Exploits...

We Add Penalty Time When You Change/Cancel/Add Subclass

1st Of All YOU MUST THE COMPILE!

 

Time To Start

Let's Go!

This Is Tested To Gracia Part I At New Realases The Code Is Into Files But You Must Make Some Edit!

Gracia Part I!

go into com.l2jfree.gameserver.util and Open FloodProtector.java

						
// protected actions
public static final int				PROTECTED_USEITEM		= 0;
public static final int				PROTECTED_ROLLDICE		= 1;
public static final int				PROTECTED_FIREWORK		= 2;
public static final int				PROTECTED_GLOBAL_CHAT	= 3;
public static final int				PROTECTED_TRADE_CHAT	= 4;
public static final int				PROTECTED_ITEMPETSUMMON	= 5;
public static final int				PROTECTED_HEROVOICE		= 6;
public static final int				PROTECTED_SOCIAL		= 7;
public static final int				PROTECTED_MULTISELL		= 8;
// =========================================================

Find This

and add this line under this protects

 public static final int PROTECTED_SUBCLASS = 9;

It Will Be Like This

// protected actions
public static final int				PROTECTED_USEITEM		= 0;
public static final int				PROTECTED_ROLLDICE		= 1;
public static final int				PROTECTED_FIREWORK		= 2;
public static final int				PROTECTED_GLOBAL_CHAT	= 3;
public static final int				PROTECTED_TRADE_CHAT	= 4;
public static final int				PROTECTED_ITEMPETSUMMON	= 5;
public static final int				PROTECTED_HEROVOICE		= 6;
public static final int				PROTECTED_SOCIAL		= 7;
public static final int				PROTECTED_MULTISELL		= 8;
public static final int				PROTECTED_SUBCLASS 	= 9;
// =========================================================

Then Find This Line

{ 4, 42, 42, Config.GLOBAL_CHAT_TIME, Config.TRADE_CHAT_TIME, 16, 100, Config.SOCIAL_TIME, 2 };

and after "2" add "100" (if you want 10 seconds penalty time)

it will be

{ 4, 42, 42, Config.GLOBAL_CHAT_TIME, Config.TRADE_CHAT_TIME, 16, 100, Config.SOCIAL_TIME, 2, 100 };

Save it...

Done!

Now Go To com.l2jfree.gameserver.model.actor.instance and open L2VillageMasterInstance.java

At Imports add this

import com.l2jfree.gameserver.util.FloodProtector;

Then Go At Line 413 find this

player.setActiveClass(paramOne); 
   
content.append("Change Subclass:<br>Your active sub class is now a <font color=\"LEVEL\">"

(IF YOU HAVE ANOTHER REALASES FIND AT -10 lines Or +10 Lines You Find It)

above This Add

 
                                     /* 
                                      * DrHouse: Despite this is not 100% retail like, it is here to avoid some exploits during subclass changes, specially 
                                      * on small servers. TODO: On retail, each village master doesn't offer any subclass that is not given by itself so player 
                                      * always has to move to other location to change subclass after changing previously. Thanks Aikimaniac for this info. 
                                     */ 
                                   if (!FloodProtector.getInstance().tryPerformAction(player.getObjectId(), FloodProtector.PROTECTED_SUBCLASS)) 
                                     { 
                                            player.sendMessage("You can change Subclass only every 10 Second(s)"); 
                                             return; 
                                     } 

Change Action Is Done!

Now Go TO Cancel

Go To Line 488 (case7) And Find This

player.setActiveClass(paramOne);

above This Add

 
                                     /* 
                                      * DrHouse: Despite this is not 100% retail like, it is here to avoid some exploits during subclass changes, specially 
                                      * on small servers. TODO: On retail, each village master doesn't offer any subclass that is not given by itself so player 
                                      * always has to move to other location to change subclass after changing previously. Thanks Aikimaniac for this info. 
                                     */ 
                                   if (!FloodProtector.getInstance().tryPerformAction(player.getObjectId(), FloodProtector.PROTECTED_SUBCLASS)) 
                                     { 
                                            player.sendMessage("You can cancel Subclass only every 10 Second(s)"); 
                                             return; 
                                     } 

Cancel It's Done..

Now Go To Add Action

Go TO Line 393 (case4)

find this

player.setActiveClass(player.getTotalSubClasses());

Above this Add

 
                                     /* 
                                      * DrHouse: Despite this is not 100% retail like, it is here to avoid some exploits during subclass changes, specially 
                                      * on small servers. TODO: On retail, each village master doesn't offer any subclass that is not given by itself so player 
                                      * always has to move to other location to change subclass after changing previously. Thanks Aikimaniac for this info. 
                                     */ 
                                   if (!FloodProtector.getInstance().tryPerformAction(player.getObjectId(), FloodProtector.PROTECTED_SUBCLASS)) 
                                     { 
                                            player.sendMessage("You can Add new Subclass only every 10 Second(s)"); 
                                             return; 
                                     } 

Add Action Is Done!

Save it And Compile Your Pack!

Credits Forgotex20 For Greek Guide Me For Transalation!

The Transalation Will Be For A-Style As Requested!

 

 

 

Gracia Part II Version 1.2.9

Go to com.l2jfree.gameserver.util and open FloodProtector.java

Find This

	// reuse delays for protected actions (in game ticks 1 tick = 100ms)
private static final int[]			REUSEDELAY				= new int[]
															{ 4, 42, 42, Config.GLOBAL_CHAT_TIME, Config.TRADE_CHAT_TIME, 16, 100, Config.SOCIAL_TIME, 20, 10 };

and make something like this

	// reuse delays for protected actions (in game ticks 1 tick = 100ms)
private static final int[]			REUSEDELAY				= new int[]
															{ 4, 42, 42, Config.GLOBAL_CHAT_TIME, Config.TRADE_CHAT_TIME, 16, 100, Config.SOCIAL_TIME, 2, 100 };

Save It...

Done!

Now You Are Done! you Have Fix It But The Players Can't Understand that server protected...

If You Are Newbie To Edit Java Files Just Compile Here But If You Want To Add Text When Someone Go To Make It Follow These Steps!

Go To com.l2jfree.gameserver.model.actor.instance and Open L2VillageMasterInstance.java

And Find at line 299-302(case 4) this

				{
				_log.warn("Player "+player.getName()+" has performed a subclass change too fast");
				return;
			}

make it

				{
				player.Sendmessage("This Server Protected! You Can Only Add Subclass Into 10 Second(s)");
				return;
			}

Done The Add!

Now Go To line 424-427 (Case 5) And Find Again The Same

				{
				_log.warn("Player "+player.getName()+" has performed a subclass change too fast");
				return;
			}

make it

				{
				player.Sendmessage("This Server Protected! You Can Only Change Subclass Into 10 Second(s)");
				return;
			}

Done And The Change Action

Now Go To Line 466-469(case 7) and Find Again THe Same

				{
				_log.warn("Player "+player.getName()+" has performed a subclass change too fast");
				return;
			}

make it

				{
				player.Sendmessage("This Server Protected! You Can Only Cancel Subclass Into 10 Second(s)");
				return;
			}

Done And The Cancel Action!

Save It And Now Compile!

Now you Are Ok With Text!

Again Credits

For Gracia Part I Forgotex20 me for transalation

For Gracia Part II Credits Go To Me!

Have Fun!

 

Link to comment
Share on other sites

As i said to forgotten this won't work.

 

Your mistake is that you add the protection after the sub is done.The bug for multi skill is when you do the subclass add fast cancel it and add another.

 

Solution:Add the protection when they choose sub and not when the action is done.

Link to comment
Share on other sites

As i said to forgotten this won't work.

 

Your mistake is that you add the protection after the sub is done.The bug for multi skill is when you do the subclass add fast cancel it and add another.

 

Solution:Add the protection when they choose sub and not when the action is done.

As I Know you have make it to Interlude...

I Have tested to Gracia and if player add subclass then you cant change/cancel subclass

maybe at IL you must make it with your own guide

Dunno if you tested to Gracia

Reply and i answer!

Link to comment
Share on other sites

about cancel action  .. it work if know where put the code! i mean b4 1 action or after!

 

 

yes this is real thing..

if you see a little the codes you understand.!

Link to comment
Share on other sites

I leave this post for a wile..:P

 

But i see none find the wrongs on second share....!!

 

Let explain what i mean....

 

 

If we go at floodprotection.java of l2jfree Gracia PT2 we will see that at begin!!

 

 

// reuse delays for protected actions (in game ticks 1 tick = 100ms)

private static final int[] REUSEDELAY = new int[]

{ 4, 42, 42, Config.GLOBAL_CHAT_TIME, Config.TRADE_CHAT_TIME, 16, 100, Config.SOCIAL_TIME, 20, 10 };

 

// protected actions

public static final int PROTECTED_USEITEM = 0;

public static final int PROTECTED_ROLLDICE = 1;

public static final int PROTECTED_FIREWORK = 2;

public static final int PROTECTED_GLOBAL_CHAT = 3;

public static final int PROTECTED_TRADE_CHAT = 4;

public static final int PROTECTED_ITEMPETSUMMON = 5;

public static final int PROTECTED_HEROVOICE = 6;

public static final int PROTECTED_SOCIAL = 7;

public static final int PROTECTED_SUBCLASS = 8;

public static final int PROTECTED_DROPITEM = 9;

 

 

 

Well let's learn some mathematics...!       

 

PROTECTED_USEITEM   = 0;   >>             4

PROTECTED_ROLLDICE = 1;     >>       42

PROTECTED_FIREWORK = 2;        >>    42

PROTECTED_GLOBAL_CHAT = 3;         >>   Config.GLOBAL_CHAT_TIME

PROTECTED_TRADE_CHAT = 4;           >> Config.TRADE_CHAT_TIME

PROTECTED_ITEMPETSUMMON = 5;      >>   16

PROTECTED_HEROVOICE = 6;       >>  100

PROTECTED_SOCIAL = 7;          >>  Config.SOCIAL_TIME

PROTECTED_SUBCLASS = 8;           >> 20

PROTECTED_DROPITEM = 9;    >>  10

 

 

 

well your share tells this!

 

 

 

 

Gracia Part II Version 1.2.9

Go to com.l2jfree.gameserver.util and open FloodProtector.java

Find This

	// reuse delays for protected actions (in game ticks 1 tick = 100ms)
private static final int[]			REUSEDELAY				= new int[]
															{ 4, 42, 42, Config.GLOBAL_CHAT_TIME, Config.TRADE_CHAT_TIME, 16, 100, Config.SOCIAL_TIME, 20, 10 };

and make something like this

	// reuse delays for protected actions (in game ticks 1 tick = 100ms)
private static final int[]			REUSEDELAY				= new int[]
															{ 4, 42, 42, Config.GLOBAL_CHAT_TIME, Config.TRADE_CHAT_TIME, 16, 100, Config.SOCIAL_TIME, 2, 100 };

Save It...

 

 

You say the 20  make it to 2... and  10 to 100 ....!!

 

But for subclass you decrease the time from 2000ms to 200ms. how can this help?

 

 

Always Friendly Cobra !

 

p.s: Just i was curious bcauz at my pack it was fixed on latest revesion ...just look changelog of l2jfree..!!

p.s:From Gracia PT1 to PT2 Are big difference and fixed ...so...!!

p.s1: Some Mod Hide My Post To 50 Pliz.... ::)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • 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