Jump to content
  • 0

To transform oneself when one is transformed


Question

Posted

Hello

Do you know if it is possible to transfo oneself when one is already transfo, I would like to be able to pass of a transformer when one is transforming

 

Thx for help

3 answers to this question

Recommended Posts

  • 0
Posted

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;
    }

 

  • 0
Posted

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();
	}

 

  • 0
Posted (edited)

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

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


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