Welcome to MaxCheaters.com

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads

  • 0

To transform oneself when one is transformed


Question

3 answers to this question

Recommended Posts

  • 0

in fact I just need that if we launch a skill of transfo he untransform then he transfom

 

 

in EffectTransformation.java I think it s possible to untransform and after transform but this code dont work

    protected boolean onStart()
    {
        if (!(getEffected() instanceof L2Player))
            return false;
        
        L2Player trg = (L2Player)getEffected();
        
        // No transformation if dead or cursed by cursed weapon
        if (trg.isAlikeDead() || trg.isCursedWeaponEquipped())
            return false;
        
        if (trg.getTransformation() != null)
        {
            // trg.sendPacket(SystemMessageId.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN);
            // return false;
            trg.stopTransformation(true);
                try
                {
                    Thread.sleep(4000);
                }
                catch(InterruptedException ie)
                {
                }
            TransformationManager.getInstance().transformPlayer(getSkill().getTransformId(), trg);
        }
        
        TransformationManager.getInstance().transformPlayer(getSkill().getTransformId(), trg);
        return true;
    }

 

Share this post


Link to post
Share on other sites
  • 0

and in L2Player there is:

 

	public void transform(L2Transformation transformation)
	{
		if (_transformation != null)
		{
			// You already polymorphed and cannot polymorph again.
			// sendPacket(SystemMessageId.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN);
			// return;
			
			TransformationManager.getInstance().transformPlayer(44630004, this);
		}
		if (isMounted())
		{
			// Get off the strider or something else if character is mounted
			dismount();
		}
		if (getPet() != null)
		{
			// Unsummon pets
			getPet().unSummon(this);
		}
		_transformation = transformation;
		for (L2Effect e : getAllEffects())
		{
			if (e != null && e.getSkill().isToggle())
				e.exit();
		}
		transformation.onTransform(this);
		sendSkillList();
		sendSkillCoolTime();
		ExBasicActionList.sendTo(this);
		broadcastUserInfo();
	}

 

Share this post


Link to post
Share on other sites
  • 0

I find, just need to change this code in l2player.java

 

	public void transform(L2Transformation transformation)
	{
		if (_transformation != null)
		{
			
			// You already polymorphed and cannot polymorph again.
			// sendPacket(SystemMessageId.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN);
			// return;
		_transformAllowedSkills.clear();
		transformation.onTransform(this);
		sendSkillList();
		sendSkillCoolTime();
		ExBasicActionList.sendTo(this);
		broadcastUserInfo();
			
		}
		if (isMounted())

 

Edited by sacrifice

Share this post


Link to post
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
Answer this question...

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