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

Status
Not open for further replies.
Level 7
Joined
Jul 9, 2008
Messages
253
Hello Hive Community, so I'm busy with this map and I need this spell that channels the target for 3 seconds ( also doing a lightning effect ) and deals damage every second. Something like Mind Flay from WoW :p. Doesn't need to be anything advance, just something I can work with.

I'll do things like, icon, damage, tooltip. I just need the basic concept.

Would like to have it in either JASS (not vJASS) or GUI.

Ask me if there are any questions.

Thanks in advance, Quetzalcotl.
 
Level 7
Joined
Jul 9, 2008
Messages
253
That's correct, and it also needs to stop damaging when you stop channeling :p, I want to the damage to be based on stats so that's why I need it triggered.
 
Level 7
Joined
Jul 9, 2008
Messages
253
Sorry for the insane late reaction, I guess any stats would do :p. Aslong I can change it somehow everything is fine.

Thanks for helping btw
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Mind Flay
  • Actions
    • Set MindFlay_Max = (MindFlay_Max + 1)
    • Set MindFlay_Caster[MindFlay_Max] = (Triggering unit)
    • Set MindFlay_Target[MindFlay_Max] = (Target unit of ability being cast)
    • Set loc = (Position of MindFlay_Caster[MindFlay_Max])
    • Set loc2 = (Position of MindFlay_Target[MindFlay_Max])
    • Lightning - Create a Finger of Death lightning effect from source loc to target loc2
    • Set MindFlay_Lightning[MindFlay_Max] = (Last created lightning effect)
    • Set MindFlay_Damage[MindFlay_Max] = (5.00 x (Real((Intelligence of MindFlay_Caster[MindFlay_Max] (Include bonuses)))))
    • Set MindFlay_Counter_Max[MindFlay_Max] = 33.00
    • Set MindFlay_Counter[MindFlay_Max] = 0.00
    • Custom script: call RemoveLocation( udg_loc )
    • Custom script: call RemoveLocation( udg_loc2 )
    • Trigger - Turn on Mind Flay Loop <gen>
  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
    • For each (Integer i) from 1 to MindFlay_Max, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Current order of MindFlay_Caster[i]) Equal to (Order(channel))
            • MindFlay_Caster[i] Not equal to No unit
            • MindFlay_Target[i] Not equal to No unit
            • (Life of MindFlay_Caster[i]) Greater than 0.00
            • (Life of MindFlay_Target[i]) Greater than 0.00
            • (MindFlay_Target[i] is visible to (Owner of MindFlay_Caster[i])) Equal to True
            • (MindFlay_Target[i] is Magic Immune) Equal to False
          • Then - Actions
            • -------- If everything is alright the spell will be casted --------
            • Set MindFlay_Counter[i] = (MindFlay_Counter[i] + 1.00)
            • -------- If the counter is equal to some value we deal dmg --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • MindFlay_Counter[i] Equal to MindFlay_Counter_Max[i]
              • Then - Actions
                • Set MindFlay_Counter[i] = 0.00
                • Unit - Cause MindFlay_Caster[i] to damage MindFlay_Target[i], dealing MindFlay_Damage[i] damage of attack type Spells and damage type Normal
                • Special Effect - Create a special effect attached to the origin of MindFlay_Target[i] using Abilities\Weapons\VengeanceMissile\VengeanceMissile.mdl
                • Special Effect - Destroy (Last created special effect)
                • -------- Show damage with floating text --------
                • Floating Text - Create floating text that reads (String((Integer(MindFlay_Damage[i])))) above MindFlay_Target[i] with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                • Floating Text - Set the velocity of (Last created floating text) to 90.00 towards 90.00 degrees
                • Floating Text - Change (Last created floating text): Disable permanence
                • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                • -------- And hide it for all players which should be unable to see it --------
                • Set playergroup = (All players matching ((MindFlay_Target[i] is visible to (Matching player)) Equal to False))
                • Floating Text - Hide (Last created floating text) for playergroup
                • Custom script: call DestroyForce( udg_playergroup )
              • Else - Actions
            • Set loc = (Position of MindFlay_Caster[i])
            • Set loc2 = (Position of MindFlay_Target[i])
            • Lightning - Move MindFlay_Lightning[i] to source loc and target loc2
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Distance between loc and loc2) Greater than 1000.00
              • Then - Actions
                • -------- If the distance is to big we stop everything be removing the target --------
                • Set MindFlay_Target[i] = No unit
              • Else - Actions
            • Custom script: call RemoveLocation( udg_loc )
            • Custom script: call RemoveLocation( udg_loc2 )
          • Else - Actions
            • -------- Else we destroy everything and sort data --------
            • Lightning - Destroy MindFlay_Lightning[i]
            • Set MindFlay_Caster[i] = MindFlay_Caster[MindFlay_Max]
            • Set MindFlay_Target[i] = MindFlay_Target[MindFlay_Max]
            • Set MindFlay_Counter[i] = MindFlay_Counter[MindFlay_Max]
            • Set MindFlay_Counter_Max[i] = MindFlay_Counter_Max[MindFlay_Max]
            • Set MindFlay_Damage[i] = MindFlay_Damage[MindFlay_Max]
            • Set MindFlay_Lightning[i] = MindFlay_Lightning[MindFlay_Max]
            • Set MindFlay_Max = (MindFlay_Max - 1)
            • Set i = (i - 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • MindFlay_Max Less than 1
      • Then - Actions
        • Trigger - Turn off (This trigger)
      • Else - Actions
20 mins of work and it was rdy..routine rocks! :D

however I didn't test it properly though but it looks nice this far

(the spell will suck with flying units and this can only be fixed with JASS.....if you want that too just ask and wait until tomorrow)

notes:
channeling will stack so you can cast the spell more then once on a single target without stopping the spell
if the caster stops for less then 0.03 sec it will be handled as if he didn't stop
if you want it that way: add all casters to a unitgroup and remove them from the array if they do/cast something else
 

Attachments

  • Mind Flay.w3x
    16.5 KB · Views: 83
Status
Not open for further replies.
Top