Name | Type | is_array | initial_value |
Awhilepos | location | No | |
b | boolean | No | |
Bonus_Ability | abilcode | Yes | |
Bonus_Number | integer | No | |
Bonus_Stats | integer | Yes | |
Bonus_Type | integer | No | |
Bonus_Value | integer | No | |
Button | button | No | |
COLOR | string | Yes | |
color | playercolor | No | |
Creep_Point | location | Yes | |
d | destructable | No | |
d2 | destructable | No | |
Defend | button | No | |
DefendMode | boolean | No | |
dt | destructablecode | No | |
dt2 | destructablecode | No | |
Dusttravel | real | No | |
Earthbindcp | location | No | |
Easy | button | No | |
End_Game_If_All_Gone | boolean | No | |
g | group | No | |
Gold | integer | No | |
Hard | button | No | |
Hero_Timer_Table | dialog | No | |
i | integervar | No | |
i2 | integervar | No | |
i3 | integer | No | |
Inventory_Ability | abilcode | No | |
Inventory_Button | destructablecode | Yes | |
Inventory_ButtonNumber | integer | No | |
Inventory_Camera | camerasetup | Yes | |
Inventory_Hashtable | hashtable | No | |
Inventory_Hero | unit | Yes | |
Inventory_ItemNumber | integer | No | |
Inventory_ItemType | itemcode | Yes | |
Inventory_Players | force | No | |
Inventory_Rect | rect | No | |
Inventory_Stop | unit | No | |
Inventory_Timer | timer | No | |
Inventory_Vision | fogmodifier | Yes | |
item | item | No | |
KillButtons | button | Yes | |
Killing | button | No | |
killing_number | dialog | No | |
KillingMode | boolean | No | |
KillTargetNumber | integer | No | |
LastHeroStanding | force | No | |
LeaderBoard | leaderboard | No | |
loc | location | No | |
Medium | button | No | |
Meepo | unit | Yes | |
MeepoClone | unitcode | Yes | E000 |
Meepopos | location | No | |
Mode | dialog | No | |
Mode_Select | dialog | No | |
multiboard_score | integer | Yes | |
p | player | No | |
P1 | playercolor | No | |
p2 | playercolor | No | |
P2G | force | Yes | |
PlayerNames | string | Yes | |
Players | force | No | |
PlayersScourge | force | No | |
PlayersScourgePlaying | force | No | |
PlayersSentinel | force | No | |
PlayersSentinelPlaying | force | No | |
PlayerStatus | integer | Yes | |
Playes_Group | force | Yes | Force00 |
Poofdmg | integer | No | |
Poofend | location | No | |
Poofstart | location | No | |
r | real | No | |
Respawn_Region | rect | Yes | |
Respawn_Time | real | No | |
Revpos | location | No | |
s | string | No | |
Team1Kills | integer | No | |
Team2Kills | integer | No | |
Temp_Integer | integer | No | |
Tempgroup | group | No | |
TempInteger | integer | No | |
Time_level | integer | No | |
u | unit | No | |
ua_EntAshes | unit | Yes | |
ua_Ents | unit | Yes | |
ug_EntAshes | group | No | |
ug_Ents | group | No | |
Unit | unit | Yes | |
x | real | No | |
x2 | real | No | |
y | real | No | |
y2 | real | No | |
zLoc | location | No |
function Trig_Combine_Items_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Combine_Items_Actions takes nothing returns nothing
local integer ITEMCOUNT
local integer ITEMLOOP
local integer CHARGES
local integer MAXIMUM
local item NEWITEM
local unit OURUNIT
set MAXIMUM = 9999
set ITEMCOUNT = 0
set ITEMLOOP = 0
set CHARGES = 0
set NEWITEM = GetManipulatedItem()
set OURUNIT = GetManipulatingUnit()
loop
exitwhen ITEMLOOP > 6
if ((GetItemTypeId(NEWITEM)) == (GetItemTypeId(UnitItemInSlotBJ(OURUNIT, ITEMLOOP)))) then
if ((GetItemCharges(UnitItemInSlotBJ(OURUNIT, ITEMLOOP)) + GetItemCharges(NEWITEM)) <= MAXIMUM) then
if not ( (UnitItemInSlotBJ(OURUNIT, ITEMLOOP)) == (NEWITEM)) then
set CHARGES = (GetItemCharges(UnitItemInSlotBJ(OURUNIT, ITEMLOOP))) + GetItemCharges(NEWITEM)
call SetItemCharges( UnitItemInSlotBJ(OURUNIT, ITEMLOOP), CHARGES )
call RemoveItem( NEWITEM )
set ITEMLOOP=7
endif
endif
endif
if ( ITEMLOOP < 7 ) then
set ITEMLOOP = ITEMLOOP + 1
endif
endloop
endfunction
//===========================================================================
function InitTrig_Combine_Items takes nothing returns nothing
set gg_trg_Combine_Items = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Combine_Items, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Combine_Items, Condition( function Trig_Combine_Items_Conditions ) )
call TriggerAddAction( gg_trg_Combine_Items, function Trig_Combine_Items_Actions )
endfunction