// ===========================Damage Enemies System
function FilterIsEnemy takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(), bj_groupEnumOwningPlayer)
endfunction
function DamageEnemiesArea takes unit whichUnit, real radius, real x, real y, real amount, boolean attack, boolean ranged, attacktype attackType, damagetype damageType, weapontype weaponType returns nothing
local group g = CreateGroup()
local boolexpr b = Condition(function FilterIsEnemy)
local unit t
set bj_groupEnumOwningPlayer = GetOwningPlayer(whichUnit)
call GroupEnumUnitsInRange(g, x, y, radius, b)
call DestroyBoolExpr(b)
loop
set t = FirstOfGroup(g)
exitwhen t == null
call GroupRemoveUnit(g,t)
call UnitDamageTarget(whichUnit,t,amount,attack, ranged,attackType,damageType,weaponType)
endloop
call DestroyGroup(g)
set g = null
set b = null
endfunction
// ===========================
// ===========================Local Handle Vars By: Kattana
function H2I takes handle h returns integer
return h
return 0
endfunction
// ===========================
function LocalVars takes nothing returns gamecache
if udg_Cache == null then
call FlushGameCache(InitGameCache("somename"))
set udg_Cache = InitGameCache("somename")
endif
return udg_Cache
endfunction
function SetHandleHandle takes handle subject, string name, handle value returns nothing
if value==null then
call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),name)
else
call StoreInteger(LocalVars(), I2S(H2I(subject)), name, H2I(value))
endif
endfunction
function SetHandleInt takes handle subject, string name, integer value returns nothing
if value==0 then
call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),name)
else
call StoreInteger(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction
function SetHandleBoolean takes handle subject, string name, boolean value returns nothing
if value==false then
call FlushStoredBoolean(LocalVars(),I2S(H2I(subject)),name)
else
call StoreBoolean(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction
function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
call FlushStoredReal(LocalVars(), I2S(H2I(subject)), name)
else
call StoreReal(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction
function SetHandleString takes handle subject, string name, string value returns nothing
if value==null then
call FlushStoredString(LocalVars(), I2S(H2I(subject)), name)
else
call StoreString(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction
function GetHandleHandle takes handle subject, string name returns handle
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleInt takes handle subject, string name returns integer
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleBoolean takes handle subject, string name returns boolean
return GetStoredBoolean(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleReal takes handle subject, string name returns real
return GetStoredReal(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleString takes handle subject, string name returns string
return GetStoredString(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleUnit takes handle subject, string name returns unit
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleLocation takes handle subject, string name returns location
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleTimer takes handle subject, string name returns timer
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleTrigger takes handle subject, string name returns trigger
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleEffect takes handle subject, string name returns effect
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleGroup takes handle subject, string name returns group
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleLightning takes handle subject, string name returns lightning
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleWidget takes handle subject, string name returns widget
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function FlushHandleLocals takes handle subject returns nothing
call FlushStoredMission(LocalVars(), I2S(H2I(subject)) )
endfunction
Name | Type | is_array | initial_value |
Backstabbed | unit | Yes | |
Backstabber | unit | Yes | |
BackstabEffect | effect | No | |
Backstabtrig | trigger | Yes | |
Ber_Caster | unit | No | |
Ber_Group | group | No | |
Black_Hole | unit | No | |
Black_Hole_Group | group | No | |
Cache | gamecache | No | |
Caster | unit | No | |
caster | unit | No | |
CasterPos | location | No | |
CF_Snd | integer | No | |
Chain_Missile | unit | No | |
ChainFrost_Group | group | No | |
ChainFrost_Jumps | integer | No | |
Charge_Caster | unit | No | |
Charge_Color | real | No | |
Charge_Dummy | unit | No | |
Charge_Skill | abilcode | No | |
Charge_Target | unit | No | |
Combine_Charged_Items | boolean | No | |
Combine_Charges_Max | integer | No | |
Creep_1 | location | No | |
Creep_2 | location | No | |
Creep_3 | location | No | |
Creep_4 | location | No | |
Creep_Positions | location | Yes | |
Creep_Types | unitcode | Yes | |
Damage | unit | No | |
DarkDragon | string | Yes | |
DeathMatch | integer | Yes | |
degrees | real | No | |
Dis_Con | real | No | |
Distance | real | No | |
Dummy | unit | Yes | |
EA_Caster | unit | No | |
EA_Caster_Loc | location | No | |
EA_Dummy | unit | No | |
EA_Dummy_Loc | location | No | |
EA_Face_Arrow | real | No | |
EA_Group | group | No | |
EA_Offset | location | No | |
EA_Picked | unit | No | |
EA_Picked_Loc | location | No | |
EA_Point | location | No | |
EA_Timer | real | No | |
EG | group | Yes | |
End_Game_If_All_Gone | boolean | No | |
Epicenter_Caster | unit | No | |
Epicenter_Caster_Loc | location | No | |
Epicenter_Damage | integer | No | |
Epicenter_Group | group | No | |
Epicenter_Picked_Loc | location | No | |
Epicenter_Pulses | integer | No | |
Fissure_AddGroup | group | No | |
Fissure_Angle | real | No | |
Fissure_Caster | unit | No | |
Fissure_Caster_Loc | location | No | |
Fissure_Destructible | destructable | Yes | |
Fissure_Group | group | No | |
Fissure_Level | integer | No | |
Fissure_Offset | location | Yes | |
Fissure_TargetPoint | location | No | |
Fissure_TempLine | real | No | |
Fissure_TimeLast | integer | No | |
FrozenThrone | integer | No | |
Game_Minutes | integer | No | |
Game_Seconds | integer | No | |
Game_Time | timer | No | |
GameMode | integer | No | |
Hero_Array | unitcode | Yes | |
Hero_Revive_Time_Factor | real | No | |
Heroes_All | unitcode | Yes | |
Heroes_Scourge | unitcode | Yes | |
Heroes_Sentinel | unitcode | Yes | |
Hostile_Revive_Time | real | No | |
HP | real | Yes | |
HPInteger | integer | No | |
i | integer | No | |
ImgEffect | unit | Yes | |
ItemDrop | integer | Yes | |
ItemDropCount | integer | No | |
l | location | No | |
LastHeroStanding | force | No | |
LastTarget | unit | No | |
LeaderboardScourge | leaderboard | No | |
LeaderboardSentinel | leaderboard | No | |
Lich | unit | No | |
Lich_Point | location | No | |
LoopCreep | integer | No | |
LoopRandom | integer | No | |
loops | integer | No | |
LoopSuper | integer | No | |
Max_Jumps | integer | No | |
maxTimerStored | integer | No | |
MH_Angle | real | No | |
MH_Level | integer | No | |
MH_Link | unit | Yes | |
MH_links | unit | Yes | |
MH_Links | integer | No | |
MH_Unit | unit | Yes | |
Missile | unit | Yes | |
Missile_Point | location | No | |
MODE_AllRandom_AllPick | integer | No | 1 |
MODE_Normal | integer | No | 0 |
MODE_Reverse | integer | No | 2 |
MP | real | Yes | |
MPInteger | integer | No | |
Multiboard_Clock | integer | No | |
Multiboard_ShowDeaths | boolean | No | true |
Multiboard_Spots | integer | Yes | |
Nova_Damage | abilcode | No | |
Nova_Point | location | No | |
Nova_Target | unit | No | |
o | unit | No | |
o_current_loc | location | No | |
Odd_Man_Out | force | No | |
Offset_Point | location | No | |
p | unit | No | |
PC_AoE | real | No | |
PC_Caster | unit | No | |
PC_Caster_Loc | location | No | |
PC_Detect | real | No | |
PC_Distance | real | No | |
PC_Dummy | unit | No | |
PC_Dummy_Loc | location | No | |
PC_Group | group | No | |
PC_Jumps | integer | No | |
PC_Movement | real | No | |
PC_Offset | location | No | |
PC_StartTimer | timer | No | |
PC_Target | unit | No | |
PC_Target_Loc | location | No | |
PC_Timer | real | No | |
Picked_Unit_Point | location | No | |
pl | location | No | |
Player | player | No | |
Player_Already_Picked | integer | Yes | |
Player_Colors | string | Yes | |
Player_Starting_Gold | integer | No | |
PlayerNames | string | Yes | |
Players | force | No | |
PlayersCount | integer | No | |
PlayersScourge | force | No | |
PlayersScourgeCount | integer | No | |
PlayersScourgePlaying | force | No | |
PlayersScourgeReverse | force | No | |
PlayersSentinel | force | No | |
PlayersSentinelCount | integer | No | |
PlayersSentinelPlaying | force | No | |
PlayersSentinelReverse | force | No | |
Point | location | No | |
POS | location | Yes | |
POSInteger | integer | No | |
Random_Count | integer | No | |
Random_Hero | integer | No | |
Random_Start_Pos | location | No | |
RandomData_All | integer | Yes | |
RandomData_Scourge | integer | Yes | |
RandomData_Sentinel | integer | Yes | |
RandomTotal_All | integer | No | |
RandomTotal_Scourge | integer | No | |
RandomTotal_Sentinel | integer | No | |
Rasengan | unit | No | |
Reaper | unit | No | |
Repick_Cost_Ammount | integer | No | |
RevivableHeroes | group | No | |
RevivableTimersWindows | timerdialog | Yes | |
Revive | location | No | |
ReviveTimers | timer | Yes | |
RiverItems | itemcode | Yes | |
RiverItemsCount | integer | No | |
RiverItemsRegions | location | Yes | |
RiverItemsRegionsCount | integer | No | |
RiverItemsTaken | boolean | Yes | |
Run_Time | integer | No | |
Rupture_Caster | unit | No | |
Rupture_Length | integer | No | |
Rupture_Level | integer | No | |
Rupture_Target | unit | No | |
Rupture_Temp_Point | location | No | |
Score_Deaths | integer | Yes | |
Score_Kills | integer | Yes | |
ShortMode_On | boolean | No | |
Sort_Board_By_Kills | boolean | No | |
StoredTimer | timer | Yes | |
StoredTimerData | integer | Yes | |
Super_Chances | integer | Yes | |
Super_Creeps | unitcode | Yes | |
Super_Creeps_On | boolean | No | |
Super_Names | string | Yes | |
Super_Regions | rect | Yes | |
t | unit | No | |
Target | unit | Yes | |
target | unit | No | |
targetpos | rect | No | |
Temp_Group | group | No | |
TEMP_point | location | Yes | |
Temp_Point | location | No | |
TempInteger | integer | No | |
TempLoc00 | location | No | |
TempReal | real | No | |
tl | location | No | |
TOE_Group | group | No | |
TOE_Orb | unit | Yes | |
TOE_Orb_loc | location | Yes | |
TOE_Picked_unit_loc | location | No | |
TOE_Target_loc | location | Yes | |
Total_Heroes | integer | No | |
UberMode_On | boolean | No | |
UltraShortMode_On | boolean | No | |
UnitGroup | group | No | |
Victim | unit | No | |
WF_Angle | real | No | |
WF_Caster | unit | No | |
WF_Caster_Loc | location | No | |
WF_Check | boolean | No | |
WF_Distance | real | No | |
WF_Group | group | No | |
WF_Offset | location | No | |
WF_Point | location | No | |
WorldTree | integer | No |
function Trig_DestroyFX_Actions takes nothing returns nothing
local effect f=bj_lastCreatedEffect
call TriggerSleepAction( 1.00 )
call DestroyEffect(f)
set f=null
endfunction
//===========================================================================
function InitTrig_DestroyFX takes nothing returns nothing
set gg_trg_DestroyFX = CreateTrigger( )
call TriggerAddAction( gg_trg_DestroyFX, function Trig_DestroyFX_Actions )
endfunction
function Trig_Revive_Creeps_Actions takes nothing returns nothing
local integer CUSTOM
set CUSTOM = GetUnitUserData(GetDyingUnit())
call TriggerSleepAction( udg_Hostile_Revive_Time )
call CreateNUnitsAtLoc( 1, udg_Creep_Types[CUSTOM], Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Creep_Positions[CUSTOM], bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), CUSTOM )
endfunction
//===========================================================================
function InitTrig_Revive_Creeps takes nothing returns nothing
set gg_trg_Revive_Creeps = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Revive_Creeps, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Revive_Creeps, function Trig_Revive_Creeps_Actions )
endfunction
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