• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Counter Helix (v1.3)

Presentation


The concept of the spell (function) it is not of my authorship. However, it is my version of algorithms and functions of this spell.
I decided to update for 1.3 and to create this spell why taste of Axe (that is the hero that possesses this ability in it Endows him/it [it Defends the Elders]).
ChangeLogs


Current (v1.3)

  • New function (flotation texts)
  • Improvement in the general descriptions
  • A better ScreenShot (1600 x 1200 wiht 4 imagens)

Old (v1.2)

  • Old options (just of detection of trees)
  • Old description
  • Old ScreenShot
Spell's Function


When Mogul Kahn is attacked, in answer, he has 17% of chance to hit back the attack with a rotative blow that it punishes the opponents around.

  • Area of effect: 300.
  • Cause: 100/135/170/205 of damage.
Spell's Triggers



[trigger=Setup]
Counter Helix Setup
Events
Map initialization
Conditions
Actions
-------- // --------
Custom script: set udg_CH_Hash = InitHashtable()
-------- // --------
-------- Ability Counter Helix: --------
Set CH_Ability = Counter Helix
-------- // --------
-------- Ability that allows Mogul Kahn to rotate: --------
Set CH_Ability_Spin = Spin (Effect)
-------- // --------
-------- You want to see flotation texts what indicate how much the spell Counter Helix caused? If yes, maintain Boolean below as true: --------
Set CH_Allow_Text = True
-------- If you doesn't want to view flotation texts, set the booelan above has FALSE. --------
-------- // --------
-------- To destroy trees, mark the variable below as true: --------
Set CH_Allow_Tree = True
-------- For the spell not to destroy trees, configure the variable above as false. --------
-------- // --------
-------- Counter Helix's Buff: --------
Set CH_Buff = Counter Helix
-------- // --------
-------- Area of Effect: --------
Set CH_AoE[1] = 300.00
Set CH_AoE[2] = 300.00
Set CH_AoE[3] = 300.00
Set CH_AoE[4] = 300.00
-------- Note: area of effect per level. --------
-------- // --------
-------- Chance of executing this spell: --------
Set CH_Chance[1] = 17
Set CH_Chance[2] = 17
Set CH_Chance[3] = 17
Set CH_Chance[4] = 17
-------- Note: chance to spin per level. --------
-------- // --------
-------- Damage caused by this spell per level: --------
Set CH_Damage[1] = 100.00
Set CH_Damage[2] = 135.00
Set CH_Damage[3] = 170.00
Set CH_Damage[4] = 205.00
-------- // --------
-------- Maximum duration that Mogul Kahn can rotate: --------
Set CH_Spin_Max = 0.65
-------- Note: 0.65 are equal to 0.65 seconds. --------
-------- // --------
-------- Name of the Model of the Effect Special servant when an unit is punished by the Mogul kahn: --------
Set CH_Model = Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
-------- // --------
-------- Angle that the flotation text will be guided: --------
Set CH_Text_Angle = 90.00
-------- Time (in Real) that the text takes to disappear of their views: --------
Set CH_Text_FadingAge = 1.50
-------- Time (in Real) that the flotation text takes to disappear definitively: --------
Set CH_Text_LifeSpan = 2.00
-------- Text size for the message that will be created: --------
Set CH_Text_Size = 11.50
-------- // --------
-------- Attack type caused by this spell: --------
Set CH_Type_Attack = Hero
-------- Damage type caused by this spell: --------
Set CH_Type_Damage = Universal
-------- // --------
-------- Type of responsible unit for destroying trees: --------
Set CH_Type_Dummy = Dummy
-------- // --------
-------- To destroy trees: --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CH_Allow_Tree Equal to True
Then - Actions
-------- // --------
Set CH_Point = (Center of (Playable map area))
Unit - Create 1 CH_Type_Dummy for Neutral Passive at CH_Point facing Default building facing degrees
Set CH_Dummy = (Last created unit)
-------- // --------
-------- Destroy Leak: --------
Custom script: call RemoveLocation(udg_CH_Point)
-------- // --------
Else - Actions
-------- // --------
-------- To reduce the leg that can cause Trigger, use the following custom script: --------
Custom script: call DestroyTrigger (GetTriggeringTrigger())
-------- // --------
[/trigger]



[trigger=Cast]
Counter Helix
Events
Unit - A unit Is attacked
Conditions
((Triggering unit) has buff Stunned (Pause)) Equal to False
(Level of CH_Ability for (Triggering unit)) Greater than 0
((Triggering unit) has buff Stunned) Equal to False
((Triggering unit) has buff CH_Buff) Equal to True
((Triggering unit) is Stunned) Equal to False
((Triggering unit) is paused) Equal to False
Actions
-------- // --------
-------- Level of Spell Counter Helix for Caster: --------
Set CH_Level = (Level of CH_Ability for CH_Caster)
-------- // --------
-------- CH_Chance[0] it is to verify the probability of CH_Caster to rotate: --------
Set CH_Chance[0] = (Random integer number between 1 and 100)
-------- // --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CH_Chance[0] Less than or equal to CH_Chance[CH_Level]
Then - Actions
-------- // --------
-------- Set the unit will go rotate: --------
Set CH_Caster = (Triggering unit)
-------- // --------
-------- Caster's Handle: --------
Set CH_Handle = (Triggering unit)
-------- // --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(CH_Caster is in CH_Group[1]) Equal to True
Then - Actions
-------- // --------
-------- Time that remains for Mogul Kahn to stop rotating: --------
Set CH_Spin_Current = (Load 1 of (Key CH_Handle) from CH_Hash)
-------- Save - 0.05 for Mogul Kahn whenever he rotates: --------
Hashtable - Save (CH_Spin_Current - 0.05) as 1 of (Key CH_Handle) in CH_Hash
-------- // --------
Else - Actions
-------- // --------
-------- Save 0.05 for Mogul Kahn whenever he rotates: --------
Hashtable - Save 0.00 as 1 of (Key CH_Handle) in CH_Hash
-------- // --------
-------- Add the ability that will allow Caster to rotate: --------
Unit - Add CH_Ability_Spin to CH_Caster
-------- // --------
-------- Order that Caster works the ability wins: --------
Unit - Order CH_Caster to Orc Blademaster - Bladestorm
-------- // --------
-------- Add Caster for the group: --------
Unit Group - Add CH_Caster to CH_Group[1]
-------- // --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Counter Helix Loop <gen> is on) Equal to True
Then - Actions
Else - Actions
-------- Turn ON the fallowing Trigger: --------
Trigger - Turn on Counter Helix Loop <gen>
-------- // --------
-------- // --------
-------- Point of CH_Caster: --------
Set CH_Point = (Position of CH_Caster)
-------- // --------
-------- Group of Units to be punished by CH_Caster: --------
Set CH_Group[2] = (Units within CH_AoE[CH_Level] of CH_Point)
-------- // --------
-------- Use the two lines below to remove mistakes: --------
Custom script: call RemoveLocation(udg_CH_Point)
Custom script: set bj_wantDestroyGroup = true
-------- // --------
-------- Catch the units of the group: --------
Unit Group - Pick every unit in CH_Group[2] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an enemy of (Owner of CH_Caster)) Equal to True
((Picked unit) is A town-hall-type unit) Equal to False
((Picked unit) is Mechanical) Equal to False
((Picked unit) is A structure) Equal to False
((Picked unit) is Ethereal) Equal to False
((Picked unit) is hidden) Equal to False
((Picked unit) is dead) Equal to False
Then - Actions
-------- // --------
-------- Target that will be punished: --------
Set CH_Target = (Picked unit)
-------- // --------
-------- Special effect created in the target: --------
Special Effect - Create a special effect attached to the origin of CH_Target using CH_Model
Special Effect - Destroy (Last created special effect)
-------- The last created special effect was destroyed to remove any leaks. --------
-------- // --------
-------- Damage the affected target for this spell: --------
Unit - Cause CH_Caster to damage CH_Target, dealing CH_Damage[CH_Level] damage of attack type CH_Type_Attack and damage type CH_Type_Damage
-------- // --------
-------- In the next part it consists of the visualization of flotation texts. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CH_Allow_Text Equal to True
Then - Actions
-------- // --------
Set CH_Text_Player = (Player group((Owner of CH_Caster)))
-------- // --------
Floating Text - Create floating text that reads (|cffFF2B2B- + (String((Integer(CH_Damage[CH_Level]))))) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Hide (Last created floating text) for (All players)
Floating Text - Show (Last created floating text) for CH_Text_Player
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to CH_Text_LifeSpan seconds
Floating Text - Change the fading age of (Last created floating text) to CH_Text_FadingAge seconds
Floating Text - Set the velocity of (Last created floating text) to 100.00 towards CH_Text_Angle degrees
-------- // --------
-------- Destroy/Remove any leak(s): --------
Custom script: call DestroyForce(udg_CH_Text_Player)
Custom script: set udg_CH_Text_Player = null
-------- // --------
Else - Actions
-------- // --------
Else - Actions
-------- // --------
Else - Actions
-------- // --------
[/trigger]



[trigger=Loop]
Counter Helix Loop
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in CH_Group[1] and do (Actions)
Loop - Actions
-------- // --------
-------- Caster: --------
Set CH_Caster = (Picked unit)
-------- // --------
-------- Caster's Handle: --------
Set CH_Handle = (Picked unit)
-------- // --------
-------- Time that remains for Mogul Kahn to stop rotating: --------
Set CH_Spin_Current = (Load 1 of (Key CH_Handle) from CH_Hash)
-------- // --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
CH_Spin_Current Greater than or equal to CH_Spin_Max
(CH_Caster has buff Stunned (Pause)) Equal to True
(CH_Caster has buff Stunned) Equal to True
(CH_Caster is Stunned) Equal to True
(CH_Caster is paused) Equal to True
(CH_Caster is dead) Equal to True
Then - Actions
-------- Remove the ability that allows Caster to spin: --------
Unit - Remove CH_Ability_Spin from CH_Caster
-------- // --------
-------- Clean Mogul Kahn's saved data: --------
Hashtable - Clear all child hashtables of child (Key CH_Handle) in CH_Hash
-------- // --------
-------- When he stops rotating, remove of the group: --------
Unit Group - Remove CH_Caster from CH_Group[1]
-------- // --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(CH_Group[1] is empty) Equal to True
Then - Actions
-------- If the group (CH_Group[1]) is empty, turn OFF this trigger: --------
Trigger - Turn off (This trigger)
Else - Actions
-------- // --------
Else - Actions
-------- Increase the variable so that Mogul Kahn stops spinning: --------
Hashtable - Save (CH_Spin_Current + 0.05) as 1 of (Key CH_Handle) in CH_Hash
-------- // --------
-------- Level of Spell Counter Helix for Caster: --------
Set CH_Level = (Level of CH_Ability for CH_Caster)
-------- // --------
-------- To Destroy/Kill Trees: --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CH_Allow_Tree Equal to True
Then - Actions
-------- Position of Caster: --------
Set CH_Point = (Position of CH_Caster)
-------- // --------
Destructible - Pick every destructible within CH_AoE[CH_Level] of CH_Point and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked destructible) is alive) Equal to True
Then - Actions
-------- // --------
-------- Order the dummy to harvest the picked destructible: --------
Unit - Order CH_Dummy to Harvest (Picked destructible)
-------- // --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of CH_Dummy) Equal to (Order(harvest))
Then - Actions
-------- If the destructible is a tree, destroy: --------
Destructible - Kill (Picked destructible)
Else - Actions
-------- // --------
-------- Order that Dummy stops: --------
Unit - Order CH_Dummy to Stop
-------- // --------
Else - Actions
-------- // --------
-------- Destroy/Remove any leak(s): --------
Custom script: call RemoveLocation(udg_CH_Point)
-------- // --------
Else - Actions
-------- // --------
-------- --------------------------- --------
[/trigger]

How to Import


To import this spell in any map (it should be compatible with the version 1.26...) it is necessary to copy the triggers and custom objects and to put in the map.
Being:

  • Trigger - The paste "Counter Helix"
  • Abilities - "Counter Helix" and "Counter Helix (Effect) "
  • Buff - "Counter Helix"

Tip: Enable the option: Automatically create unknown variables while pasting trigger dates (Go to: File>Preferences>General in your Warcraft III World Editor)
Contact


  • Suggestions?
  • Doubts?
  • Critical?
  • Subjects?

For any question, I recommend sends her for me, in this page, in my profile or for a pm (private message).
I insist on helping.
Credits


  • For Hive WorkShop.
  • Moderator of this resource.
  • To you for the kindness, dowload and for everything! Thank you for participating in my work.
My request


If it uses my spell in any map, for kindness, thank for my work.
If it can, I ask that it rewards with reputation, in that way I can reward the favor.
Don't stop visiting my page for more resources.
Keywords:
Spell , Passive , Losam , DotA , Axe
Contents

Counter Helix (v1.3) (Map)

Reviews
Counter Helix (v1.1) | Reviewed by Maker | 6th Jun 2013 APPROVED Leakless and MUI [tr] You could set caster has CH buff as the main condition to avoid unnecessary actions You save 0 as 1 of Trig unit, so take it out...

Moderator

M

Moderator


Counter Helix (v1.1) | Reviewed by Maker | 6th Jun 2013
APPROVED


126248-albums6177-picture66521.png


  • Leakless and MUI
126248-albums6177-picture66523.png


  • You could set caster has CH buff as the main condition to
    avoid unnecessary actions
  • You save 0 as 1 of Trig unit, so take it out of the if/then/else
  • Don't check if the group is empty during every loop
    only when removing a unit from it
  • Making the unit repeatedly play the spin animation is not the best solution
    You could try hidden ability based on Channel and some follow through time
    You wouldn't need the looping trigger then
[tr]
 
Level 11
Joined
Mar 27, 2011
Messages
293
It's copied from DotA.

I know this is a kind of copy, read the description of the spell?

Note that not put the triggers why is there bugs in time to give uploading the spell.




very original and demonstrates a high skill in coding

Well, very thanks.
 
Last edited by a moderator:
Top