• 🏆 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] Increase level of this spell

Status
Not open for further replies.
Level 5
Joined
Jan 5, 2019
Messages
108
Hey i would like to know if i can increase the level of this ability, by leveling it up from a shop.

  • [/B][/B]
  • Learn Ability
  • [B][B] Events
    • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Permanent
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempItem = (Item being manipulated)
      • For each (Integer A) from 0 to ItemAbilityCount, do (Actions)
        • Loop - Actions
          • Set TempInt = (Integer A)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Items[TempInt] Equal to (Item-type of TempItem)
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Abilities[TempInt] for TempUnit) Less than 10
                • Then - Actions
                  • Unit - Add Abilities[TempInt] to TempUnit
                  • Set TempForce = (Player group((Owner of TempUnit)))
                  • Game - Display to TempForce the text: ((|c0000FFFF + (Name of Abilities[TempInt])) + |r learned.)
                  • Custom script: call DestroyForce( udg_TempForce )
                  • Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\Items\AIem\AIemTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: exitwhen true
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Level[TempInt] Greater than 10
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Abilities[TempInt] for TempUnit) Less than Level[TempInt]
                    • Then - Actions
                      • Unit - Increase level of Abilities[TempInt] for TempUnit
                      • Set TempForce = (Player group((Owner of TempUnit)))
                      • Game - Display to TempForce for 5.00 seconds the text: ((((|c0000FFFF + (Name of Abilities[TempInt])) + |r) + 's Level) + ( is increased to |c00540081 + (String((Level of Abilities[TempInt] for TempUnit)))))
                      • Custom script: call DestroyForce( udg_TempForce )
                      • Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: exitwhen true
                    • Else - Actions
                      • Set TempForce = (Player group((Owner of TempUnit)))
                      • Game - Display to TempForce for 5.00 seconds the text: (|c0000FFFF + ((Name of Abilities[TempInt]) + |r's maximum level reached.))
                      • Custom script: call DestroyForce( udg_TempForce )
                      • Player - Add Gold[(Integer A)] to (Owner of TempUnit) Current gold
                  • Skip remaining actions
                • Else - Actions
                  • Set TempForce = (Player group((Owner of TempUnit)))
                  • Game - Display to TempForce for 5.00 seconds the text: (|c0000FFFF + ((Name of Abilities[TempInt]) + |r's maximum level reached.))
                  • Custom script: call DestroyForce( udg_TempForce )
                  • Player - Add Gold[TempInt] to (Owner of TempUnit) Current gold
            • Else - Actions
  • /trigger [/B][/B]
 
Level 5
Joined
Jan 5, 2019
Messages
108
  • Blizzard Spell
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Blizzard
    • Actions
      • Set Units = (Triggering unit)
      • Set Ability[(Player number of (Owner of Units))] = Blizzard
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Ability[(Player number of (Owner of Units))] for (Triggering unit)) Less than 10
        • Then - Actions
          • Unit - Add Ability[(Player number of (Owner of Units))] to (Triggering unit)
          • Game - Display to (Player group((Owner of Units))) for 10.00 seconds the text: You have bought the...
        • Else - Actions
          • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: You already have th...
          • Player - Add 400 to (Owner of Units) Current gold
  • ---------------------------------------------------------------------------------------------------------------------
  • /trigger
  • [trigger]
  • Set Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set ItemAbilityCount = -1
      • -------- Blizzard --------
      • Set ItemAbilityCount = (ItemAbilityCount + 1)
      • Set Abilities[ItemAbilityCount] = Blizzard
      • Set Items[ItemAbilityCount] = Blizzard
      • Set Level[ItemAbilityCount] = -10
      • -------- Dark Ritual --------
      • Set ItemAbilityCount = (ItemAbilityCount + 1)
      • Set Abilities[ItemAbilityCount] = Dark Ritual
      • Set Items[ItemAbilityCount] = Potion 5000
      • Set Lumber[ItemAbilityCount] = 100
      • Set Level[ItemAbilityCount] = 3
  • /trigger
 
Status
Not open for further replies.
Top