Spellpack Mountain King

jackall

You can change this now in User CP.
Reaction score
37
Hello helpers, this is my first spellpack so dont yell at me if i did something wrong, ok?
Import Difficulty: easy, i guess
MUI: idk, but whos gonna use the spells anyway
Lagless: yes
Leakless: pretty much

Spells: Storm Hammer, Thunder Clap, Dwarf Might, Avatar

Storm Hammer
Manacost: 130/155/180
Cooldown: 13/10/7 seconds
Effect: Sends a hammer(storm bolt model) towards the target point/unit, purges and damages all units it hits
Damage: 125/250/375
Paralise: Hero 1 second, unit 1/2/3 seconds
Slow(Purge slow): 3/4/6

Thunder Clap
Manacost: 90/100/110
Cooldown: 6 seconds
Effects: Makes units with 350 range of the caster face him, get knockbacked 250 units and receive 5 damage every 0.04 seconds

Dwarf Might
Bash with the name changed, i tried adding a sound to it but it wouldnt play

Avatar
Acts like normal avatar but slows down units 450 range around the caster and shrink by 10%
Slow: Attackspeed 30%
Movespeed 20%

CODES
Storm Hammer
Trigger:
  • Storm Hammer Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Hammer
    • Actions
      • Set StormHammerCount = (StormHammerCount + 1)
      • Set StormHammerCaster[StormHammerCount] = (Triggering unit)
      • Set StormHammerAngle = (Angle from (Position of (Triggering unit)) to (Target point of ability being cast))
      • Set StormHammerOwner[StormHammerCount] = (Owner of (Triggering unit))
      • Set StormHammerPoint[StormHammerCount] = (Position of StormHammerCaster[StormHammerCount])
      • Unit - Create 1 stormHammer for StormHammerOwner[StormHammerCount] at StormHammerPoint[StormHammerCount] facing StormHammerAngle degrees
      • Unit - Set the custom value of (Last created unit) to StormHammerCount
      • Unit Group - Add (Last created unit) to StormHammerDummyGroup
      • Unit - Add stormHammerSlow to (Last created unit)
      • Unit - Set level of stormHammerSlow for (Last created unit) to (Level of Storm Hammer for (Triggering unit))
      • Set StormHammerRemaining[StormHammerCount] = 1250.00
      • Set StormHammerDistance = (StormHammerRemaining[StormHammerCount] x 0.04)
      • Custom script: call RemoveLocation( udg_StormHammerPoint[udg_StormHammerCount] )
      • Trigger - Turn on Storm Hammer Slide <gen>

Trigger:
  • Storm Hammer Slide
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in StormHammerDummyGroup and do (Actions)
        • Loop - Actions
          • Set StormHammerCustomValue = (Custom value of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • StormHammerRemaining[StormHammerCustomValue] Greater than 0.00
            • Then - Actions
              • Unit - Add a 1.35 second Generic expiration timer to (Picked unit)
              • Set StormHammerRemaining[StormHammerCustomValue] = (StormHammerRemaining[StormHammerCustomValue] - 50.00)
              • Set StormHammerNextPoint[StormHammerCustomValue] = ((Position of (Picked unit)) offset by StormHammerDistance towards (Facing of (Picked unit)) degrees)
              • Unit - Move (Picked unit) instantly to StormHammerNextPoint[StormHammerCustomValue]
              • Special Effect - Create a special effect at StormHammerNextPoint[StormHammerCustomValue] using Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl
              • Set StormHammerGroup[StormHammerCustomValue] = (Units within 200.00 of StormHammerNextPoint[StormHammerCustomValue] matching ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and ((((Matching unit) has buff Storm Hammer ) Equal to False) and (((Matching unit) is alive) Equ
              • Special Effect - Destroy (Last created special effect)
              • Set StormHammerCastDummy[StormHammerCustomValue] = (Picked unit)
              • Unit Group - Pick every unit in StormHammerGroup[StormHammerCustomValue] and do (Actions)
                • Loop - Actions
                  • Unit - Cause (Picked unit) to damage (Picked unit), dealing (125.00 x (Real((Level of Storm Hammer for StormHammerCaster[StormHammerCustomValue])))) damage of attack type Chaos and damage type Universal
                  • Unit - Order StormHammerCastDummy[StormHammerCustomValue] to Orc Shaman - Purge (Picked unit)
                  • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl
                  • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in StormHammerDummyGroup) Equal to 0
                • Then - Actions
                  • Custom script: call DestroyGroup( udg_StormHammerGroup[udg_StormHammerCustomValue] )
                  • Custom script: call DestroyGroup( udg_StormHammerDummyGroup )
                  • Custom script: call RemoveLocation( udg_StormHammerNextPoint[udg_StormHammerCustomValue] )
                  • Trigger - Turn off (This trigger)
                • Else - Actions

Thunder Clap
Trigger:
  • Thunder Clap Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Clap
    • Actions
      • Set ThunderClapCount = (ThunderClapCount + 1)
      • Set ThunderClapCaster[ThunderClapCount] = (Triggering unit)
      • Set ThunderClapGroup[ThunderClapCount] = (Units within 350.00 of (Position of (Triggering unit)) matching ((((Matching unit) belongs to an enemy of (Owner of ThunderClapCaster[ThunderClapCount])) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Set ThunderClapDistance = (250.00 x 0.04)
      • Set ThunderClapRemaining[ThunderClapCount] = 250.00
      • Trigger - Turn on Thunder Clap Slide <gen>

Trigger:
  • Thunder Clap Slide
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ThunderClapRemaining[ThunderClapCount] Greater than 0.00
        • Then - Actions
          • Set ThunderClapRemaining[ThunderClapCount] = (ThunderClapRemaining[ThunderClapCount] - ThunderClapDistance)
          • Unit Group - Pick every unit in ThunderClapGroup[ThunderClapCount] and do (Actions)
            • Loop - Actions
              • Unit - Make (Picked unit) face ThunderClapCaster[ThunderClapCount] over 0.00 seconds
              • Set ThunderClapAngle[ThunderClapCount] = ((Facing of (Picked unit)) + 180.00)
              • Set ThunderClapNextPoint[ThunderClapCount] = ((Position of (Picked unit)) offset by ThunderClapDistance towards ThunderClapAngle[ThunderClapCount] degrees)
              • Unit - Move (Picked unit) instantly to ThunderClapNextPoint[ThunderClapCount]
              • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl
              • Unit - Cause ThunderClapCaster[ThunderClapCount] to damage (Picked unit), dealing (ThunderClapDistance x 0.50) damage of attack type Spells and damage type Normal
              • Unit - Pause (Picked unit)
              • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ThunderClapRemaining[ThunderClapCount] Less than or equal to 0.00
            • Then - Actions
              • Unit Group - Pick every unit in ThunderClapGroup[ThunderClapCount] and do (Actions)
                • Loop - Actions
                  • Unit - Unpause (Picked unit)
              • Custom script: call DestroyGroup( udg_ThunderClapGroup[udg_ThunderClapCount] )
              • Trigger - Turn off (This trigger)
            • Else - Actions

Avatar
Trigger:
  • Avatar Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Avatar
    • Actions
      • Set AvatarCount = (AvatarCount + 1)
      • Set AvatarCaster[AvatarCount] = (Triggering unit)
      • Set AvatarOwner[AvatarCount] = (Owner of AvatarCaster[AvatarCount])
      • Set AvatarPoint[AvatarCount] = (Position of AvatarCaster[AvatarCount])
      • Unit - Create 1 avatarDummy for AvatarOwner[AvatarCount] at AvatarPoint[AvatarCount] facing Default building facing degrees
      • Set AvatarDummy[AvatarCount] = (Last created unit)
      • Unit - Add avatarSlow to AvatarDummy[AvatarCount]
      • Unit - Set level of avatarSlow for AvatarDummy[AvatarCount] to 1
      • Unit - Add a 10.00 second Generic expiration timer to AvatarDummy[AvatarCount]
      • Trigger - Run Avatar Slow <gen> (ignoring conditions)

Trigger:
  • Avatar Slow
    • Events
    • Conditions
    • Actions
      • Set AvatarGroup[AvatarCount] = (Units within 450.00 of AvatarPoint[AvatarCount] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Storm Hammer ) Not equal to True)) and (((Matching unit) belongs to an enemy of (Owner of AvatarCaster[AvatarCount])) Equal t
      • Unit Group - Pick every unit in AvatarGroup[AvatarCount] and do (Actions)
        • Loop - Actions
          • Unit - Order AvatarDummy[AvatarCount] to Orc Shaman - Purge (Picked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in AvatarGroup[AvatarCount]) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Custom script: call RemoveLocation( udg_AvatarPoint[udg_AvatarCount] )
          • Custom script: call DestroyGroup( udg_AvatarGroup[udg_AvatarCount] )
        • Else - Actions

ok, it's kinda solved, ill upload the first version as i am still working on making it MUI(ITS MY FIRST SPELLPACK and im using it in an RPG where 2 players or more cant choose the same hero thus i dont need it MUI

UPDATE: uploaded the MUI SH, working on TC(name&func) and Avatar
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Please, post the codes for the spell here too :D
Much easier to review it then ;)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Have you actually tried these spells out, I mean with several units at one time ?! I think you've got the GUI MUI stuff wrong, my friend :S
 

Hatebreeder

So many apples
Reaction score
381
Sorry to say this but...
This submission does not have any PICTURES ! of the Spells you created =)

Could you be so kind and add them to you post?
Also put the code in spoiler tags.
 

Sevion

The DIY Ninja
Reaction score
413
I suggest you also fix your code. "For some reason dummy won't cast Slow" "Sound won't play"...
 

BlackRose

Forum User
Reaction score
239
o_O
0.5kb per second.

How big is it your map anyway, it doesn't take that long to upload like 30kb.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
I hope he means 0.5MB/sec, because 0.5KB/sec just seems too slow...
 

Tyman2007

Ya Rly >.
Reaction score
74
And I hope he's referring to kilobytes instead of kilobits as well.

That would suck.

Tin can internet maybe? My friend did that once. Was very unstable, but worked.
 

jackall

You can change this now in User CP.
Reaction score
37
"repaired" Storm Hammer and made it MUI(tested with 3 MK's)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Good :D Exactly what I meant (With my post) for you to do :p

(Only Thunder Clap left now :p)

Just one suggestion... You really should come up with some "custom" names for them :thup:
 

jackall

You can change this now in User CP.
Reaction score
37
ok kom, i failed to upload the map cuz there was a power surge last night and the power supply on my old pc(on which im working) is OFO for now... but today im going to the highschool and ill search for a new PS and try to get it repaired asap
 

Avaleirra

Is back. Probably.
Reaction score
128
I like the storm hammer ability, mind if I use it?

P.S. I will give you credit if you want it, if not rep (or both :p)
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Storm Hammer

Trigger:
  • Set StormHammerNextPoint[StormHammerCustomValue] = ((Position of (Picked unit)) offset by StormHammerDistance towards (Facing of (Picked unit)) degrees)


Trigger:
  • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl


Position of (Picked unit) leaks in both of these.

The first one will also leak MANY locations, since the variable is overwritten EVERY 0.04 seconds for EVERY storm hammer. Your line to remove the leak is in the Else conditions, which means it will only remove the last location of the spell when it ends. The StormHammerGroup[StormHammerCustomValue] does the same exact thing. Your StormHammerPoint[StormHammerCustomValue] will never have the leak removed, which means it will leak on every cast of the spell.

Trigger:
  • Unit - Cause (Picked unit) to damage (Picked unit), dealing (125.00 x (Real((Level of Storm Hammer for StormHammerCaster[StormHammerCustomValue])))) damage of attack type Chaos and damage type Universal


I don't think this will do what you expect it. The game has no way of knowing which 'Picked unit' is which, and it will use the inner loop 'Picked unit'. In other words, the units getting hit by this function will be killing themselves, as far as the game is concerned. No bounty gain for the actual killing unit.

Trigger:
  • Unit - Order StormHammerCastDummy[StormHammerCustomValue] to Orc Shaman - Purge (Picked unit)


Unless your StormHammerCastDummy unit has a 0 second casting time, never has to change angles to cast Purge, and has 0 for its cast backswing and cast point, your dummy is only going to Purge the very last unit (if you're very lucky, as he only has 0.04 seconds just to hit that one unit).

Trigger:
  • Trigger - Turn off (This trigger)


Why do you turn off the trigger when ONE spell ends? What happens if you have multiple spells running? You should have an integer keeping count of the number of spells running, and when THAT integer hits 0, pause it.

Thunder Clap

Trigger:
  • Set ThunderClapGroup[ThunderClapCount] = (Units within 350.00 of (Position of (Triggering unit)) matching ((((Matching unit) belongs to an enemy of (Owner of ThunderClapCaster[ThunderClapCount])) Equal to True) and (((Matching unit) is alive) Equal to True)))


Leaks Position of (Picked unit)

Trigger:
  • Set ThunderClapNextPoint[ThunderClapCount] = ((Position of (Picked unit)) offset by ThunderClapDistance towards ThunderClapAngle[ThunderClapCount] degrees)


This point will overwrite itself every 0.04 seconds, for every instance of the ability. That's a lot of leaks. It also leaks Position of (Picked unit)

Trigger:
  • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl


Leaks Position of (Picked unit)

Trigger:
  • Trigger - Turn off (This trigger)


(Again!?) Why do you turn off the trigger when ONE spell ends? What happens if you have multiple spells running? You should have an integer keeping count of the number of spells running, and when THAT integer hits 0, pause it.

Avatar

Why did you split this into multiple triggers? The fact that there's no waiting involved means that it's MUI.

You also never remove units from the AvatarGroup.

Trigger:
  • Unit Group - Pick every unit in AvatarGroup[AvatarCount] and do (Actions)
    • Loop - Actions
      • Unit - Order AvatarDummy[AvatarCount] to Orc Shaman - Purge (Picked unit)


Why are you ordering the dummy to purge every unit that has ever used Avatar?

I don't think you've extensively tested this, there are many leaks, and many problems with the code. I'm going to graveyard this until you bring it into working order, and up to our Leakless standards. :eek:
 
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