• 🏆 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!

Spell Request Plague

Status
Not open for further replies.
I need a spell made from scratch. Targets a unit from melee range and infects that unit with plague (Adds Buff) Damages the unit 60 DPS for 5 seconds. After 5 Seconds or the infected unit dies, the infection spreads to units in range of 250 of the unit (The unit that passed the infection does not get it from him self (That would be ridiculous)). And the infected units in range take the same damage for the same amount of time. And passes on after 5 seconds. If someone needs further Explanation send me a private message If it can be made in GUI(MUI) that would be great (Because i needz to learn)
 
Last edited:
Level 14
Joined
Mar 30, 2009
Messages
971
wouldnt that result in infinity spread, ended only by the death of recipients?
i mean e.g. unit 1 gets infected, 5 seconds pass (300 damage), unit 2 gets infected (is in 250 range), 5 seconds pass (also gets 300 damage), unit 1 gets infected (is still in 250 range), 5 seconds pass, unit 2 gets infected (is still in 250 range), 5 seconds pass, unit 1 gets infected (is still in 250 range), 5 seconds pass, unit 2 gets infected (is still in 250 range), 5 seconds pass... actually everyone is already dead due to the 60 dps.

btw can the caster be infected himself (e.g. when the infected unit follows the caster for 5 seconds and the caster cannot exit the 250 range)?
 
Level 11
Joined
Feb 11, 2010
Messages
199
I need a spell made from scratch. Targets a unit from melee range and infects that unit with plague (Adds Buff) Damages the unit 60 DPS for 5 seconds. After 5 Seconds or the infected unit dies, the infection spreads to units in range of 250 of the unit (The unit that passed the infection does not get it from him self (That would be ridiculous)). And the infected units in range take the same damage for the same amount of time. And passes on after 5 seconds. If someone needs further Explanation send me a private message If it can be made in GUI(MUI) that would be great (Because i needz to learn)

GUI(MUI) huh?

Shouldn't be too hard. Here you go! I made this quickly, but it should be MUI and all that. Tell me if you need anything else.

  • Plague
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Plague
    • Actions
      • Set Plague = (Plague + 1)
      • Set PlagueSkip = (PlagueSkip + 1)
      • Set PlagueArea = 250.00
      • Set PlagueOwner[Plague] = (Owner of (Triggering unit))
      • Unit Group - Add (Target unit of ability being cast) to PlagueGroup[Plague]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlagueSkip Equal to 1
        • Then - Actions
          • Trigger - Turn on Plague Loop <gen>
        • Else - Actions
  • Plague Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer PlagueA) from 1 to Plague, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (PlagueGroup[PlagueA] is empty) Equal to True
            • Then - Actions
              • Set PlagueSkip = (PlagueSkip - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PlagueSkip Equal to 0
                • Then - Actions
                  • Set Plague = 0
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • Unit Group - Pick every unit in PlagueGroup[PlagueA] and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) has buff Plague ) Equal to False
                    • Then - Actions
                      • Unit Group - Remove (Picked unit) from PlagueGroup[PlagueA]
                      • Unit - Kill (Picked unit)
                    • Else - Actions
                      • Set PlaguePoint[PlagueA] = (Position of (Picked unit))
                      • Set PlagueCheckGroup = (Units within PlagueArea of PlaguePoint[PlagueA])
                      • Unit Group - Pick every unit in PlagueCheckGroup and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Picked unit) has buff Plague ) Equal to False
                              • ((Owner of (Picked unit)) is an enemy of PlagueOwner[PlagueA]) Equal to True
                              • ((Picked unit) is Magic Immune) Equal to False
                              • ((Picked unit) is A flying unit) Equal to False
                              • ((Picked unit) is Mechanical) Equal to False
                              • ((Picked unit) is Undead) Equal to False
                            • Then - Actions
                              • Unit Group - Add (Picked unit) to PlagueGroup[PlagueA]
                              • Set PlaguePoint2[PlagueA] = (Position of (Picked unit))
                              • Unit - Create 1 WCDummy for PlagueOwner[PlagueA] at PlaguePoint2[PlagueA] facing Default building facing degrees
                              • Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)
                              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                              • Custom script: call RemoveLocation(udg_PlaguePoint2[udg_PlagueA])
                            • Else - Actions
                      • Custom script: call RemoveLocation(udg_PlaguePoint[udg_PlagueA])
                      • Custom script: call DestroyGroup(udg_PlagueCheckGroup)
See attached map file. Remember to turn on "automatically create unknown variables when pasting trigger data" in your World Editor to easily import my code. Make sure you credit and all that jazz.
 

Attachments

  • Plague.w3x
    199.2 KB · Views: 60
Last edited:
Status
Not open for further replies.
Top