i want to make rush impact take 50 range but with this code only goes in front of target always, i want to go on which location skill is casted with 50 range
not front please help me
video here:
code here
public final Location getFlyLocation(L2Character target, Skill skill)
{
if (target == null)
{
target = this;
}
int sign = 1;
Location toLoc = null;
int heading = target == this ? getHeading() : target.getHeading();
double radian = Util.convertHeadingToRadian(heading);
if (target != this)
{
toLoc = new Location(target.getX() + (int) (Math.sin(radian) * 40), target.getY() + (int) (Math.cos(radian) * 40), target.getZ());
}
else
{
toLoc = new Location(target.getX() + (int) (Math.sin(radian) * (skill.getFlyRadius() * (-sign))), target.getY() + (int) (Math.cos(radian) * (skill.getFlyRadius() * sign)), target.getZ(), heading);
}
if (isFlying())
{
return toLoc;
}
return GeoData.getInstance().moveCheck(this, toLoc);
}
The boss itself is available in the archive (repack from SGER@fjs)
You can contact the repack author; maybe they'll help.
But it's better to learn how to properly add NPCs in HF.
Question
GoldenNightmare
hello mxc i need some help with this code
i want to make rush impact take 50 range but with this code only goes in front of target always, i want to go on which location skill is casted with 50 range
not front please help me
video here:
code here
public final Location getFlyLocation(L2Character target, Skill skill) { if (target == null) { target = this; } int sign = 1; Location toLoc = null; int heading = target == this ? getHeading() : target.getHeading(); double radian = Util.convertHeadingToRadian(heading); if (target != this) { toLoc = new Location(target.getX() + (int) (Math.sin(radian) * 40), target.getY() + (int) (Math.cos(radian) * 40), target.getZ()); } else { toLoc = new Location(target.getX() + (int) (Math.sin(radian) * (skill.getFlyRadius() * (-sign))), target.getY() + (int) (Math.cos(radian) * (skill.getFlyRadius() * sign)), target.getZ(), heading); } if (isFlying()) { return toLoc; } return GeoData.getInstance().moveCheck(this, toLoc); }
Edited by GoldenNightmare0 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now