rORUMI
Expired VIP Member
Posts: 278
Joined: May 2014
Reputation: 50
Version:
1.4.2.142
|
doubt with CancelTarget()
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...
ty
|
|
09-09-2014 05:59 AM |
|
capucine
Expired VIP Member
Posts: 1,083
Joined: Jan 2013
Reputation: 208
Version:
1.4.2.142
|
RE: doubt with CancelTarget()
(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...
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...
|
|
09-09-2014 14:59 PM |
|
kerberos464
Bug revealer
Posts: 1,538
Joined: Jun 2012
Reputation: 576
Version:
1.4.3.143
|
RE: doubt with CancelTarget()
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
Everything is possible. The impossible just takes longer.
|
|
09-09-2014 17:14 PM |
|
Reputed by : | rORUMI(+2) , diegol(+2) |
rORUMI
Expired VIP Member
Posts: 278
Joined: May 2014
Reputation: 50
Version:
1.4.2.142
|
RE: doubt with CancelTarget()
(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.
(This post was last modified: 09-10-2014 02:09 AM by rORUMI.)
|
|
09-10-2014 01:50 AM |
|