Farplane
New Member
- Reaction score
- 8
I'm trying to improve my familiarity with GUI spells (I'll get into JASS later), so I decided that I'd make a spellpack of 4 DotA spells. Please notify me of any leaks or malfunctions because that's what I'm trying to imrpove on. I know these codes are very simple to many of you but I'm here to learn.
---
Spell 1: Chaos Bolt (Chaos Knight)
MUI: No.
Import Difficulty: Medium
-Chaos Bolt-
Deals random damage and stuns for a random amount of seconds to a target unit.
Level 1: 1-200 damage, stuns for 1-2 seconds.
Level 2: 1-200 damage, stuns for 1-3 seconds.
Level 3: 1-200 damage, stuns for 1-4 seconds.
Level 4: 1-200 damage, stuns for 2-4 seconds.
---
Screenshot:
Code:
---
Spell 2: Slithereen Crush (Slithereen Guard)
MUI: Yes.
Import Difficuly: Easy
-Slithereen Crush-
Slams the ground, dealing damage to all units in a 450 AOE, and stunning them.
Level 1: 50 damage, 1 second stun.
Level 2: 100 damage, 1.5 second stun.
Level 3: 150 damage, 2 second stun.
Level 4: 200 damage, 2.5 second stun.
---
Screenshot:
Code:
---
Spell 3: Void (Night Stalker)
MUI: No.
Import Difficulty: Easy.
-Void-
Deals damage to a target unit and slows its movement speed if cast at night.
Level 1: 90 damage, 50% movement speed for 7 seconds if casted at night.
Level 2: 160 damage, 50% movement speed for 7 seconds if casted at night.
Level 3: 255 damage, 50% movement speed for 7 seconds if casted at night.
Level 4: 335 damage, 50% movement speed for 7 seconds if casted at night.
---
Screenshots:
Casted during the day, it only does damage.
But at night, it gives an addition movement speed reduction.
Code:
---
Spell 4: X Marks the Spot (Admiral Proudmoore)
MUI: No.
Import Difficulty: Medium.
-X Marks the Spot-
Marks the position of an enemy unit and sends them back to it after several seconds.
Level 1: 2 seconds.
Level 2: 3 seconds.
Level 3: 4 seconds.
Level 4: 5 seconds.
---
Screenshots:
Code:
---
Hope you guys enjoy it, I spent lots of time to make it as close to DotA as possible (with the resources I have).
---
Spell 1: Chaos Bolt (Chaos Knight)
MUI: No.
Import Difficulty: Medium
-Chaos Bolt-
Deals random damage and stuns for a random amount of seconds to a target unit.
Level 1: 1-200 damage, stuns for 1-2 seconds.
Level 2: 1-200 damage, stuns for 1-3 seconds.
Level 3: 1-200 damage, stuns for 1-4 seconds.
Level 4: 1-200 damage, stuns for 2-4 seconds.
---
Screenshot:
Code:
Code:
Chaos Bolt
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Chaos Bolt
Actions
Set chaosTarget = (Target unit of ability being cast)
Set chaosDamage = (Random integer number between 1 and 200)
-------- Sets the damage that will be done to a random integer between 1 and 200. --------
Set chaosDamageReal = (Real(chaosDamage))
-------- Converts integer to a real so it can be used. --------
Set chaosStunMax = ((Level of Chaos Bolt for (Triggering unit)) + 1)
-------- Sets the maximum amount of seconds the target can be stunned, based on level. --------
If ((Level of Chaos Bolt for (Triggering unit)) Less than or equal to 3) then do (Set chaosStun = (Random integer number between 1 and chaosStunMax)) else do (Set chaosStun = (Random integer number between 2 and 4))
-------- Sets how long the unit will be stunned. L1: 1-2, L2: 1-3, L3: 1-4, or L4: 2-4. --------
Set chaosStunReal = (Real(chaosStun))
-------- Converts the integer into a real so it can be used. --------
Unit - Set life of chaosTarget to ((Life of chaosTarget) - chaosDamageReal)
Floating Text - Create floating text that reads (String(chaosStun)) at (Position of chaosTarget) with Z offset 0.00, using font size 17.00, color (0.00%, 0.00%, 100.00%), and 0.00% transparency
Set chaosText = (Last created floating text)
Special Effect - Create a special effect attached to the overhead of chaosTarget using Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl
Set chaosEffect = (Last created special effect)
Unit - Pause chaosTarget
Wait chaosStunReal seconds
Special Effect - Destroy chaosEffect
Unit - Unpause chaosTarget
Floating Text - Destroy chaosText
Spell 2: Slithereen Crush (Slithereen Guard)
MUI: Yes.
Import Difficuly: Easy
-Slithereen Crush-
Slams the ground, dealing damage to all units in a 450 AOE, and stunning them.
Level 1: 50 damage, 1 second stun.
Level 2: 100 damage, 1.5 second stun.
Level 3: 150 damage, 2 second stun.
Level 4: 200 damage, 2.5 second stun.
---
Screenshot:
Code:
Code:
Slithereen Crush
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Slithereen Crush
Actions
Set slithGroup = (Units within 450.00 of (Position of (Triggering unit)) matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True))))
Environment - Create a 1.00 second Depression ripple deformation at (Position of (Triggering unit)) with starting radius 300.00, ending radius 450.00, and depth 45.00, using 0.20 second ripples spaced 60.00 apart
Special Effect - Create a special effect at (Position of (Triggering unit)) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
Special Effect - Destroy (Last created special effect)
Unit Group - Pick every unit in slithGroup and do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Position of (Picked unit)) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call DestroyGroup(udg_slithGroup)
Spell 3: Void (Night Stalker)
MUI: No.
Import Difficulty: Easy.
-Void-
Deals damage to a target unit and slows its movement speed if cast at night.
Level 1: 90 damage, 50% movement speed for 7 seconds if casted at night.
Level 2: 160 damage, 50% movement speed for 7 seconds if casted at night.
Level 3: 255 damage, 50% movement speed for 7 seconds if casted at night.
Level 4: 335 damage, 50% movement speed for 7 seconds if casted at night.
---
Screenshots:
Casted during the day, it only does damage.
But at night, it gives an addition movement speed reduction.
Code:
Code:
Void
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Void
Actions
Set voidTime = (In-game time of day)
-------- Checks the time of day to see if a slow effect will be used or not. --------
Set voidTarget = (Target unit of ability being cast)
-------- Sets the target of the spell, needed to reset movespeed if time is night. --------
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Undead\DeathPact\DeathPactTarget.mdl
Special Effect - Destroy (Last created special effect)
If ((Level of Void for (Triggering unit)) Equal to 1) then do (Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - 90.00)) else do (Do nothing)
If ((Level of Void for (Triggering unit)) Equal to 2) then do (Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - 160.00)) else do (Do nothing)
If ((Level of Void for (Triggering unit)) Equal to 3) then do (Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - 255.00)) else do (Do nothing)
If ((Level of Void for (Triggering unit)) Equal to 4) then do (Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - 335.00)) else do (Do nothing)
-------- These ifs determine how much damage is done depending on Level of Void. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(voidTime Greater than or equal to 18.00) or (voidTime Less than 6.00)
(voidTarget is alive) Equal to True
Then - Actions
-------- Temporarily slows movespeed of victim if spell is cast at night. --------
Set voidTargetSpeed = (Current movement speed of (Target unit of ability being cast))
Unit - Set (Target unit of ability being cast) movement speed to (voidTargetSpeed / 2.00)
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Undead\Cripple\CrippleTarget.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Undead\DarkSummoning\DarkSummonMissile.mdl
Set voidEffect = (Last created special effect)
Wait 7.00 seconds
Special Effect - Destroy voidEffect
Unit - Set voidTarget movement speed to voidTargetSpeed
Else - Actions
Do nothing
Spell 4: X Marks the Spot (Admiral Proudmoore)
MUI: No.
Import Difficulty: Medium.
-X Marks the Spot-
Marks the position of an enemy unit and sends them back to it after several seconds.
Level 1: 2 seconds.
Level 2: 3 seconds.
Level 3: 4 seconds.
Level 4: 5 seconds.
---
Screenshots:
Code:
Code:
X Marks the Spot
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to X Marks the Spot
Actions
Set xTarget = (Target unit of ability being cast)
-------- Stores who the victim is. --------
Set xPosition = (Position of xTarget)
-------- Sets the position where unit will be moved to. --------
Set xWait = ((Level of X Marks the Spot for (Triggering unit)) + 1)
-------- Sets time until unit will return to "X". --------
Set xWaitReal = (Real(xWait))
-------- Converts time integer into a real so it can be used. --------
Floating Text - Create floating text that reads X at xPosition with Z offset 0.00, using font size 19.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Set xText = (Last created floating text)
Special Effect - Create a special effect at (Position of xTarget) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the overhead of xTarget using Doodads\Cinematic\GlowingRunes\GlowingRunes4.mdl
Set xEffect = (Last created special effect)
Wait xWaitReal seconds
Special Effect - Destroy xEffect
Special Effect - Create a special effect at xPosition using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
Special Effect - Destroy (Last created special effect)
Floating Text - Destroy xText
Unit - Move xTarget instantly to xPosition
Custom script: call RemoveLocation(udg_xPosition)
Hope you guys enjoy it, I spent lots of time to make it as close to DotA as possible (with the resources I have).