Item stacking The following trigger "combines" the charges of 2 items together to save inventory slots.
(very useful): function Combine_Items_Conditions takes nothing returns boolean return GetItemCharges(GetManipulatedItem()) > 0 endfunction
function Combine_Items_Actions takes nothing returns nothing local item NEWITEM = GetManipulatedItem() local unit OURUNIT = GetManipulatingUnit() local integer MAXIMUM = 15 //The max no. of charges allowed local integer ITEMCOUNT = 0 local integer ITEMLOOP = 0 local integer CHARGES = 0