Spellpack Capacitor and Electric Punch

THE_X

New Member
Reaction score
49
Yes hello again, i have made yet another spellpack for your use, this is all i do most of the day!!, pathetic i know..

(All spells)
MUI/MPI - Both
GUI/Jass - GUI
Leakless - Think so
Original - I think so :D






Capacitor

CapacitorIcon.jpg


Capacitor.jpg

Creates a ball of electricty that will gather energy every second channeld dealing 100 damage for every second, after the ball has been released it will explode on the 1st enemy unit it comes into contact with or until it reaches 900 range, dealing damage to units within a 350 aoe.

Code:
Start Capacitor
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Capacitor 
    Actions
        Set Point[1] = (Position of (Triggering unit))
        Set Point[2] = (Target point of ability being cast)
        Set Point[3] = (Point[1] offset by 20.00 towards (Angle from Point[1] to Point[2]) degrees)
        Unit - Create 1 Capacitor Dummy for (Owner of (Triggering unit)) at Point[3] facing Point[2]
        Set MUI = (MUI + 1)
        Unit - Set the custom value of (Last created unit) to MUI
        Set Capacitor_Unit[(Custom value of (Last created unit))] = (Triggering unit)
        Custom script:   call RemoveLocation (udg_Point[1])
        Custom script:   call RemoveLocation (udg_Point[2])
        Custom script:   call RemoveLocation (udg_Point[3])

Code:
Set Capacitor Time
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set Group[1] = (Units of type Capacitor Dummy)
        Unit Group - Pick every unit in Group[1] and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        [COLOR="Blue"](Current order of Capacitor_Unit[(Custom value of (Picked unit))]) Equal to (Order(acidbomb))[/COLOR]
                        Capacitor_Move[(Custom value of (Picked unit))] Equal to False
                    Then - Actions
                        Set Capacitor_Time_2[(Custom value of (Picked unit))] = (Capacitor_Time_2[(Custom value of (Picked unit))] + 0.01)
                        Set Capacitor_Time[(Custom value of (Picked unit))] = (Capacitor_Time[(Custom value of (Picked unit))] + 1.00)
                        Animation - Change (Picked unit)'s size to (Capacitor_Time[(Custom value of (Picked unit))]%, Capacitor_Time[(Custom value of (Picked unit))]%, Capacitor_Time[(Custom value of (Picked unit))]%) of its original size
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Capacitor_Time_2[(Custom value of (Picked unit))] Greater than or equal to (Real((Level of Capacitor  for Capacitor_Unit[(Custom value of (Picked unit))])))
                            Then - Actions
                                Set Capacitor_Move[(Custom value of (Picked unit))] = True
                                Unit - Order Capacitor_Unit[(Custom value of (Picked unit))] to Stop
                            Else - Actions
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Capacitor_Move[(Custom value of (Picked unit))] Equal to False
                            Then - Actions
                                Set Capacitor_Move[(Custom value of (Picked unit))] = True
                                Unit - Order Capacitor_Unit[(Custom value of (Picked unit))] to Stop
                            Else - Actions
        Custom script:   call DestroyGroup (udg_Group[1])

Code:
Move Capacitor
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Set Group[1] = (Units of type Capacitor Dummy)
        Unit Group - Pick every unit in Group[1] and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Capacitor_Move[(Custom value of (Picked unit))] Equal to True
                    Then - Actions
                        Set Unit[1] = (Picked unit)
                        Set Point[1] = (Position of (Picked unit))
                        Set Point[2] = (Point[1] offset by 24.00 towards (Facing of (Picked unit)) degrees)
                        Unit - Move (Picked unit) instantly to Point[2]
                        Set Capacitor_Range[(Custom value of (Picked unit))] = (Capacitor_Range[(Custom value of (Picked unit))] + 24.00)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Capacitor_Range[(Custom value of (Picked unit))] Greater than or equal to 1500.00
                            Then - Actions
                                Unit - Remove (Picked unit) from the game
                                Special Effect - Create a special effect at Point[2] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                                Special Effect - Destroy (Last created special effect)
                                Set Group[3] = (Units within 350.00 of Point[2] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit) Equal to True) and ((
                                Unit Group - Pick every unit in Group[3] and do (Actions)
                                    Loop - Actions
                                        Set Point[3] = (Position of (Picked unit))
                                        Unit - Cause Capacitor_Unit[(Custom value of Unit[1])] to damage (Picked unit), dealing (100.00 x Capacitor_Time_2[(Custom value of Unit[1])]) damage of attack type Spells and damage type Lightning
                                        Special Effect - Create a special effect at Point[3] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                                        Special Effect - Destroy (Last created special effect)
                                        Custom script:   call RemoveLocation (udg_Point[3])
                                Custom script:   call DestroyGroup (udg_Group[3])
                            Else - Actions
                        Set Group[2] = (Units within 100.00 of Point[2] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit) Equal to True) and ((
                        Unit Group - Pick every unit in Group[2] and do (Actions)
                            Loop - Actions
                                Set Group[3] = (Units within 350.00 of Point[2] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit) Equal to True) and ((
                                Unit Group - Pick every unit in Group[3] and do (Actions)
                                    Loop - Actions
                                        Special Effect - Create a special effect at Point[2] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                                        Special Effect - Destroy (Last created special effect)
                                        Set Point[3] = (Position of (Picked unit))
                                        Unit - Remove Unit[1] from the game
                                        Unit - Cause Capacitor_Unit[(Custom value of Unit[1])] to damage (Picked unit), dealing (100.00 x Capacitor_Time_2[(Custom value of Unit[1])]) damage of attack type Spells and damage type Lightning
                                        Special Effect - Create a special effect at Point[3] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                                        Special Effect - Destroy (Last created special effect)
                                        Custom script:   call RemoveLocation (udg_Point[3])
                                Custom script:   call DestroyGroup (udg_Group[3])
                        Custom script:   call DestroyGroup (udg_Group[2])
                        Custom script:   call RemoveLocation (udg_Point[1])
                        Custom script:   call RemoveLocation (udg_Point[2])
                        Set Unit[1] = No unit
                    Else - Actions
        Custom script:   call DestroyGroup (udg_Group[1])

To import this spell, the base ability is channel and the order ID MUST be Acid Bomb, if it cant be acid bomb then change it in the spell and on the code where it is highlighted in blue


Electric Punch

ElectricPunchIcon.jpg


ElectricPunch.jpg

On every sucsesfull attack the electric demon will buid a charge up into his blade after the charge has reached maximum capacity, the next attack after will release a chain lightning.
Code:
Set Attacking Damage
    Events
        Unit - A unit Is attacked
    Conditions
    Actions
        Unit Group - Add (Attacking unit) to Attack
Code:
Set Non Attacking Damage
    Events
        Unit - A unit Starts the effect of an ability
        Unit - A unit Begins channeling an ability
        Unit - A unit Begins casting an ability
    Conditions
    Actions
        Unit Group - Remove (Triggering unit) from Attack

Code:
Electric Punch Add 1
    Events
        Unit - A unit enters (Entire map)
    Conditions
    Actions
        Trigger - Add to Electric Punch Hit <gen> the event (Unit - (Triggering unit) Takes damage)

Code:
Electric Punch Add 2
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Set Group[1] = (Units in (Playable map area))
        Unit Group - Pick every unit in Group[1] and do (Actions)
            Loop - Actions
                Trigger - Add to Electric Punch Hit <gen> the event (Unit - (Picked unit) Takes damage)
        Custom script:   call DestroyGroup (udg_Group[1])
Code:
Electric Punch Hit
    Events
    Conditions
        (Unit-type of (Damage source)) Equal to Illidan
        (Level of Electric Punch  for (Damage source)) Greater than or equal to 1
        ((Damage source) is in Attack) Equal to True
    Actions
        Set Electric_Punch_Hits[(Custom value of (Damage source))] = (Electric_Punch_Hits[(Custom value of (Damage source))] + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Electric_Punch_Hits[(Custom value of (Damage source))] Equal to (10 - (Level of Electric Punch  for (Damage source)))
            Then - Actions
                Special Effect - Create a special effect attached to the (weapon + left) of (Damage source) using Abilities\Spells\Orc\LightningShield\LightningShieldTarget.mdl
                Set Electric_Punch_Effect[(Custom value of (Damage source))] = (Last created special effect)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Electric_Punch_Hits[(Custom value of (Damage source))] Equal to (11 - (Level of Electric Punch  for (Damage source)))
                    Then - Actions
                        Set Point[1] = (Position of (Damage source))
                        Unit - Create 1 Dummy for (Owner of (Damage source)) at Point[1] facing Default building facing degrees
                        Unit - Add Electric Punch Lighting  to (Last created unit)
                        Unit - Set level of Electric Punch Lighting  for (Last created unit) to (Level of Electric Punch  for (Damage source))
                        Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Triggering unit)
                        Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                        Special Effect - Destroy Electric_Punch_Effect[(Custom value of (Damage source))]
                        Custom script:   call RemoveLocation (udg_Point[1])
                        Set Electric_Punch_Hits[(Custom value of (Damage source))] = 0
                    Else - Actions
 

Attachments

  • Capacitor and Electric Punch Spells!.w3x
    55.2 KB · Views: 293

Flare

Stops copies me!
Reaction score
662
Hmmm, why not keep all your spells for one big spellpack (of 5 or 6 spells)?

From a quick look at your code, it looks like you're able to build up the charge for Electric Punch by attacking allies (I can't see an enemy check anywhere)

Also
Code:
(Current order of Capacitor_Unit[(Custom value of (Picked unit))]) Equal to (Order([B][U]acidbomb[/U][/B]))
Set the acidbomb string in a variable at Map Init (or at the beginning of the casting trigger, it doesn't really matter). If people import the spell, and are already using something with the acidbomb Order ID (I assume you're using Channel), they will have to change your spell's Order ID and likelihood is that your spell won't work properly since the order will never be the same :p

And you need some importing instructions
 

THE_X

New Member
Reaction score
49
>Hmmm, why not keep all your spells for one big spellpack (of 5 or 6 spells)?

I get the ideas at diffrent times and make them as they come iv made a few packs that is just a whole hero this the the only one iv done with just 2 spells

>And you need some importing instructions

I'll be sure to tell how to import the spell :thup:
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Hey can i ask a question. Really nice spellpack but i can't do the Electric Punch for ranged heroes... Because it creates a dummy unit and if u move ur hero u will be far from the dummy and the lightning would look like it is spawned from the ground. Any ideas?
 

millzy

Ultra Cool Member
Reaction score
44
im realy interest in the spell Capacitor but its unbalanced for my map is there easy way of decreasing the damage of it to

lvl 1 200
lvl 2 :250
lvl 3:300

im using it as a ult spell for my thunder panda

also the special effect on the units to purge

plz reply ... i think the tread is dead
 

Nerfpl

New Member
Reaction score
53
im realy interest in the spell Capacitor but its unbalanced for my map is there easy way of decreasing the damage of it to

lvl 1 200
lvl 2 :250
lvl 3:300

im using it as a ult spell for my thunder panda

also the special effect on the units to purge

plz reply ... i think the tread is dead

cmon dude read the trigger.
 

millzy

Ultra Cool Member
Reaction score
44
i did it damages on the seconds... where do i go for the seconds to be 2 and 2.5 then 3
 

millzy

Ultra Cool Member
Reaction score
44
i cant c where it sets the seconds for the damage.....is it somthing like 1 x level of capacitor
if it is would i just be able to change it to 1.5 + 0.5 x level of capacitor
 

Kenny

Back for now.
Reaction score
202
Code:
If - Conditions
    Capacitor_Time_2[(Custom value of (Picked unit))] Greater than or equal to (Real((Level of Capacitor  for Capacitor_Unit[(Custom value of (Picked unit))])))
Then - Actions

Its in the trigger: Set Capacitor Time.

I think thats the line your looking for. You would change it to use arithmatic, then use 1.5 + (Real((Level of Capacitor for Capacitor_Unit[(Custom value of (Picked unit))]))).
 

Azlier

Old World Ghost
Reaction score
461
Ahahah, electric spells from a guy with a Tesla avatar. Good work :D.
 

gameman

It's been a long, long time.
Reaction score
96
I'm still a strong gui user, so this is very interesting! I guess spells in Gui is possible. (making fun of the fact that nearly all spells are vjass.)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top