Lineage 2 Tower Forum

Full Version: doubt with CancelTarget()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
CancelTarget(breakActiveAction) | Cancels active target in true|false

why the difference between true or false if you are looking to cancel the target because I have seen several script:

    LUA Programming
ClearTarget();
CancelTarget(false);
CancelTarget(false);
CancelTarget(false);



and why is the diference with true, if we want to cancel the target or lost the target...

    LUA Programming
CancelTarget(true);



ty
(09-09-2014 05:59 AM)rORUMI Wrote: [ -> ]CancelTarget(breakActiveAction) | Cancels active target in true|false

why the difference between true or false if you are looking to cancel the target because I have seen several script:

    LUA Programming
ClearTarget();
CancelTarget(false);
CancelTarget(false);
CancelTarget(false);



and why is the diference with true, if we want to cancel the target or lost the target...

    LUA Programming
CancelTarget(true);



ty

I dont know lua a lot, barely not at all... but my understanding with
ClearTarget();
CancelTarget(false);
is that it will switch back to the previous target...

You are attacking a mob, script makes you heal a player for example, then will switch back to your previous target.

Not sure about the TRUE option... I guess it doesn't go back to you previous target...
I want to ask the same many time, but oh well
ClearTargets() - clears all targets internally, without immediately canceling target in game
CancelTarget(false) - immediately cancel target
CancelTarget(true) - immediately cancel target and interrupt current skill casting
(09-09-2014 17:14 PM)kerberos464 Wrote: [ -> ]ClearTargets() - clears all targets internally, without immediately canceling target in game
CancelTarget(false) - immediately cancel target
CancelTarget(true) - immediately cancel target and interrupt current skill casting

Last night i finish 2 functions to protect me at GF, in one my wynns kills the pet of "bugged" pk wynn in the hight parts of towers just if they target me or pet are near, and the other kill gazem or Issad if it target me or any of my party are target or attacked.

And of course, a correct cancel of action was important to take a new action the most fast possible.

I think i need to check the last party of this with the function:

IsAttacking() -> can be conbined with GetMe() like IsAttacking(GetMe()) or
gazem:IsAttacking(me)

To do some like that:

if Gazem IsAttacking() in a range of 800, kill the mob.. then kill Gazem (or Issad) for safe
if Gazem IsAttacking(me), cancel the mob now and kill Gazem..



thanks Kerberos.
Reference URL's