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

[GUI]Malefice v1.0c [MUI]

Another tribute, now to my friend D4RK_G4ND4LF. Not difficult enough to make it worthy so I'll make one more for sure but it uses his way of indexing.

Enjoy.

DOCUMENTATION

Malefice v1.0c
by baassee

credits

bribe for indexer system (not needed if you use standalone stun system
me for stun system and spell
D4RK_G4ND4LF for his awesome way of indexing
icefrog for DOTA
-Berz- for testmap
unknown for the malefice idea for DOTA

Author's note

This spell was made as a tribute to another friend of mine - D4RK_G4ND4LF - so I coded it the way he was coding. I really should have made a more difficult spell but there will be one for sure but had to apply my stun system to something and people always love DOTA spells hehe.

Any of my stun system versions will work with this system.

Everything you need to know is explained if you follow the code comments.

Info

Focuses Darchrow's hatred on a target, causing it to take damage over time and become repeatedly stunned.

Level 1 - 30 damage and 1s stun every 2 seconds
Level 2 - 40 damage and 1s stun every 2 seconds
Level 3 - 65 damage and 1s stun every 2 seconds
Level 4 - 80 damage and 1s stun every 2 seconds

HOW TO IMPORT

1. Import dummy, dummystun and the spell.
2. Copy category named Spell into your map.
3. Fix broken tags like ability and turn on loop
4. Credit me (and bribe if you use indexer version).
5. Have fun with the spell.

Regards,
-baassee

  • Malefice Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Malefice
    • Actions
      • -------- ---------------------------------------------------------------------- --------
      • -------- increasing an integer --------
      • -------- ---------------------------------------------------------------------- --------
      • Set MaleficeMAX = (MaleficeMAX + 1)
      • -------- ---------------------------------------------------------------------- --------
      • -------- SETTINGS --------
      • -------- ---------------------------------------------------------------------- --------
      • -------- setting the caster --------
      • -------- will be the one that does the damage --------
      • -------- ---------------------------------------------------------------------- --------
      • Set MALEFICE_CASTER[MaleficeMAX] = (Triggering unit)
      • -------- ---------------------------------------------------------------------- --------
      • -------- setting the target --------
      • -------- will be the one who recieves the stun and the damage --------
      • -------- ---------------------------------------------------------------------- --------
      • Set MALEFICE_TARGET[MaleficeMAX] = (Target unit of ability being cast)
      • -------- ---------------------------------------------------------------------- --------
      • -------- heres the interval between the stun STARTS --------
      • -------- basically if I want it to stun every 2 sec and stun lasts for 1 second --------
      • -------- then I count first the stun dur 1 + the interval 2 --------
      • -------- if the duration is less than the stun --------
      • -------- the stun value will just stack (if you set it to true) or just remove the previous stun --------
      • -------- ---------------------------------------------------------------------- --------
      • Set MALEFICE_DUR[MaleficeMAX] = 3.00
      • -------- ---------------------------------------------------------------------- --------
      • -------- the damage each interval --------
      • -------- ---------------------------------------------------------------------- --------
      • Set TempInt = (Level of Malefice for MALEFICE_CASTER[MaleficeMAX])
      • -------- ---------------------------------------------------------------------- --------
      • Set MALEFICE_DAMAGE[MaleficeMAX] = (15.00 + (15.00 x (Real(TempInt))))
      • -------- ---------------------------------------------------------------------- --------
      • Custom script: set udg_MALEFICE_INTERVAL[udg_MaleficeMAX] = R2I(udg_TempInt * 0.8 + 0.5)
      • -------- ---------------------------------------------------------------------- --------
      • -------- END SETTINGS IT WILL CONTINUE BELOW --------
      • -------- ---------------------------------------------------------------------- --------
      • -------- this is the interval count --------
      • -------- ---------------------------------------------------------------------- --------
      • Set MALEFICE_COUNT[MaleficeMAX] = MALEFICE_DUR[MaleficeMAX]
      • -------- ---------------------------------------------------------------------- --------
      • -------- have to reduce the amount of intervals instantly as we trigger one with the cast --------
      • -------- ---------------------------------------------------------------------- --------
      • Set MALEFICE_INTERVAL[MaleficeMAX] = (MALEFICE_INTERVAL[MaleficeMAX] - 1)
      • -------- ---------------------------------------------------------------------- --------
      • -------- cause damage --------
      • -------- ---------------------------------------------------------------------- --------
      • Unit - Cause MALEFICE_CASTER[MaleficeMAX] to damage MALEFICE_TARGET[MaleficeMAX], dealing MALEFICE_DAMAGE[MaleficeMAX] damage of attack type Spells and damage type Magic
      • -------- ---------------------------------------------------------------------- --------
      • -------- turn on the loop --------
      • -------- ---------------------------------------------------------------------- --------
      • Trigger - Turn on Malefice Loop <gen>
      • -------- ---------------------------------------------------------------------- --------
      • -------- MORE SETTINGS --------
      • -------- ---------------------------------------------------------------------- --------
      • -------- THIS IS WHAT YOU WILL COPY INTO YOUR TRIGGER --------
      • -------- ---------------------------------------------------------------------- --------
      • -------- ---------------------------------------------------------------------- --------
      • -------- The unit that is getting stunned, can be picked unit, triggering unit etc etc. --------
      • -------- ---------------------------------------------------------------------- --------
      • Set StunUnit = MALEFICE_TARGET[MaleficeMAX]
      • -------- ---------------------------------------------------------------------- --------
      • -------- The duration the unit is being stunned. --------
      • -------- ---------------------------------------------------------------------- --------
      • Set StunDur = 1.00
      • -------- ---------------------------------------------------------------------- --------
      • -------- THE GFX that will be above the stunned unit --------
      • -------- ---------------------------------------------------------------------- --------
      • Set StunGFX = Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl
      • -------- ---------------------------------------------------------------------- --------
      • -------- and this boolean - if true - makes the stun stack with any previous stuns --------
      • -------- if false it will just be the duration of the last stun applied (this one) --------
      • -------- ---------------------------------------------------------------------- --------
      • Set StunStack = True
      • -------- ---------------------------------------------------------------------- --------
      • -------- and you're done! Can you believe it, how simple it can be? ^^ --------
      • -------- ---------------------------------------------------------------------- --------
      • -------- runs the indexing trigger --------
      • -------- check it out if you wanna learn something about triggering ^^ --------
      • -------- ---------------------------------------------------------------------- --------
      • Trigger - Run STUNRUN <gen> (checking conditions)
      • -------- ---------------------------------------------------------------------- --------
      • -------- END MORE SETTINGS --------
      • -------- go to the loop trigger if you wanna learn more --------
      • -------- ---------------------------------------------------------------------- --------

  • Malefice Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer MaleficeLoop) from 1 to MaleficeMAX, do (Actions)
        • Loop - Actions
          • -------- ---------------------------------------------------------------------- --------
          • -------- first we check these small things --------
          • -------- like there's interval counts left --------
          • -------- target is alive --------
          • -------- and is not magic immune --------
          • -------- ---------------------------------------------------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (MALEFICE_TARGET[MaleficeLoop] is dead) Equal to False
                  • MALEFICE_INTERVAL[MaleficeLoop] Greater than 0
                  • (MALEFICE_TARGET[MaleficeLoop] is Magic Immune) Equal to False
            • Then - Actions
              • -------- ---------------------------------------------------------------------- --------
              • -------- then we check our counter --------
              • -------- ---------------------------------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MALEFICE_COUNT[MaleficeLoop] Greater than 0.00
                • Then - Actions
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- reduce if it's still greater --------
                  • -------- ---------------------------------------------------------------------- --------
                  • Set MALEFICE_COUNT[MaleficeLoop] = (MALEFICE_COUNT[MaleficeLoop] - 0.03)
                • Else - Actions
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- else we lower the interval --------
                  • -------- ---------------------------------------------------------------------- --------
                  • Set MALEFICE_INTERVAL[MaleficeLoop] = (MALEFICE_INTERVAL[MaleficeLoop] - 1)
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- reset the count --------
                  • -------- ---------------------------------------------------------------------- --------
                  • Set MALEFICE_COUNT[MaleficeLoop] = MALEFICE_DUR[MaleficeLoop]
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- cause damage --------
                  • -------- ---------------------------------------------------------------------- --------
                  • Unit - Cause MALEFICE_CASTER[MaleficeMAX] to damage MALEFICE_TARGET[MaleficeMAX], dealing MALEFICE_DAMAGE[MaleficeMAX] damage of attack type Spells and damage type Magic
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- MORE SETTINGS 2 --------
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- THIS IS WHAT YOU WILL COPY INTO YOUR TRIGGER --------
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- The unit that is getting stunned, can be picked unit, triggering unit etc etc. --------
                  • -------- ---------------------------------------------------------------------- --------
                  • Set StunUnit = MALEFICE_TARGET[MaleficeLoop]
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- The duration the unit is being stunned. --------
                  • -------- ---------------------------------------------------------------------- --------
                  • Set StunDur = 1.00
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- THE GFX that will be above the stunned unit --------
                  • -------- ---------------------------------------------------------------------- --------
                  • Set StunGFX = Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- and this boolean - if true - makes the stun stack with any previous stuns --------
                  • -------- if false it will just be the duration of the last stun applied (this one) --------
                  • -------- ---------------------------------------------------------------------- --------
                  • Set StunStack = True
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- and you're done! Can you believe it, how simple it can be? ^^ --------
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- runs the indexing trigger --------
                  • -------- check it out if you wanna learn something about triggering ^^ --------
                  • -------- ---------------------------------------------------------------------- --------
                  • Trigger - Run STUNRUN <gen> (checking conditions)
                  • -------- ---------------------------------------------------------------------- --------
                  • -------- END MORE SETTINGS 2 --------
                  • -------- ---------------------------------------------------------------------- --------
            • Else - Actions
              • -------- ---------------------------------------------------------------------- --------
              • -------- if any of those conditions fail --------
              • -------- we cancel the spell --------
              • -------- and here's the D4RK_G4ND4LF tribute part --------
              • -------- the way he indexed --------
              • -------- and shifts data --------
              • -------- ---------------------------------------------------------------------- --------
              • -------- shifting data --------
              • -------- ---------------------------------------------------------------------- --------
              • Set MALEFICE_CASTER[MaleficeLoop] = MALEFICE_CASTER[MaleficeMAX]
              • Set MALEFICE_COUNT[MaleficeLoop] = MALEFICE_COUNT[MaleficeMAX]
              • Set MALEFICE_DAMAGE[MaleficeLoop] = MALEFICE_DAMAGE[MaleficeMAX]
              • Set MALEFICE_DUR[MaleficeLoop] = MALEFICE_DUR[MaleficeMAX]
              • Set MALEFICE_INTERVAL[MaleficeLoop] = MALEFICE_INTERVAL[MaleficeMAX]
              • Set MALEFICE_TARGET[MaleficeLoop] = MALEFICE_TARGET[MaleficeMAX]
              • -------- ---------------------------------------------------------------------- --------
              • -------- reduce our max --------
              • -------- and our loop integer --------
              • -------- ---------------------------------------------------------------------- --------
              • Set MaleficeMAX = (MaleficeMAX - 1)
              • Set MaleficeLoop = (MaleficeLoop - 1)
              • -------- ---------------------------------------------------------------------- --------
              • -------- and instantly checks if the loop shall continue or not --------
              • -------- ---------------------------------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MaleficeMAX Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Skip remaining actions
                • Else - Actions



Remember to credit me if used (and bribe if you use indexer version of stun system).

Sincerly,
~baassee

Keywords:
malefice, dota, mui, gui, stun, system, spell, baassee
Contents

Malefice v1.0c (Map)

Reviews
20:29, 8th Sep 2012 Magtheridon96: I'll just go ahead and approve this now.

Moderator

M

Moderator

20:29, 8th Sep 2012
Magtheridon96:

I'll just go ahead and approve this now.
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
You should have a configuration trigger that allows the user to modify the interval and duration, and possibly other things.

This way, you can avoid that whole If-Block crap and just set the interval for the new instance to Malefice_Interval[(Level of ...)].

By the way, (Ability being cast) is useless because I'm sure you already know what ability is being cast before runtime :p

I know, it makes it easier for the user to import the spell because he doesn't have to change more than one line, but to solve that, you can have a variable set to the ability in a configuration trigger.

It's a win-win :D

Right ability being cast, was just lazy I guess ^^ The other crap ain't a win-win as I explained in the PM.

EDIT:

v1.0b up, cache crap fixed

edit 2

v1.0c up formula fixed thanks to mag96, no shitty arrays needed as I said :D
 
Last edited:
Top