Name | Type | is_array | initial_value |
CTFDialog | dialog | No | |
CTFLimit | integer | No | |
DeathmatchDialog | dialog | No | |
DeathMatchLimit | integer | No | |
Deaths | integer | Yes | |
DialogButton | button | Yes | |
DwarvesControlHill | boolean | No | |
FlagDwarf | item | No | |
FlagGoblin | item | No | |
Fragz | integer | Yes | |
GameTime | real | No | |
GameTimeMultiplied | real | No | |
GameTimer | timer | No | |
GameTimerWindow | timerdialog | No | |
GameTypeDialog | dialog | No | |
GoblinsControlHill | boolean | No | |
HillControlRadius | real | No | 300.00 |
HillGroup | group | Yes | |
HillPoint | location | No | |
ItemHolder | unit | Yes | |
KotHDialog | dialog | No | |
KOTHPoints | integer | Yes | |
Multiboard | multiboard | No | |
MultishotCount | integer | No | |
MultishotTime | real | No | |
MultishotTimer | timer | No | |
NeutralControlHill | boolean | No | |
NukeCount | integer | No | |
NukeTime | real | No | |
NukeTimer | timer | No | |
PlayerColor | string | Yes | |
PowerUpRegions | rect | Yes | |
RuneGroup | group | No | |
TeamCaptures | integer | Yes | |
TeamFragz | integer | Yes | |
TeamKotHPoints | integer | Yes | |
TempItem | item | Yes | |
TempPoint | location | No | |
TempPoint2 | location | No | |
TempReal | real | No | |
TempRect | rect | No | |
TempUnitGroup | group | No | |
TimeAttackDialog | dialog | No |
function attackingConditions takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function multiShotConditions takes unit u returns boolean
return (UnitHasBuffBJ(u, 'B00K') == true)
endfunction
function attackingActions takes nothing returns nothing
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(u)
local location l = GetSpellTargetLoc()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local real f = GetUnitFacing(u)
local unit u2 = CreateUnit(p, 'h006', x, y, f)
local integer i
local unit u3
local location l2
call UnitApplyTimedLife(u2, 'BTLF', 1.00)
call IssuePointOrderLoc(u2, "attackground", l)
if ( multiShotConditions(u) ) then
set i = 1
loop
exitwhen i == 5
set l2 = PolarProjectionBJ(l, 100.00, ( i*(360/4)-45 ))
set u3 = CreateUnit(p, 'h006', x, y, f)
call UnitApplyTimedLife(u3, 'BTLF', 1.00)
call IssuePointOrderLoc(u3, "attackground", l2)
call RemoveLocation(l2)
set i = i+1
endloop
endif
call RemoveLocation(l)
call RemoveLocation(l2)
set u = null
set u2 = null
set u3 = null
set l = null
set l2 = null
endfunction
//===========================================================================
function InitTrig_attacking takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function attackingConditions ) )
call TriggerAddAction( t, function attackingActions )
endfunction
function preventAttackConditions takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function preventAttackActions takes nothing returns nothing
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(u)
local location l = GetSpellTargetLoc()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local real xx = GetLocationX(l)
local real yy = GetLocationY(l)
local real d = SquareRoot((xx-x)*(xx-x)+(yy-y)*(yy-y))
if d < 250 then
call IssueImmediateOrderBJ( u, "stop" )
call QuestMessageBJ( GetForceOfPlayer(p), bj_QUESTMESSAGE_WARNING, "|cffffcc00That Position is inside minimum range!|r" )
call SetUnitAnimationByIndex(u, 5)
endif
call RemoveLocation(l)
endfunction
//===========================================================================
function InitTrig_prevent_attack takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( t, Condition( function preventAttackConditions ) )
call TriggerAddAction( t, function preventAttackActions )
endfunction
function reviveConditions takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit()) == 'h004' or GetUnitTypeId(GetTriggerUnit()) == 'h005'
endfunction
function reviveActions takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit u2
local player p = GetOwningPlayer(u)
local integer i = GetUnitTypeId(u)
local timerdialog w
local timer t = CreateTimer()
local location l
local real r = 8.00
local integer j = 1
call TimerStart(t, r, false, null)
call CreateTimerDialogBJ(t, GetPlayerName(p))
set w = GetLastCreatedTimerDialogBJ()
call TimerDialogDisplay( w, false )
call TimerDialogDisplayForPlayerBJ(true, w, p)
call PolledWait(r)
if ( IsPlayerAlly(p, Player(0)) ) then
set l = GetRandomLocInRect(gg_rct_DwarfReviveZone)
set u2 = CreateUnitAtLoc(p, i, l, 270.00)
call SelectUnitForPlayerSingle(u2, p)
call SetUnitInvulnerable( u2, true )
endif
if ( IsPlayerEnemy(p, Player(0)) ) then
set l = GetRandomLocInRect(gg_rct_GoblinReviveZone)
set u2 = CreateUnitAtLoc(p, i, l, 270.00)
call SelectUnitForPlayerSingle(u2, p)
call SetUnitInvulnerable( u2, true )
endif
loop
exitwhen j == 3
call UnitAddItemById( u2, GetItemTypeId(UnitItemInSlot(udg_ItemHolder[GetConvertedPlayerId(p)], j)) )
call RemoveItem( UnitItemInSlot(udg_ItemHolder[GetConvertedPlayerId(p)], j) )
set j = j + 1
endloop
call PanCameraToTimedLocForPlayer(p,l,0.60)
call PolledWait(5.00)
call SetUnitInvulnerable( u2, false )
call DestroyTimerDialog(w)
call RemoveLocation(l)
set u = null
set u2 = null
set t = null
endfunction
//===========================================================================
function InitTrig_revive takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( t, Condition( function reviveConditions ) )
call TriggerAddAction( t, function reviveActions )
endfunction
function Trig_give_multishot_Conditions takes nothing returns boolean
return GetItemTypeId(GetManipulatedItem()) == 'I004'
endfunction
function Trig_give_multishot_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local real w = 30.0
local location l
if ( GetUnitAbilityLevel(u, 'A008') < 1 ) then
set udg_MultishotCount = udg_MultishotCount - 1
call UnitAddAbility( u, 'A008' )
else
set l = GetItemLoc(GetManipulatedItem())
call CreateItemLoc( 'I004', l )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(u)), "|cffffcc00You must wait until Multishot runs out to use another!|r" )
call RemoveLocation(l)
endif
call PolledWait(w)
call UnitRemoveAbility(u, 'A008')
set u = null
set l = null
endfunction
//===========================================================================
function InitTrig_give_multishot takes nothing returns nothing
set gg_trg_give_multishot = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_give_multishot, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_give_multishot, Condition( function Trig_give_multishot_Conditions ) )
call TriggerAddAction( gg_trg_give_multishot, function Trig_give_multishot_Actions )
endfunction
function use_nukeConditions takes nothing returns boolean
return GetSpellAbilityId() == 'A006'
endfunction
function use_nukeActions takes nothing returns nothing
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(u)
local location l = GetSpellTargetLoc()
local location l2 = GetUnitLoc(u)
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local real f = GetUnitFacing(u)
local real w = ( DistanceBetweenPoints(l2, l) / 1200 )
local unit u2 = CreateUnit(p, 'h009', x, y, f)
call UnitApplyTimedLife(u2, 'BTLF', 1.00)
call IssuePointOrderLoc(u2, "attackground", l)
call UnitRemoveAbilityBJ( GetSpellAbilityId(), u )
call PolledWait(w)
call DestroyEffect( AddSpecialEffectLoc("war3mapImported\\NuclearExplosion.mdx", l) )
call RemoveLocation(l)
call RemoveLocation(l2)
set u = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_use_nuke takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function use_nukeConditions ) )
call TriggerAddAction( t, function use_nukeActions )
endfunction
function use_bombConditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00B'
endfunction
function use_bombActions takes nothing returns nothing
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(u)
local location l = GetSpellTargetLoc()
local location l2 = GetUnitLoc(u)
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local real f = GetUnitFacing(u)
local real w = ( DistanceBetweenPoints(l2, l) / 1200 )
local unit u2 = CreateUnit(p, 'h00B', x, y, f)
call UnitApplyTimedLife(u2, 'BTLF', 1.00)
call IssuePointOrderLoc(u2, "attackground", l)
call PolledWait(w)
call DestroyEffect( AddSpecialEffectLoc("war3mapImported\\ExplosionBIG.mdx", l) )
call RemoveLocation(l)
call RemoveLocation(l2)
set u = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_use_bomb takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function use_bombConditions ) )
call TriggerAddAction( t, function use_bombActions )
endfunction
function use_cocktailConditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00A'
endfunction
function use_cocktailActions takes nothing returns nothing
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(u)
local location l = GetSpellTargetLoc()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local real f = GetUnitFacing(u)
local unit u2 = CreateUnit(p, 'h00A', x, y, f)
call UnitApplyTimedLife(u2, 'BTLF', 1.00)
call IssuePointOrderLoc(u2, "attackground", l)
call RemoveLocation(l)
set u = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_use_cocktail takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function use_cocktailConditions ) )
call TriggerAddAction( t, function use_cocktailActions )
endfunction