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

[Trigger] Item Drop

Status
Not open for further replies.
Level 6
Joined
Jan 2, 2015
Messages
171
I need help on how to make exclusive item for hero. When they are not meeting requirements they will drop it automatically. For Example, i want only Paladin level 10 to pick this exclusive item..and other units or hero or lower level paladin that try to pick it will drop it automatically. My Real Problems is when level 10 paladin tried to pick this exclusive item..it just dropping again.

  • Paladin
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Paladin
          • (Item-type of (Item being manipulated)) Equal to |cffff8800Heaven's Law|r
          • (Level of (Hero manipulating item)) Equal to 10
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
          • Item - Make (Item being manipulated) Undroppable
          • Unit - Add All Stat 10 (+5 All Stats) to (Triggering unit)
          • Unit - Add Life Bonus 300 (Greater) to (Triggering unit)
          • Unit - Add Healing Aoe to (Triggering unit)
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Blademaster
          • (Item-type of (Item being manipulated)) Equal to |cffff8800Muramasa|r
          • (Level of (Hero manipulating item)) Equal to 10
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
          • Item - Make (Item being manipulated) Undroppable
          • Unit - Add All Stat 10 (+5 All Stats) to (Triggering unit)
          • Wait 1.00 seconds
          • Unit - Replace (Triggering unit) with a Blademaster using The old unit's relative life and mana
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
 
Level 5
Joined
Jun 28, 2010
Messages
110
Well i don't really see any problems from your trigger either idk why it doesnt work, i tested it myself and its not work too. but this should work
  • Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Item = (Item being manipulated)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Triggering unit)) Equal to 10
          • (Unit-type of (Triggering unit)) Equal to Blood Mage
          • (Item-type of Item) Equal to Kelen's Dagger of Escape
        • Then - Actions
          • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Weapons\ChimaeraAcidMissile\ChimaeraAcidMissile.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
              • (Level of (Triggering unit)) Equal to 5
              • (Unit-type of (Triggering unit)) Equal to Blood Mage
              • (Item-type of Item) Equal to Crown of Kings +5
            • Then - Actions
              • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Weapons\ChimaeraAcidMissile\ChimaeraAcidMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Skip remaining actions
            • Else - Actions
              • Hero - Drop Item from (Triggering unit)
          • Hero - Drop Item from (Triggering unit)
 
Level 6
Joined
Jan 2, 2015
Messages
171
Well i don't really see any problems from your trigger either idk why it doesnt work, i tested it myself and its not work too. but this should work
  • Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Item = (Item being manipulated)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Triggering unit)) Equal to 10
          • (Unit-type of (Triggering unit)) Equal to Blood Mage
          • (Item-type of Item) Equal to Kelen's Dagger of Escape
        • Then - Actions
          • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Weapons\ChimaeraAcidMissile\ChimaeraAcidMissile.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
              • (Level of (Triggering unit)) Equal to 5
              • (Unit-type of (Triggering unit)) Equal to Blood Mage
              • (Item-type of Item) Equal to Crown of Kings +5
            • Then - Actions
              • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Weapons\ChimaeraAcidMissile\ChimaeraAcidMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Skip remaining actions
            • Else - Actions
              • Hero - Drop Item from (Triggering unit)
          • Hero - Drop Item from (Triggering unit)

thx for help but still not work. my paladin lvl 10 loot his exclusive item but still drop it again and my blademaster also tried to loot his exclusive item but still drop it again. anyone can help?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
For me it is pretty clear why your first trigger doesnt work.

But let us first take a step back from your trigger and take a look what happens:
  • Paladin
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Paladin
          • (Item-type of (Item being manipulated)) Equal to |cffff8800Heaven's Law|r
          • (Level of (Hero manipulating item)) Equal to 10
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
          • Item - Make (Item being manipulated) Undroppable
          • Unit - Add All Stat 10 (+5 All Stats) to (Triggering unit)
          • Unit - Add Life Bonus 300 (Greater) to (Triggering unit)
          • Unit - Add Healing Aoe to (Triggering unit)
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Blademaster
          • (Item-type of (Item being manipulated)) Equal to |cffff8800Muramasa|r
          • (Level of (Hero manipulating item)) Equal to 10
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
          • Item - Make (Item being manipulated) Undroppable
          • Unit - Add All Stat 10 (+5 All Stats) to (Triggering unit)
          • Wait 1.00 seconds
          • Unit - Replace (Triggering unit) with a Blademaster using The old unit's relative life and mana
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
1, a unit acquires an item.
2, that unit is a paladin
3, the item is your heavens law
4, the level of that unit is 10
5, you create those special effects and do your stuff
6, you check if the hero is a blademaster... no
7, hero drops item

no matter what happens, noone will keep this item
in some occasions those effects are applied... but the item will always be dropped because you cannot be a blademaster AND a paladin
that said... no item at all can be carried.

lets go to trigger 2:
  • Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Item = (Item being manipulated)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Triggering unit)) Equal to 10
          • (Unit-type of (Triggering unit)) Equal to Blood Mage
          • (Item-type of Item) Equal to Kelen's Dagger of Escape
        • Then - Actions
          • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Weapons\ChimaeraAcidMissile\ChimaeraAcidMissile.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
              • (Level of (Triggering unit)) Equal to 5
              • (Unit-type of (Triggering unit)) Equal to Blood Mage
              • (Item-type of Item) Equal to Crown of Kings +5
            • Then - Actions
              • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Weapons\ChimaeraAcidMissile\ChimaeraAcidMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Skip remaining actions
            • Else - Actions
              • Hero - Drop Item from (Triggering unit)
          • Hero - Drop Item from (Triggering unit)
in this case, a lvl 10 blood mage can equip kelens dagger.
all other items, heroes or levels of blood mage will find themselves inside the else block.
after that second check for items, they will always drop the item.
so a lvl 10 blood mage can carry kelens dagger, noone else can carry items, no other items can be carried

let me introduce a switch case which will help you today.
(ofcourse for people who have seen a real switch case, this is not a real one but this is the best I can do in GUI)

when an item is acquired, we will first check what item it is:
  • Item Check
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ITEM = (Item being manipulated)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Tome of Experience
        • Then - Actions
        • Else - Actions
Now we have an if statement that runs it's actions when the item is a tome of experience.
ITEM is a global variable (you can use whatever global variable you already have)

Now we can do some stuff inside that block:
  • Item Check
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ITEM = (Item being manipulated)
      • Set UNIT = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Tome of Experience
        • Then - Actions
          • Unit - Kill UNIT
        • Else - Actions
(how cruel)
when a unit picks up a tome of experience, he dies.
now I want that if a unit picks up claws of attack, he will then have all his buffs removed
  • Item Check
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ITEM = (Item being manipulated)
      • Set UNIT = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Tome of Experience
        • Then - Actions
          • Unit - Kill UNIT
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Claws of Attack +15
        • Then - Actions
          • Unit - Remove All buffs from UNIT
        • Else - Actions
seems ok right?

now there is one thing that is a bit of trouble right here.
why do we need to check if an item is claws of attack if we already know it is a tome of experience?
so in every single actions block, we use the action "skip remaining actions"
  • Item Check
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ITEM = (Item being manipulated)
      • Set UNIT = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Tome of Experience
        • Then - Actions
          • Unit - Kill UNIT
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Claws of Attack +15
        • Then - Actions
          • Unit - Remove All buffs from UNIT
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Urn of King Terenas
        • Then - Actions
          • -------- do stuff --------
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Mask of Death
        • Then - Actions
          • -------- do stuff --------
          • Skip remaining actions
        • Else - Actions
like this, we dont check if the item is anything else
this can also be done by placing everything after the if statements, inside the else blocks which will be this:
  • Item Check
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ITEM = (Item being manipulated)
      • Set UNIT = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Tome of Experience
        • Then - Actions
          • Unit - Kill UNIT
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of ITEM) Equal to Claws of Attack +15
            • Then - Actions
              • Unit - Remove All buffs from UNIT
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of ITEM) Equal to Urn of King Terenas
                • Then - Actions
                  • -------- do stuff --------
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Item-type of ITEM) Equal to Mask of Death
                    • Then - Actions
                      • -------- do stuff --------
                    • Else - Actions
however, when you have 25 items like this, it is unreadable.
so we use the one with "skip remaining actions".

now we want to know if the hero is a lvl 10 paladin when he acquires tome of experience:
  • Item Check
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ITEM = (Item being manipulated)
      • Set UNIT = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Tome of Experience
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of UNIT) Equal to Paladin
              • (Hero level of UNIT) Equal to 10
            • Then - Actions
              • -------- do stuff --------
            • Else - Actions
              • Hero - Drop ITEM from UNIT
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Claws of Attack +15
        • Then - Actions
          • -------- do stuff --------
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Urn of King Terenas
        • Then - Actions
          • -------- do stuff --------
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Mask of Death
        • Then - Actions
          • -------- do stuff --------
          • Skip remaining actions
        • Else - Actions
like this, we do check that without making any mistakes regarding other items, other heroes or any other effects

*note that you have to do stuff before "skip remaining actions" so also before the if statement if you want something to happen when any unit picks up any item
 
Level 6
Joined
Jan 2, 2015
Messages
171
For me it is pretty clear why your first trigger doesnt work.

But let us first take a step back from your trigger and take a look what happens:
  • Paladin
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Paladin
          • (Item-type of (Item being manipulated)) Equal to |cffff8800Heaven's Law|r
          • (Level of (Hero manipulating item)) Equal to 10
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
          • Item - Make (Item being manipulated) Undroppable
          • Unit - Add All Stat 10 (+5 All Stats) to (Triggering unit)
          • Unit - Add Life Bonus 300 (Greater) to (Triggering unit)
          • Unit - Add Healing Aoe to (Triggering unit)
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Blademaster
          • (Item-type of (Item being manipulated)) Equal to |cffff8800Muramasa|r
          • (Level of (Hero manipulating item)) Equal to 10
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
          • Item - Make (Item being manipulated) Undroppable
          • Unit - Add All Stat 10 (+5 All Stats) to (Triggering unit)
          • Wait 1.00 seconds
          • Unit - Replace (Triggering unit) with a Blademaster using The old unit's relative life and mana
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
1, a unit acquires an item.
2, that unit is a paladin
3, the item is your heavens law
4, the level of that unit is 10
5, you create those special effects and do your stuff
6, you check if the hero is a blademaster... no
7, hero drops item

no matter what happens, noone will keep this item
in some occasions those effects are applied... but the item will always be dropped because you cannot be a blademaster AND a paladin
that said... no item at all can be carried.

lets go to trigger 2:
  • Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Item = (Item being manipulated)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Triggering unit)) Equal to 10
          • (Unit-type of (Triggering unit)) Equal to Blood Mage
          • (Item-type of Item) Equal to Kelen's Dagger of Escape
        • Then - Actions
          • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Weapons\ChimaeraAcidMissile\ChimaeraAcidMissile.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
              • (Level of (Triggering unit)) Equal to 5
              • (Unit-type of (Triggering unit)) Equal to Blood Mage
              • (Item-type of Item) Equal to Crown of Kings +5
            • Then - Actions
              • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Weapons\ChimaeraAcidMissile\ChimaeraAcidMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Skip remaining actions
            • Else - Actions
              • Hero - Drop Item from (Triggering unit)
          • Hero - Drop Item from (Triggering unit)
in this case, a lvl 10 blood mage can equip kelens dagger.
all other items, heroes or levels of blood mage will find themselves inside the else block.
after that second check for items, they will always drop the item.
so a lvl 10 blood mage can carry kelens dagger, noone else can carry items, no other items can be carried

let me introduce a switch case which will help you today.
(ofcourse for people who have seen a real switch case, this is not a real one but this is the best I can do in GUI)

when an item is acquired, we will first check what item it is:
  • Item Check
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ITEM = (Item being manipulated)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Tome of Experience
        • Then - Actions
        • Else - Actions
Now we have an if statement that runs it's actions when the item is a tome of experience.
ITEM is a global variable (you can use whatever global variable you already have)

Now we can do some stuff inside that block:
  • Item Check
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ITEM = (Item being manipulated)
      • Set UNIT = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Tome of Experience
        • Then - Actions
          • Unit - Kill UNIT
        • Else - Actions
(how cruel)
when a unit picks up a tome of experience, he dies.
now I want that if a unit picks up claws of attack, he will then have all his buffs removed
  • Item Check
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ITEM = (Item being manipulated)
      • Set UNIT = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Tome of Experience
        • Then - Actions
          • Unit - Kill UNIT
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Claws of Attack +15
        • Then - Actions
          • Unit - Remove All buffs from UNIT
        • Else - Actions
seems ok right?

now there is one thing that is a bit of trouble right here.
why do we need to check if an item is claws of attack if we already know it is a tome of experience?
so in every single actions block, we use the action "skip remaining actions"
  • Item Check
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ITEM = (Item being manipulated)
      • Set UNIT = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Tome of Experience
        • Then - Actions
          • Unit - Kill UNIT
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Claws of Attack +15
        • Then - Actions
          • Unit - Remove All buffs from UNIT
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Urn of King Terenas
        • Then - Actions
          • -------- do stuff --------
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Mask of Death
        • Then - Actions
          • -------- do stuff --------
          • Skip remaining actions
        • Else - Actions
like this, we dont check if the item is anything else
this can also be done by placing everything after the if statements, inside the else blocks which will be this:
  • Item Check
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ITEM = (Item being manipulated)
      • Set UNIT = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Tome of Experience
        • Then - Actions
          • Unit - Kill UNIT
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of ITEM) Equal to Claws of Attack +15
            • Then - Actions
              • Unit - Remove All buffs from UNIT
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of ITEM) Equal to Urn of King Terenas
                • Then - Actions
                  • -------- do stuff --------
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Item-type of ITEM) Equal to Mask of Death
                    • Then - Actions
                      • -------- do stuff --------
                    • Else - Actions
however, when you have 25 items like this, it is unreadable.
so we use the one with "skip remaining actions".

now we want to know if the hero is a lvl 10 paladin when he acquires tome of experience:
  • Item Check
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set ITEM = (Item being manipulated)
      • Set UNIT = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Tome of Experience
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of UNIT) Equal to Paladin
              • (Hero level of UNIT) Equal to 10
            • Then - Actions
              • -------- do stuff --------
            • Else - Actions
              • Hero - Drop ITEM from UNIT
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Claws of Attack +15
        • Then - Actions
          • -------- do stuff --------
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Urn of King Terenas
        • Then - Actions
          • -------- do stuff --------
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ITEM) Equal to Mask of Death
        • Then - Actions
          • -------- do stuff --------
          • Skip remaining actions
        • Else - Actions
like this, we do check that without making any mistakes regarding other items, other heroes or any other effects

*note that you have to do stuff before "skip remaining actions" so also before the if statement if you want something to happen when any unit picks up any item

This is what i want.. thanks alot! +rep everyone
 
Level 6
Joined
Jan 2, 2015
Messages
171
Ah sorry for asking again. but it seems theres flaw in Wietlol trigger. The Paladin still can pick muramasa of Blademaster. Heres the trigger that i used.

  • Paladin
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Item = (Item being manipulated)
      • Set Unit = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of Item) Equal to |cffff8800Heaven's Law|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Unit) Equal to Paladin
              • (Hero level of Unit) Equal to 10
            • Then - Actions
              • Special Effect - Create a special effect attached to the origin of Unit using Abilities\Spells\Items\AIem\AIemTarget.mdl
              • Item - Make Item Undroppable
              • Unit - Add All Stat 10 (+5 All Stats) to Unit
              • Unit - Add Life Bonus 300 (Greater) to Unit
              • Unit - Add Healing Aoe to Unit
            • Else - Actions
              • Hero - Drop Item from Unit
        • Else - Actions
          • Skip remaining actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of Item) Equal to |cffff8800Muramasa|r
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Unit) Equal to Blademaster
              • (Hero level of Unit) Equal to 10
            • Then - Actions
              • Special Effect - Create a special effect attached to the origin of Unit using Abilities\Spells\Items\AIem\AIemTarget.mdl
              • Item - Make Item Undroppable
            • Else - Actions
              • Hero - Drop Item from Unit
        • Else - Actions
          • Skip remaining actions
 
Status
Not open for further replies.
Top