1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. The results are out! Check them out.
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Oh dang i just hit a brick wall

Discussion in 'Triggers & Scripts' started by Nemitri, Nov 24, 2010.

  1. Nemitri

    Nemitri

    Joined:
    Nov 15, 2010
    Messages:
    29
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Ok here's the thing, im making a map and one of its features is that heroes get evasion, critical strike and spell resistance by default and they grow like armor (well I changed armor to come from STR instead of agility to balance things out) I made it so that every 3 points of agility gives 1% of crit and evasion and 3 points of intelligence gives 1% spell resistance.

    I made 4 skills and gave it to a spellbook, the four skills are for armor, evade critical and resistance, they have 75 levels, each one gives 1% (so the cap for all is 75%) then i made a trigger that sets the values each time a hero picks up/drops an item, levels up or learns a skill. Every runs as expected; except for this...

    Once I set a level, the skill cant go down! it can only go up, this is a problem since if a hero picks up a stat-boosting item or an item that boosts crit evasion or resistance, once the hero drops it, he keeps the highest value!

    I also added some armors that up evasion and spell resistance (to emulate it via triggers) and nothing, it just doesnt go down!

    I could really use some help here, I don't know how to fix this! I would be glad to share my map with anyone who could help me fix those problems.
     
  2. Raven0

    Raven0

    Joined:
    Oct 16, 2010
    Messages:
    878
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Those abilities should be able to decrease, which means it's a trigger problem. Could you post you'r triggers? ^-^
     
  3. Nemitri

    Nemitri

    Joined:
    Nov 15, 2010
    Messages:
    29
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Oh yes silly me!

    Set Heroic Attributes Value
    Events
    Unit - A unit Acquires an item
    Unit - A unit Loses an item
    Unit - A unit Gains a level
    Unit - A unit Learns a skill
    Unit - A unit Sells an item (from shop)
    Unit - A unit Pawns an item (to shop)
    Conditions
    ((Triggering unit) is A Hero) Equal to True
    Actions
    -------- Leather Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff00ff00Leather Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10
    Else - Actions
    Do nothing
    -------- Studded Leather Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff00ff00Studded Leather Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 15
    Else - Actions
    Do nothing
    -------- Dragonhide Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff00ff00Dragonhide Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 25
    Else - Actions
    Do nothing
    -------- Apprentice's Robe --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff0000ffApprentice's Robe|r
    Then - Actions
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10
    Else - Actions
    Do nothing
    -------- Adept's Robe --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff0000ffAdept's Robe|r
    Then - Actions
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 15
    Else - Actions
    Do nothing
    -------- Master's Robe --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff0000ffMaster's Robe|r
    Then - Actions
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 25
    Else - Actions
    Do nothing
    -------- Omni Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cffffcc00Omni Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10
    Else - Actions
    Do nothing
    -------- Omega Omni Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cffffcc00Omega Omni Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 20
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 20
    Else - Actions
    Do nothing
    -------- Set Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    ((Strength of (Triggering unit) (Include bonuses)) / 3) Greater than 75
    Then - Actions
    Unit - Set level of Heroic Toughness (Hero Armor) for (Triggering unit) to 75
    Else - Actions
    Unit - Set level of Heroic Toughness (Hero Armor) for (Triggering unit) to ((Strength of (Triggering unit) (Include bonuses)) / 3)
    -------- Set Evasion --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (((Agility of (Triggering unit) (Include bonuses)) / 3) + Hero_Evasion_Bonus[(Player number of (Owner of (Triggering unit)))]) Greater than 75
    Then - Actions
    Unit - Set level of Heroic Precision (Hero Critical) for (Triggering unit) to 75
    Unit - Set level of Heroic Reflexes (Hero Evasion) for (Triggering unit) to 75
    Else - Actions
    Unit - Set level of Heroic Precision (Hero Critical) for (Triggering unit) to ((Agility of (Triggering unit) (Include bonuses)) / 3)
    Unit - Set level of Heroic Reflexes (Hero Evasion) for (Triggering unit) to (((Agility of (Triggering unit) (Include bonuses)) / 3) + Hero_Evasion_Bonus[(Player number of (Owner of (Triggering unit)))])
    -------- Set Resistance --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (((Intelligence of (Triggering unit) (Include bonuses)) / 3) + Hero_Resistance_Bonus[(Player number of (Owner of (Triggering unit)))]) Greater than 75
    Then - Actions
    Unit - Set level of Heroic Resistance (Dummy Icon) for (Triggering unit) to 75
    Unit - Set level of Heroic Resistance (Hero Spell Damage Reduction) for (Triggering unit) to 75
    Else - Actions
    Unit - Set level of Heroic Resistance (Dummy Icon) for (Triggering unit) to (((Intelligence of (Triggering unit) (Include bonuses)) / 3) + Hero_Resistance_Bonus[(Player number of (Owner of (Triggering unit)))])
    Unit - Set level of Heroic Resistance (Hero Spell Damage Reduction) for (Triggering unit) to (((Intelligence of (Triggering unit) (Include bonuses)) / 3) + Hero_Resistance_Bonus[(Player number of (Owner of (Triggering unit)))])
     
  4. Nemitri

    Nemitri

    Joined:
    Nov 15, 2010
    Messages:
    29
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Resistances has 2 abilities, one is actually the skill and the other is a dummy icon for players to see the value.
    I also made another trigger that decreases the bonus given by those specific items (its the same but with a negative value). But I suspect that both triggers run at the same time and screw something up?
     
  5. Raven0

    Raven0

    Joined:
    Oct 16, 2010
    Messages:
    878
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Use GUI and Hidden tags
    • Set Heroic Attributes Value
    • Events
    • Unit - A unit Acquires an item
    • Unit - A unit Loses an item
    • Unit - A unit Gains a level
    • Unit - A unit Learns a skill
    • Unit - A unit Sells an item (from shop)
    • Unit - A unit Pawns an item (to shop)
    • Conditions
    • ((Triggering unit) is A Hero) Equal to True
    • Actions
    • -------- Leather Armor --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Item-type of (Item being manipulated)) Equal to |cff00ff00Leather Armor|r
    • Then - Actions
    • Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10
    • Else - Actions
    • Do nothing
    • -------- Studded Leather Armor --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Item-type of (Item being manipulated)) Equal to |cff00ff00Studded Leather Armor|r
    • Then - Actions
    • Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 15
    • Else - Actions
    • Do nothing
    • -------- Dragonhide Armor --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Item-type of (Item being manipulated)) Equal to |cff00ff00Dragonhide Armor|r
    • Then - Actions
    • Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 25
    • Else - Actions
    • Do nothing
    • -------- Apprentice's Robe --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Item-type of (Item being manipulated)) Equal to |cff0000ffApprentice's Robe|r
    • Then - Actions
    • Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10
    • Else - Actions
    • Do nothing
    • -------- Adept's Robe --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Item-type of (Item being manipulated)) Equal to |cff0000ffAdept's Robe|r
    • Then - Actions
    • Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 15
    • Else - Actions
    • Do nothing
    • -------- Master's Robe --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Item-type of (Item being manipulated)) Equal to |cff0000ffMaster's Robe|r
    • Then - Actions
    • Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 25
    • Else - Actions
    • Do nothing
    • -------- Omni Armor --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Item-type of (Item being manipulated)) Equal to |cffffcc00Omni Armor|r
    • Then - Actions
    • Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10
    • Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10
    • Else - Actions
    • Do nothing
    • -------- Omega Omni Armor --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Item-type of (Item being manipulated)) Equal to |cffffcc00Omega Omni Armor|r
    • Then - Actions
    • Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 20
    • Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 20
    • Else - Actions
    • Do nothing
    • -------- Set Armor --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • ((Strength of (Triggering unit) (Include bonuses)) / 3) Greater than 75
    • Then - Actions
    • Unit - Set level of Heroic Toughness (Hero Armor) for (Triggering unit) to 75
    • Else - Actions
    • Unit - Set level of Heroic Toughness (Hero Armor) for (Triggering unit) to ((Strength of (Triggering unit) (Include bonuses)) / 3)
    • -------- Set Evasion --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (((Agility of (Triggering unit) (Include bonuses)) / 3) + Hero_Evasion_Bonus[(Player number of (Owner of (Triggering unit)))]) Greater than 75
    • Then - Actions
    • Unit - Set level of Heroic Precision (Hero Critical) for (Triggering unit) to 75
    • Unit - Set level of Heroic Reflexes (Hero Evasion) for (Triggering unit) to 75
    • Else - Actions
    • Unit - Set level of Heroic Precision (Hero Critical) for (Triggering unit) to ((Agility of (Triggering unit) (Include bonuses)) / 3)
    • Unit - Set level of Heroic Reflexes (Hero Evasion) for (Triggering unit) to (((Agility of (Triggering unit) (Include bonuses)) / 3) + Hero_Evasion_Bonus[(Player number of (Owner of (Triggering unit)))])
    • -------- Set Resistance --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (((Intelligence of (Triggering unit) (Include bonuses)) / 3) + Hero_Resistance_Bonus[(Player number of (Owner of (Triggering unit)))]) Greater than 75
    • Then - Actions
    • Unit - Set level of Heroic Resistance (Dummy Icon) for (Triggering unit) to 75
    • Unit - Set level of Heroic Resistance (Hero Spell Damage Reduction) for (Triggering unit) to 75
    • Else - Actions
    • Unit - Set level of Heroic Resistance (Dummy Icon) for (Triggering unit) to (((Intelligence of (Triggering unit) (Include bonuses)) / 3) + Hero_Resistance_Bonus[(Player number of (Owner of (Triggering unit)))])
    • Unit - Set level of Heroic Resistance (Hero Spell Damage Reduction) for (Triggering unit) to (((Intelligence of (Triggering unit) (Include bonuses)) / 3) + Hero_Resistance_Bonus[(Player number of (Owner of (Triggering unit)))])


    You'r setting the variables to the values, instead of just adding or subtracting values. So if somebody has leather armor and they pick up studded leather armor, the bonus from the leather armor will be ignored. If you switch those values to negatives it won't run the action b/c you'r not subtracting that number but actually setting the level of the ability TO that number. You can't have an ability with a level of -10.

    What you want to do is say this:

    • Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = (Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] + 10)


    Instead of:

    • Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10


    Hope thats what it was, if not let me know ^-^
     
  6. Nemitri

    Nemitri

    Joined:
    Nov 15, 2010
    Messages:
    29
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Unit - Set level of Heroic Reflexes (Hero Evasion) for (Triggering unit) to (((Agility of (Triggering unit) (Include bonuses)) / 3) + Hero_Evasion_Bonus[(Player number of (Owner of (Triggering unit)))])

    This is the basic formula it takes the agility of the hero (including bonuses such as a certain ring that gives agility) divides the number by 3 THEN, based off of if the hero has certain armors, it gives a bonus (that's the hero evasion bonus). I had to do this with triggers because different evasions dont stack, the bes tone is used, so i had to emulate a system that stacks evasion.

    In short, the hero gets his total agility/3+any bonus from certain armors.
     
  7. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,193
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    You should know that when you use "Unit loses an item", the +attribute is still there.

    Let's say you equip a piece of armor with +5 to str. You base str is 20, so your str becomes 25. When the "loses an item" event runs, the str of the unit is still considered as 25 in the trigger's actions.

    Unit sells an item to shop is not necessary, since Unit loses an item covers that.
     
  8. Raven0

    Raven0

    Joined:
    Oct 16, 2010
    Messages:
    878
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Oops, sorry I missed those few lines of code at the bottom. What Maker said above is correct.
     
  9. Nemitri

    Nemitri

    Joined:
    Nov 15, 2010
    Messages:
    29
    Resources:
    1
    Maps:
    1
    Resources:
    1
    hmmm how do i go around that little problem then?

    lol edit: just as i typed this it came into my mind...i could make a loop trigger that checks every x seconds? but woulndt that make the game lag a bit or its meaningless?

    Also i have another problem, the items dont add the correct evasion and/or resistance bonus.
     
  10. Nemitri

    Nemitri

    Joined:
    Nov 15, 2010
    Messages:
    29
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Ok I made some changes and it seems to work, although i do get a weird display bug that unless I close and open again the spellbook it wont display the real values, so thats taken care of now, thanks to you guys for letting me know about that losses items thing, now what im having trouble with is assigning the custom values to evade/resistances that come from items (the emulating part)..

    Here's the re-worked trigger to run every 3 secs of game time

    Set Heroic Attributes Value
    Events
    Time - Every 3.00 seconds of game time
    Conditions
    Actions
    Game - Display to (All players) the text: 3 seconds have pass...
    For each (Integer A) from 1 to 8, do (Actions)
    Loop - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    ((Player((Integer A))) slot status) Equal to Is playing
    Then - Actions
    -------- Set Resistance --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (((Intelligence of Hero_List[(Integer A)] (Include bonuses)) / 3) + Hero_Resistance_Bonus[(Integer A)]) Greater than 75
    Then - Actions
    Unit - Set level of Heroic Resistance (Dummy Icon) for Hero_List[(Integer A)] to 75
    Unit - Set level of Heroic Resistance (Hero Spell Damage Reduction) for Hero_List[(Integer A)] to 75
    Else - Actions
    Unit - Set level of Heroic Resistance (Dummy Icon) for Hero_List[(Integer A)] to (((Intelligence of Hero_List[(Integer A)] (Include bonuses)) / 3) + Hero_Resistance_Bonus[(Integer A)])
    Unit - Set level of Heroic Resistance (Hero Spell Damage Reduction) for Hero_List[(Integer A)] to (((Intelligence of Hero_List[(Integer A)] (Include bonuses)) / 3) + Hero_Resistance_Bonus[(Integer A)])
    -------- Set Evasion --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (((Agility of Hero_List[(Integer A)] (Include bonuses)) / 3) + Hero_Evasion_Bonus[(Integer A)]) Greater than 75
    Then - Actions
    Unit - Set level of Heroic Precision (Hero Critical) for Hero_List[(Integer A)] to 75
    Unit - Set level of Heroic Reflexes (Hero Evasion) for Hero_List[(Integer A)] to 75
    Else - Actions
    Unit - Set level of Heroic Precision (Hero Critical) for Hero_List[(Integer A)] to ((Agility of Hero_List[(Integer A)] (Include bonuses)) / 3)
    Unit - Set level of Heroic Reflexes (Hero Evasion) for Hero_List[(Integer A)] to (((Agility of Hero_List[(Integer A)] (Include bonuses)) / 3) + Hero_Evasion_Bonus[(Integer A)])
    -------- Set Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    ((Strength of Hero_List[(Integer A)] (Include bonuses)) / 3) Greater than 75
    Then - Actions
    Unit - Set level of Heroic Toughness (Hero Armor) for Hero_List[(Integer A)] to 75
    Else - Actions
    Unit - Set level of Heroic Toughness (Hero Armor) for Hero_List[(Integer A)] to ((Strength of Hero_List[(Integer A)] (Include bonuses)) / 3)
    Else - Actions
    Do nothing


    Here's the setting of values depending on the armors worn

    Custom Evasion and Resistance Bonus
    Events
    Unit - A unit Acquires an item
    Conditions
    Actions
    -------- Leather Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff00ff00Leather Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10
    Game - Display to (All players) the text: leather +10
    Else - Actions
    Do nothing
    -------- Studded Leather Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff00ff00Studded Leather Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 15
    Else - Actions
    Do nothing
    -------- Dragonhide Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff00ff00Dragonhide Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 25
    Else - Actions
    Do nothing
    -------- Apprentice's Robe --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff0000ffApprentice's Robe|r
    Then - Actions
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10
    Else - Actions
    Do nothing
    -------- Adept's Robe --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff0000ffAdept's Robe|r
    Then - Actions
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 15
    Else - Actions
    Do nothing
    -------- Master's Robe --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff0000ffMaster's Robe|r
    Then - Actions
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 25
    Else - Actions
    Do nothing
    -------- Omni Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cffffcc00Omni Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 10
    Else - Actions
    Do nothing
    -------- Omega Omni Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cffffcc00Omega Omni Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = 20
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = 20
    Else - Actions
    Do nothing
    Trigger - Run Set Heroic Attributes Value <gen> (ignoring conditions)

    Heres the trigger to substract from if the hero loses the item

    Custom Evasion and Resistance Drop
    Events
    Unit - A unit Loses an item
    Conditions
    Actions
    -------- Leather Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff00ff00Leather Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = -10
    Game - Display to (All players) the text: leather -10
    Else - Actions
    Do nothing
    -------- Studded Leather Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff00ff00Studded Leather Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = -15
    Else - Actions
    Do nothing
    -------- Dragonhide Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff00ff00Dragonhide Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = -25
    Else - Actions
    Do nothing
    -------- Apprentice's Robe --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff0000ffApprentice's Robe|r
    Then - Actions
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = -10
    Else - Actions
    Do nothing
    -------- Adept's Robe --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff0000ffAdept's Robe|r
    Then - Actions
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = -15
    Else - Actions
    Do nothing
    -------- Master's Robe --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cff0000ffMaster's Robe|r
    Then - Actions
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = -25
    Else - Actions
    Do nothing
    -------- Omni Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cffffcc00Omni Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = -10
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = -10
    Else - Actions
    Do nothing
    -------- Omega Omni Armor --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Item-type of (Item being manipulated)) Equal to |cffffcc00Omega Omni Armor|r
    Then - Actions
    Set Hero_Evasion_Bonus[(Player number of (Owner of (Item being manipulated)))] = -20
    Set Hero_Resistance_Bonus[(Player number of (Owner of (Item being manipulated)))] = -20
    Else - Actions
    Do nothing
    Trigger - Run Set Heroic Attributes Value <gen> (ignoring conditions)

    Note; just after pating this i removed those calls to other triggers, but i doubt that was the problem, perhaps the variables arent the same? Hero [Attibute]/3 might return a real number, which gets rounded up or down? and the armors give an integer? perhaps thats it?