Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Aion > Aion Private Server
You last visited: Today at 19:54

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Need Help with the Pulled_effect

Discussion on Need Help with the Pulled_effect within the Aion Private Server forum part of the Aion category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2012
Posts: 12
Received Thanks: 4
Unhappy Need Help with the Pulled_effect

Hey guys,

In another post I was talking about creating a server 2.7, I use the (old) emulator Aion Galaxy... No idea if I should get a better one to be honest. As I am not a programmer at all I worked with that.

Anyway I got a huge problem with the Pull. I thought that was the Pulled_effect so I tried to copie from other more recent emulators the lines but nothing. The Doom Lure for instance is still pulling away every kind of monster in the game... I tried many different things but no way.
The Fear and Sleep work well. I just needed to change the "rank" to better than "elite", so I tried for the pull but noway it doesn't work so easily.

Please if someone knows what could be wrong HELP ! I have no idea where the problem is !

Thanks a lot for your time !
maxkirby is offline  
Old 06/15/2013, 19:17   #2
 
elite*gold: 0
Join Date: Oct 2011
Posts: 603
Received Thanks: 97
Do you mean Pull = aggro?
dallas_extreme is offline  
Old 06/15/2013, 20:15   #3
 
elite*gold: 0
Join Date: Dec 2012
Posts: 12
Received Thanks: 4
No it is called pulled_effect I think in the emulator. It is the lure of the templar for instance. The thing that grab the monster to you.
maxkirby is offline  
Old 06/15/2013, 21:08   #4
 
elite*gold: 0
Join Date: Oct 2011
Posts: 603
Received Thanks: 97

skill:2052

Code:
<skill_template skill_id="2052" name="Divine Grasp II" nameId="590791" cooldownId="525" stack="SKILL_KN_LANDSNACHER" lvl="2" skilltype="PHYSICAL" skillsubtype="ATTACK" tslot="DEBUFF" dispel_category="DEBUFF_PHYSICAL" req_dispel_level="1" activation="ACTIVE" cooldown="36000" duration="2000" cancel_rate="10">
        <properties first_target="TARGET" first_target_range="15" target_relation="ENEMY" target_type="AREA" target_distance="20" target_maxcount="18" awr="true" revision_distance="12"/>
        <startconditions>
            <dp value="4000"/>
            <weapon weapon="SWORD_2H DAGGER_1H MACE_1H POLEARM_2H STAFF_2H SWORD_1H"/>
        </startconditions>
        <useconditions>
            <playermove allow="false"/>
        </useconditions>
        <effects>
            <skillatk value="203" e="1" hoptype="SKILLLV" hopb="40415">
                <subeffect skill_id="8441"/>
            </skillatk>
            <snare duration2="10000" effectid="20007" e="2" element="EARTH" preeffect="1">
                <change stat="SPEED" func="PERCENT" value="-50"/>
                <change stat="FLY_SPEED" func="PERCENT" value="-50"/>
            </snare>
        </effects>
        <actions>
            <dpuse value="4000"/>
        </actions>
        <motion name="snatchatk"/>
    </skill_template>
java code

Code:
package com.aionemu.gameserver.skillengine.effect;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

import com.aionemu.gameserver.model.gameobjects.Creature;
import com.aionemu.gameserver.model.stats.container.StatEnum;
import com.aionemu.gameserver.network.aion.serverpackets.SM_FORCED_MOVE;
import com.aionemu.gameserver.network.aion.serverpackets.SM_TARGET_IMMOBILIZE;
import com.aionemu.gameserver.skillengine.model.Effect;
import com.aionemu.gameserver.skillengine.model.SkillMoveType;
import com.aionemu.gameserver.utils.MathUtil;
import com.aionemu.gameserver.utils.PacketSendUtility;
import com.aionemu.gameserver.world.World;

/**
 * @author Sarynth modified by Wakizashi, Sippolo
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PulledEffect")
public class PulledEffect extends EffectTemplate {

	@Override
	public void applyEffect(Effect effect) {
		effect.addToEffectedController();
		final Creature effected = effect.getEffected();
		effected.getController().cancelCurrentSkill();
		effected.getMoveController().abortMove();
		World.getInstance().updatePosition(effected, effect.getTargetX(), effect.getTargetY(), effect.getTargetZ(), effected.getHeading());
		PacketSendUtility.broadcastPacketAndReceive(effected, new SM_FORCED_MOVE(effected, effected.getObjectId(), effect.getTargetX(), effect.getTargetY(), effect.getTargetZ()));
	}

	@Override
	public void calculate(Effect effect) {
		if (effect.getEffected() == null)
			return;
		if (!super.calculate(effect, StatEnum.PULLED_RESISTANCE, null))
			return;

		effect.setSkillMoveType(SkillMoveType.PULL);
		final Creature effector = effect.getEffector();

		// Target must be pulled just one meter away from effector, not IN place of effector
		double radian = Math.toRadians(MathUtil.convertHeadingToDegree(effector.getHeading()));
		final float x1 = (float) Math.cos(radian);
		final float y1 = (float) Math.sin(radian);
		effect.setTargetLoc(effector.getX() + x1, effector.getY() + y1, effector.getZ() + 0.25F);
	}

	@Override
	public void startEffect(Effect effect) {
		final Creature effected = effect.getEffected();
		effected.getEffectController().setAbnormal(AbnormalState.CANNOT_MOVE.getId());
		effect.setAbnormal(AbnormalState.CANNOT_MOVE.getId());
		//PacketSendUtility.broadcastPacketAndReceive(effect.getEffected(), new SM_TARGET_IMMOBILIZE(effect.getEffected()));
	}

	@Override
	public void endEffect(Effect effect) {
		effect.getEffected().getEffectController().unsetAbnormal(AbnormalState.CANNOT_MOVE.getId());
	}
}
dallas_extreme is offline  
Old 06/15/2013, 23:39   #5
 
elite*gold: 0
Join Date: Dec 2012
Posts: 12
Received Thanks: 4
Thanks Dallas, I'm gonna try this tomorrow

It doesn't seem to work ... The main problem being that I'm nearly sure that I do it the wrong way... When I copyed the lines I changed the PulledEffect.java and PulledEffect.java.svn-database but I guess I should update my compilation with Eclipse ? I am such a noobish I don't get exactly how it works sorry... If you know how to make it work...?

By the way I didn't copy the beginning of the lines concerning the imports, cause my version is not the same and I don't have :
-SkillMoveType (I have something called Spellstatus)
-MathUtil (I have ThreadPoolManager)
-and SM_TARGET_IMMOBILIZE I have nothing instead...

I "work" on Aion X Emu, no idea if it's a bad choice ?

Please little help I am lost
maxkirby is offline  
Reply

Tags
aion, doom lure, pull, pull effect, pulled




All times are GMT +2. The time now is 19:54.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.