Jump to content
  • 0

Goddess of Destruction Transformation


Question

Posted

Ok, so i am trying to implement the new Kukuru transformation that mechanical chicken, and i don't have any idea where should i start, for example The Jet_Bike transformation code is this:

package transformations;

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

public class JetBike extends L2Transformation
{
private static final int[] SKILLS = {5491,839};
public JetBike()
{
	// id, colRadius, colHeight
	super(20001, 21.5, 27);
}

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

	transformedSkills();
}

public void transformedSkills()
{
	// Decrease Bow/Crossbow Attack Speed
	getPlayer().addSkill(SkillTable.getInstance().getInfo(5491, 1), 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);
	// Dismount
	getPlayer().removeSkill(SkillTable.getInstance().getInfo(839, 1), false);

	getPlayer().setTransformAllowedSkills(EMPTY_ARRAY);
}

public static void main(String[] args)
{
	TransformationManager.getInstance().registerTransformation(new JetBike());
}
}

 

most of it it's clear The Server_ID=Client_ID = 20001 but where is this transformation stored, and how can i implement a new transformation using an mount that i allready have exactely like this jetbike . And what is with this ID where is stored and where is it coming from?

3 answers to this question

Recommended Posts

  • 0
Posted

public JetBike()

{

// id, colRadius, colHeight

super(20001, 21.5, 27);

}

public class JetBike extends L2Transformation

L2Transformation

/**
 * 
 * @param id Internal id that server will use to associate this transformation
 * @param graphicalId Client visible transformation id
 * @param collisionRadius Collision Radius of the player while transformed
 * @param collisionHeight  Collision Height of the player while transformed
 */
public L2Transformation(int id, int graphicalId, double collisionRadius, double collisionHeight)
{
	_id = id;
	_graphicalId = graphicalId;
	_collisionRadius = collisionRadius;
	_collisionHeight = collisionHeight;
	_isStance = false;
}

/**
 * 
 * @param id Internal id(will be used also as client graphical id) that server will use to associate this transformation
 * @param collisionRadius Collision Radius of the player while transformed
 * @param collisionHeight  Collision Height of the player while transformed
 */
public L2Transformation(int id, double collisionRadius, double collisionHeight)
{
	this(id, id, collisionRadius, collisionHeight);
}

public void start()
{
	this.resume();
}

public void resume()
{
	this.getPlayer().transform(this);
}

L2PcInstance

public void transform(L2Transformation transformation)
{
...
	_transformation = transformation;
	stopAllToggles();
	transformation.onTransform();
	sendSkillList();
	sendPacket(new SkillCoolTime(this));
	sendPacket(ExBasicActionList.getStaticPacket(this));
	broadcastUserInfo();
}

public final void broadcastUserInfo()
{
	// Send a Server->Client packet UserInfo to this L2PcInstance
	sendPacket(new UserInfo(this));

UserInfo

	// T1 Starts
	writeD(_activeChar.getTransformationId());

  • 0
Posted

ok, i dont need code folow up i want to know where that id comes from that's all for example i want to implement gremlin transformation:) how do i get specific code for gremlin?.

  • 0
Posted

i just shown you the way how that id is sent from srv to client, if i am not wrong you are a client dev, so you should know where and what to add, i dont know what to do, but i think that it starts with transformdata.dat

..
20000	0	27	0	LineageEffect.s_u833_transform	LineageEffect.s_u833_transform	0	0	0	0
20000	1	27	0	LineageEffect.s_u833_transform	LineageEffect.s_u833_transform	0	0	0	0
20001	0	32	0	LineageEffect.s_u833_transform	LineageEffect.s_u833_transform	2	0	0	0
20001	1	32	0	LineageEffect.s_u833_transform	LineageEffect.s_u833_transform	2	0	0	0
20002	0	33	0	LineageEffect.s_u833_transform	LineageEffect.s_u833_transform	0	0	0	0
20002	1	33	0	LineageEffect.s_u833_transform	LineageEffect.s_u833_transform	0	0	0	0
20003	0	34	0	LineageEffect.s_u833_transform	LineageEffect.s_u833_transform	0	0	0	0
20003	1	34	0	LineageEffect.s_u833_transform	LineageEffect.s_u833_transform	0	0	0	0
...

so you must register it here, and add somewhere somehow the model, idk, but ask it at client mod section, here i dont know if any1 will know

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