Page 1 of 1

About transformations adding new ones

Posted: Tue Sep 25, 2012 12:09 pm
by babyjason
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:4395
L2JDP Revision Number:7666

Hello,
I would like to add new transformations, my question is, can i simply make a XXXX.java in the db/scripts/transformations , inside instead of super(125, 12, 27.50); i write instead of 125 another custom number i chose (no client modding discussion here i got it so i wont go further , no need), then add it at scripts.cfg at #transformations.

IS it enough , or i have to modify /add things in gameserver core also?

Code: Select all

package transformations; import com.l2jserver.gameserver.datatables.SkillTable;import com.l2jserver.gameserver.instancemanager.TransformationManager;import com.l2jserver.gameserver.model.L2Transformation; public class AquaElf extends L2Transformation{    private static final int[] SKILLS = new int[]{619};        public AquaElf()    {        // id, colRadius, colHeight        super(125, 12, 27.50);    }        @Override    public void onTransform()    {        if (getPlayer().getTransformationId() != 125 || getPlayer().isCursedWeaponEquipped())            return;                transformedSkills();    }        public void transformedSkills()    {        // Transform Dispel        getPlayer().addSkill(SkillTable.getInstance().getInfo(619, 1), false);                getPlayer().setTransformAllowedSkills(SKILLS);    }        @Override    public void onUntransform()    {        removeSkills();    }        public void removeSkills()    {        // Transform Dispel        getPlayer().removeSkill(SkillTable.getInstance().getInfo(619, 1), false);                getPlayer().setTransformAllowedSkills(EMPTY_ARRAY);    }        public static void main(String[] args)    {        TransformationManager.getInstance().registerTransformation(new AquaElf());    }} 

Re: About transformations adding new ones

Posted: Tue Sep 25, 2012 12:16 pm
by jurchiks
how about "try and see"?

Re: About transformations adding new ones

Posted: Tue Sep 25, 2012 2:06 pm
by babyjason
sadly i cant, because i only have 1 server and no other pc in my house :( no resources

Re: About transformations adding new ones

Posted: Tue Sep 25, 2012 3:31 pm
by MELERIX
transformations id are client side.

Re: About transformations adding new ones

Posted: Tue Sep 25, 2012 3:34 pm
by babyjason
MELERIX wrote:transformations id are client side.

ty, so theoretically no core is involved in this i can add as many as there are in client, ty again

Re: About transformations adding new ones

Posted: Tue Sep 25, 2012 8:02 pm
by jurchiks
That's just the ID; I thought you meant to ask if there is anything more to change server-side...

Re: About transformations adding new ones

Posted: Thu Sep 27, 2012 10:14 am
by babyjason
public class LightPurpleManedHorse extends L2Transformation

what should i put there? npc s class?

Re: About transformations adding new ones

Posted: Thu Sep 27, 2012 12:10 pm
by jurchiks
You mean the class name? Obviously you make it up; it's just a name, the ID is the only significant thing here.

Re: About transformations adding new ones

Posted: Tue Oct 16, 2012 7:23 am
by babyjason
no, for ex there is this, the id of transformation is 109 , if i put other transformation (readen from client) like 145 for ex, do i have to add somewhere in core also?

Code: Select all

package transformations; import com.l2jserver.gameserver.datatables.SkillTable;import com.l2jserver.gameserver.instancemanager.TransformationManager;import com.l2jserver.gameserver.model.L2Transformation; public class TawnyManedLion extends L2Transformation{    private static final int[] SKILLS = {5491,574,839};    public TawnyManedLion()    {        // id, colRadius, colHeight        super(109, 25, 22.5);    }        @Override    public void onTransform()    {        if (getPlayer().getTransformationId() != 109 || getPlayer().isCursedWeaponEquipped())            return;                transformedSkills();    }        public void transformedSkills()    {        // Decrease Bow/Crossbow Attack Speed        getPlayer().addSkill(SkillTable.getInstance().getInfo(5491, 1), false);        // Bomb Installation (up to 4 levels)        getPlayer().addSkill(SkillTable.getInstance().getInfo(574, 4), false);        // Dismount        getPlayer().addSkill(SkillTable.getInstance().getInfo(839, 1), false);                getPlayer().setTransformAllowedSkills(SKILLS);    }        @Override    public void onUntransform()    {        removeSkills();    }        public void removeSkills()    {        // Decrease Bow/Crossbow Attack Speed        getPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);        // Bomb Installation (up to 4 levels)        getPlayer().removeSkill(SkillTable.getInstance().getInfo(574, 4), false);        // Dismount        getPlayer().removeSkill(SkillTable.getInstance().getInfo(839, 1), false);                getPlayer().setTransformAllowedSkills(EMPTY_ARRAY);    }        public static void main(String[] args)    {        TransformationManager.getInstance().registerTransformation(new TawnyManedLion());    }}

Re: About transformations adding new ones

Posted: Tue Oct 16, 2012 12:10 pm
by Zoey76
I think they have been unhardcoded from core, meaning you can implement them DP-side only.

Re: About transformations adding new ones

Posted: Tue Oct 16, 2012 12:51 pm
by UnAfraid
In Ride packet?