Jump to content

How To Create Own Transformation?


Recommended Posts

In this guide i show you how to create own trasnformation.

 

In this guide i take Mutant Overlord Transform, and here is final result:

 

 

12964012.png

 

 

1) Go to gameserver/data/scripts/transformations and create new file MutantOverlord.java

 

Insert this code

 

package transformations;

import com.l2jserver.gameserver.datatables.SkillTable;
import com.l2jserver.gameserver.instancemanager.TransformationManager;
import com.l2jserver.gameserver.model.L2Transformation;

public class MutantOverlord extends L2Transformation
{
private static final int[] SKILLS = {686,687,688,689,690,691,797,5491,619};
public MutantOverlord()
{
	// id, colRadius, colHeight
	super(555, 20, 34);
}

public void onTransform()
{
	if (getPlayer().getTransformationId() != 555 || getPlayer().isCursedWeaponEquipped())
		return;

	transformedSkills();
}

public void transformedSkills()
{
	// Divine Rogue Stun Shot
	getPlayer().addSkill(
;SkillTable.getInstance().getInfo(686, 1), false);
	// Divine Rogue Double Shot
	getPlayer().addSkill(
;SkillTable.getInstance().getInfo(687, 1), false);
	// Divine Rogue Bleed Attack
	getPlayer().addSkill(
;SkillTable.getInstance().getInfo(688, 1), false);
	// Divine Rogue Deadly Blow
	getPlayer().addSkill(
;SkillTable.getInstance().getInfo(689, 1), false);
	// Divine Rogue Agility
	getPlayer().addSkill(
;SkillTable.getInstance().getInfo(690, 1), false);
	// Sacrifice Rogue
	getPlayer().addSkill(
;SkillTable.getInstance().getInfo(691, 1), false);
	// Divine Rogue Piercing Attack
	getPlayer().addSkill(
;SkillTable.getInstance().getInfo(797, 1), false);
	// Decrease Bow/Crossbow Attack Speed
	getPlayer().addSkill(
;SkillTable.getInstance().getInfo(5491, 1), false);
	// Transform Dispel
	getPlayer().addSkill(
;SkillTable.getInstance().getInfo(619, 1), false);

	getPlayer().setTransform
AllowedSkills(SKILLS);
}

public void onUntransform()
{
	removeSkills();
}

public void removeSkills()
{
	// Divine Rogue Stun Shot
	getPlayer().removeSkill&
#40;SkillTable.getInstance().getInfo(686, 1), false);
	// Divine Rogue Double Shot
	getPlayer().removeSkill&
#40;SkillTable.getInstance().getInfo(687, 1), false);
	// Divine Rogue Bleed Attack
	getPlayer().removeSkill&
#40;SkillTable.getInstance().getInfo(688, 1), false);
	// Divine Rogue Deadly Blow
	getPlayer().removeSkill&
#40;SkillTable.getInstance().getInfo(689, 1), false);
	// Divine Rogue Agility
	getPlayer().removeSkill&
#40;SkillTable.getInstance().getInfo(690, 1), false);
	// Sacrifice Rogue
	getPlayer().removeSkill&
#40;SkillTable.getInstance().getInfo(691, 1), false);
	// Divine Rogue Piercing Attack
	getPlayer().removeSkill&
#40;SkillTable.getInstance().getInfo(797, 1), false);
	// Decrease Bow/Crossbow Attack Speed
	getPlayer().removeSkill&
#40;SkillTable.getInstance().getInfo(5491, 1), false);
	// Transform Dispel
	getPlayer().removeSkill&
#40;SkillTable.getInstance().getInfo(619, 1), false);

	getPlayer().setTransform
AllowedSkills(EMPTY_ARRAY);
}

public static void main(String[] args)
{
	TransformationManager.getInstanc
e().registerTransformation(new MutantOverlord());
}
}

 

If you want create your own npc, so you need to change:

 

All names: MutantOverlord

super(555, 20, 34);

555 - transform id, but you can leave it 555

20 - colRadius

34 - colHeight

 

Moreover you can change skills, i think you find where need to change :)

 

 

Now insert our transform into data/scripts.cfg

 

transformations/MutantOverlord.java

 

 

2)Go to gameserver/data/stats/skills and create new file 55555-55599.xml

 

and insert this code:

 

	<skill id="555555" levels="1" name="Mutant Overlord">
	<set name="itemConsumeCount" val="1" />
	<set name="target" val="TARGET_SELF" />
	<set name="skillType" val="BUFF" />
	<set name="operateType" val="OP_ACTIVE" />
	<set name="transformId" val="555" />
	<cond msgId="1509">
		<pla
yer olympiad="false" />
	</cond>
	<for>
		<eff
ect name="Transformation" time="6000" val="0" /> <!-- Transformation lasts 1 hour -->
	</for>
</skill>

 

 

3) Go to etcitem.sql create new item (I will use Apiga - 9142 ).

Find Handler and write ItemSkills, near skill write 555555-1;

 

4) With FileEdit open transformdata.dat (you can found in system directory)

 

And in end add these two lines

 

555	0	22736    
;0	LineageEffect.s_u833_transform	
LineageEffect.s_u833_transform	0	0
0	0
555	1	22736    
;0	LineageEffect.s_u833_transform	
LineageEffect.s_u833_transform	0	0
0	0

 

 

22736 - Monster ID, in my guide its Mutant Overlord

 

 

That all, you have mutant overlord transform :)

 

 

P.s. Moderators: Edit my language mistakes :)

  • Upvote 1
Link to comment
Share on other sites

  • 1 year later...
  • 3 weeks later...

Moding client i think is innevitable in order to make tha transformation work skeygeta.Because all the graphics u see in the game are from the client part.The gameplay and the variables comes from the code either l2j or other packs.

Link to comment
Share on other sites

Thanks..nice share?

 

http://maxcheaters.com/forum/index.php?topic=235647.msg2115795#msg2115795

 

Thought you understood.

 

Link to comment
Share on other sites

  • 1 year later...

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