You don't need an autocast for that; use a normal active one.
-
Trigger
-
Events
-

Unit - A unit starts the effect of an ability
-
Conditions
-

(Ability being cast) Equal to Sacrifice
-
Actions
-

If (All conditions are true) then do (Actions)
-


If - Conditions
-



(Key(dummy) is stored as a Handle of (Key(Triggering unit)) in Hashtable) Equal to True
-


Then - Actions
-



Unit - Kill (Load (Key(dummy)) of (Key(Triggering unit)) from Hashtable
-


Else - Actions
-

Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - 50.00)
-

Set Point1 = (Position of (Triggering unit))
-

Unit - Create 1 dummy for (Owner of (Triggering unit)) at Point1 facing default building degrees
-

Hashtable - Save (Triggering unit) as (Key(caster)) of (Key(Last created unit)) in Hashtable
-

Hashtable - Save (Last created unit) as (Key(dummy)) of (Key(Triggering unit)) in Hashtable
-

Unit Group - Add (Last created unit) to (TempGroup)
-

Hashtable - Save 30.00 as (Key(timer)) of (Key(Last created unit)) in Hashtable
-

Unit - Add (Claws of Attack) to (Triggering unit)
-

Unit - Set level of ((Claws of Attack) for (Triggering unit)) to (Level of (Ability being cast) for (Triggering unit))
-

Custom script: call RemoveLocation (udg_Point1)
-

Trigger - Turn on Trigger 2 <gen>
-
Trigger2
-
Events
-

Time - Every 1.00 seconds of game-time
-
Conditions
-
Actions
-

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-


If - Conditions
-



(TempGroup is empty) Equal to True
-


Then - Actions
-



Trigger - Turn off (This trigger)
-


Else - Actions
-



Unit Group - Pick every unit in TempGroup and do (Actions)
-




Loop - Actions
-





Set Time = (Load (Key(timer)) of (Key(Picked unit)) from Hashtable)
-





Hashtable - Save (Time - 1.00) as (Key(timer)) of (Key(Picked unit)) in Hashtable
-





If (All conditions are true) then do (Actions) else do (Actions)
-






If - Conditions
-






Then - Actions
-







Unit Group - Remove (Picked unit) from TempGroup
-







Unit - Remove (Claws of Attack) from (Load (Key(caster)) of (Key(Picked unit)) from Hashtable)
-







Unit - Kill (Picked unit)
-







Hashtable - Clear all child hashtables of (Key(Load (Key(caster)) of (Key(Picked unit)) from Hashtable) in Hashtable
-







Hashtable - Clear all child hashtables of (Key(Picked unit)) from Hashtable
Just create a Claws of Attack based ability and give it levels. You can also use
Battle Roar and just trigger the life loss, it's up to you actually.
The action "Hashtable - Save 30.00 ..." is the timer action. Adjust that "30.00" value to be your wanted duration. For this example, it lasts 30 seconds.
Unless you want to make something like this, use Battle Roar instead.
If you really want to mess with Autocast abilities, you need the trigger I gave you, but, except for the Event "Unit - A unit starts the effect of an ability", you will need an additional trigger that detects the autocast on/off.
I would base the ability off "Heal", since it's the only autocast ability that detects when life is threatened. Just set the healing amount to 0 and Targets Allowed to Self. You also need to detect the autocast, as I said, so use
-
Trig
-
Events
-

Unit - A unit is issued an order with no target
-
Conditions
-

(Issued order) Equal to (order(healon))
This is the autocast on, and the following the autocast off:
-
Trig2
-
Events
-

Unit - A unit is issued an order with no target
-
Conditions
-

(Issued order) Equal to (order(healoff))
You will additionally need another trigger, to check when the spell is actually used (by itself, when the "heal" occurs by itself), so use
-
Trig3
-
Events
-

Unit - A unit is issued an order targeting an object
-
Conditions
-

(Target unit of issued order) Equal to (Triggering unit)
-

(Issued order) Equal to (order(heal))
The above trigger will detect when you cast the spell, but, when your life gets lower; just add your action Unit - Set life (to make the life loss).
The event "Unit - A unit starts the effect of an ability" will be used when the user manually presses the Heal ability. Of course the heal ability tries by default to recover the amount of life, so, you will end up having a really low health. So, forget the auto-casting issue on this problem, cause it can't happen; when the auto-cast will take place? When you attack? If so, use "Searing Arrows" to make this happen, because the Heal (which detects the hp and not when the unit attacks) will get your life really low, because it is made to work that way.
Searing Arrows orders are
-
(Issued order) Equal to (order(flamingarrows))
The above is for autocast on and the following for the autocast off
-
(Issued order) Equal to (order(unflamingarrows))
So, you can now create a damage detection system to check when a unit takes damage and if your unit has Searing Arrows on (just add your unit in a Unit Group and make a Boolean comparison through the Conditions to check whether it is in a Unit Group or not), then add your Claws of Attack ability and create the dummy, exactly like I told you in the first trigger.
Fore more about hashtables:
[•]
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/