Spellpack Hero: Rogue

H34DhUnT3r

Ultra Cool Member
Reaction score
36
hi,

this is my second spellpack

Enjoy!

MPI
Memory Leaks: No
Import Difficulty: 3/5
Lot of custom icons and abilities

Custom Abilities
-4 normal skill abilities
-2 dummy abilities

Units
1 Dummy unit
1 Custom Hero (based on Warden, with Sentry model)

4 Custom icons
A total of 9 files to import

Variables
Rush: 10 (all array)
Heart Poison: 2 (none array)
Revenge: 6 (all array, 1 should created at the time where you chose the hero, because of the Take Damage event)
Backstab: 4 (all array but one)
Testing: 1
Total: 23

=========================================
Skill 1
Rush

Surprising the enemy with a rush attack. damaging and stunning the target

Level 1: 100 damage; 3 second stun
Level 2: 225 damage; 4 second stun
Level 3: 350 damage; 5 second stun
Level 4: 475 damage; 6 second stun

Icon:
f_RushIconm_26248dd.png


Triggers:

Casting Trigger:
Code:
RushCast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Rush (Rogue)
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Triggering unit)) Equal to (Player((Integer A)))
                    Then - Actions
                        Set RH_Target[(Integer A)] = (Target unit of ability being cast)
                        Set RH_TargetPos[(Integer A)] = (Position of RH_Target[(Integer A)])
                        Set RH_Caster[(Integer A)] = (Triggering unit)
                        Set RH_CasterPos[(Integer A)] = (Position of RH_Caster[(Integer A)])
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Distance between RH_CasterPos[(Integer A)] and RH_TargetPos[(Integer A)]) Less than 500.00
                            Then - Actions
                                Game - Display to (Player group((Owner of RH_Caster[(Integer A)]))) the text: |cffff0000Target to...
                                Unit - Remove Stunned buff from RH_Target[(Integer A)]
                                Set RH_Caster[(Integer A)] = No unit
                                Set RH_Target[(Integer A)] = No unit
                                Custom script:   call RemoveLocation(udg_RH_CasterPos[bj_forLoopAIndex])
                                Custom script:   call RemoveLocation(udg_RH_TargetPos[bj_forLoopAIndex])
                                Skip remaining actions
                            Else - Actions
                        Set RH_Level[(Integer A)] = (Level of Rush (Rogue) for RH_Caster[(Integer A)])
                        Unit - Turn collision for RH_Caster[(Integer A)] Off
                        Animation - Change RH_Caster[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 80.00% transparency
                        Unit - Make RH_Caster[(Integer A)] face RH_Target[(Integer A)] over 0.00 seconds
                        Set RH_MoveAngle[(Integer A)] = (Facing of RH_Caster[(Integer A)])
                        Set RH_Rushing[(Integer A)] = True
                    Else - Actions

Moving Trigger:

Code:
RushMove
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        RH_Rushing[(Integer A)] Equal to True
                    Then - Actions
                        Set RH_PrevPos[(Integer A)] = (Position of RH_Caster[(Integer A)])
                        Set RH_MovePoint[(Integer A)] = (RH_PrevPos[(Integer A)] offset by 10.00 towards RH_MoveAngle[(Integer A)] degrees)
                        Unit - Move RH_Caster[(Integer A)] instantly to RH_MovePoint[(Integer A)]
                        Unit - Make RH_Caster[(Integer A)] face RH_Target[(Integer A)] over 0.00 seconds
                        Set RH_MoveAngle[(Integer A)] = (Facing of RH_Caster[(Integer A)])
                        Special Effect - Create a special effect at RH_MovePoint[(Integer A)] using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
                        Special Effect - Destroy (Last created special effect)
                        Custom script:   call RemoveLocation(udg_RH_PrevPos[bj_forLoopAIndex])
                        Custom script:   call RemoveLocation(udg_RH_MovePoint[bj_forLoopAIndex])
                    Else - Actions

Disable Trigger:

Code:
RushDis
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (RH_Target[(Integer A)] has buff Stunned) Equal to True
                    Then - Actions
                        Unit - Cause RH_Caster[(Integer A)] to damage RH_Target[(Integer A)], dealing ((Real(RH_Level[(Integer A)])) x 125.00) damage of attack type Spells and damage type Normal
                        Animation - Change RH_Caster[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                        Animation - Play RH_Caster[(Integer A)]'s attack animation
                        Unit - Turn collision for RH_Caster[(Integer A)] On
                        Set RH_Rushing[(Integer A)] = False
                        Set RH_Caster[(Integer A)] = No unit
                        Set RH_Target[(Integer A)] = No unit
                    Else - Actions

Screenshot:
f_RushSSm_2b4060c.png


Skill 2
Heart Poison

Gives random stuns to the target unit.

Level 1: lasts 20 seconds
Level 2: lasts 40 seconds
Level 3: lasts 60 seconds
Level 4: lasts 80 seconds

Icon:
f_HeartPoisonm_2917c31.png


Trigger:

Code:
HeartPoison
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set HP_TmpGroup = (Units in (Playable map area) matching (((Matching unit) has buff Heart Poison ) Equal to True))
        Unit Group - Pick every unit in HP_TmpGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Random integer number between 1 and 10) Equal to 1
                    Then - Actions
                        Set HP_TargetPos = (Position of (Picked unit))
                        Unit - Create 1 Dummy for (Random player from (All enemies of (Owner of (Picked unit)))) at HP_TargetPos facing Default building facing degrees
                        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                        Unit - Order (Last created unit) to Neutral - Hurl Boulder (Picked unit)
                        Custom script:   call RemoveLocation(udg_HP_TargetPos)
                    Else - Actions
        Custom script:   call DestroyGroup(udg_HP_TmpGroup)

Screenshot:
N/A

Skill 3
Revenge

Gives a 10% chance to evade the attack of an enemy unit and damage the attacking unit.

Level 1: Dealing 100 damage
Level 2: Dealing 200 damage
Level 3: Dealing 300 damage
Level 4: Dealing 400 damage

Icon:
f_RevengeIconm_1a5f439.png


Trigger:

Code:
Revenge
    Events
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Map_Hero_Revenge[(Integer A)] Equal to (Triggering unit)
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Revenge (Rogue) for (Triggering unit)) Greater than or equal to 1
                                (Random integer number between 1 and 10) Equal to 1
                            Then - Actions
                                Set RV_Level[(Integer A)] = (Level of Revenge (Rogue) for (Triggering unit))
                                Set RV_Hero[(Integer A)] = (Triggering unit)
                                Set RV_SpecialPoint[(Integer A)] = (Position of RV_Hero[(Integer A)])
                                Set RV_DamageTaken[(Integer A)] = (Damage taken)
                                Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + RV_DamageTaken[(Integer A)])
                                Set RV_Angle[(Integer A)] = (Facing of (Damage source))
                                Set RV_AttackerPos[(Integer A)] = (Position of (Damage source))
                                Set RV_MovePoint[(Integer A)] = (RV_AttackerPos[(Integer A)] offset by 70.00 towards (RV_Angle[(Integer A)] + 180.00) degrees)
                                Special Effect - Create a special effect at RV_SpecialPoint[(Integer A)] using Abilities\Spells\Orc\FeralSpirit\feralspirittarget.mdl
                                Unit - Move RV_Hero[(Integer A)] instantly to RV_MovePoint[(Integer A)], facing RV_AttackerPos[(Integer A)]
                                Unit - Create 1 Dummy for (Owner of (Triggering unit)) at RV_MovePoint[(Integer A)] facing Default building facing degrees
                                Unit - Set level of Revenge (Dummy) for (Last created unit) to RV_Level[(Integer A)]
                                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                                Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Damage source)
                                Special Effect - Destroy (Last created special effect)
                                Custom script:   call RemoveLocation(udg_RV_MovePoint[bj_forLoopAIndex])
                                Custom script:   call RemoveLocation(udg_RV_AttackerPos[bj_forLoopAIndex])
                                Custom script:   call RemoveLocation(udg_RV_SpecialPoint[bj_forLoopAIndex])
                            Else - Actions
                    Else - Actions

Screenshot:
f_RevengeSSm_578ebbf.png


Skill 4 (Ultimate)
Backstab

Backstabbing an enemy hero, reducing it's attributes by 50%. Lasts 15 seconds

Level 1: 180 second cooldown, 210 mana cost
Level 2: 150 second cooldown, 180 mana cost
Level 3: 120 second cooldown, 150 mana cost

Icon:
f_BackstabIcom_09921aa.png


Triggers:

Casting trigger:
Code:
BackSCast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Backstab (Rogue)
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Triggering unit)) Equal to (Player((Integer A)))
                    Then - Actions
                        Set BS_Target[(Integer A)] = (Target unit of ability being cast)
                        Set BS_StrSet[(Integer A)] = ((Strength of BS_Target[(Integer A)] (Exclude bonuses)) / 2)
                        Set BS_AgiSet[(Integer A)] = ((Agility of BS_Target[(Integer A)] (Exclude bonuses)) / 2)
                        Set BS_IntSet[(Integer A)] = ((Intelligence of BS_Target[(Integer A)] (Exclude bonuses)) / 2)
                        Hero - Modify Strength of BS_Target[(Integer A)]: Subtract BS_StrSet[(Integer A)]
                        Hero - Modify Agility of BS_Target[(Integer A)]: Subtract BS_AgiSet[(Integer A)]
                        Hero - Modify Intelligence of BS_Target[(Integer A)]: Subtract BS_IntSet[(Integer A)]
                    Else - Actions

Remove Trigger
Code:
BackSRemove
    Events
        Time - Every 0.20 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (BS_Target[(Integer A)] has buff Backstab ) Equal to True
                    Then - Actions
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (BS_Target[(Integer A)] has buff Backstab ) Equal to False
                    Then - Actions
                        Hero - Modify Strength of BS_Target[(Integer A)]: Add BS_StrSet[(Integer A)]
                        Hero - Modify Agility of BS_Target[(Integer A)]: Add BS_AgiSet[(Integer A)]
                        Hero - Modify Intelligence of BS_Target[(Integer A)]: Add BS_IntSet[(Integer A)]
                        Set BS_Target[(Integer A)] = No unit
                    Else - Actions
                        Special Effect - Create a special effect attached to the chest of BS_Target[(Integer A)] using Objects\Spawnmodels\Orc\Orcblood\HeroShadowHunterBlood.mdl
                        Special Effect - Destroy (Last created special effect)

Screenshot:
N/A

=========================================

Greetings,
H34DhUnT3r[NL]
 

Attachments

  • [Spellpack] Rogue.w3x
    69.6 KB · Views: 288

T3rm1nat0r

New Member
Reaction score
23
Cool, i like the icon, but are we suposed to coment on it or something?? Well i say it worked weel for me! I might use it for one of my projects! Thanx!
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
You should have posted this in the resources forum. No matter, let's review your code.

#1: Why didn't you simply make the casting range of this ability to 500 instead of displaying a messege if the unit is too far? Simplest way really... Also in the first trigger no need to use Integer A use player's id. Also, what happens if the unit moves during this? Lastly 10 pixels per ~.1 seconds is not very fast.

#2: What if the unit you casted the spell upon in neutral hostile or an ally of it? It won't work in this case...

#3: Looking for events... Post the trigger that add those. Also you are not using waits nor timer, thus this is MUI and you don't need to use arrays.

#4: This is not even MPI as each player may cast it on only 1 target... Also you got an extra if / then / else there.
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
your rush is cool but if you do it without being in range it stuns the target, too
because your using
Code:
    Events
        Unit - A unit Starts the effect of an ability
use
Code:
A unit finishes casting an ability
 
A

Alpha600

Guest
your rush is cool but if you do it without being in range it stuns the target, too
because your using
Code:
    Events
        Unit - A unit Starts the effect of an ability
use
Code:
A unit finishes casting an ability

Then you can animation cancel it...no.
 

H34DhUnT3r

Ultra Cool Member
Reaction score
36
@ T3rm1nat0r:
thx for the positive comment, hope to see my Rogue in your project one day :)

@ Rheias:
#1: its not about being to far.. it's about being to close. If a unit is within a 500 range of the targeted unit it cancels the ability cuz you are too close (that's also what the messages says)

#2: Not sure what you mean by that

#3: i already was affraid that that might not be clear. The events of that trigger (Revenge) must be added on the time that the hero chooses the hero (the time that the unit is created). If you check the initialization trigger you see that the events are added there. I forgot to mention that.

#4: I don't see why it's not MPI.. you don't reset the cooldown of the abilities in a normal game so the duration is always shorter then the cooldown. This way one player will not be able to target another unit.

@ Drunken_God:
All i can say is: wrong. The ability is already cast so i don't see the problem.. It should stun when it is in range. Or didn't I understand what you mean?

@ Alpha600:
Was that pointed at Drunken_God?

Anyway thx for all the replies and if you be so kind to rate the spellpack, that would be awesome :)

Greetings,
H34DhUnT3r[NL]
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
#2 You create the dummy that casts the spell for neutral hostile, however, what if the target of the original spell is neutral hostile?

#4 Try to cast the spell with the same unit on two different targets. You are going to have a lot of problems.
 

H34DhUnT3r

Ultra Cool Member
Reaction score
36
#2 You create the dummy that casts the spell for neutral hostile, however, what if the target of the original spell is neutral hostile?

#4 Try to cast the spell with the same unit on two different targets. You are going to have a lot of problems.

#2: ow like that.. well i changed it to "(random player from (all enemies of (owner of (picked unit))))"

#4: it isn't possible unless you create another hero of the same type, cuz the duration is shorter then the cooldown. So it is MPI, just not MUI.

Greetings,
H34DhUnT3r[NL]
 

NapaHero

Back from the dead...
Reaction score
43
Nice ones +Rep.

Isn't Rush the ability that you were asking help? How did you solve it?
 

H34DhUnT3r

Ultra Cool Member
Reaction score
36
Nice ones +Rep.

Isn't Rush the ability that you were asking help? How did you solve it?

Thank you for the rep :rolleyes: and yes that was the one :) i solved it by spreading the trigger over 3 triggers, this way there wasn't any looping which was probably the main problem.. anyway it works now :p

Greetings,
H34DhUnT3r[NL]
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top