Name | Type | is_array | initial_value |
Button_Extreme_1 | button | No | |
Button_Extreme_2 | button | No | |
Button_Points_1 | button | No | |
Button_Points_2 | button | No | |
Button_Points_3 | button | No | |
Button_Points_4 | button | No | |
Button_Portals_1 | button | No | |
Button_Portals_2 | button | No | |
Dialog_Extreme | dialog | No | |
Dialog_Points | dialog | No | |
Dialog_Portals | dialog | No | |
Int_Hotkeys | integer | Yes | |
Integer | integer | No | |
IntegerBallFacing | integer | No | |
Kicker | player | No | |
Mode_Extreme_Int | integer | No | |
Mode_Portal_Int | integer | No | |
Multiboard | multiboard | No | |
Player | player | No | |
Player_BallContacts | integer | Yes | |
Player_Goals | integer | Yes | |
Player_OwnGoals | integer | Yes | |
Player_Score | integer | Yes | |
PlayerUnit | unit | No | |
Points | integer | Yes | |
Real_Cam | real | Yes | 1650.00 |
ReqPoints | integer | No | |
Rune_Gegenstand | item | Yes | |
Rune_Wahrheitswert | boolean | Yes | |
Scoreboard | multiboard | No | |
Temp_Point | location | No | |
Temp_Point2 | location | No | |
Temp_Point3 | location | No | |
tempGroup | group | No | |
UnitGroup | group | No |
function Trig_Item_Stack_Conditions takes nothing returns boolean
return GetItemCharges(GetManipulatedItem()) > 0
endfunction
function Trig_Item_Stack_Actions takes nothing returns nothing
local integer i = 0
local item iteminslot
loop
set iteminslot = UnitItemInSlot(GetManipulatingUnit(), i)
if ( GetItemTypeId(iteminslot) == GetItemTypeId(GetManipulatedItem()) and iteminslot != GetManipulatedItem()) then
call SetItemCharges( iteminslot, ( GetItemCharges(iteminslot) + GetItemCharges(GetManipulatedItem()) ) )
call RemoveItem( GetManipulatedItem() )
set i = 5
// To end the loop i is increased
endif
set i = i + 1
exitwhen i > 5
endloop
set i = 0
set iteminslot = null
endfunction
// ==================
function InitTrig_Item_stack takes nothing returns nothing
set gg_trg_Item_stack = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Item_stack, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Item_stack, Condition( function Trig_Item_Stack_Conditions ) )
call TriggerAddAction( gg_trg_Item_stack, function Trig_Item_Stack_Actions )
endfunction