function Recipe_Actions takes nothing returns nothing
local unit u = GetManiPulatingUnit() /// I forgot this syntax, sorry ya
local effect sfx
// Bracers
if(UnitHasItemBJ(u, 'item1') == true and UnitHasItemBJ(u, 'item2') == true and UnitHasItemBJ(u, 'itemy') == true)then
call RemoveItem(GetItemOfTypeFromUnit(u, 'item1')
call RemoveItem(GetItemOfTypeFromUnit(u, 'item2')
call RemoveItem(GetItemOfTypeFromUnit(u, 'item3')
call UnitAddItemById(u, 'new_item')
set sfx = AddSpecialEffect("Effect", GetUnitX(u), GetUnitY(U))
call DestroyEffect(sfx)
set sfx = null
set u = null
endif
//Wraith Band
if(UnitHasItemBJ(u, 'item1') == true and UnitHasItemBJ(u, 'item2') == true and UnitHasItemBJ(u, 'itemy') == true)then
call RemoveItem(GetItemOfTypeFromUnit(u, 'item1')
call RemoveItem(GetItemOfTypeFromUnit(u, 'item2')
call RemoveItem(GetItemOfTypeFromUnit(u, 'item3')
call UnitAddItemById(u, 'new_item')
set sfx = AddSpecialEffect("Effect", GetUnitX(u), GetUnitY(U))
call DestroyEffect(sfx)
set sfx = null
set u = null
endif
//Null Talisman
if(UnitHasItemBJ(u, 'item1') == true and UnitHasItemBJ(u, 'item2') == true and UnitHasItemBJ(u, 'itemy') == true)then
call RemoveItem(GetItemOfTypeFromUnit(u, 'item1')
call RemoveItem(GetItemOfTypeFromUnit(u, 'item2')
call RemoveItem(GetItemOfTypeFromUnit(u, 'item3')
call UnitAddItemById(u, 'new_item')
set sfx = AddSpecialEffect("Effect", GetUnitX(u), GetUnitY(U))
call DestroyEffect(sfx)
set sfx = null
set u = null
endif
endfunction
function InitTrig_Recipe_Item takes nothing reuturns nothing
local trigger t = CreateTRigger()
call TriggerRegisterAnyUnitEventUnitBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddActions(t, function Recipe_Actions)
set t = null
endfunction