Name | Type | is_array | initial_value |
abyss_chance | real | No | |
abyss_random | real | No | |
abyss_unit | unit | No | |
Aint | integer | No | 100 |
altarspit | button | No | |
angry | button | No | |
arthastheme | sound | No | |
bandit | dialog | No | |
bandit1 | button | No | |
banditall | button | No | |
banditboo | boolean | No | |
banditlord | quest | No | |
banditone | texttag | No | |
bandittwo | texttag | No | |
banditvismod | fogmodifier | No | |
batentry | effect | No | |
battlenetamb | sound | No | |
beastunit | unit | No | |
Bimchee | quest | No | |
bimchee1 | texttag | No | |
BladeMasterShadow | unit | Yes | |
Blink_Effect | effect | Yes | |
Blink_Storm_Caster | unit | Yes | |
Blink_Storm_Target | unit | Yes | |
Blink_Storm_Targets | group | Yes | |
BMVisibility | fogmodifier | No | |
CasterUnit | unit | No | |
Cineskip | boolean | No | |
cineskipone | boolean | No | |
Combine_Charged_Items | boolean | No | |
Combine_Charges_Max | integer | No | |
cult | quest | No | |
darkwizard1 | texttag | No | |
daynight | boolean | No | |
diefelbat | effect | No | |
donothing | button | No | |
doommusic | sound | No | |
doommusic2 | sound | No | |
felbat | dialog | No | |
felbatcaster | unit | No | |
felbatfly | unit | No | |
felbatground | unit | No | |
felbatse | effect | No | |
felbatunitgrp | group | No | |
floatinginteger | integer | No | |
floatingtexts | trigger | Yes | |
flowersize | real | No | 400.00 |
freakyforest | sound | No | |
gandhalf | quest | No | |
gate | boolean | No | |
good | button | No | |
illusion | abilcode | No | |
Illusion | group | No | |
islandvladmir | texttag | No | |
leap | abilcode | No | |
LokGar | quest | No | |
mainquest | quest | No | |
mutplantboo | boolean | No | |
mutplantvismod | fogmodifier | No | |
mystalone | button | No | |
mystique | dialog | No | |
mysttrick | button | No | |
nightamb | sound | No | |
NightTimeCheck | boolean | No | |
ogre | texttag | No | |
ogregood | dialog | No | |
Pheon_Missile | effect | Yes | |
Player_Colors | string | Yes | |
Player_Integer | integer | Yes | |
rockridgevis | boolean | No | |
ruinsgolem2 | texttag | No | |
runtbang | texttag | No | |
scout | fogmodifier | No | |
seclandvismod | boolean | No | |
Shadow1Timer | timer | No | |
Shadow2Timer | timer | No | |
Shadow3Timer | timer | No | |
Shadow4Timer | timer | No | |
Shadow5Timer | timer | No | |
slimeball1 | unit | No | |
slimeball2 | unit | No | |
soundspellruin | sound | No | |
surviveheroes | questitem | No | |
Target_Random | unit | Yes | |
TargetUnit | unit | No | |
TempInterger_Agil | integer | No | |
TempInterger_Int | integer | No | |
TempInterger_Str | integer | No | |
TempPoint | location | No | |
tigera | quest | No | |
torchboo | boolean | No | |
torchvis | fogmodifier | No | |
UnitGroup | group | No | |
vismodsecland | fogmodifier | No | |
visrockbridge | fogmodifier | No | |
visrockbridget | fogmodifier | No | |
war2intro | sound | No |
function Trig_Combine_Items_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) > 0 ) ) then
return false
endif
if ( not ( udg_Combine_Charged_Items == true ) ) 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 = udg_Combine_Charges_Max
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_Charged_Items takes nothing returns nothing
set gg_trg_Combine_Charged_Items = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Combine_Charged_Items, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Combine_Charged_Items, Condition( function Trig_Combine_Items_Conditions ) )
call TriggerAddAction( gg_trg_Combine_Charged_Items, function Trig_Combine_Items_Actions )
endfunction