Name | Type | is_array | initial_value |
AbilityHash | hashtable | No | |
AI_Item | itemcode | Yes | |
AI_ItemCost | integer | Yes | |
AIGroup | group | No | |
AIHeroes | group | Yes | |
AIHeroName | string | Yes | |
AIInjuredHeroes | group | Yes | |
AIIsDefendingBase | boolean | Yes | |
AIPlayers | force | No | |
AITargetUnit | unit | Yes | |
AIUnits | group | Yes | |
AOETempUnit | unit | No | |
AOEUnitsEnter | group | No | |
ArcaneBoltCaster | unit | No | |
ArcaneBoltHit | integer | No | |
ArcaneBoltPointArray | location | Yes | |
ArcaneBoltTarget | unit | No | |
ArcaneBoltTempGroup | group | Yes | |
backstab | effect | No | |
Cam_Object | unit | Yes | |
Camera_QQ | real | No | |
CastingAIUnits | group | No | |
ChangePosition | location | Yes | |
ChangeUnits | unit | Yes | |
Configure_Attack_Creep | real | No | |
Configure_Attack_Hero | real | No | |
Configure_Attack_Range | real | No | |
Configure_Flee | real | No | |
Configure_Hero_Retreat | real | No | |
Configure_Item_Pick_Range | real | No | |
Configure_Max_Item | integer | No | |
CreepDenies | integer | Yes | |
DashAngle | real | No | |
DashCaster | unit | No | |
DashCondition | boolean | No | |
DashRange | integer | No | |
DashTravel | integer | No | |
DeadPlayer | string | No | |
End_Game_If_All_Gone | boolean | No | |
EnemyHeroCounter | integer | No | |
FightingForceStrength | real | Yes | |
Force_Point | location | No | |
Game_Minutes | integer | No | |
Game_Seconds | integer | No | |
Game_Time | timer | No | |
group1 | group | No | |
Hashtable | hashtable | No | |
HeroType | unitcode | Yes | |
KillCounter | integer | Yes | |
loc1 | location | No | |
loc2 | location | No | |
maxdist | real | No | |
Morphling | unit | No | |
N | integer | No | |
NovaAngle | real | No | |
NovaCastLoc | location | Yes | |
offset | real | No | |
Player_Color | string | Yes | |
Player_Colors | string | Yes | |
PlayerName | string | Yes | |
PlayerNames | string | Yes | |
Players | force | No | |
PlayersScourge | force | No | |
PlayersScourgePlaying | force | No | |
PlayersSentinel | force | No | |
PlayersSentinelPlaying | force | No | |
RecentKill | integer | Yes | |
Rupture_Integer | integer | No | |
Rupture_Loop | integervar | No | |
RuptureCaster | unit | No | |
RuptureCaster1 | unit | Yes | |
RuptureCaster2 | unit | Yes | |
RuptureEffect | effect | No | |
RuptureOff | boolean | Yes | |
RupturePoint | location | Yes | |
RupturePoint2 | location | No | |
RuptureTarget | unit | No | |
RuptureTime | integer | Yes | |
RuptureTurnOff | integer | No | |
SFX | effect | Yes | |
SFXTempPoint | location | No | |
Shadowstep_Ability_Level | integer | No | |
Shadowstep_Base_Damage | real | No | |
Shadowstep_Calculation | real | No | |
Shadowstep_Caster | unit | No | |
Shadowstep_Damage_Multiplier | real | No | |
Shadowstep_Location | location | No | |
Shadowstep_Location_2 | location | No | |
Shadowstep_Loop_Location | location | No | |
Shadowstep_Loop_Number | integer | No | |
Shadowstep_Target | unit | No | |
Shadowstep_Total_Damage | real | No | |
ShortMode_On | boolean | No | |
StartTimer | real | No | |
Streak | integer | Yes | |
TempGroup | group | No | |
TempGroupDash | group | No | |
TempInteger | integer | No | |
TempInteger2 | integer | No | |
TempLoc | location | No | |
TempPoint | location | No | |
TempPoint2 | location | No | |
TempReal | real | No | |
TempUnit | unit | No | |
TempUnit2 | unit | No | |
Textkillme | texttag | Yes | |
Timer | real | No | |
TimerGroup | group | No | |
TotalHeroes | integer | No | |
UltraShortMode_On | boolean | No | |
UnitGroup | group | No |
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 = 9999 //The max no. of charges allowed
local integer ITEMCOUNT = 0
local integer ITEMLOOP = 0
local integer CHARGES = 0
loop
exitwhen ITEMLOOP > 6
if GetItemTypeId(NEWITEM) == GetItemTypeId(UnitItemInSlot(OURUNIT, ITEMLOOP)) then
if GetItemCharges(UnitItemInSlot(OURUNIT, ITEMLOOP)) + GetItemCharges(NEWITEM) <= MAXIMUM then
if not (UnitItemInSlot(OURUNIT, ITEMLOOP) == NEWITEM) then
set CHARGES = GetItemCharges(UnitItemInSlot(OURUNIT, ITEMLOOP)) + GetItemCharges(NEWITEM)
call SetItemCharges(UnitItemInSlot(OURUNIT, ITEMLOOP), CHARGES)
call RemoveItem(NEWITEM)
set ITEMLOOP = 7
endif
endif
endif
if (ITEMLOOP < 7) then
set ITEMLOOP = ITEMLOOP + 1
endif
endloop
set NEWITEM = null
set OURUNIT = null
endfunction
function InitTrig_Combine_Charge_Items takes nothing returns nothing
set gg_trg_Combine_Charge_Items = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Combine_Charge_Items, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Combine_Charge_Items, Condition( function Combine_Items_Conditions ) )
call TriggerAddAction( gg_trg_Combine_Charge_Items, function Combine_Items_Actions )
endfunction