the trigger is relativley simple.
(i guess you mean learning spells by combining items)
you only need a lot of code, one if-sentence for each ability.
//there might be another way with jass, but i don't recommend it for ones not beeing expert in jass...
you need like this:
Prerequisites:
- Items - the items that might be combined
- Abilities - the abilities that shall be learned
Trigger
event
- unit - unit aquires item
cond
- or
- - item - itemtype(Item beeing manipulated) = <one of the items that are combineable>
- integer - Number of Items caried by (Hero manipulating Item) >= <number of items minimum required to combine to an ability>
action
- if
- - boolean - unit caries item of type() = true (do this for each item required for this ability)
- then
- - if
- - - integer - level of ability(<ability to be learned>) of (Hero manipulating item) = 0
- - then
- - - unit - add ability (<the ability to be learned>) to (Hero manipulating item)
- - - item - remove item(each item required for this ability)
- - else
- - - if
- - - - Integer - level of ability(<ability to be learned>) of (Hero manipulating item) < max_level
- - - then
- - - - unit - increase level of ability() for ()
- - - - item - remove item(each item required for this ability)
- - - else
- - - - //ability already maxed