Jump to content

[Share-Updated] On Subclass Add/Change Freaze Players


`Rοmeο

Recommended Posts

Hello.

I whanna share you again one simple script that is very useful !

This script will fix the SA Stuck exploit.

Index: /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 345)
+++ /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 346)
@@ -8425,4 +8425,6 @@
    public boolean addSubClass(int classId, int classIndex)
    {
+    	L2PcInstance player = getClient().getActiveChar();
+    	
    	if (getTotalSubClasses() == 3 || classIndex == 0)
    		return false;
@@ -8430,4 +8432,8 @@
    	if (getSubClasses().containsKey(classIndex))
    		return false;
+    	
+    	player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1);
+    	player.setIsParalyzed(true);
+    	player.sendMessage("You are paralized untill your subclass load.");

    	// Note: Never change _classIndex in any method other than setActiveClass().
@@ -8492,4 +8498,8 @@
        if (Config.DEBUG)
            _log.info(getName() + " was given " + getAllSkills().length + " skills for their new sub class.");
+        
+        player.setIsParalyzed(false);
+        player.stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1);
+        player.sendMessage("You are unparalized.");

        return true;

I hope that I helped a little :)

 

yes fix stuck sa ! But new bug From IT ! StuckSubs ....

Link to comment
Share on other sites

  • 2 weeks later...

u realize how stupid this code is? and that with phx(even with out) u can still do the subclass bug... right? xD

 

pff did you ever tested ?! when you try the multisub you get message you can do nothing while you are paralized or something like that...

and when you are paralized you cant use your weapons witch stats are stucking...

please just test and then judge me...

Link to comment
Share on other sites

Its not retail like so its stupid to me.. And client packet often overlap (with phx) and they have no synchronization so this lil fix of yours is basically stupid.

1rst Idiotic thing you did (and the funnyest) = L2PcInstance player = getClient().getActiveChar(); -  You invoke getActiveChar() method from the players client (so ur invoking pcinstance inside pc instance? HA!) when you could simply use the default class methods..(or in ur case the invoker "this." since u cant do anything with out eclipse xD).

Secondly theres not even a try surrounding.. so ur player could just get 2 times paralyzed get two classes (the mutiskill bug) and then restart xD

 

Epilogue has fixed this problem retail like with a ReentrantLock. So.. do i need to continue?

Link to comment
Share on other sites

Its not retail like so its stupid to me.. And client packet often overlap (with phx) and they have no synchronization so this lil fix of yours is basically stupid.

1rst Idiotic thing you did (and the funnyest) = L2PcInstance player = getClient().getActiveChar(); -  You invoke getActiveChar() method from the players client (so ur invoking pcinstance inside pc instance? HA!) when you could simply use the default class methods..(or in ur case the invoker "this." since u cant do anything with out eclipse xD).

Secondly theres not even a try surrounding.. so ur player could just get 2 times paralyzed get two classes (the mutiskill bug) and then restart xD

 

Epilogue has fixed this problem retail like with a ReentrantLock. So.. do i need to continue?

 

damn you are right ...

I removed the l2pcinstance ... and the epilogue fix couse in there realy is fixed...

and yes its not retail but its useful for interlude...

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

It is for epilogue i think..

Furthermore i tried the exact code for Gracia Final T2.3 latest revision but i failed...The error was for this:

(L2Character.ABNORMAL_EFFECT_HOLD_1)
 

It said that it could not recognize it...:o

SO i tried to change it a little for Gracia Final project..

(i don't know how to make a .diff file i am newbie with eclipse...sorry for that...  :'( )

 

 

||For Gracia Final T2.3|| ''NOT TESTED YET''

 

Go in L2PcInstance.java (...\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java)

Find this line

import net.sf.l2j.gameserver.skills.l2skills.L2SkillSiegeFlag;

 

and after that insert this one

import net.sf.l2j.gameserver.skills.AbnormalEffect;

 

then find

       	if (getSubClasses().containsKey(classIndex))
       		return false;

 

and after that put this

       		startAbnormalEffect(AbnormalEffect.HOLD_1);
       		setIsParalyzed(true);
       		sendMessage("You are paralyzed until your subclass loads.");

 

next find

           if (Config.DEBUG)
               _log.info(getName() + " was given " + getAllSkills().length + " skills for their new sub class.");

 

and after that put

           			stopAbnormalEffect(AbnormalEffect.HOLD_1);
			setIsParalyzed(false);
			sendMessage("You are unparalized.");

 

And that would be all....I would be glad if someone could test it and post the results cause i am on vacation right now...   :(

If this altered version works i would be overjoyed because this is the first time i tried to do something and write it in java.... :-[  ;D

 

 

EDIT:

Well i tried testing it but.....when i changed sub two things happends; firstly it changed so fast that there is no way to see the effect and secondly when the sub is finished a new html box apears saying "Your sub is finished.Press ALT + T to check it. bla bla bla" so i can't make the bug easily furthermore to check if ti working.....

Link to comment
Share on other sites

  • 1 month later...

Nice small and easy code... ..I am using different codes for subclass :P.. para,weapon unequip and 1 more. Thanks for your code .Its great to be more protected.

Link to comment
Share on other sites

  • 2 months later...

Guys Problem :/

 

[javac] symbol  : variable ABNORMAL_EFFECT_HOLD_1

    [javac] location: class com.l2jserver.gameserver.model.actor.L2Character

    [javac] stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1);

    [javac]                               ^

    [javac] 2 errors

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.
Note: Your post will require moderator approval before it will be visible.

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...