//=============================================
function DebugError takes player ForPlayer, string msg returns nothing
local sound error=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
if (GetLocalPlayer() == ForPlayer) then
if (msg!="") and (msg!=null) then
call ClearTextMessages()
call DisplayTimedTextToPlayer(ForPlayer, 0.85, 0., 2.00, "|cffffcc00"+msg+"|r")
endif
call StartSound(error)
endif
call KillSoundWhenDone(error)
set error=null
endfunction
//=============================================
function Refresh takes unit u returns nothing
call SetUnitLifePercentBJ(u,100.0)
call SetUnitManaPercentBJ(u,100.0)
call UnitResetCooldown(u)
call SetHeroLevelBJ( u, ( GetHeroLevel(u) + 10 ), false )
endfunction
//====================================================
//Remove Location
function rl takes location l returns nothing
call RemoveLocation(l)
set l = null
endfunction
//=============================================
//Destroy Group
function dg takes group g returns nothing
call DestroyGroup(g)
set g = null
endfunction
//=============================================
//Destroy Effect
function de takes effect e returns nothing
call DestroyEffect(e)
set e = null
endfunction
Name | Type | is_array | initial_value |
Chance2 | integer | No | |
Cinematic_Mode_Kaede | boolean | Yes | |
Cinematic_Mode_Kaede_Off | boolean | Yes | |
Cinematic_Mode_Murloc | boolean | Yes | |
Cinematic_Mode_Murloc_Off | boolean | Yes | |
Creep_Positions | location | Yes | |
Creep_Types | unitcode | Yes | |
FloatingText | integer | No | |
FM_Caster | unit | Yes | |
FM_CustomV | integer | No | |
FM_Dummy | unit | Yes | |
FM_Dummy_Loc | location | Yes | |
FM_First_Loc | location | Yes | |
FM_Index | integer | No | |
FM_Movement | location | Yes | |
FM_Range | real | Yes | |
FM_UGroup_Target | group | Yes | |
FM_UnitGroup | group | No | |
Heroes | unit | Yes | |
Kaede_Area | location | No | |
Kaede_Loc | location | No | |
KaedeQuest | quest | Yes | |
LoopCreep | integer | No | |
Murloc_Loc | location | No | |
Murlock_Area | location | No | |
MurlockQuest | quest | Yes | |
PlayerNumber | integer | No | |
Q_Already_Kaede_Quest | boolean | Yes | |
Q_Already_Murloc_Quest | boolean | Yes | |
Q_AskToKaede | questitem | Yes | |
Q_AskToMurloc | questitem | Yes | |
Q_Kaede_Is_Completed | boolean | Yes | |
Q_KillThe_MN | questitem | Yes | |
Q_KillThe_VVAF | questitem | Yes | |
Q_Murloc_Is_Completed | boolean | Yes | |
Roll_First_Number | string | Yes | |
Roll_Sec_Number | string | Yes | |
Roll_Times | integer | Yes | |
Unit | unit | No | |
UnitGroups | group | Yes | |
WaterSizeA | integer | No | |
WaterSizeB | integer | No | |
WaterSizeC | integer | No | |
Weather | weathereffect | Yes | |
WEATHERLOOP | integer | No |
function Trig_Revive_Creeps_Actions takes nothing returns nothing
local integer CUSTOM = GetUnitUserData(GetDyingUnit())
local real r = 20.00
call TriggerSleepAction( r )
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_ChargesAdd_Actions takes nothing returns nothing
local integer i=-1
local unit u=GetTriggerUnit()
local item it=GetManipulatedItem()
loop
set i=i+1
if UnitItemInSlot(u,i)!=it and GetItemType(it)==ITEM_TYPE_PURCHASABLE and GetItemType(it)==ITEM_TYPE_CHARGED and GetItemTypeId(UnitItemInSlot(u,i))==GetItemTypeId(it)then
call SetItemCharges(UnitItemInSlot(u,i), GetItemCharges(UnitItemInSlot(u,i))+GetItemCharges(it))
call RemoveItem(it)
endif
exitwhen i==5
endloop
set u=null
set it=null
endfunction
//===========================================================================
function InitTrig_ChargesAdd takes nothing returns nothing
set gg_trg_ChargesAdd = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ChargesAdd, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_ChargesAdd, function Trig_ChargesAdd_Actions )
endfunction
function Trig_REPIPE_Trees_Actions takes nothing returns nothing
local destructable AsDf
local real a = 120.00
set AsDf = GetDyingDestructable()
call TriggerSleepAction( a )
call DestructableRestoreLife( AsDf, GetDestructableMaxLife(AsDf), true )
endfunction
//===========================================================================
function InitTrig_Revive_Trees takes nothing returns nothing
set gg_trg_Revive_Trees = CreateTrigger( )
call TriggerAddAction( gg_trg_Revive_Trees, function Trig_REPIPE_Trees_Actions )
endfunction