- Joined
- Jan 20, 2011
- Messages
- 496
Hey guys, I have a trigger in my game, to enchant items (Combine), where you buy the item Enchant, and it creates (imbues) a new item. I have the trigger correct, as in it works properly, but it looks messy, and I plan to add in more items to enchant.
So my question is; Is there a way to make this trigger more efficient (Smaller, No leaks, less memory, etc)?
NOTE: ENCHANT IS NOT AN ABILITY, IT IS AN ITEM, DISGUISED AS AN ABILITY FOR A SHOP OWNER
So my question is; Is there a way to make this trigger more efficient (Smaller, No leaks, less memory, etc)?
-
Combine
-

Events
-


Unit - A unit Acquires an item
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




((Item carried by (Triggering unit) of type |CFF959697Claws of Attack|R) is owned) Equal to True
-




((Triggering unit) has an item of type Enchant) Equal to True
-
-



Then - Actions
-




-------- Creates effect on unit, removes items, takes gold, creates item --------
-




Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
-




Item - Remove (Item carried by (Triggering unit) of type |CFF959697Claws of Attack|R)
-




Item - Remove (Item carried by (Triggering unit) of type Enchant)
-




Player - Add -500 to (Owner of (Triggering unit)) Current gold
-




Hero - Create |cff87cefaPoison Claws|r and give it to (Triggering unit)
-
-



Else - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Item carried by (Triggering unit) of type |CFF959697Dagger|R) is owned) Equal to True
-






((Triggering unit) has an item of type Enchant) Equal to True
-
-





Then - Actions
-






-------- Creates effect on unit, removes items, takes gold, creates item --------
-






Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
-






Item - Remove (Item carried by (Triggering unit) of type |CFF959697Dagger|R)
-






Item - Remove (Item carried by (Triggering unit) of type Enchant)
-






Player - Add -750 to (Owner of (Triggering unit)) Current gold
-






Hero - Create |cff87cefaMithril Dagger|r and give it to (Triggering unit)
-
-





Else - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








((Item carried by (Triggering unit) of type |CFF959697Gloves of Will|R) is owned) Equal to True
-








((Triggering unit) has an item of type Enchant) Equal to True
-
-







Then - Actions
-








-------- Creates effect on unit, removes items, takes gold, creates item --------
-








Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
-








Item - Remove (Item carried by (Triggering unit) of type |CFF959697Gloves of Will|R)
-








Item - Remove (Item carried by (Triggering unit) of type Enchant)
-








Player - Add -750 to (Owner of (Triggering unit)) Current gold
-








Hero - Create |cff87cefaPower Gauntlets|r and give it to (Triggering unit)
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










((Item carried by (Triggering unit) of type |CFF959697Odd Shield|R) is owned) Equal to True
-










((Triggering unit) has an item of type Enchant) Equal to True
-
-









Then - Actions
-










-------- Creates effect on unit, removes items, takes gold, creates item --------
-










Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
-










Item - Remove (Item carried by (Triggering unit) of type |CFF959697Odd Shield|R)
-










Item - Remove (Item carried by (Triggering unit) of type Enchant)
-










Player - Add -650 to (Owner of (Triggering unit)) Current gold
-










Hero - Create |cff87cefaElite Shield|r and give it to (Triggering unit)
-
-









Else - Actions
-










-------- Removes the enchant item from inventory if no item found --------
-










Item - Remove (Item carried by (Triggering unit) of type Enchant)
-
-
-
-
-
-
-
-
-
-
Last edited:


