1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Join other hivers in a friendly concept-art contest. The contestants have to create a genie coming out of its container. We wish you the best of luck!
    Dismiss Notice
  3. The Melee Mapping Contest #4: 2v2 - Results are out! Step by to congratulate the winners!
    Dismiss Notice
  4. We're hosting the 15th Mini-Mapping Contest with YouTuber Abelhawk! The contestants are to create a custom map that uses the hidden content within Warcraft 3 or is inspired by any of the many secrets within the game.
    Dismiss Notice
  5. The 20th iteration of the Terraining Contest is upon us! Join and create exquisite Water Structures for it.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice

Bloodstone (DotA) GUI v1.4

Submitted by Wietlol
This bundle is marked as approved. It works and satisfies the submission rules.
Description:
I made this spell on request of yrogerg.
This is based on the item Bloodstone from DotA.

Item Description:
- Kills the owner on activation.
- Gains a charge each time an enemy hero dies within 1675 range. Each charge grants 1 mana regeneration per second. If the bearer dies, 500 + 30 health per charge is restored to all allies within a 1675 radius, while the Bloodstone loses a third of its charges. A bloodmark is then placed where the bearer died, granting vision over a 1800 radius and allowing the bearer to gain nearby experience while dead.

How to install:
Copy or create a bloodstone item.
Copy or create all custom abilities from the test map.
Copy or create all global variables used in the test map.
Copy all triggers from the Bloodstone category into your map.
Copy all triggers from the Game Time System (GTS) into your map.
Copy the functions from the header file into your map.
Set the bloodstone variable to the item boodstone.

Triggers:
triggers
  • Bloodstone Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Bloodstone = Bloodstone
      • Set Bloodstone_Dummy_Hero = Dummy Hero
      • Set Bloodstone_Param_Heal_Base = 500.00
      • Set Bloodstone_Param_Heal_Increase = 30.00
      • Set Bloodstone_Param_Heal_Radius = 1675.00
      • Set Bloodstone_Param_Stack_Radius = 1675.00
      • Set Bloodstone_Param_Stack_Lose = 0.67
      • Set Bloodstone_Param_Visual_Radius = 1800.00
      • Set Bloodstone_Param_Mana_Gain = 1.00

  • Bloodstone Death Effect
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • -------- ------------------------------------ --------
      • -------- Local Variables --------
      • -------- ------------------------------------ --------
      • Custom script: local unit udg_TempUnit
      • Custom script: local unit udg_TempUnit2
      • Custom script: local fogmodifier udg_TempVisibilityModifier
      • Custom script: local effect udg_TempSpecialEffect
      • Custom script: local integer udg_TempInteger2
      • -------- ------------------------------------ --------
      • -------- A hero dies in range of an enemy hero with bloodstone --------
      • -------- ------------------------------------ --------
      • Set TempUnit = (Triggering unit)
      • Set TempPlayer = (Owner of TempUnit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempUnit is A Hero) Equal to True
        • Then - Actions
          • Set TempLocation = (Position of TempUnit)
          • Set TempUnitGroup = (Units within Bloodstone_Param_Stack_Radius of TempLocation)
          • Custom script: call RemoveLocation(udg_TempLocation)
          • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
            • Loop - Actions
              • Set TempUnit2 = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (TempUnit2 is alive) Equal to True
                  • (TempUnit2 belongs to an enemy of TempPlayer) Equal to True
                  • (TempUnit2 has an item of type Bloodstone) Equal to True
                • Then - Actions
                  • For each (Integer TempInteger) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Set TempItem = (Item carried by TempUnit2 in slot TempInteger)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Item-type of TempItem) Equal to Bloodstone
                        • Then - Actions
                          • Item - Set charges remaining in TempItem to ((Charges remaining in TempItem) + 1)
                        • Else - Actions
                • Else - Actions
          • Custom script: call DestroyGroup(udg_TempUnitGroup)
          • Custom script: set udg_TempUnit2 = null
        • Else - Actions
      • -------- ------------------------------------ --------
      • -------- Condition for bloodstone effect --------
      • -------- ------------------------------------ --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempUnit has an item of type Bloodstone) Equal to False
        • Then - Actions
          • Custom script: set udg_TempUnit = null
          • Skip remaining actions
        • Else - Actions
      • -------- ------------------------------------ --------
      • -------- Heal Allies --------
      • -------- ------------------------------------ --------
      • Set TempItem = (Item carried by TempUnit of type Bloodstone)
      • Set TempInteger = (Charges remaining in TempItem)
      • Set TempReal = (Bloodstone_Param_Heal_Base + (Bloodstone_Param_Heal_Increase x (Real(TempInteger))))
      • Set TempLocation = (Position of TempUnit)
      • Special Effect - Create a special effect at TempLocation using Abilities\Spells\NightElf\Tranquility\Tranquility.mdl
      • Set TempSpecialEffect = (Last created special effect)
      • Set TempUnitGroup = (Units within Bloodstone_Param_Heal_Radius of TempLocation)
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • Set TempUnit2 = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit2 is alive) Equal to True
              • (TempUnit2 is A structure) Equal to False
              • (TempUnit2 belongs to an ally of TempPlayer) Equal to True
            • Then - Actions
              • Unit - Set life of TempUnit2 to ((Life of TempUnit2) + TempReal)
            • Else - Actions
      • Custom script: call DestroyGroup(udg_TempUnitGroup)
      • -------- ------------------------------------ --------
      • -------- Remove Charges --------
      • -------- ------------------------------------ --------
      • For each (Integer TempInteger) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set TempItem = (Item carried by TempUnit in slot TempInteger)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of TempItem) Equal to Bloodstone
            • Then - Actions
              • Set TempReal = ((Real((Charges remaining in TempItem))) x Bloodstone_Param_Stack_Lose)
              • Item - Set charges remaining in TempItem to (Integer(TempReal))
            • Else - Actions
      • -------- ------------------------------------ --------
      • -------- Add Vision --------
      • -------- ------------------------------------ --------
      • Set TempLocation = (Position of TempUnit)
      • Visibility - Create an initially Enabled visibility modifier for TempPlayer emitting Visibility from TempLocation to a radius of Bloodstone_Param_Visual_Radius
      • Set TempVisibilityModifier = (Last created visibility modifier)
      • -------- ------------------------------------ --------
      • -------- Keep Track Of Experience --------
      • -------- ------------------------------------ --------
      • Unit - Create 1 Bloodstone_Dummy_Hero for TempPlayer at TempLocation facing (Facing of TempUnit) degrees
      • Set TempUnit2 = (Last created unit)
      • Hero - Set TempUnit2 experience to (Hero experience of TempUnit), Hide level-up graphics
      • Unit - Make TempUnit2 Invulnerable
      • Custom script: call RemoveLocation(udg_TempLocation)
      • -------- ------------------------------------ --------
      • -------- Remove Heal Special Effect --------
      • -------- ------------------------------------ --------
      • Wait 3.67 game-time seconds
      • Special Effect - Destroy TempSpecialEffect
      • -------- ------------------------------------ --------
      • -------- Wait until hero revives --------
      • -------- ------------------------------------ --------
      • Custom script: loop
      • Custom script: exitwhen GetWidgetLife(udg_TempUnit) > 0
      • Custom script: call TriggerSleepAction(1)
      • Custom script: endloop
      • -------- ------------------------------------ --------
      • -------- Remove Vision --------
      • -------- ------------------------------------ --------
      • Visibility - Disable TempVisibilityModifier
      • Visibility - Destroy TempVisibilityModifier
      • -------- ------------------------------------ --------
      • -------- Add Experience --------
      • -------- ------------------------------------ --------
      • Set TempInteger = (Hero experience of TempUnit2)
      • Hero - Add TempInteger experience to TempUnit, Show level-up graphics
      • Unit - Remove TempUnit2 from the game
      • Custom script: set udg_TempUnit = null
      • Custom script: set udg_TempUnit2 = null
      • Custom script: set udg_TempVisibilityModifier = null
      • Custom script: set udg_TempSpecialEffect = null

  • Bloodstone Activation
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Bloodstone
    • Actions
      • Set TempItem = (Item being manipulated)
      • Item - Set charges remaining in TempItem to ((Charges remaining in TempItem) + 1)
      • Unit - Kill (Triggering unit)

  • Bloodstone Acquire Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Bloodstone
    • Actions
      • Set TempUnit = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempUnit is in BloodstoneUnitGroup) Equal to False
        • Then - Actions
          • Unit Group - Add TempUnit to BloodstoneUnitGroup
          • Trigger - Turn on Bloodstone Mana Regeneration <gen>
        • Else - Actions
      • For each (Integer TempInteger) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set TempItem = (Item carried by TempUnit in slot TempInteger)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TempItem Not equal to (Item being manipulated)
              • (Item-type of TempItem) Equal to Bloodstone
            • Then - Actions
              • Item - Set charges remaining in (Item being manipulated) to (Charges remaining in TempItem)
              • Skip remaining actions
            • Else - Actions

  • Bloodstone Lose Item
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Bloodstone
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempItem = (Item being manipulated)
      • For each (Integer TempInteger) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set TempItem2 = (Item carried by TempUnit in slot TempInteger)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TempItem2 Not equal to TempItem
              • (Item-type of TempItem2) Equal to Bloodstone
            • Then - Actions
              • Skip remaining actions
            • Else - Actions
      • Unit Group - Remove TempUnit from BloodstoneUnitGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in BloodstoneUnitGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off Bloodstone Mana Regeneration <gen>
        • Else - Actions

  • Bloodstone Mana Regeneration
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BloodstoneUnitGroup and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set TempInteger = (Charges remaining in (Item carried by TempUnit of type Bloodstone))
          • Set TempReal = ((Real(TempInteger)) x Bloodstone_Param_Mana_Gain)
          • Unit - Set mana of TempUnit to ((Mana of TempUnit) + TempReal)


Images
Tooltip:
[​IMG]

Healing:
[​IMG]

While the unit is dead:
[​IMG]


Changelog:
- 1.4 - 03/03/2015 - Fixed the drop item bug and minor performance improvements.
- 1.3 - 01/03/2015 - Added parameters and reset normal Wait timer.
- 1.2 - 04/02/2015 - Update on review of IcemanBo.
Merged the two "A unit dies" triggers to one.
Fixed a bug where units would not be removed from the mana regeneration group.
Made a variable for the ex-hardcoded dummy hero.
Replaced Wait gametime with a custom wait timer which is more accurate and uses a global timer.
A little code optimization.
- 1.1 - Now sets the dummy unit's experience to the experience of the owner of bloodstone.
This is required for level-dependant experience reduction.
- 1.0 - Uploaded this spell on the Hive.

Keywords:
DotA, Bloodstone.
Contents

Just another Warcraft III map (Map)

Reviews
Moderator
IcemanBo: -date: 3rd March 2015 -submission: Bloodstone (DotA) GUI v1.4 http://www.hiveworkshop.com/forums/spells-569/bloodstone-dota-gui-v1-4-a-261704/index2.html#post2660263 02:26, 3th Feb 2015 IcemanBo:...
  1. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,104
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    ^In this post you announced version 1.3. In main thread it is "Bloodstone (DotA) GUI v1.2".
    Is the map up to date and you only forgot to change the name?
     
  2. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Uhm... Yea seems so.
    The post had the wrong values.
    They had to be 1.2 because I cannot find the 1.2 update in this thread anywhere.
    Changed them now.
     
  3. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,104
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Okay. Then please read my older review again. Some points still needs to be changed. (config part, and the lose item thing were points I mentioned again for example)

    This was the point against range variable etc? If yes, it is better user has one config part where he can change all things he need.
    Some users are not pro in coding, and it's confusing and frustrating for them to go through code and find/change values by themselves.
    A good thing is when user do not even needs to have a look in your code, but only in the (short) config part.
    I don't felt offended or anything similar, don't worry bro.

    And frankly, I'm very skeptical with your approach of custom wait. :s
    Me personaly would just prefer the normal GUI "wait" function in here.

    "Wait until hero revives"
    exit loop if hero is alive or unit type id == 0. (means hero was removed)
     
  4. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Except for these two:
    Did I miss something?


    Yea who the hell needs improved accuracy and leak fixes :p
    Just doing the best I can.
    I will replace it with Leakless wait so at least the leak will be fixed.

    Will do.

    -----------------------------------------------------------------------------------------------------------------------------------------------------
    -----------------------------------------------------------------------------------------------------------------------------------------------------
    -----------------------------------------------------------------------------------------------------------------------------------------------------

    Update 1.3

    I just released version 1.3

    Here are the changes:
    • Removed the Gametime System and reset the custom timer to the normal Wait timer.
    • Made a parameter for every effect variable.
     
    Last edited: Mar 1, 2015
  5. BrightDark

    BrightDark

    Joined:
    Feb 9, 2015
    Messages:
    101
    Resources:
    0
    Resources:
    0
    Awesome , keep up the good work
     
  6. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,104
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Hey, with the config it looks some nicer to me. :)

    • The drop item bug needs to be fixed. Unit won't get removed properly from group when losing the item.
    • Store "PickedUnit" into a temporary unit variable. It is used more often. (death trigger)
    • onDeath directly make a trigger condition if TriggeringUnit has the item.
    • exitwhen GetUnitState(udg_TempUnit, UNIT_STATE_LIFE) > 0
      ->
      exitwhen GetWidgetLife(udg_TempUnit) > 0
      ^It is faster.
     
  7. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Update 1.4

    I just released version 1.4

    Here are the changes:
    • Fixed the bug where the mana regeneration would never be removed from the unit... even though he would not regenerate any mana though.
    • Added minor performance improvements.

    @Icemanbo
    You really have to make up your mind man.
    First you say that I should put triggers with the same event together and now you want me to split them up again. -_-
    If you take a good look at the on-death trigger, you see that the first action is not applied on units with bloodstone, the second actions is.
    So I cannot put the bloodstone check in the conditions because that would remove the first action completely.
    Or I have to split those in two triggers... what I changed in 1.2.
     
  8. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,104
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Yes, you're right. DyingUnit might not have the item. :)

    • Set TempUnit = (Triggering unit)

    ^This could be done immediatly on top of trigger, and only once.

    • Unit - Set life of (Picked unit) to ((Leben of TempUnit2) + TempReal)

    You forgot here to replace "PickedUnit" here with the varible.

    Good, the item bug has been fixed. :)

    The TriggerSleepAction loop is not a perfect solution,
    but it works here and simplifies it a lot for you.
    So it's fine for me here.

    I would prefer a custom counter over using the "IsGroupEmpty" function.

    In my eyes it's a very specified spell, but might be useful.

    Approved.
     
  9. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Well fixed those...
    These two updates are pretty quick after each other so I didn't bother to change version number :D
     
  10. jonbon29

    jonbon29

    Joined:
    Aug 19, 2014
    Messages:
    1,096
    Resources:
    0
    Resources:
    0
    Cool so this is how the bloodstone works, pretty awesome.
     
  11. Kam

    Kam

    Blizzard Associate Producer

    Joined:
    Aug 3, 2004
    Messages:
    2,623
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    *woops!
     
    Last edited: May 15, 2015
  12. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    0.o

    wrong thread?