function Q5 takes real S5 returns nothing
local real T5
local real st=TimerGetElapsed(F5)
if st<=0 then
set F5=CreateTimer()
call TimerStart(F5,$F4240,false,null)
endif
if(S5>0)then
loop
set T5=S5-TimerGetElapsed(F5)+st
exitwhen T5<=0
if(T5>bj_POLLED_WAIT_SKIP_THRESHOLD)then
call TriggerSleepAction(.1*T5)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
endif
endfunction
function U5 takes location W5,real Y5,real Z5 returns location
return Location(GetLocationX(W5)+Y5*Cos(Z5*bj_DEGTORAD),G etLocationY(W5)+Y5*Sin(Z5*bj_DEGTORAD))
endfunction
function V6 takes nothing returns boolean
local real dx=GetDestructableX(GetFilterDestructable())-H5
local real dy=GetDestructableY(GetFilterDestructable())-J5
return(dx*dx+dy*dy<=bj_enumDestructableRadius)
endfunction
function E6 takes real X6,location O6,code R6 returns nothing
local rect r
if(X6>=0)then
set H5=GetLocationX(O6)
set J5=GetLocationY(O6)
set bj_enumDestructableRadius=X6*X6
set r=Rect(H5-X6,J5-X6,H5+X6,J5+X6)
call EnumDestructablesInRect(r,filterEnumDestructablesI nCircleBJ,R6)
call RemoveRect(r)
set r=null
endif
endfunction
function I6 takes rect r,boolexpr A6 returns group
set K5=CreateGroup()
call GroupEnumUnitsInRect(K5,r,A6)
call DestroyBoolExpr(A6)
return K5
endfunction
function N6 takes rect r returns group
set K5=CreateGroup()
call GroupEnumUnitsInRect(K5,r,M5)
return K5
endfunction
function B6 takes rect r,player C6 returns group
set K5=CreateGroup()
set bj_groupEnumOwningPlayer=C6
call GroupEnumUnitsInRect(K5,r,filterGetUnitsInRectOfPl ayer)
return K5
endfunction
function D6 takes real X6,location F6,boolexpr A6 returns group
set K5=CreateGroup()
call GroupEnumUnitsInRangeOfLoc(K5,F6,X6,A6)
return K5
endfunction
function G6 takes real X6,location F6 returns group
set K5=CreateGroup()
call GroupEnumUnitsInRangeOfLoc(K5,F6,X6,M5)
return K5
endfunction
function H6 takes integer J6 returns group
set K5=CreateGroup()
call GroupEnumUnitsOfType(K5,UnitId2String(J6),M5)
return K5
endfunction
function K6 takes player C6,boolexpr A6 returns group
set K5=CreateGroup()
call GroupEnumUnitsOfPlayer(K5,C6,A6)
call DestroyBoolExpr(A6)
return K5
endfunction
function L6 takes player C6,integer J6 returns group
set K5=CreateGroup()
set bj_groupEnumTypeId=J6
call GroupEnumUnitsOfPlayer(K5,C6,filterGetUnitsOfPlaye rAndTypeId)
return K5
endfunction
function M6 takes player C6 returns force
set L5=CreateForce()
call ForceAddPlayer(L5,C6)
return L5
endfunction
function P6 takes player C6 returns force
set L5=CreateForce()
call ForceEnumAllies(L5,C6,M5)
return L5
endfunction
function Q6 takes boolexpr A6 returns force
set L5=CreateForce()
call ForceEnumPlayers(L5,A6)
call DestroyBoolExpr(A6)
return L5
endfunction
function S6 takes itemtype T6,integer U6 returns nothing
local group g
set bj_stockPickedItemType=T6
set bj_stockPickedItemLevel=U6
set g=CreateGroup()
call GroupEnumUnitsOfType(g,"marketplace",M5)
call ForGroup(g,function UpdateEachStockBuildingEnum)
call DestroyGroup(g)
set g=null
endfunction
function W6 takes nothing returns nothing
local integer pickedItemId
local itemtype Y6
local integer Z6=0
local integer V7=0
local integer U6
set U6=1
loop
if(bj_stockAllowedPermanent[U6])then
set V7=V7+1
if(GetRandomInt(1,V7)==1)then
set Y6=ITEM_TYPE_PERMANENT
set Z6=U6
endif
endif
if(bj_stockAllowedCharged[U6])then
set V7=V7+1
if(GetRandomInt(1,V7)==1)then
set Y6=ITEM_TYPE_CHARGED
set Z6=U6
endif
endif
if(bj_stockAllowedArtifact[U6])then
set V7=V7+1
if(GetRandomInt(1,V7)==1)then
set Y6=ITEM_TYPE_ARTIFACT
set Z6=U6
endif
endif
set U6=U6+1
exitwhen U6>$A
endloop
if(V7==0)then
set Y6=null
return
endif
call S6(Y6,Z6)
set Y6=null
endfunction
function E7 takes nothing returns nothing
call W6()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_IN TERVAL,true,function W6)
endfunction
function O7 takes nothing returns boolean
return true
endfunction
function N7 takes unit B7,integer C7 returns item
if(C7==-1)then
return null
endif
set P5=CreateItem(C7,GetUnitX(B7)+GetRandomReal(-32,32),GetUnitY(B7)+GetRandomReal(-32,32))
call SetItemDropID(P5,GetUnitTypeId(B7))
call UpdateStockAvailability(P5)
return P5
endfunction
function D7 takes nothing returns integer
local integer F7=I4
if(F7!=0)then
set I4=N4[F7]
else
set A4=A4+1
set F7=A4
endif
if(F7>8190)then
return 0
endif
set K4[F7]=1
set N4[F7]=-1
return F7
endfunction
function G7 takes unit H7,unit J7,real K7,real L7 returns integer
set I5=H7
set A5=J7
set N5=K7
set B5=L7
call TriggerEvaluate(O5)
return D5
endfunction
function M7 takes nothing returns integer
local integer F7=Q4
if(F7!=0)then
set Q4=T4[F7]
else
set S4=S4+1
set F7=S4
endif
if(F7>8190)then
return 0
endif
set T4[F7]=-1
return F7
endfunction
function P7 takes integer F7 returns nothing
if F7==null then
return
elseif(T4[F7]!=-1)then
return
endif
set T4[F7]=Q4
set Q4=F7
endfunction
function Q7 takes nothing returns nothing
local timer z=GetExpiredTimer()
local group gg=LoadGroupHandle(V,GetHandleId(z),0)
local unit t
loop
set t=FirstOfGroup(gg)
exitwhen t==null
call CameraClearNoiseForPlayer(GetOwningPlayer(t))
call GroupRemoveUnit(gg,t)
endloop
call DestroyGroup(gg)
call DestroyTimer(z)
call FlushChildHashtable(V,GetHandleId(z))
set z=null
set gg=null
endfunction
function S7 takes real K7,real x,real y,real T7,real U7 returns nothing
local group g=CreateGroup()
local unit t
local timer z=CreateTimer()
call SaveGroupHandle(V,GetHandleId(z),0,CreateGroup())
call GroupEnumUnitsInRange(g,x,y,T7,null)
loop
set t=FirstOfGroup(g)
exitwhen t==null
if IsUnitType(t,UNIT_TYPE_HERO) then
call CameraSetEQNoiseForPlayer(GetOwningPlayer(t),U7)
call GroupAddUnit(LoadGroupHandle(V,GetHandleId(z),0),t )
endif
call GroupRemoveUnit(g,t)
endloop
call TimerStart(z,K7,false,function Q7)
set g=null
set z=null
endfunction
function W7 takes real x1,real y1,real x2,real y2 returns real
return bj_RADTODEG*Atan2(y2-y1,x2-x1)
endfunction
function BORN__MultiInstanceFilter takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer (GetTriggerUnit())) and GetUnitAbilityLevel(GetFilterUnit(),'Avul')!=1 and GetWidgetLife(GetFilterUnit())>.45 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==f alse)!=null
endfunction
function Z7 takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit c=LoadUnitHandle(V,0,GetHandleId(z))
call PauseUnit(c,false)
call FlushChildHashtable(V,GetHandleId(z))
call DestroyTimer(z)
set z=null
set c=null
endfunction
function V8 takes nothing returns nothing
set V=InitHashtable()
endfunction
function E8 takes nothing returns nothing
set E=InitHashtable()
endfunction
function X8 takes unit c,unit t returns boolean
return IsUnitEnemy(t,GetOwningPlayer(c)) and GetWidgetLife(t)>.45 and IsUnitType(t,UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(t,'Avul')<=0 and GetWidgetLife(t)>.45
endfunction
function PickUnit takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer (GetTriggerUnit())) and GetWidgetLife(GetFilterUnit())>.45 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==f alse and GetUnitAbilityLevel(GetFilterUnit(),'Avul')<=0)!=n ull
endfunction
function PickHero takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer (GetTriggerUnit())) and GetWidgetLife(GetFilterUnit())>.45 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO) and GetUnitAbilityLevel(GetFilterUnit(),'Avul')<=0)!=n ull
endfunction
function O8 takes nothing returns group
if X==0 then
set V5[0]=CreateGroup()
else
set X=X-1
endif
return V5[X]
endfunction
function R8 takes group g returns nothing
if g==null then
else
if X==8191 then
call DestroyGroup(g)
else
call GroupClear(g)
set V5[X]=g
set X=X+1
endif
endif
endfunction
function I8 takes real Y5,real A8,real N8 returns real
local real t=(Y5*2)/ A8-1
return(-t*t+1)*(A8/ N8)
endfunction
function B8 takes nothing returns boolean
local destructable d=GetFilterDestructable()
local boolean i=IsDestructableInvulnerable(d)
local boolean C8=false
call SetUnitPosition(N,GetWidgetX(d),GetWidgetY(d))
if i then
call SetDestructableInvulnerable(d,false)
endif
set C8=IssueTargetOrderById(N,$D0032,d)
if i then
call SetDestructableInvulnerable(d,true)
endif
call IssueImmediateOrderById(N,$D0004)
set d=null
return C8
endfunction
function D8 takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function J8 takes integer F7 returns nothing
local real x=GetUnitX(B4[F7])
local real y=GetUnitY(B4[F7])
local rect r
if M4[F7]!=0 then
set r=Rect(x-M4[F7],y-M4[F7],x+M4[F7],y+M4[F7])
call EnumDestructablesInRect(r,R,function D8)
call RemoveRect(r)
set r=null
endif
if P4[F7]!="" and P4[F7]!=null then
call DestroyEffect(AddSpecialEffect(P4[F7],x,y))
endif
call PauseUnit(B4[F7],false)
call IssueImmediateOrderById(B4[F7],$D0004)
call SetUnitAnimation(B4[F7],"stand")
call SetUnitFlyHeight(B4[F7],0,0)
endfunction
function K8 takes integer F7 returns nothing
if F7==null then
return
elseif(N4[F7]!=-1)then
return
endif
call J8(F7)
set N4[F7]=I4
set I4=F7
endfunction
function L8 takes nothing returns nothing
local integer H8
local integer i=0
local real x
local real y
local location l
local real h
local rect r
loop
exitwhen i>=C
set H8=O[i]
set x=GetUnitX(B4[H8])+(F4[H8])*J4[H8]
set y=GetUnitY(B4[H8])+(F4[H8])*H4[H8]
call MoveLocation(A,x,y)
set h=I8(F4[H8]*K4[H8],D4[H8],G4[H8])-(GetLocationZ(A)-GetLocationZ(I))+L4[H8]*K4[H8]
if x<D and y<F and x>G and y>H then
call SetUnitX(B4[H8],x)
call SetUnitY(B4[H8],y)
endif
call SetUnitFlyHeight(B4[H8],h,0)
if K4[H8]>=C4[H8]then
call K8(H8)
set C=C-1
set O[i]=O[C]
else
set K4[H8]=K4[H8]+1
endif
set i=i+1
endloop
if C==0 then
call PauseTimer(B)
endif
set l=null
endfunction
function M8 takes nothing returns nothing
set R=Filter(function B8)
set D=GetRectMaxX(bj_mapInitialPlayableArea)-64
set F=GetRectMaxY(bj_mapInitialPlayableArea)-64
set G=GetRectMinX(bj_mapInitialPlayableArea)+64
set H=GetRectMinY(bj_mapInitialPlayableArea)+64
endfunction
function P8 takes real x1,real y1,real x2,real y2 returns real
return bj_RADTODEG*Atan2(y2-y1,x2-x1)
endfunction
function Q8 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer (GetTriggerUnit())) and GetUnitAbilityLevel(GetFilterUnit(),'Avul')!=1 and GetWidgetLife(GetFilterUnit())>.45 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==f alse)!=null
endfunction
function S8 takes real x1,real y1,real x2,real y2 returns real
return SquareRoot((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))
endfunction
function T8 takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit c=LoadUnitHandle(J,0,GetHandleId(z))
local real x=LoadReal(J,0,GetHandleId(z))
local real y=LoadReal(J,1,GetHandleId(z))
local real U8=LoadReal(J,2,GetHandleId(z))
local real Z5=P8(GetUnitX(c),GetUnitY(c),x,y)
local real xx=(((GetUnitX(c))*1.)+((U8)*1.)*Cos(((Z5)*1.)*bj_ DEGTORAD))
local real yy=(((GetUnitY(c))*1.)+((U8)*1.)*Sin(((Z5)*1.)*bj_ DEGTORAD))
call SetUnitPosition(c,xx,yy)
if S8(xx,yy,x,y)<=50 then
call SetUnitPathing(c,true)
call DestroyTimer(z)
call FlushChildHashtable(J,GetHandleId(z))
endif
set c=null
set z=null
endfunction
function W8 takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit c=LoadUnitHandle(J,0,GetHandleId(z))
local real x=LoadReal(J,0,GetHandleId(z))
local real y=LoadReal(J,1,GetHandleId(z))
local real U8=LoadReal(J,2,GetHandleId(z))
local real K7=LoadReal(J,3,GetHandleId(z))
local real Y8=LoadReal(J,4,GetHandleId(z))
local real Z5=P8(GetUnitX(c),GetUnitY(c),x,y)
local real xx=(((GetUnitX(c))*1.)+((U8)*1.)*Cos(((Z5)*1.)*bj_ DEGTORAD))
local real yy=(((GetUnitY(c))*1.)+((U8)*1.)*Sin(((Z5)*1.)*bj_ DEGTORAD))
set K7=K7*50
set Y8=Y8+1
if Y8>=K7 then
call SetUnitPathing(c,true)
call DestroyTimer(z)
call FlushChildHashtable(J,GetHandleId(z))
endif
call SaveReal(J,4,GetHandleId(z),Y8)
call SetUnitPosition(c,xx,yy)
set c=null
set z=null
endfunction
function Z8 takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit c=LoadUnitHandle(J,0,GetHandleId(z))
local unit t=LoadUnitHandle(J,1,GetHandleId(z))
local real U8=LoadReal(J,0,GetHandleId(z))
local real Z5=P8(GetUnitX(t),GetUnitY(t),GetUnitX(c),GetUnitY (c))
local real xx=(((GetUnitX(t))*1.)+((U8)*1.)*Cos(((Z5)*1.)*bj_ DEGTORAD))
local real yy=(((GetUnitY(t))*1.)+((U8)*1.)*Sin(((Z5)*1.)*bj_ DEGTORAD))
local real L7=LoadReal(J,1,GetHandleId(z))
if S8(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY(t) )<=$96 then
call SetUnitPathing(t,true)
call DestroyTimer(z)
call FlushChildHashtable(J,GetHandleId(z))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\ \Human\\ThunderClap\\ThunderClapCaster.mdl",GetUni tX(t),GetUnitY(t)))
call UnitDamageTarget(c,t,L7,true,true,null,DAMAGE_TYPE _DIVINE,null)
endif
call DestroyEffect(AddSpecialEffect("war3mapImported\\E arthSmash.mdx",GetUnitX(t),GetUnitY(t)))
call SetUnitPosition(t,xx,yy)
set c=null
set z=null
set t=null
endfunction
function VVV takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit t=LoadUnitHandle(J,0,GetHandleId(z))
local unit c=LoadUnitHandle(J,1,GetHandleId(z))
local real U8=LoadReal(J,0,GetHandleId(z))
local real Z5=LoadReal(J,1,GetHandleId(z))
local real K7=LoadReal(J,2,GetHandleId(z))
local real Y8=LoadReal(J,3,GetHandleId(z))
local real L7=LoadReal(J,4,GetHandleId(z))
local real xx=(((GetUnitX(t))*1.)+((U8)*1.)*Cos(((Z5)*1.)*bj_ DEGTORAD))
local real yy=(((GetUnitY(t))*1.)+((U8)*1.)*Sin(((Z5)*1.)*bj_ DEGTORAD))
set Y8=Y8+1
set K7=K7*50
if Y8>=K7 then
call DestroyTimer(z)
call FlushChildHashtable(J,GetHandleId(z))
call DestroyEffect(AddSpecialEffect("war3mapImported\\E arthSmash.mdx",GetUnitX(t),GetUnitY(t)))
call UnitDamageTarget(c,t,L7,true,true,null,DAMAGE_TYPE _DIVINE,null)
endif
call SetUnitPosition(t,xx,yy)
call SaveReal(J,3,GetHandleId(z),Y8)
set z=null
set t=null
set c=null
endfunction
function VEV takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit c=LoadUnitHandle(J,0,GetHandleId(z))
call SetUnitPathing(c,true)
call FlushChildHashtable(J,GetHandleId(z))
call DestroyTimer(z)
set z=null
set c=null
endfunction
function VXV takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit t=LoadUnitHandle(J,0,GetHandleId(z))
local unit c=LoadUnitHandle(J,1,GetHandleId(z))
local real U8=LoadReal(J,0,GetHandleId(z))
local real Z5=LoadReal(J,1,GetHandleId(z))
local real K7=LoadReal(J,2,GetHandleId(z))
local real Y8=LoadReal(J,3,GetHandleId(z))
local real L7=LoadReal(J,4,GetHandleId(z))
local real xx=(((GetUnitX(t))*1.)+((U8)*1.)*Cos(((Z5)*1.)*bj_ DEGTORAD))
local real yy=(((GetUnitY(t))*1.)+((U8)*1.)*Sin(((Z5)*1.)*bj_ DEGTORAD))
set Y8=Y8+1
set K7=K7*50
if Y8>=K7 then
call DestroyTimer(z)
call FlushChildHashtable(J,GetHandleId(z))
call DestroyEffect(AddSpecialEffect("war3mapImported\\W hiteApplause.mdx",GetUnitX(t),GetUnitY(t)))
call UnitDamageTarget(c,t,L7,true,true,null,DAMAGE_TYPE _DIVINE,null)
endif
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\ \NightElf\\Blink\\BlinkCaster.mdl",GetUnitX(t),Get UnitY(t)))
call SetUnitPosition(t,xx,yy)
call SaveReal(J,3,GetHandleId(z),Y8)
set z=null
set t=null
set c=null
endfunction
function VOV takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit t=LoadUnitHandle(J,0,GetHandleId(z))
local unit c=LoadUnitHandle(J,1,GetHandleId(z))
local real U8=LoadReal(J,0,GetHandleId(z))
local real Z5=LoadReal(J,1,GetHandleId(z))
local real K7=LoadReal(J,2,GetHandleId(z))
local real Y8=LoadReal(J,3,GetHandleId(z))
local real L7=LoadReal(J,4,GetHandleId(z))
local real xx=(((GetUnitX(t))*1.)+((U8)*1.)*Cos(((Z5)*1.)*bj_ DEGTORAD))
local real yy=(((GetUnitY(t))*1.)+((U8)*1.)*Sin(((Z5)*1.)*bj_ DEGTORAD))
local unit d
set Y8=Y8+1
set K7=K7*50
if Y8>=K7 then
call DestroyTimer(z)
call FlushChildHashtable(J,GetHandleId(z))
call DestroyEffect(AddSpecialEffect("war3mapImported\\E arthSmash.mdx",GetUnitX(t),GetUnitY(t)))
set d=CreateUnit(GetOwningPlayer(c),'h01P',GetUnitX(c) ,GetUnitY(c),0)
call UnitDamageTarget(d,t,L7,true,true,null,DAMAGE_TYPE _DIVINE,null)
call UnitApplyTimedLife(d,'BTLF',.1)
endif
call SetUnitPosition(t,xx,yy)
call SaveReal(J,3,GetHandleId(z),Y8)
set z=null
set t=null
set c=null
set d=null
endfunction
function VRV takes nothing returns nothing
set J=InitHashtable()
endfunction
function VIV takes integer VAV returns timer
if(M==0)then
if(not Q)then
call TriggerEvaluate(R5[(1)])
set M=M-1
else
set E5[0]=CreateTimer()
endif
else
set M=M-1
endif
call SaveInteger(L,0,GetHandleId((E5[M])),(VAV))
return E5[M]
endfunction
function NewTimer takes nothing returns timer
return VIV(0)
endfunction
function VNV takes timer t returns nothing
if(t==null)then
return
endif
if(M==8190)then
call DestroyTimer(t)
else
call PauseTimer(t)
if((LoadInteger(L,0,GetHandleId((t))))==P)then
return
endif
call SaveInteger(L,0,GetHandleId((t)),(P))
set E5[M]=t
set M=M+1
endif
endfunction
function VBV takes nothing returns nothing
local integer i=0
local integer o=-1
local boolean oops=false
if(Q)then
return
else
set Q=true
endif
set L=InitHashtable()
loop
exitwhen(i==256)
set E5[i]=CreateTimer()
call SaveInteger(L,0,GetHandleId((E5[i])),(P))
set i=i+1
endloop
set M=256
endfunction
function VCV takes unit c,unit t,real K7 returns nothing
local real i=K7*2
local integer r=R2I(i)
local unit d
set d=CreateUnit(GetOwningPlayer(c),'h000',GetUnitX(t) ,GetUnitY(t),bj_UNIT_FACING)
call UnitAddAbility(d,'A04Y')
call SetUnitAbilityLevel(d,'A04Y',r)
call IssueTargetOrderById(d,$D007F,t)
call UnitApplyTimedLife(d,'BTLF',.5)
set d=null
endfunction
function VDV takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer (GetTriggerUnit())) and GetUnitAbilityLevel(GetFilterUnit(),'Avul')!=1 and GetWidgetLife(GetFilterUnit())>.45 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==f alse)!=null
endfunction
function VFV takes unit c,unit t,real r returns nothing
local unit d
local real VGV=r
if GetUnitAbilityLevel(t,'AXXX')>=1 then
set VGV=VGV-(VGV*(GetUnitAbilityLevel(t,'AXXX')*.01))
endif
set d=CreateUnit(GetOwningPlayer(c),'h03E',GetUnitX(t) ,GetUnitY(t),bj_UNIT_FACING)
call UnitDamageTarget(d,t,r,true,true,ATTACK_TYPE_CHAOS ,DAMAGE_TYPE_MAGIC,null)
call UnitApplyTimedLife(d,'BTLF',.01)
set d=null
endfunction
function VHV takes unit c,unit t,real r returns nothing
local unit d
local real VGV=r
if VGV>=50 and UnitHasItemOfTypeBJ(t,'I9AA') and GetRandomReal(1,'d')<=5 then
set d=CreateUnit(GetOwningPlayer(t),'h05Z',GetUnitX(c) ,GetUnitY(c),bj_UNIT_FACING)
call UnitDamageTarget(d,c,VGV,true,true,null,DAMAGE_TYP E_DIVINE,null)
call RemoveUnit(d)
else
set d=CreateUnit(GetOwningPlayer(c),'h05Z',GetUnitX(t) ,GetUnitY(t),bj_UNIT_FACING)
call UnitDamageTarget(d,t,r,true,true,null,DAMAGE_TYPE_ DIVINE,null)
call UnitApplyTimedLife(d,'BTLF',.01)
endif
set d=null
endfunction
function VJV takes unit c,unit t,real r returns nothing
local unit d
local real VGV=r
if VGV>=50 and UnitHasItemOfTypeBJ(t,'I9AA') and GetRandomReal(1,'d')<=5 then
set d=CreateUnit(GetOwningPlayer(t),'h03C',GetUnitX(c) ,GetUnitY(c),bj_UNIT_FACING)
call UnitDamageTarget(d,c,VGV,true,true,ATTACK_TYPE_CHA OS,DAMAGE_TYPE_MAGIC,null)
call RemoveUnit(d)
else
set d=CreateUnit(GetOwningPlayer(c),'h03C',GetUnitX(t) ,GetUnitY(t),bj_UNIT_FACING)
call UnitDamageTarget(d,t,VGV,true,true,ATTACK_TYPE_CHA OS,DAMAGE_TYPE_MAGIC,null)
call UnitApplyTimedLife(d,'BTLF',.01)
endif
set d=null
endfunction
function VKV takes unit c,unit t,real r returns nothing
local unit d
local real VGV=r
local texttag tt
if VGV>=50 and UnitHasItemOfTypeBJ(t,'I9AA') and GetRandomReal(1,'d')<=5 then
set d=CreateUnit(GetOwningPlayer(t),'h03D',GetUnitX(c) ,GetUnitY(c),bj_UNIT_FACING)
call UnitDamageTarget(d,c,VGV,true,true,ATTACK_TYPE_CHA OS,DAMAGE_TYPE_MAGIC,null)
call RemoveUnit(d)
elseif GetUnitAbilityLevel(t,'AXXQ')>=1 and GetRandomReal(1,'d')<=5 then
call SetWidgetLife(t,GetWidgetLife(t)+VGV)
set tt=CreateTextTag()
call SetTextTagText(tt,I2S(R2I(VGV)),.025)
call SetTextTagPos(tt,GetUnitX(t),GetUnitY(t),0)
call SetTextTagColor(tt,'d',$FF,'d',$FF)
call SetTextTagVelocity(tt,0,.07)
call SetTextTagPermanent(tt,false)
call SetTextTagLifespan(tt,1.5)
else
set d=CreateUnit(GetOwningPlayer(c),'h03D',GetUnitX(t) ,GetUnitY(t),bj_UNIT_FACING)
call UnitDamageTarget(d,t,VGV,true,true,ATTACK_TYPE_CHA OS,DAMAGE_TYPE_MAGIC,null)
call UnitApplyTimedLife(d,'BTLF',.01)
endif
set d=null
set tt=null
endfunction
function VLV takes unit c,unit t,real r,integer VMV returns nothing
if VMV==1 then
call VKV(c,t,r)
elseif VMV==2 then
call VJV(c,t,r)
elseif VMV==3 then
call VFV(c,t,r)
elseif VMV==4 then
call VHV(c,t,r)
endif
endfunction
function VPV takes integer F7 returns nothing
call UnitRemoveAbility(U4[F7],'B00W')
call P7(F7)
endfunction
function VQV takes nothing returns nothing
local timer z=GetExpiredTimer()
local integer F7=(LoadInteger(L,0,GetHandleId((z))))
local group g
local unit v
local real L7
if GetWidgetLife(W4[F7])>.45 then
set Y4[F7]=Y4[F7]-.2
set L7=Z4[F7]/ 5
call VLV(U4[F7],W4[F7],L7,3)
set g=O8()
call GroupEnumUnitsInRange(g,GetUnitX(W4[F7]),GetUnitY(W4[F7]),$96,null)
loop
set v=FirstOfGroup(g)
exitwhen v==null
if X8(U4[F7],v)and GetUnitAbilityLevel(v,'B00W')<=0 and v!=W4[F7]then
call G7(U4[F7],v,$C,Z4[F7])
endif
call GroupRemoveUnit(g,v)
endloop
call R8(g)
if Y4[F7]<=0 then
call VNV(z)
call VPV(F7)
endif
else
call VNV(z)
call VPV(F7)
endif
endfunction
function VSV takes unit H7,unit J7,real K7,real L7 returns integer
local timer z=(VIV(0))
local integer F7=M7()
local unit d
set U4[F7]=H7
set W4[F7]=J7
set Y4[F7]=K7
set Z4[F7]=L7
set d=CreateUnit(GetOwningPlayer(U4[F7]),'h000',GetUnitX(W4[F7]),GetUnitY(W4[F7]),bj_UNIT_FACING)
call UnitAddAbility(d,'A09Y')
call IssueTargetOrderById(d,$D02BC,W4[F7])
call UnitApplyTimedLife(d,'BTLF',.5)
call SaveInteger(L,0,GetHandleId((z)),(F7))
call TimerStart(z,.2,true,function VQV)
set d=null
return F7
endfunction
function VTV takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit c=LoadUnitHandle(HS,GetHandleId(z),0)
local unit t=LoadUnitHandle(HS,GetHandleId(z),1)
local real L7=LoadReal(HS,GetHandleId(z),0)
call VLV(c,t,L7,3)
call UnitRemoveAbility(t,'B00I')
call SetUnitTimeScale(t,1)
call SetUnitVertexColor(t,$FF,$FF,$FF,$FF)
call VNV(z)
call FlushChildHashtable(HS,GetHandleId(z))
set c=null
set t=null
endfunction
function VUV takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit t=LoadUnitHandle(HS,GetHandleId(z),0)
local real K7=LoadReal(HS,GetHandleId(z),0)
local real VWV=LoadReal(HS,GetHandleId(z),1)
local real VYV=VWV/ 5
local real VZV
local unit d
set K7=K7-.02
call SaveReal(HS,GetHandleId(z),0,K7)
if K7>=VYV then
call SetUnitFlyHeight(t,GetUnitFlyHeight(t)+25,0)
else
set VYV=VYV*50
set VZV=GetUnitFlyHeight(t)/ VYV
call SetUnitFlyHeight(t,GetUnitFlyHeight(t)-VZV,0)
endif
if K7<=0 then
call SetUnitFlyHeight(t,0,0)
call PauseUnit(t,false)
set d=CreateUnit(GetOwningPlayer(t),'h000',GetUnitX(t) ,GetUnitY(t),bj_UNIT_FACING)
call UnitAddAbility(d,'A044')
call IssueTargetOrderById(d,$D006B,t)
call UnitApplyTimedLife(d,'BTLF',.5)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set z=null
set t=null
set d=null
endfunction
function V_V takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit t=LoadUnitHandle(HS,GetHandleId(z),0)
local real K7=LoadReal(HS,GetHandleId(z),0)
local real Z5=LoadReal(HS,GetHandleId(z),1)
local real V0V=LoadReal(HS,GetHandleId(z),2)
local real V1V=LoadReal(HS,GetHandleId(z),3)
local real V2V=LoadReal(HS,GetHandleId(z),4)
local real x
local real y
set K7=K7-.02
call SaveReal(HS,GetHandleId(z),0,K7)
if LoadReal(HS,GetHandleId(t),0)<=0 then
if GetUnitFlyHeight(t)<=V0V/ 2 then
set x=(((GetUnitX(t))*1.)+((V2V)*1.)*Cos(((Z5+90)*1.)* bj_DEGTORAD))
set y=(((GetUnitY(t))*1.)+((V2V)*1.)*Sin(((Z5+90)*1.)* bj_DEGTORAD))
call SetUnitPosition(t,x,y)
else
set x=(((GetUnitX(t))*1.)+((V2V)*1.)*Cos(((Z5-90)*1.)*bj_DEGTORAD))
set y=(((GetUnitY(t))*1.)+((V2V)*1.)*Sin(((Z5-90)*1.)*bj_DEGTORAD))
call SetUnitPosition(t,x,y)
endif
call SetUnitFlyHeight(t,GetUnitFlyHeight(t)+V1V,0)
if GetUnitFlyHeight(t)>=V0V then
call SaveReal(HS,GetHandleId(t),0,1)
endif
else
if GetUnitFlyHeight(t)>=V0V/ 2 then
set x=(((GetUnitX(t))*1.)+((V2V)*1.)*Cos(((Z5-90)*1.)*bj_DEGTORAD))
set y=(((GetUnitY(t))*1.)+((V2V)*1.)*Sin(((Z5-90)*1.)*bj_DEGTORAD))
call SetUnitPosition(t,x,y)
else
set x=(((GetUnitX(t))*1.)+((V2V)*1.)*Cos(((Z5+90)*1.)* bj_DEGTORAD))
set y=(((GetUnitY(t))*1.)+((V2V)*1.)*Sin(((Z5+90)*1.)* bj_DEGTORAD))
call SetUnitPosition(t,x,y)
endif
if GetUnitFlyHeight(t)-V1V<=0 then
call SetUnitFlyHeight(t,0,0)
else
call SetUnitFlyHeight(t,GetUnitFlyHeight(t)-V1V,0)
endif
if GetUnitFlyHeight(t)<=.1 then
call SaveReal(HS,GetHandleId(t),0,0)
endif
endif
if K7<=0 then
call SetUnitFlyHeight(t,0,0)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(t))
call FlushChildHashtable(HS,GetHandleId(z))
endif
set z=null
set t=null
endfunction
function V3V takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit c=LoadUnitHandle(HS,GetHandleId(z),0)
local unit t=LoadUnitHandle(HS,GetHandleId(z),1)
local real U8=LoadReal(HS,GetHandleId(z),1)
local real Z5=W7(GetUnitX(t),GetUnitY(t),GetUnitX(c),GetUnitY (c))
local real K7=LoadReal(HS,GetHandleId(z),0)
local real x=(((GetUnitX(t))*1.)+((U8)*1.)*Cos(((Z5)*1.)*bj_D EGTORAD))
local real y=(((GetUnitY(t))*1.)+((U8)*1.)*Sin(((Z5)*1.)*bj_D EGTORAD))
set K7=K7-.02
call SetUnitPosition(t,x,y)
call SetUnitFacing(t,Z5)
call SaveReal(HS,GetHandleId(z),0,K7)
if K7<=0 then
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set z=null
set t=null
set c=null
endfunction
function V4V takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit d=LoadUnitHandle(HS,GetHandleId(z),0)
local real V5V=LoadReal(HS,GetHandleId(z),0)
local real V6V=LoadReal(HS,GetHandleId(z),1)
local real K7=LoadReal(HS,GetHandleId(z),2)
set K7=K7-.02
set V6V=V6V+V5V
call SetUnitScale(d,V6V,V6V,V6V)
if K7<=0 then
call VNV(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
call SaveReal(HS,GetHandleId(z),1,V6V)
call SaveReal(HS,GetHandleId(z),2,K7)
endif
set d=null
endfunction
function V7V takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit d=LoadUnitHandle(HS,GetHandleId(z),0)
local real V5V=LoadReal(HS,GetHandleId(z),0)
local real V6V=LoadReal(HS,GetHandleId(z),1)
local real K7=LoadReal(HS,GetHandleId(z),2)
set K7=K7-.02
set V6V=V6V+V5V
call SetUnitScale(d,V6V,V6V,V6V)
if K7<=0 then
call RemoveUnit(d)
call VNV(z)
call FlushChildHashtable(HS,GetHandleId(z))
else
call SaveReal(HS,GetHandleId(z),1,V6V)
call SaveReal(HS,GetHandleId(z),2,K7)
endif
set d=null
endfunction
function V8V takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit t=LoadUnitHandle(HS,GetHandleId(z),0)
local real U8=LoadReal(HS,GetHandleId(z),0)
local real Z5=LoadReal(HS,GetHandleId(z),1)
local real K7=LoadReal(HS,GetHandleId(z),2)
local string V9V=LoadStr(HS,GetHandleId(z),3)
local real EVV=LoadReal(HS,GetHandleId(z),4)
local real xx
local real yy
set K7=K7-.02
set EVV=EVV-.02
call SaveReal(HS,GetHandleId(z),2,K7)
call SaveReal(HS,GetHandleId(z),4,EVV)
if S==false then
set xx=(((GetUnitX(t))*1.)+((U8)*1.)*Cos(((Z5)*1.)*bj_ DEGTORAD))
set yy=(((GetUnitY(t))*1.)+((U8)*1.)*Sin(((Z5)*1.)*bj_ DEGTORAD))
call DestroyEffect(AddSpecialEffect(V9V,GetUnitX(t),Get UnitY(t)))
call SetUnitPosition(t,xx,yy)
if K7<=0 then
call PauseTimer(z)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
else
set U8=U8*.2
set xx=(((GetUnitX(t))*1.)+((U8)*1.)*Cos(((Z5)*1.)*bj_ DEGTORAD))
set yy=(((GetUnitY(t))*1.)+((U8)*1.)*Sin(((Z5)*1.)*bj_ DEGTORAD))
call DestroyEffect(AddSpecialEffect(V9V,GetUnitX(t),Get UnitY(t)))
call SetUnitPosition(t,xx,yy)
if EVV<=0 then
call PauseTimer(z)
call DestroyTimer(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
endif
set z=null
set t=null
endfunction
function EEV takes unit c,real x,real y,real EXV,real V5V,integer id,real S5,integer EOV,integer ERV,integer EIV,integer EAV returns nothing
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(c),i d,x,y,EXV)
call SetUnitVertexColor(bj_lastCreatedUnit,EOV,ERV,EIV, EAV)
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',S5)
call SetUnitScale(bj_lastCreatedUnit,V5V,V5V,V5V)
endfunction
function ENV takes nothing returns nothing
local timer z=GetExpiredTimer()
local string s=LoadStr(HS,0,GetHandleId(z))
local real x=LoadReal(HS,1,GetHandleId(z))
local real y=LoadReal(HS,2,GetHandleId(z))
local real EBV=LoadReal(HS,3,GetHandleId(z))
local real S5=LoadReal(HS,4,GetHandleId(z))
set S5=S5-EBV
call DestroyEffect(AddSpecialEffect(s,x,y))
if S5<=0 then
call VNV(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
call SaveReal(HS,4,GetHandleId(z),S5)
set z=null
endfunction
function ItemTable000000_DropItems takes nothing returns nothing
local widget ECV=null
local unit EDV=null
local integer EFV=0
local boolean EGV=true
set ECV=bj_lastDyingWidget
if(ECV==null)then
set EDV=GetTriggerUnit()
endif
if(EDV!=null)then
set EGV=not IsUnitHidden(EDV)
if(EGV and GetChangingUnit()!=null)then
set EGV=(GetChangingUnitPrevOwner()==Player($C))
endif
endif
if(EGV)then
call RandomDistReset()
call RandomDistAddItem('I019',25)
call RandomDistAddItem('I00J',25)
call RandomDistAddItem('I018',25)
call RandomDistAddItem('I017',25)
set EFV=RandomDistChoose()
if(EDV!=null)then
call N7(EDV,EFV)
else
call WidgetDropItem(ECV,EFV)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function EHV takes nothing returns nothing
local widget ECV=null
local unit EDV=null
local integer EFV=0
local boolean EGV=true
set ECV=bj_lastDyingWidget
if(ECV==null)then
set EDV=GetTriggerUnit()
endif
if(EDV!=null)then
set EGV=not IsUnitHidden(EDV)
if(EGV and GetChangingUnit()!=null)then
set EGV=(GetChangingUnitPrevOwner()==Player($C))
endif
endif
if(EGV)then
call RandomDistReset()
call RandomDistAddItem('I018',25)
call RandomDistAddItem('I019',25)
call RandomDistAddItem('I00J',25)
call RandomDistAddItem('I017',25)
set EFV=RandomDistChoose()
if(EDV!=null)then
call N7(EDV,EFV)
else
call WidgetDropItem(ECV,EFV)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function EJV takes nothing returns nothing
local widget ECV=null
local unit EDV=null
local integer EFV=0
local boolean EGV=true
set ECV=bj_lastDyingWidget
if(ECV==null)then
set EDV=GetTriggerUnit()
endif
if(EDV!=null)then
set EGV=not IsUnitHidden(EDV)
if(EGV and GetChangingUnit()!=null)then
set EGV=(GetChangingUnitPrevOwner()==Player($C))
endif
endif
if(EGV)then
call RandomDistReset()
call RandomDistAddItem('I019',25)
call RandomDistAddItem('I017',25)
call RandomDistAddItem('I00J',25)
call RandomDistAddItem('I018',25)
set EFV=RandomDistChoose()
if(EDV!=null)then
call N7(EDV,EFV)
else
call WidgetDropItem(ECV,EFV)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function InitSounds takes nothing returns nothing
endfunction
function EQV takes nothing returns nothing
local weathereffect we
set LU=Rect(5344.,1568.,5696.,2304.)
set MU=Rect(5280.,-2784.,5664.,-1952.)
set PU=Rect(-5760.,1632.,-5376.,2400.)
set QU=Rect(-5824.,-2720.,-5408.,-1952.)
set SU=Rect(-6752.,-6368.,-6464.,-6080.)
set TU=Rect(4224.,-6368.,4512.,-6080.)
set UU=Rect(-8064.,-8192.,-2560.,2624.)
set WU=Rect(2368.,-8192.,8192.,2688.)
set YU=Rect(6496.,-384.,7296.,384.)
set ZU=Rect(-7296.,-608.,-6784.,-96.)
set VW=Rect(-3296.,-256.,-3104.,.0)
set EW=Rect(2944.,-320.,3200.,-64.)
set XW=Rect(5088.,-6848.,5728.,-6304.)
set OW=Rect(-5952.,-6752.,-5344.,-6240.)
set RW=Rect(-3264.,7232.,-2656.,7808.)
set IW=Rect(2016.,7296.,2592.,7808.)
set AW=Rect(4992.,5024.,5728.,5600.)
set NW=Rect(-6016.,5184.,-5312.,5952.)
set BW=Rect(864.,4960.,1408.,5376.)
set CW=Rect(-1632.,4992.,-1088.,5408.)
set DW=Rect(-7584.,3648.,-7104.,4096.)
set FW=Rect(7168.,3552.,7680.,4000.)
set GW=Rect(-3904.,3680.,-3392.,4128.)
set HW=Rect(2304.,3776.,2784.,4256.)
set JW=Rect(-2592.,-1152.,-2144.,608.)
set KW=Rect(2016.,-1184.,2400.,672.)
set LW=Rect(2400.,6080.,2720.,6400.)
set MW=Rect(-3104.,6304.,-2784.,6624.)
set PW=Rect(3680.,-7424.,3904.,-7168.)
set QW=Rect(-7168.,-7392.,-6944.,-7168.)
set SW=Rect(-6912.,-2496.,-6656.,-2208.)
set TW=Rect(6240.,-2528.,6496.,-2240.)
set UW=Rect(6144.,-6400.,6528.,-6048.)
set WW=Rect(-4928.,-6336.,-4672.,-6048.)
set YW=Rect(-6720.,1952.,-6464.,2240.)
set ZW=Rect(6240.,1728.,6496.,2016.)
set VY=Rect(-2432.,-8160.,1600.,-5024.)
set EY=Rect(-2432.,-8192.,1600.,-5024.)
set XY=Rect(-2112.,-6848.,-1632.,-6240.)
set OY=Rect(736.,-6816.,1216.,-6272.)
set RY=Rect(-6048.,-6880.,-5280.,-6496.)
set IY=Rect(5024.,-6784.,5792.,-6400.)
set AY=Rect(-1024.,6944.,576.,7680.)
set NY=Rect(-4352.,3904.,-4096.,4128.)
set BY=Rect(3040.,3744.,3232.,3936.)
set CY=Rect(-8192.,-3168.,8160.,8160.)
endfunction
function ESV takes nothing returns nothing
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_RESO URCE_GOLD,700)
call PanCameraToTimedLocForPlayer(GetEnumPlayer(),GetRe ctCenter(AY),0)
endfunction
function ETV takes nothing returns nothing
call ForForce(bj_FORCE_ALL_PLAYERS,function ESV)
set LH=$A
set MH=$A
set PH[1]='Hpal'
set PH[2]='Hamg'
set PH[3]='Hmkg'
set PH[4]='Hblm'
set PH[5]='Ekee'
set PH[6]='Emoo'
set PH[7]='Edem'
set PH[8]='Ewar'
set PH[8]='H008'
set PH[$A]='Ofar'
set PH[$B]='O006'
set PH[$C]='Otch'
set PH[$D]='Oshd'
set PH[$E]='Udea'
set PH[$F]='Obla'
set PH[16]='Ulic'
set PH[17]='Udre'
set PH[18]='Ucrl'
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=18
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function EWV takes nothing returns boolean
return(IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO))!= null
endfunction
function EYV takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetSoldUnit()) ,Player(6)))
endfunction
function EZV takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetSoldUnit()) ,Player(0)))
endfunction
function E_V takes nothing returns nothing
call SetPlayerUnitAvailableBJ(GetUnitTypeId(GetSoldUnit ()),false,GetEnumPlayer())
endfunction
function E0V takes nothing returns nothing
if(EZV())then
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetSo ldUnit()),GetRectCenter(OW),0)
call SetUnitPositionLoc(GetSoldUnit(),GetRectCenter(OW) )
else
if(EYV())then
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetSo ldUnit()),GetRectCenter(XW),0)
call SetUnitPositionLoc(GetSoldUnit(),GetRectCenter(XW) )
endif
endif
call SetPlayerMaxHeroesAllowed(0,GetOwningPlayer(GetSol dUnit()))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(DC[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]+(GetPlayerName(GetOwningPlayer(GetSoldUnit()))+(" |r"+(" "+("has chosen"+(" "+GetUnitName(GetSoldUnit()))))))))
call SetPlayerName(GetOwningPlayer(GetSoldUnit()),(GetP layerName(GetOwningPlayer(GetSoldUnit()))+("("+(Ge tUnitName(GetSoldUnit())+")"))))
call ForForce(bj_FORCE_ALL_PLAYERS,function E_V)
endfunction
function E2V takes nothing returns boolean
return(IsUnitAliveBJ(F3))
endfunction
function E3V takes nothing returns nothing
call CreateNUnitsAtLoc(4,'h007',Player(0),GetRectCenter (PU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(4,'h00L',Player(0),GetRectCenter (PU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,'h002',Player(0),GetRectCenter (PU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'h006',Player(0),GetRectCenter (PU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'h001',Player(0),GetRectCenter (PU),bj_UNIT_FACING)
call GroupPointOrderByIdLoc(B6(PU,Player(0)),$D000F,Get RectCenter(YU))
endfunction
function E5V takes nothing returns boolean
return(IsUnitAliveBJ(K3))
endfunction
function E6V takes nothing returns nothing
call CreateNUnitsAtLoc(4,'h007',Player(0),GetRectCenter (QU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(4,'h00L',Player(0),GetRectCenter (QU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,'h002',Player(0),GetRectCenter (QU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'h006',Player(0),GetRectCenter (QU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'h001',Player(0),GetRectCenter (QU),bj_UNIT_FACING)
call GroupPointOrderByIdLoc(B6(QU,Player(0)),$D000F,Get RectCenter(YU))
endfunction
function E8V takes nothing returns boolean
return(IsUnitAliveBJ(Q3))
endfunction
function E9V takes nothing returns nothing
call CreateNUnitsAtLoc(4,'o007',Player(6),GetRectCenter (LU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(4,'o000',Player(6),GetRectCenter (LU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'o008',Player(6),GetRectCenter (LU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'o002',Player(6),GetRectCenter (LU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'o001',Player(6),GetRectCenter (LU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'o009',Player(6),GetRectCenter (LU),bj_UNIT_FACING)
call GroupPointOrderByIdLoc(B6(LU,Player(6)),$D000F,Get RectCenter(ZU))
endfunction
function XEV takes nothing returns boolean
return(IsUnitAliveBJ(S3))
endfunction
function XXV takes nothing returns nothing
call CreateNUnitsAtLoc(4,'o007',Player(6),GetRectCenter (MU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(4,'o000',Player(6),GetRectCenter (MU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'o008',Player(6),GetRectCenter (MU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'o002',Player(6),GetRectCenter (MU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'o001',Player(6),GetRectCenter (MU),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'o009',Player(6),GetRectCenter (MU),bj_UNIT_FACING)
call GroupPointOrderByIdLoc(B6(MU,Player(6)),$D000F,Get RectCenter(ZU))
endfunction
function XRV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())!=Player(6 ))and(GetOwningPlayer(GetTriggerUnit())!=Player(7) )and(GetOwningPlayer(GetTriggerUnit())!=Player(8)) and(GetOwningPlayer(GetTriggerUnit())!=Player(9))a nd(GetOwningPlayer(GetTriggerUnit())!=Player($A))a nd(GetOwningPlayer(GetTriggerUnit())!=Player($B))
endfunction
function XIV takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\NightElf\\Blink\\Blink Caster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\Human\\MassTeleport\\M assTeleportTarget.mdl")
call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter( MW))
endfunction
function XNV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())!=Player(0 ))and(GetOwningPlayer(GetTriggerUnit())!=Player(1) )and(GetOwningPlayer(GetTriggerUnit())!=Player(2)) and(GetOwningPlayer(GetTriggerUnit())!=Player(3))a nd(GetOwningPlayer(GetTriggerUnit())!=Player(4))an d(GetOwningPlayer(GetTriggerUnit())!=Player(5))
endfunction
function XBV takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\NightElf\\Blink\\Blink Caster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\Human\\MassTeleport\\M assTeleportTarget.mdl")
call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter( LW))
endfunction
function XDV takes nothing returns nothing
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer(0))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer(1))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer(2))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer(3))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer(4))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer(5))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer(6))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer(7))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer(8))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer(9))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer($A))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer($B))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer($C))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer($D))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer($E))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Pla yer($F))
endfunction
function XGV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())!=Player(6 ))and(GetOwningPlayer(GetTriggerUnit())!=Player(7) )and(GetOwningPlayer(GetTriggerUnit())!=Player(8)) and(GetOwningPlayer(GetTriggerUnit())!=Player(9))a nd(GetOwningPlayer(GetTriggerUnit())!=Player($A))a nd(GetOwningPlayer(GetTriggerUnit())!=Player($B))a nd(GetOwningPlayer(GetTriggerUnit())!=Player(0))
endfunction
function XHV takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\NightElf\\Blink\\Blink Caster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\Human\\MassTeleport\\M assTeleportTarget.mdl")
call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter( OW))
endfunction
function XKV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())!=Player(6 ))and(GetOwningPlayer(GetTriggerUnit())!=Player(7) )and(GetOwningPlayer(GetTriggerUnit())!=Player(8)) and(GetOwningPlayer(GetTriggerUnit())!=Player(9))a nd(GetOwningPlayer(GetTriggerUnit())!=Player($A))a nd(GetOwningPlayer(GetTriggerUnit())!=Player($B))a nd(GetOwningPlayer(GetTriggerUnit())!=Player(0))an d(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function XLV takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\NightElf\\Blink\\Blink Caster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\Human\\MassTeleport\\M assTeleportTarget.mdl")
call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter( OW))
endfunction
function XPV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())!=Player(0 ))and(GetOwningPlayer(GetTriggerUnit())!=Player(1) )and(GetOwningPlayer(GetTriggerUnit())!=Player(3)) and(GetOwningPlayer(GetTriggerUnit())!=Player(2))a nd(GetOwningPlayer(GetTriggerUnit())!=Player(4))an d(GetOwningPlayer(GetTriggerUnit())!=Player(5))and (GetOwningPlayer(GetTriggerUnit())!=Player(6))
endfunction
function XQV takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\NightElf\\Blink\\Blink Caster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\Human\\MassTeleport\\M assTeleportTarget.mdl")
call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter( XW))
endfunction
function XTV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())!=Player(0 ))and(GetOwningPlayer(GetTriggerUnit())!=Player(1) )and(GetOwningPlayer(GetTriggerUnit())!=Player(3)) and(GetOwningPlayer(GetTriggerUnit())!=Player(2))a nd(GetOwningPlayer(GetTriggerUnit())!=Player(4))an d(GetOwningPlayer(GetTriggerUnit())!=Player(5))and (GetOwningPlayer(GetTriggerUnit())!=Player(6))and( GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function XUV takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\NightElf\\Blink\\Blink Caster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\Human\\MassTeleport\\M assTeleportTarget.mdl")
call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter( XW))
endfunction
function XYV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())!=Player(7 ))and(GetOwningPlayer(GetTriggerUnit())!=Player(8) )and(GetOwningPlayer(GetTriggerUnit())!=Player(9)) and(GetOwningPlayer(GetTriggerUnit())!=Player($A)) and(GetOwningPlayer(GetTriggerUnit())!=Player($B))
endfunction
function XZV takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\NightElf\\Blink\\Blink Caster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\Human\\MassTeleport\\M assTeleportTarget.mdl")
call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter( SW))
endfunction
function X0V takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())!=Player(7 ))and(GetOwningPlayer(GetTriggerUnit())!=Player(8) )and(GetOwningPlayer(GetTriggerUnit())!=Player(9)) and(GetOwningPlayer(GetTriggerUnit())!=Player($A)) and(GetOwningPlayer(GetTriggerUnit())!=Player($B))
endfunction
function X1V takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\NightElf\\Blink\\Blink Caster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\Human\\MassTeleport\\M assTeleportTarget.mdl")
call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter( YW))
endfunction
function X3V takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())!=Player(1 ))and(GetOwningPlayer(GetTriggerUnit())!=Player(2) )and(GetOwningPlayer(GetTriggerUnit())!=Player(3)) and(GetOwningPlayer(GetTriggerUnit())!=Player(4))a nd(GetOwningPlayer(GetTriggerUnit())!=Player(5))
endfunction
function X4V takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\NightElf\\Blink\\Blink Caster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\Human\\MassTeleport\\M assTeleportTarget.mdl")
call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter( TW))
endfunction
function X6V takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())!=Player(1 ))and(GetOwningPlayer(GetTriggerUnit())!=Player(2) )and(GetOwningPlayer(GetTriggerUnit())!=Player(3)) and(GetOwningPlayer(GetTriggerUnit())!=Player(4))a nd(GetOwningPlayer(GetTriggerUnit())!=Player(5))
endfunction
function X7V takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\NightElf\\Blink\\Blink Caster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",GetEnterin gUnit(),"Abilities\\Spells\\Human\\MassTeleport\\M assTeleportTarget.mdl")
call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter( ZW))
endfunction
function X9V takes nothing returns boolean
return((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)) and(GetOwningPlayer(GetDyingUnit())!=Player(7))and (GetOwningPlayer(GetDyingUnit())!=Player(8))and(Ge tOwningPlayer(GetDyingUnit())!=Player(9))and(GetOw ningPlayer(GetDyingUnit())!=Player($A))and(GetOwni ngPlayer(GetDyingUnit())!=Player($B)))!=null
endfunction
function OVV takes nothing returns nothing
call TriggerSleepAction((I2R(GetUnitLevel(GetDyingUnit( )))*2.4))
call ReviveHeroLoc(GetDyingUnit(),GetRectCenter(OW),tru e)
endfunction
function OXV takes nothing returns boolean
return((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)) and(GetOwningPlayer(GetDyingUnit())!=Player(1))and (GetOwningPlayer(GetDyingUnit())!=Player(2))and(Ge tOwningPlayer(GetDyingUnit())!=Player(3))and(GetOw ningPlayer(GetDyingUnit())!=Player(4))and(GetOwnin gPlayer(GetDyingUnit())!=Player(5)))!=null
endfunction
function OOV takes nothing returns nothing
call TriggerSleepAction((I2R(GetUnitLevel(GetDyingUnit( )))*2.4))
call ReviveHeroLoc(GetDyingUnit(),GetRectCenter(XW),tru e)
endfunction
function OIV takes nothing returns nothing
call RemoveAllGuardPositions(Player(0))
call RemoveAllGuardPositions(Player(6))
endfunction
function ONV takes nothing returns nothing
set U3[0]="|c00ff0303"
set U3[1]="|c000042ff"
set U3[2]="|c001ce6b9"
set U3[3]="|c00540081"
set U3[4]="|c00fffc01"
set U3[5]="|c00ff8000"
set U3[6]="|c0020c000"
set U3[7]="|c00e55bb0"
set U3[8]="|c00959697"
set U3[9]="|c007ebff1"
set U3[$A]="|c00106246"
set U3[$B]="|c004e2a04"
endfunction
function OBV takes unit OCV,integer ODV returns string
local string s=""
local unit c=OCV
local integer OFV=GetPlayerId(GetOwningPlayer(c))
local string OGV=GetPlayerName(GetOwningPlayer(c))
set c=null
if ODV==3 then
set s=U3[OFV]+OGV+"|r is on a |cff80ff80Killing Spree|r"
elseif ODV==4 then
set s=U3[OFV]+OGV+"|r is |cff4B0082Dominating|r"
elseif ODV==5 then
set s=U3[OFV]+OGV+"|r is |cffFF00FFMega Kill|r!"
elseif ODV==6 then
set s=U3[OFV]+OGV+"|r is |cffFF8C00Unstoppable!|r"
elseif ODV==7 then
set s=U3[OFV]+OGV+"|r is |cffB8860BWicked Sick|r!|r"
elseif ODV==8 then
set s=U3[OFV]+OGV+"|r is |cffFF00FFMonster Kill!|r!!"
elseif ODV==9 then
set s=U3[OFV]+OGV+"|r is |cffFF0000Godlike|r!!!|r"
elseif ODV==$A then
set s=U3[OFV]+OGV+"|r is |cffFF0000Beyond Godlike|r!|r"
elseif ODV==$B then
set s=U3[OFV]+OGV+"|r is |cffFF8C00MASSACRE !!!!!|r"
endif
return s
endfunction
function OHV takes unit OCV,integer ODV returns string
local string s=""
local unit c=OCV
local integer OFV=GetPlayerId(GetOwningPlayer(c))
local string OGV=GetPlayerName(GetOwningPlayer(c))
set c=null
if ODV==2 then
set s=U3[OFV]+OGV+"|r just got a |cff0000CDDouble Kill|r!|r"
elseif ODV==3 then
set s=U3[OFV]+OGV+"|r just got a |cff80ff80Tripel Kill|r!!!|r"
elseif ODV==4 then
set s=U3[OFV]+OGV+"|r just got a |cff1E90FFUltra Kill|r!!!|r"
elseif ODV==5 then
set s=U3[OFV]+OGV+"|r just got a |cff4169E1 RAMPAGE !!|r!!!|r"
endif
return s
endfunction
function OJV takes unit OCV returns string
local string s=""
local unit c=OCV
local integer OFV=GetPlayerId(GetOwningPlayer(c))
local string OGV=GetPlayerName(GetOwningPlayer(c))
set c=null
set s=U3[OFV]+OGV+"|r just drew |cffFF0000FirstBlood! |r"
return s
endfunction
function OKV takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) )!=null
endfunction
function OLV takes nothing returns nothing
local timer z=GetExpiredTimer()
local integer OFV=LoadInteger(X4,GetHandleId(z),0)
set V4[OFV]=0
call DestroyTimer(z)
call FlushChildHashtable(X4,GetHandleId(z))
set z=null
endfunction
function OMV takes nothing returns nothing
local unit t=GetTriggerUnit()
local unit c=GetKillingUnit()
local integer OFV=GetPlayerId(GetOwningPlayer(c))
local integer OPV=GetPlayerId(GetOwningPlayer(t))
local sound s
local sound s2
local timer OQV
local timer z
local integer OSV
if GetPlayerController(GetOwningPlayer(c))==MAP_CONTR OL_USER then
set OQV=LoadTimerHandle(X4,GetHandleId(c),0)
if OQV!=null then
call DestroyTimer(OQV)
call FlushChildHashtable(X4,GetHandleId(OQV))
call FlushChildHashtable(X4,GetHandleId(c))
endif
set z=CreateTimer()
call SaveTimerHandle(X4,GetHandleId(c),0,z)
call SaveInteger(X4,GetHandleId(z),0,OFV)
call TimerStart(z,Y3,false,function OLV)
set E4=E4+1
set Z3[OFV]=Z3[OFV]+1
set V4[OFV]=V4[OFV]+1
if V4[OFV]>5 then
set V4[OFV]=5
endif
set Z3[OPV]=0
if Z3[OFV]>W3 then
set Z3[OFV]=W3
endif
set OSV=V4[OFV]
if E4==1 then
set s=CreateSound("war3mapImported\\firstblood.mp3",fa lse,false,false,$A,$A,"Default")
call SetSoundPosition(s,GetUnitX(c),GetUnitY(c),0)
call SetSoundVolume(s,$7F)
call StartSound(s)
call DisplayTextToForce(O4,OJV(c))
else
if Z3[OFV]>=3 then
set s=CreateSound("war3mapImported\\SoundKill"+I2S(Z3[OFV])+".mp3",false,false,false,$A,$A,"Default")
call SetSoundPosition(s,GetUnitX(c),GetUnitY(c),0)
call SetSoundVolume(s,$7F)
call StartSound(s)
call DisplayTextToForce(O4,OBV(c,Z3[OFV]))
endif
call Q5(1)
set s2=CreateSound("war3mapImported\\KillContinue"+I2S (OSV)+".mp3",false,false,false,$A,$A,"Default")
call SetSoundPosition(s2,GetUnitX(c),GetUnitY(c),0)
call SetSoundVolume(s2,$7F)
call StartSound(s2)
call DisplayTextToForce(O4,OHV(c,OSV))
endif
endif
set t=null
set c=null
set s=null
set s2=null
set OQV=null
endfunction
function OTV takes nothing returns nothing
local trigger t=CreateTrigger()
local integer I7=0
set U3[0]="|c00ff0303"
set U3[1]="|c000042ff"
set U3[2]="|c001ce6b9"
set U3[3]="|c00540081"
set U3[4]="|c00fffc01"
set U3[5]="|c00ff8000"
set U3[6]="|c0020c000"
set U3[7]="|c00e55bb0"
set U3[8]="|c00959697"
set U3[9]="|c007ebff1"
set U3[$A]="|c00106246"
set U3[$B]="|c004e2a04"
set O4=bj_FORCE_ALL_PLAYERS
loop
set Z3[I7]=0
set V4[I7]=0
call TriggerRegisterPlayerUnitEvent(t,Player(I7),EVENT_ PLAYER_UNIT_DEATH,null)
set I7=I7+1
exitwhen I7==16
endloop
call TriggerAddCondition(t,Condition(function OKV))
call TriggerAddAction(t,function OMV)
set I7=3
call Preload("war3mapImported\\firstblood.mp3")
loop
exitwhen I7>W3
call Preload("war3mapImported\\SoundKill"+I2S(I7)+".mp3 ")
if I7>=2 and I7<=5 then
call Preload("war3mapImported\\KillContinue"+I2S(I7)+". mp3")
endif
set I7=I7+1
endloop
set t=null
endfunction
function OUV takes nothing returns boolean
return(GetItemCharges(GetManipulatedItem())>0)
endfunction
function OWV takes nothing returns boolean
return(GetItemTypeId(GetManipulatedItem())==GetIte mTypeId(UnitItemInSlotBJ(GetManipulatingUnit(),bj_ forLoopAIndex)))and(GetManipulatedItem()!=UnitItem InSlotBJ(GetManipulatingUnit(),bj_forLoopAIndex))
endfunction
function OYV takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(OWV())then
call SetItemCharges(UnitItemInSlotBJ(GetManipulatingUni t(),bj_forLoopAIndex),(GetItemCharges(UnitItemInSl otBJ(GetManipulatingUnit(),bj_forLoopAIndex))+GetI temCharges(GetManipulatedItem())))
call RemoveItem(GetManipulatedItem())
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function O_V takes nothing returns boolean
return(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer (GetAttacker())))
endfunction
function O0V takes nothing returns nothing
call IssueImmediateOrderById(GetAttacker(),$D0004)
endfunction
function O2V takes nothing returns boolean
return(GetOwningPlayer(GetFilterUnit())==GetTrigge rPlayer())
endfunction
function O3V takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function O4V takes nothing returns nothing
set FF=(FF-1)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|c00ff0 303"+(GetPlayerName(GetTriggerPlayer())+"|r"))+(" has left the game")))
set FG=I6(bj_mapInitialPlayableArea,Condition(function O2V))
call ForGroupBJ(FG,function O3V)
call DestroyGroup(FG)
endfunction
function O6V takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)) !=null
endfunction
function O7V takes nothing returns nothing
call DisplayTextToForce(M6(GetTriggerPlayer()),(DC[(1+GetPlayerId(GetTriggerPlayer()))]+(GetUnitName(GetEnumUnit())+("|r movement speed is "+R2SW(GetUnitMoveSpeed(GetEnumUnit()),4,3)))) )
endfunction
function O8V takes nothing returns nothing
set ZC=K6(GetTriggerPlayer(),Condition(function O6V))
call ForGroupBJ(ZC,function O7V)
endfunction
function RVV takes nothing returns boolean
return(GetEventPlayerChatString()=="-clear")
endfunction
function REV takes nothing returns nothing
call ClearTextMessagesBJ(Q6(Condition(function RVV)))
endfunction
function ROV takes nothing returns boolean
return(GetTriggerUnit()==L3)or(GetTriggerUnit()==J 3)
endfunction
function RRV takes nothing returns boolean
return(ROV())
endfunction
function RIV takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
endfunction
function RAV takes nothing returns nothing
call CreateFogModifierRectBJ(true,GetEnumPlayer(),FOG_O F_WAR_VISIBLE,bj_mapInitialPlayableArea)
endfunction
function RNV takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
endfunction
function RBV takes nothing returns nothing
call CreateFogModifierRectBJ(true,GetEnumPlayer(),FOG_O F_WAR_VISIBLE,bj_mapInitialPlayableArea)
endfunction
function RCV takes nothing returns boolean
return(IsUnitAlly(GetKillingUnit(),Player(6)))
endfunction
function RDV takes nothing returns boolean
return(IsUnitAlly(GetKillingUnit(),Player(0)))
endfunction
function RFV takes nothing returns nothing
if(RDV())then
call ForGroupBJ(N6(bj_mapInitialPlayableArea),function RIV)
call ForForce(GG,function RAV)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Game has ended. Team Alliance Win")
call TriggerSleepAction(3.)
call CustomVictoryBJ(Player(1),true,true)
call CustomVictoryBJ(Player(2),true,true)
call CustomVictoryBJ(Player(3),true,true)
call CustomVictoryBJ(Player(4),true,true)
call CustomVictoryBJ(Player(5),true,true)
call CustomDefeatBJ(Player(7),"Defeat")
call CustomDefeatBJ(Player(8),"Defeat")
call CustomDefeatBJ(Player(9),"Defeat")
call CustomDefeatBJ(Player($A),"Defeat")
call CustomDefeatBJ(Player($B),"Defeat")
else
if(RCV())then
call ForGroupBJ(N6(bj_mapInitialPlayableArea),function RNV)
call ForForce(GG,function RBV)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Game has ended. Team Horde Win")
call TriggerSleepAction(3.)
call CustomVictoryBJ(Player(7),true,true)
call CustomVictoryBJ(Player(8),true,true)
call CustomVictoryBJ(Player(9),true,true)
call CustomVictoryBJ(Player($A),true,true)
call CustomVictoryBJ(Player($B),true,true)
call CustomDefeatBJ(Player(1),"Defeat")
call CustomDefeatBJ(Player(2),"Defeat")
call CustomDefeatBJ(Player(3),"Defeat")
call CustomDefeatBJ(Player(4),"Defeat")
call CustomDefeatBJ(Player(5),"Defeat")
endif
endif
endfunction
function RHV takes nothing returns nothing
call AdjustPlayerStateBJ(1,GetEnumPlayer(),PLAYER_STATE _RESOURCE_GOLD)
endfunction
function RJV takes nothing returns nothing
call ForForce(GG,function RHV)
endfunction
function RLV takes nothing returns nothing
call AdjustPlayerStateBJ(1,Player(0),PLAYER_STATE_RESOU RCE_GOLD)
call AdjustPlayerStateBJ(1,Player(1),PLAYER_STATE_RESOU RCE_GOLD)
call AdjustPlayerStateBJ(1,Player(2),PLAYER_STATE_RESOU RCE_GOLD)
call AdjustPlayerStateBJ(1,Player(3),PLAYER_STATE_RESOU RCE_GOLD)
call AdjustPlayerStateBJ(1,Player(4),PLAYER_STATE_RESOU RCE_GOLD)
call AdjustPlayerStateBJ(1,Player(5),PLAYER_STATE_RESOU RCE_GOLD)
call AdjustPlayerStateBJ(1,Player(6),PLAYER_STATE_RESOU RCE_GOLD)
call AdjustPlayerStateBJ(1,Player(7),PLAYER_STATE_RESOU RCE_GOLD)
call AdjustPlayerStateBJ(1,Player(8),PLAYER_STATE_RESOU RCE_GOLD)
call AdjustPlayerStateBJ(1,Player(9),PLAYER_STATE_RESOU RCE_GOLD)
call AdjustPlayerStateBJ(1,Player($A),PLAYER_STATE_RESO URCE_GOLD)
call AdjustPlayerStateBJ(1,Player($B),PLAYER_STATE_RESO URCE_GOLD)
endfunction
function RPV takes nothing returns boolean
return(IsDestructableDeadBJ(GetEnumDestructable()) )
endfunction
function RQV takes nothing returns nothing
if(RPV())then
call DestructableRestoreLife(GetEnumDestructable(),GetD estructableMaxLife(GetEnumDestructable()),false)
endif
endfunction
function RSV takes nothing returns nothing
call EnumDestructablesInRectAll(bj_mapInitialPlayableAr ea,function RQV)
endfunction
function RUV takes nothing returns boolean
return(TG>=60)
endfunction
function RWV takes nothing returns nothing
set TG=(TG+1)
if(RUV())then
set TG=0
set UG=(UG+1)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=$C
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetPlayerStateBJ(Player(-1+(bj_forLoopAIndex)),PLAYER_STATE_RESOURCE_LUMBER ,UG)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=$C
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetPlayerStateBJ(Player(-1+(bj_forLoopAIndex)),PLAYER_STATE_RESOURCE_FOOD_U SED,TG)
call EnableTrigger(GZ)
call EnableTrigger(KZ)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function RZV takes nothing returns nothing
call StartTimerBJ(HF,false,1800.)
call CreateTimerDialogBJ(HF,"Team Brawl")
set JF=bj_lastCreatedTimerDialog
endfunction
function R0V takes nothing returns boolean
return(FF>=2)
endfunction
function R1V takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)) !=null
endfunction
function R2V takes nothing returns nothing
call SetUnitTimeScalePercent(GetEnumUnit(),100.)
call PauseUnit(GetEnumUnit(),true)
call SetUnitInvulnerable(GetEnumUnit(),true)
endfunction
function Trig_Tournament_Team_Begin_Func004Func039002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)) !=null
endfunction
function Trig_Tournament_Team_Begin_Func004Func039002002002 takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetFilterUnit( )),Player(0)))
endfunction
function R3V takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_HERO)),(IsPlayerAlly(GetOwningPlayer(GetF ilterUnit()),Player(0)))))!=null
endfunction
function Trig_Tournament_Team_Begin_Func004Func040002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)) !=null
endfunction
function Trig_Tournament_Team_Begin_Func004Func040002002002 takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetFilterUnit( )),Player(6)))
endfunction
function R4V takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_HERO)),(IsPlayerAlly(GetOwningPlayer(GetF ilterUnit()),Player(6)))))!=null
endfunction
function R5V takes nothing returns nothing
call SetUnitPositionLoc(GetEnumUnit(),GetRandomLocInRec t(XY))
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetEn umUnit()),GetRandomLocInRect(XY),0)
call SetUnitLifePercentBJ(GetEnumUnit(),'d')
call SetUnitManaPercentBJ(GetEnumUnit(),'d')
endfunction
function R6V takes nothing returns nothing
call SetUnitPositionLoc(GetEnumUnit(),GetRandomLocInRec t(OY))
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetEn umUnit()),GetRandomLocInRect(OY),0)
call SetUnitLifePercentBJ(GetEnumUnit(),'d')
call SetUnitManaPercentBJ(GetEnumUnit(),'d')
endfunction
function R7V takes nothing returns nothing
call PauseUnit(GetEnumUnit(),false)
call SetUnitInvulnerable(GetEnumUnit(),false)
endfunction
function Trig_Tournament_Team_Begin_Func004Func054001 takes nothing returns boolean
return(IsTriggerEnabled(PZ)==false)
endfunction
function R8V takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
call SetUnitInvulnerable(GetEnumUnit(),true)
endfunction
function Trig_Tournament_Team_Begin_Func004Func056002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)) !=null
endfunction
function Trig_Tournament_Team_Begin_Func004Func056002002002 001 takes nothing returns boolean
return(IsUnitAlly(GetFilterUnit(),Player(0)))
endfunction
function Trig_Tournament_Team_Begin_Func004Func056002002002 002 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Tournament_Team_Begin_Func004Func056002002002 takes nothing returns boolean
return GetBooleanAnd((IsUnitAlly(GetFilterUnit(),Player(0 ))),(IsUnitAliveBJ(GetFilterUnit())))
endfunction
function R9V takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_HERO)),(GetBooleanAnd((IsUnitAlly(GetFilt erUnit(),Player(0))),(IsUnitAliveBJ(GetFilterUnit( )))))))!=null
endfunction
function Trig_Tournament_Team_Begin_Func004Func057002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)) !=null
endfunction
function Trig_Tournament_Team_Begin_Func004Func057002002002 001 takes nothing returns boolean
return(IsUnitAlly(GetFilterUnit(),Player(6)))
endfunction
function Trig_Tournament_Team_Begin_Func004Func057002002002 002 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Tournament_Team_Begin_Func004Func057002002002 takes nothing returns boolean
return GetBooleanAnd((IsUnitAlly(GetFilterUnit(),Player(6 ))),(IsUnitAliveBJ(GetFilterUnit())))
endfunction
function IVV takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_HERO)),(GetBooleanAnd((IsUnitAlly(GetFilt erUnit(),Player(6))),(IsUnitAliveBJ(GetFilterUnit( )))))))!=null
endfunction
function IEV takes nothing returns nothing
call AdjustPlayerStateBJ(5000,GetOwningPlayer(GetEnumUn it()),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function IXV takes nothing returns nothing
call SetUnitPositionLoc(GetEnumUnit(),GetRectCenter(XW) )
endfunction
function IOV takes nothing returns boolean
return(AG==2)
endfunction
function IRV takes nothing returns nothing
call AdjustPlayerStateBJ(5000,GetOwningPlayer(GetEnumUn it()),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function IIV takes nothing returns nothing
call SetUnitPositionLoc(GetEnumUnit(),GetRectCenter(OW) )
endfunction
function IAV takes nothing returns boolean
return(AG==1)
endfunction
function INV takes nothing returns boolean
return(AG==0)
endfunction
function IBV takes nothing returns nothing
call PauseUnit(GetEnumUnit(),false)
call SetUnitInvulnerable(GetEnumUnit(),false)
endfunction
function ICV takes nothing returns boolean
return(DF<=$A)
endfunction
function IDV takes nothing returns boolean
return(DF<=5)
endfunction
function IFV takes nothing returns boolean
return(AF==5)
endfunction
function IGV takes nothing returns boolean
return(AF==2)or(AF==4)or(AF==7)or(AF==9)or(AF==$C) or(AF==$E)or(AF==17)
endfunction
function IHV takes nothing returns boolean
return(IGV())
endfunction
function IJV takes nothing returns boolean
return(FF>=6)
endfunction
function IKV takes nothing returns nothing
set AF=(AF+1)
call DestroyTimerDialog(JF)
if(IJV())then
call DestroyTimerDialog(KF)
call DestroyTimerDialog(LF)
call DestroyTimerDialog(MF)
call DestroyTimerDialog(TF)
call DestroyTimerDialog(PF)
call DestroyTimerDialog(QF)
call DestroyTimerDialog(DG)
call DestroyTimerDialog(SF)
call DestroyTimerDialog(JG)
call DestroyTimerDialog(KG)
call PauseTimerBJ(true,UF)
call PauseTimerBJ(true,WF)
call PauseTimerBJ(true,YF)
call PauseTimerBJ(true,OG)
call PauseTimerBJ(true,ZF)
call PauseTimerBJ(true,EG)
call PauseTimerBJ(true,CG)
call PauseTimerBJ(true,XG)
call PauseTimerBJ(true,LG)
call PauseTimerBJ(true,MG)
call ReviveHeroLoc(IG[2],GetRectCenter(OW),true)
call ReviveHeroLoc(IG[3],GetRectCenter(OW),true)
call ReviveHeroLoc(IG[4],GetRectCenter(OW),true)
call ReviveHeroLoc(IG[5],GetRectCenter(OW),true)
call ReviveHeroLoc(IG[6],GetRectCenter(OW),true)
call ReviveHeroLoc(IG[8],GetRectCenter(XW),true)
call ReviveHeroLoc(IG[9],GetRectCenter(XW),true)
call ReviveHeroLoc(IG[$A],GetRectCenter(XW),true)
call ReviveHeroLoc(IG[$B],GetRectCenter(XW),true)
call ReviveHeroLoc(IG[$C],GetRectCenter(XW),true)
set AG=0
set NF=I6(bj_mapInitialPlayableArea,Condition(function R1V))
call ForGroupBJ(NF,function R2V)
call CinematicModeBJ(true,bj_FORCE_ALL_PLAYERS)
call TransmissionFromUnitWithNameBJ(bj_FORCE_ALL_PLAYER S,null,"Tournament Team Start",null,"Kill all of your enemy team",0,0,true)
call TriggerSleepAction(1.)
set GF[1]=I6(bj_mapInitialPlayableArea,Condition(function R3V))
set GF[2]=I6(bj_mapInitialPlayableArea,Condition(function R4V))
call ForGroupBJ(GF[1],function R5V)
call ForGroupBJ(GF[2],function R6V)
call TriggerSleepAction(3.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"3...")
call TriggerSleepAction(1.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"2...")
call TriggerSleepAction(1.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"1...")
call TriggerSleepAction(1.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Let the Battle Begin !")
call CinematicModeBJ(false,bj_FORCE_ALL_PLAYERS)
call ForGroupBJ(NF,function R7V)
call EnableTrigger(PZ)
loop
exitwhen((IsTriggerEnabled(PZ)==false))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INT ERVAL,.1))
endloop
call ForGroupBJ(NF,function R8V)
set GF[4]=I6(EY,Condition(function R9V))
set GF[5]=I6(EY,Condition(function IVV))
call CinematicModeBJ(true,bj_FORCE_ALL_PLAYERS)
if(INV())then
call TransmissionFromUnitWithNameBJ(bj_FORCE_ALL_PLAYER S,null,"Tournament Start",null,"No one survived",0,0,true)
else
if(IAV())then
call TransmissionFromUnitWithNameBJ(bj_FORCE_ALL_PLAYER S,null,"Tournament Start",null,("The winners areTeam1"),0,0,true)
call ForGroupBJ(GF[1],function IRV)
call ForGroupBJ(GF[4],function IIV)
else
if(IOV())then
call TransmissionFromUnitWithNameBJ(bj_FORCE_ALL_PLAYER S,null,"Tournament Start",null,("The winners areTeam2"),0,0,true)
call ForGroupBJ(GF[2],function IEV)
call ForGroupBJ(GF[5],function IXV)
endif
endif
endif
call DestroyGroup(GF[4])
call DestroyGroup(GF[5])
call TriggerSleepAction(5.)
call CinematicModeBJ(false,bj_FORCE_ALL_PLAYERS)
call ForGroupBJ(NF,function IBV)
call DestroyGroup(NF)
call DestroyGroup(GF[2])
call DestroyGroup(GF[1])
set DF=GetRandomInt(1,$F)
if(IHV())then
call TriggerExecute(LZ)
else
if(IFV())then
call TriggerExecute(LZ)
else
if(IDV())then
call TriggerExecute(LZ)
else
if(ICV())then
call TriggerExecute(LZ)
else
call TriggerExecute(LZ)
endif
endif
endif
endif
else
call TriggerExecute(LZ)
endif
endfunction
function Trig_TourUnitTeam_die_Func001002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)) !=null
endfunction
function Trig_TourUnitTeam_die_Func001002002002001 takes nothing returns boolean
return(IsUnitAlly(GetFilterUnit(),Player(0)))
endfunction
function Trig_TourUnitTeam_die_Func001002002002002 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_TourUnitTeam_die_Func001002002002 takes nothing returns boolean
return GetBooleanAnd((IsUnitAlly(GetFilterUnit(),Player(0 ))),(IsUnitAliveBJ(GetFilterUnit())))
endfunction
function IMV takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_HERO)),(GetBooleanAnd((IsUnitAlly(GetFilt erUnit(),Player(0))),(IsUnitAliveBJ(GetFilterUnit( )))))))!=null
endfunction
function Trig_TourUnitTeam_die_Func002002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)) !=null
endfunction
function Trig_TourUnitTeam_die_Func002002002002001 takes nothing returns boolean
return(IsUnitAlly(GetFilterUnit(),Player(6)))
endfunction
function Trig_TourUnitTeam_die_Func002002002002002 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_TourUnitTeam_die_Func002002002002 takes nothing returns boolean
return GetBooleanAnd((IsUnitAlly(GetFilterUnit(),Player(6 ))),(IsUnitAliveBJ(GetFilterUnit())))
endfunction
function IPV takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_HERO)),(GetBooleanAnd((IsUnitAlly(GetFilt erUnit(),Player(6))),(IsUnitAliveBJ(GetFilterUnit( )))))))!=null
endfunction
function Trig_TourUnitTeam_die_Func003002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)) !=null
endfunction
function Trig_TourUnitTeam_die_Func003002002002 takes nothing returns boolean
return(GetOwningPlayer(GetFilterUnit())==Player($C ))
endfunction
function IQV takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_HERO)),(GetOwningPlayer(GetFilterUnit())= =Player($C))))!=null
endfunction
function ISV takes nothing returns boolean
return(CountUnitsInGroup(GF[4])>=1)and(CountUnitsInGroup(GF[5])==0)
endfunction
function ITV takes nothing returns boolean
return(CountUnitsInGroup(GF[4])==0)and(CountUnitsInGroup(GF[5])==0)
endfunction
function IUV takes nothing returns boolean
return(ITV())
endfunction
function IWV takes nothing returns boolean
return(CountUnitsInGroup(GF[4])==0)and(CountUnitsInGroup(GF[5])>=1)
endfunction
function IYV takes nothing returns boolean
return(IWV())
endfunction
function IZV takes nothing returns boolean
return(ISV())
endfunction
function I_V takes nothing returns boolean
return(CountUnitsInGroup(GF[7])>=1)
endfunction
function I0V takes nothing returns nothing
set GF[4]=I6(EY,Condition(function IMV))
set GF[5]=I6(EY,Condition(function IPV))
set GF[7]=I6(EY,Condition(function IQV))
if(I_V())then
else
if(IZV())then
set AG=1
call DisableTrigger(GetTriggeringTrigger())
else
if(IYV())then
set AG=2
call DisableTrigger(GetTriggeringTrigger())
else
if(IUV())then
set AG=0
call DisableTrigger(GetTriggeringTrigger())
endif
endif
endif
endif
call DestroyGroup(GF[4])
call DestroyGroup(GF[5])
call DestroyGroup(GF[7])
endfunction
function I2V takes nothing returns boolean
return(GetPlayerSlotState(Player(1))==PLAYER_SLOT_ STATE_PLAYING)
endfunction
function I3V takes nothing returns boolean
return(GetPlayerSlotState(Player(1))==PLAYER_SLOT_ STATE_PLAYING)
endfunction
function I4V takes nothing returns boolean
return(GetPlayerSlotState(Player(2))==PLAYER_SLOT_ STATE_PLAYING)
endfunction
function I5V takes nothing returns boolean
return(GetPlayerSlotState(Player(3))==PLAYER_SLOT_ STATE_PLAYING)
endfunction
function I6V takes nothing returns boolean
return(GetPlayerSlotState(Player(4))==PLAYER_SLOT_ STATE_PLAYING)
endfunction
function I7V takes nothing returns boolean
return(GetPlayerSlotState(Player(5))==PLAYER_SLOT_ STATE_PLAYING)
endfunction
function I8V takes nothing returns boolean
return(GetPlayerSlotState(Player(7))==PLAYER_SLOT_ STATE_PLAYING)
endfunction
function I9V takes nothing returns boolean
return(GetPlayerSlotState(Player(8))==PLAYER_SLOT_ STATE_PLAYING)
endfunction
function AVV takes nothing returns boolean
return(GetPlayerSlotState(Player(9))==PLAYER_SLOT_ STATE_PLAYING)
endfunction
function AEV takes nothing returns boolean
return(GetPlayerSlotState(Player($A))==PLAYER_SLOT _STATE_PLAYING)
endfunction
function AXV takes nothing returns boolean
return(GetPlayerSlotState(Player($B))==PLAYER_SLOT _STATE_PLAYING)
endfunction
function AOV takes nothing returns boolean
return(FF>=2)
endfunction
function ARV takes nothing returns boolean
return(FF>=6)
endfunction
function AIV takes nothing returns nothing
set FF=0
if(I3V())then
set FF=(FF+1)
endif
if(I4V())then
set FF=(FF+1)
endif
if(I5V())then
set FF=(FF+1)
endif
if(I6V())then
set FF=(FF+1)
endif
if(I7V())then
set FF=(FF+1)
endif
if(I8V())then
set FF=(FF+1)
endif
if(I9V())then
set FF=(FF+1)
endif
if(AVV())then
set FF=(FF+1)
endif
if(AEV())then
set FF=(FF+1)
endif
if(AXV())then
set FF=(FF+1)
endif
if(ARV())then
call TriggerExecute(LZ)
else
if(AOV())then
endif
endif
endfunction
function ANV takes nothing returns nothing
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayer Name(Player(1))+(" has chosen No tournament mode")))
call DisableTrigger(QZ)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function ACV takes nothing returns nothing
call DisableTrigger(SZ)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function Trig_RemoveHeroOut_Func001002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)) !=null
endfunction
function Trig_RemoveHeroOut_Func001002002002001 takes nothing returns boolean
return(GetOwningPlayer(GetFilterUnit())!=Player($C ))
endfunction
function Trig_RemoveHeroOut_Func001002002002002 takes nothing returns boolean
return(GetPlayerSlotState(GetOwningPlayer(GetFilte rUnit()))==PLAYER_SLOT_STATE_LEFT)
endfunction
function Trig_RemoveHeroOut_Func001002002002 takes nothing returns boolean
return GetBooleanAnd((GetOwningPlayer(GetFilterUnit())!=P layer($C)),(GetPlayerSlotState(GetOwningPlayer(Get FilterUnit()))==PLAYER_SLOT_STATE_LEFT))
endfunction
function AFV takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_HERO)),(GetBooleanAnd((GetOwningPlayer(Ge tFilterUnit())!=Player($C)),(GetPlayerSlotState(Ge tOwningPlayer(GetFilterUnit()))==PLAYER_SLOT_STATE _LEFT)))))!=null
endfunction
function AGV takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function AHV takes nothing returns nothing
set NG=I6(bj_mapInitialPlayableArea,Condition(function AFV))
call ForGroupBJ(NG,function AGV)
call DestroyGroup(NG)
endfunction
function AKV takes nothing returns nothing
call SetCameraFieldForPlayer(Player(0),CAMERA_FIELD_TAR GET_DISTANCE,2400.,2.)
call SetCameraFieldForPlayer(Player(1),CAMERA_FIELD_TAR GET_DISTANCE,2400.,2.)
call SetCameraFieldForPlayer(Player(2),CAMERA_FIELD_TAR GET_DISTANCE,2400.,2.)
call SetCameraFieldForPlayer(Player(3),CAMERA_FIELD_TAR GET_DISTANCE,2400.,2.)
call SetCameraFieldForPlayer(Player(4),CAMERA_FIELD_TAR GET_DISTANCE,2400.,2.)
call SetCameraFieldForPlayer(Player(5),CAMERA_FIELD_TAR GET_DISTANCE,2400.,2.)
call SetCameraFieldForPlayer(Player(6),CAMERA_FIELD_TAR GET_DISTANCE,2400.,2.)
call SetCameraFieldForPlayer(Player(7),CAMERA_FIELD_TAR GET_DISTANCE,2400.,2.)
call SetCameraFieldForPlayer(Player(8),CAMERA_FIELD_TAR GET_DISTANCE,2400.,2.)
call SetCameraFieldForPlayer(Player(9),CAMERA_FIELD_TAR GET_DISTANCE,2400.,2.)
call SetCameraFieldForPlayer(Player($A),CAMERA_FIELD_TA RGET_DISTANCE,2400.,2.)
call SetCameraFieldForPlayer(Player($B),CAMERA_FIELD_TA RGET_DISTANCE,2400.,2.)
endfunction
function AMV takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) )!=null
endfunction
function APV takes nothing returns nothing
call AdjustPlayerStateBJ(GetRandomInt(-600,-900),GetOwningPlayer(GetDyingUnit()),PLAYER_STATE_ RESOURCE_GOLD)
endfunction
function Trig_Create_Multiboard_Func001002001001001 takes nothing returns boolean
return(GetPlayerController(GetFilterPlayer())==MAP _CONTROL_USER)
endfunction
function Trig_Create_Multiboard_Func001002001001002 takes nothing returns boolean
return(GetPlayerSlotState(GetFilterPlayer())==PLAY ER_SLOT_STATE_PLAYING)
endfunction
function ASV takes nothing returns boolean
return GetBooleanAnd((GetPlayerController(GetFilterPlayer ())==MAP_CONTROL_USER),(GetPlayerSlotState(GetFilt erPlayer())==PLAYER_SLOT_STATE_PLAYING))
endfunction
function Trig_Create_Multiboard_Func014001001001 takes nothing returns boolean
return(GetPlayerSlotState(GetFilterPlayer())==PLAY ER_SLOT_STATE_PLAYING)
endfunction
function Trig_Create_Multiboard_Func014001001002 takes nothing returns boolean
return(GetPlayerController(GetFilterPlayer())==MAP _CONTROL_USER)
endfunction
function ATV takes nothing returns boolean
return GetBooleanAnd((GetPlayerSlotState(GetFilterPlayer( ))==PLAYER_SLOT_STATE_PLAYING),(GetPlayerControlle r(GetFilterPlayer())==MAP_CONTROL_USER))
endfunction
function AUV takes nothing returns nothing
set AC[(1+GetPlayerId(GetEnumPlayer()))]=IC
call MultiboardSetItemIconBJ(bj_lastCreatedMultiboard,1 ,IC,"ReplaceableTextures\\CommandButtons\\BTNVilla gerMan1.blp")
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard, 2,IC,(DC[(1+GetPlayerId(GetEnumPlayer()))]+(GetPlayerName(GetEnumPlayer())+"|r")))
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard, 3,IC,"0")
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard, 4,IC,"0")
set IC=(IC+1)
endfunction
function AWV takes nothing returns nothing
set QC=CountPlayersInForceBJ(Q6(Condition(function ASV)))
call CreateMultiboardBJ(4,(1+QC),"Kill / Death")
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard, 2,1,"Player")
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard, 3,1,"Kills")
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard, 4,1,"Deaths")
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=(1+QC)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemStyleBJ(bj_lastCreatedMultiboard, 1,bj_forLoopAIndex,true,true)
call MultiboardSetItemStyleBJ(bj_lastCreatedMultiboard, 2,bj_forLoopAIndex,true,false)
call MultiboardSetItemStyleBJ(bj_lastCreatedMultiboard, 3,bj_forLoopAIndex,true,false)
call MultiboardSetItemStyleBJ(bj_lastCreatedMultiboard, 4,bj_forLoopAIndex,true,false)
call MultiboardSetItemWidthBJ(bj_lastCreatedMultiboard, 1,bj_forLoopAIndex,2.)
call MultiboardSetItemWidthBJ(bj_lastCreatedMultiboard, 2,bj_forLoopAIndex,10.)
call MultiboardSetItemWidthBJ(bj_lastCreatedMultiboard, 3,bj_forLoopAIndex,3.)
call MultiboardSetItemWidthBJ(bj_lastCreatedMultiboard, 4,bj_forLoopAIndex,3.)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardSetItemStyleBJ(bj_lastCreatedMultiboard, 1,1,true,false)
set IC=2
call ForForce(Q6(Condition(function ATV)),function AUV)
call MultiboardDisplay(bj_lastCreatedMultiboard,true)
endfunction
function AZV takes nothing returns nothing
set DC[2]="|c000000ff"
set DC[3]="|c0000ffff"
set DC[4]="|c00800080"
set DC[5]="|c00ffff00"
set DC[6]="|c00ff8000"
set DC[8]="|c00ff00ff"
set DC[9]="|c00959697"
set DC[$A]="|c007EBFF1"
set DC[$B]="|c00106246"
set DC[$C]="|c004e2a04"
endfunction
function A0V takes nothing returns boolean
return((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)) and(GetPlayerController(GetOwningPlayer(GetKilling Unit()))==MAP_CONTROL_USER))!=null
endfunction
function A1V takes nothing returns nothing
set SC[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]=(SC[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]+1)
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard, 3,AC[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))],I2S(SC[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]))
endfunction
function A3V takes nothing returns boolean
return((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)) and(GetPlayerController(GetOwningPlayer(GetDyingUn it()))==MAP_CONTROL_USER))!=null
endfunction
function A4V takes nothing returns nothing
set TC[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]=(TC[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]+1)
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard, 4,AC[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))],I2S(TC[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]))
endfunction
function A6V takes nothing returns boolean
return(IsUnitAlly(GetKillingUnit(),Player(0)))and( GetUnitTypeId(GetTriggerUnit())=='nftk')
endfunction
function A7V takes nothing returns nothing
call AdjustPlayerStateBJ(5000,Player(1),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player(2),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player(3),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player(4),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player(5),PLAYER_STATE_RE SOURCE_GOLD)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"| cff32cd32The Alliance has slain The Master Grunt !!!|r")
call DisplayTimedTextToForce(P6(Player(0)),5.,"|cff32cd 32You have been rewarded 5000 Golds for slaying The Master Grunt !!!|r")
endfunction
function A9V takes nothing returns boolean
return(IsUnitAlly(GetKillingUnit(),Player(6)))and( GetUnitTypeId(GetTriggerUnit())=='nftk')
endfunction
function NVV takes nothing returns nothing
call AdjustPlayerStateBJ(5000,Player(7),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player(8),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player(9),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player($A),PLAYER_STATE_R ESOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player($B),PLAYER_STATE_R ESOURCE_GOLD)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"| cff32cd32The Horde has slain The Master Grunt !!!|r")
call DisplayTimedTextToForce(P6(Player(6)),5.,"|cff32cd 32You have been rewarded 5000 Golds for slaying The Master Grunt !!!|r")
endfunction
function NXV takes nothing returns boolean
return(IsUnitAlly(GetKillingUnit(),Player(0)))and( GetUnitTypeId(GetTriggerUnit())=='nogl')
endfunction
function NOV takes nothing returns nothing
call AdjustPlayerStateBJ(5000,Player(1),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player(2),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player(3),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player(4),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player(5),PLAYER_STATE_RE SOURCE_GOLD)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"| cffffcc00The Alliance has slain The Master Swordsman !!!|r")
call DisplayTimedTextToForce(P6(Player(0)),5.,"|cffffcc 00You have been rewarded 5000 Golds for slaying The Master Swordsman !!!|r")
endfunction
function NIV takes nothing returns boolean
return(IsUnitAlly(GetKillingUnit(),Player(6)))and( GetUnitTypeId(GetTriggerUnit())=='nogl')
endfunction
function NAV takes nothing returns nothing
call AdjustPlayerStateBJ(5000,Player(7),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player(8),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player(9),PLAYER_STATE_RE SOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player($A),PLAYER_STATE_R ESOURCE_GOLD)
call AdjustPlayerStateBJ(5000,Player($B),PLAYER_STATE_R ESOURCE_GOLD)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"| cffffcc00The Horde has slain The Master Swordsman !!!|r")
call DisplayTimedTextToForce(P6(Player(6)),5.,"|cffffcc 00You have been rewarded 5000 Golds for slaying The Master Swordsman !!!|r")
endfunction
function NBV takes nothing returns nothing
call FogEnableOff()
call FogMaskEnableOff()
endfunction
function NDV takes nothing returns nothing
call FogEnableOn()
call FogMaskEnableOn()
endfunction
function NGV takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)) !=null
endfunction
function NHV takes nothing returns boolean
return(CountUnitsInGroup(OV)>0)
endfunction
function NJV takes nothing returns boolean
return(IsUnitDeadBJ(Y[W]))or(Y[W]==null)
endfunction
function NKV takes nothing returns boolean
return(NJV())
endfunction
function NLV takes nothing returns nothing
set W=1
loop
exitwhen W>XV
if(NKV())then
set OV=D6(850.,VV[W],Condition(function NGV))
if(NHV())then
else
call CreateNUnitsAtLoc(1,UnitId(EV[W]),Player($C),VV[W],Z[W])
set Y[W]=bj_lastCreatedUnit
endif
call DestroyGroup(OV)
endif
set W=W+1
endloop
endfunction
function NPV takes nothing returns nothing
set W=(W+1)
set Y[W]=GetEnumUnit()
set Z[W]=GetUnitFacing(GetEnumUnit())
set VV[W]=GetUnitLoc(GetEnumUnit())
set EV[W]=UnitId2StringBJ(GetUnitTypeId(GetEnumUnit()))
endfunction
function NQV takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(B6(CW,Player($C)),function NPV)
set XV=W
endfunction
function NTV takes nothing returns nothing
set W=(W+1)
set Y[W]=GetEnumUnit()
set Z[W]=GetUnitFacing(GetEnumUnit())
set VV[W]=GetUnitLoc(GetEnumUnit())
set EV[W]=UnitId2StringBJ(GetUnitTypeId(GetEnumUnit()))
endfunction
function NUV takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(B6(BW,Player($C)),function NTV)
set XV=W
endfunction
function NYV takes nothing returns nothing
set W=(W+1)
set Y[W]=GetEnumUnit()
set Z[W]=GetUnitFacing(GetEnumUnit())
set VV[W]=GetUnitLoc(GetEnumUnit())
set EV[W]=UnitId2StringBJ(GetUnitTypeId(GetEnumUnit()))
endfunction
function NZV takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(B6(NW,Player($C)),function NYV)
set XV=W
endfunction
function N0V takes nothing returns nothing
set W=(W+1)
set Y[W]=GetEnumUnit()
set Z[W]=GetUnitFacing(GetEnumUnit())
set VV[W]=GetUnitLoc(GetEnumUnit())
set EV[W]=UnitId2StringBJ(GetUnitTypeId(GetEnumUnit()))
endfunction
function N1V takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(B6(AW,Player($C)),function N0V)
set XV=W
endfunction
function N3V takes nothing returns nothing
set W=(W+1)
set Y[W]=GetEnumUnit()
set Z[W]=GetUnitFacing(GetEnumUnit())
set VV[W]=GetUnitLoc(GetEnumUnit())
set EV[W]=UnitId2StringBJ(GetUnitTypeId(GetEnumUnit()))
endfunction
function N4V takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(B6(GW,Player($C)),function N3V)
set XV=W
endfunction
function N6V takes nothing returns nothing
set W=(W+1)
set Y[W]=GetEnumUnit()
set Z[W]=GetUnitFacing(GetEnumUnit())
set VV[W]=GetUnitLoc(GetEnumUnit())
set EV[W]=UnitId2StringBJ(GetUnitTypeId(GetEnumUnit()))
endfunction
function N7V takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(B6(HW,Player($C)),function N6V)
set XV=W
endfunction
function N9V takes nothing returns nothing
set W=(W+1)
set Y[W]=GetEnumUnit()
set Z[W]=GetUnitFacing(GetEnumUnit())
set VV[W]=GetUnitLoc(GetEnumUnit())
set EV[W]=UnitId2StringBJ(GetUnitTypeId(GetEnumUnit()))
endfunction
function BVV takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(B6(IW,Player($C)),function N9V)
set XV=W
endfunction
function BXV takes nothing returns nothing
set W=(W+1)
set Y[W]=GetEnumUnit()
set Z[W]=GetUnitFacing(GetEnumUnit())
set VV[W]=GetUnitLoc(GetEnumUnit())
set EV[W]=UnitId2StringBJ(GetUnitTypeId(GetEnumUnit()))
endfunction
function BOV takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(B6(FW,Player($C)),function BXV)
set XV=W
endfunction
function BIV takes nothing returns nothing
set W=(W+1)
set Y[W]=GetEnumUnit()
set Z[W]=GetUnitFacing(GetEnumUnit())
set VV[W]=GetUnitLoc(GetEnumUnit())
set EV[W]=UnitId2StringBJ(GetUnitTypeId(GetEnumUnit()))
endfunction
function BAV takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(B6(DW,Player($C)),function BIV)
set XV=W
endfunction
function BBV takes nothing returns nothing
set W=(W+1)
set Y[W]=GetEnumUnit()
set Z[W]=GetUnitFacing(GetEnumUnit())
set VV[W]=GetUnitLoc(GetEnumUnit())
set EV[W]=UnitId2StringBJ(GetUnitTypeId(GetEnumUnit()))
endfunction
function BCV takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(B6(RW,Player($C)),function BBV)
set XV=W
endfunction
function BFV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='Oshd')
endfunction
function BGV takes nothing returns nothing
call KillUnit(GroupPickRandomUnit(H6('ngzc')))
call KillUnit(GroupPickRandomUnit(H6('ngzd')))
call KillUnit(GroupPickRandomUnit(H6('ngza')))
call KillUnit(GroupPickRandomUnit(H6('ngz4')))
endfunction
function BJV takes nothing returns boolean
return((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)) and(GetPlayerController(GetOwningPlayer(GetKilling Unit()))==MAP_CONTROL_USER))!=null
endfunction
function BKV takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,(D C[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]+(GetPlayerName(GetOwningPlayer(GetKillingUnit())) +(" has killed "+(DC[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]+GetPlayerName(GetOwningPlayer(GetDyingUnit()))))) ))
endfunction
function BMV takes nothing returns boolean
return((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)) and(IsUnitAlly(GetKillingUnit(),Player(0)))and(Get PlayerController(GetOwningPlayer(GetKillingUnit()) )==MAP_CONTROL_COMPUTER))!=null
endfunction
function BPV takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,(( "|CFF0042FFThe Alliance has Slain|R "+(DC[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]+GetPlayerName(GetOwningPlayer(GetDyingUnit()))))+ "!!!"))
endfunction
function BSV takes nothing returns boolean
return((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)) and(IsUnitAlly(GetKillingUnit(),Player(8)))and(Get PlayerController(GetOwningPlayer(GetKillingUnit()) )==MAP_CONTROL_COMPUTER))!=null
endfunction
function BTV takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,(( "|CFFFF0303The Horde has Slain|R "+DC[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))])+(GetPlayerName(GetOwningPlayer(GetDyingUnit()))+ " !!!")))
endfunction
function BWV takes nothing returns boolean
return((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)) and(GetOwningPlayer(GetKillingUnit())==Player($C)) and(GetUnitTypeId(GetKillingUnit())!='nftk')and(Ge tUnitTypeId(GetKillingUnit())!='nogl'))!=null
endfunction
function BYV takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,(" |CFFF00FFFJungle Creeps has killed|R "+(DC[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]+GetPlayerName(GetOwningPlayer(GetDyingUnit())))))
endfunction
function B_V takes nothing returns boolean
return((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)) and(GetOwningPlayer(GetKillingUnit())==Player($C)) and(GetUnitTypeId(GetKillingUnit())=='nftk'))!=nul l
endfunction
function B0V takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,(" |cff32cd32The Master Grunt|r has killed "+(DC[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]+GetPlayerName(GetOwningPlayer(GetDyingUnit())))))
endfunction
function B2V takes nothing returns boolean
return((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)) and(GetOwningPlayer(GetKillingUnit())==Player($C)) and(GetUnitTypeId(GetKillingUnit())=='nogl'))!=nul l
endfunction
function B3V takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,(" |cffffcc00The Master Swordsman|r has killed "+(DC[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]+GetPlayerName(GetOwningPlayer(GetDyingUnit())))))
endfunction
function B5V takes nothing returns boolean
return(GetSpellAbilityId()=='A027')
endfunction
function B6V takes nothing returns boolean
return(IsUnitEnemy(II,GetOwningPlayer(RI)))
endfunction
function B7V takes nothing returns nothing
set RI=GetSpellAbilityUnit()
set II=GetSpellTargetUnit()
set AI[1]=GetUnitLoc(RI)
set AI[2]=GetUnitLoc(II)
set NI=(135.+GetUnitFacing(II))
set AI[3]=U5(AI[2],135.,NI)
call SetUnitPositionLoc(RI,AI[3])
if(B6V())then
call IssueTargetOrderById(RI,$D000F,II)
call UnitDamageTargetBJ(RI,II,(GetUnitStateSwap(UNIT_ST ATE_LIFE,GetTriggerUnit())*GetRandomReal(.05,.1)), ATTACK_TYPE_CHAOS,DAMAGE_TYPE_NORMAL)
else
call IssueImmediateOrderById(RI,$D0004)
endif
call RemoveLocation(AI[1])
call RemoveLocation(AI[2])
call RemoveLocation(AI[3])
endfunction
function B9V takes nothing returns boolean
return(GetSpellAbilityId()=='A026')
endfunction
function CVV takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTarget Unit(),(I2R(GetUnitAbilityLevelSwapped('A026',GetT riggerUnit()))*(I2R(GetHeroStatBJ(0,GetTriggerUnit (),true))+150.)),ATTACK_TYPE_CHAOS,DAMAGE_TYPE_DIV INE)
endfunction
function CXV takes nothing returns boolean
return(GetSpellAbilityId()=='A05P')
endfunction
function COV takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTarget Unit(),(I2R(UnitInventoryCount(GetTriggerUnit()))* I2R(GetHeroStatBJ(2,GetTriggerUnit(),true))),ATTAC K_TYPE_CHAOS,DAMAGE_TYPE_DIVINE)
endfunction
function CIV takes nothing returns boolean
return(GetSpellAbilityId()=='A05Q')
endfunction
function CAV takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTarget Unit(),(GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTr iggerUnit())/ GetRandomReal(3.,5.)),ATTACK_TYPE_CHAOS,DAMAGE_TYP E_DIVINE)
endfunction
function CBV takes nothing returns boolean
return(GetSpellAbilityId()=='A00S')
endfunction
function CCV takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTarget Unit(),(I2R(GetHeroStatBJ(1,GetTriggerUnit(),true) )*6.),ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
endfunction
function CFV takes nothing returns boolean
return(GetSpellAbilityId()=='A011')
endfunction
function CGV takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTarget Unit(),(I2R(GetUnitAbilityLevelSwapped('A011',GetT riggerUnit()))*(I2R(GetHeroStatBJ(0,GetTriggerUnit (),true))+(.3*GetUnitMoveSpeed(GetTriggerUnit()))) ),ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
endfunction
function CJV takes nothing returns boolean
return(GetSpellAbilityId()=='A01N')
endfunction
function CKV takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTarget Unit(),(I2R(GetUnitAbilityLevelSwapped('A01N',GetT riggerUnit()))*(I2R(CountUnitsInGroup(N6(WU)))*(Ge tUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTriggerUnit( ))/ 350.))),ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
endfunction
function CMV takes nothing returns boolean
return(GetSpellAbilityId()=='A01L')
endfunction
function CPV takes nothing returns nothing
call UnitDamagePointLoc(GetTriggerUnit(),0,500,GetSpell TargetLoc(),(.1*GetUnitStateSwap(UNIT_STATE_MANA,G etTriggerUnit())),ATTACK_TYPE_CHAOS,DAMAGE_TYPE_DI VINE)
call AddSpecialEffectLocBJ(GetUnitLoc(GetSpellTargetUni t()),"Abilities\\Spells\\Human\\FlameStrike\\Flame Strike1.mdl")
call AddSpecialEffectLocBJ(GetUnitLoc(GetSpellTargetUni t()),"Abilities\\Spells\\Human\\Thunderclap\\Thund erClapCaster.mdl")
endfunction
function CSV takes nothing returns boolean
return(GetSpellAbilityId()=='A05A')
endfunction
function CTV takes nothing returns nothing
call SetUnitLifePercentBJ(GetTriggerUnit(),GetUnitManaP ercent(GetTriggerUnit()))
call SetUnitManaBJ(GetTriggerUnit(),.0)
call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()) ,"Abilities\\Spells\\Other\\HowlOfTerror\\HowlC ast er.mdl")
call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()) ,"Abilities\\Spells\\Orc\\HealingWave\\HealingW ave Target.mdl")
endfunction
function CWV takes nothing returns boolean
return(GetSpellAbilityId()=='A00P')
endfunction
function Trig_Ion_Canon_Func022Func017002003001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCT URE)==false)!=null
endfunction
function Trig_Ion_Canon_Func022Func017002003002001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Ion_Canon_Func022Func017002003002002 takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetFilterUnit ()),GetOwningPlayer(QI)))
endfunction
function Trig_Ion_Canon_Func022Func017002003002 takes nothing returns boolean
return GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(Is PlayerEnemy(GetOwningPlayer(GetFilterUnit()),GetOw ningPlayer(QI))))
endfunction
function CYV takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_STRUCTURE)==false),(GetBooleanAnd((IsUnit AliveBJ(GetFilterUnit())),(IsPlayerEnemy(GetOwning Player(GetFilterUnit()),GetOwningPlayer(QI)))))))! =null
endfunction
function CZV takes nothing returns nothing
call UnitDamageTargetBJ(QI,GetEnumUnit(),YI,ATTACK_TYPE _NORMAL,DAMAGE_TYPE_UNKNOWN)
call SetUnitManaBJ(GetEnumUnit(),(GetUnitStateSwap(UNIT _STATE_MANA,GetEnumUnit())-VA))
call AddSpecialEffectTargetUnitBJ("chest",GetEnumUnit() ,"Abilities\\Weapons\\DragonHawkMissile\\Dragon Haw kMissile.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectTargetUnitBJ("chest",GetEnumUnit() ,"Abilities\\Spells\\Human\\Feedback\\ArcaneTow erA ttack.mdl")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function C_V takes nothing returns nothing
set QI=GetTriggerUnit()
set SI=GetUnitAbilityLevelSwapped(GetSpellAbilityId(), QI)
set TI=50.
set UI=25
set WI=75.
set YI=(WI*I2R(SI))
set ZI=50.
set VA=(ZI*I2R(SI))
set EA=25.
set XA=U5(GetUnitLoc(QI),100.,GetUnitFacing(QI))
call CreateNUnitsAtLoc(1,'h003',GetOwningPlayer(QI),XA, GetUnitFacing(QI))
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=UI
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set OA=U5(XA,(TI*I2R(bj_forLoopAIndex)),GetUnitFacing( QI))
call CreateNUnitsAtLoc(1,'h004',GetOwningPlayer(QI),OA, GetUnitFacing(QI))
call UnitAddAbility(bj_lastCreatedUnit,'A00P')
call UnitRemoveAbility(bj_lastCreatedUnit,'A00P')
call SetUnitFlyHeight(bj_lastCreatedUnit,100.,.0)
call SetUnitPathing(bj_lastCreatedUnit,false)
call UnitApplyTimedLifeBJ((.85-(.01*I2R(bj_forLoopAIndex))),'BTLF',bj_lastCreated Unit)
set RA=D6(EA,OA,Condition(function CYV))
call ForGroupBJ(RA,function CZV)
call DestroyGroup(RA)
call RemoveLocation(OA)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(XA)
endfunction
function C1V takes nothing returns boolean
return(GetSpellAbilityId()=='A00O')
endfunction
function Trig_Face_of_Void_Func015002003001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCT URE)==false)!=null
endfunction
function Trig_Face_of_Void_Func015002003002001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Face_of_Void_Func015002003002002 takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetFilterUnit ()),GetOwningPlayer(IA)))
endfunction
function Trig_Face_of_Void_Func015002003002 takes nothing returns boolean
return GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(Is PlayerEnemy(GetOwningPlayer(GetFilterUnit()),GetOw ningPlayer(IA))))
endfunction
function C2V takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_STRUCTURE)==false),(GetBooleanAnd((IsUnit AliveBJ(GetFilterUnit())),(IsPlayerEnemy(GetOwning Player(GetFilterUnit()),GetOwningPlayer(IA)))))))! =null
endfunction
function C3V takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h005',GetOwningPlayer(IA),NA, bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A029')
call SetUnitAbilityLevelSwapped('A00O',bj_lastCreatedUn it,AA)
call IssueImmediateOrderById(bj_lastCreatedUnit,$D006C)
call IssueTargetOrderById(bj_lastCreatedUnit,$D006B,Get EnumUnit())
call UnitDamageTargetBJ(IA,GetEnumUnit(),GA,ATTACK_TYPE _NORMAL,DAMAGE_TYPE_UNKNOWN)
endfunction
function C4V takes nothing returns nothing
set IA=GetTriggerUnit()
set AA=GetUnitAbilityLevelSwapped(GetSpellAbilityId(), IA)
set NA=GetSpellTargetLoc()
set BA=300.
set CA=100.
set DA=125.
set FA=(BA+(CA*I2R(AA)))
set GA=(DA*I2R(AA))
set HA=D6(FA,NA,Condition(function C2V))
call ForGroupBJ(HA,function C3V)
call AddSpecialEffectLocBJ(NA,"Abilities\\Spells\\Items \\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(NA,"Objects\\Spawnmodels\\Ni ghtElf\\NECancelDeath\\NECancelDeath.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(NA,"Abilities\\Spells\\Undea d\\DeathPact\\DeathPactTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(NA,"Abilities\\Spells\\Items \\AIil\\AIilTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(NA)
call DestroyGroup(HA)
endfunction
function C6V takes nothing returns boolean
return(GetSpellAbilityId()=='A00N')
endfunction
function Trig_Earth_Fury_Func020002003001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCT URE)==false)!=null
endfunction
function Trig_Earth_Fury_Func020002003002001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Earth_Fury_Func020002003002002 takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetFilterUnit ()),LA))
endfunction
function Trig_Earth_Fury_Func020002003002 takes nothing returns boolean
return GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(Is PlayerEnemy(GetOwningPlayer(GetFilterUnit()),LA)))
endfunction
function C7V takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_STRUCTURE)==false),(GetBooleanAnd((IsUnit AliveBJ(GetFilterUnit())),(IsPlayerEnemy(GetOwning Player(GetFilterUnit()),LA))))))!=null
endfunction
function C8V takes nothing returns boolean
return(GetRandomReal(1.,100.)<=TA)
endfunction
function C9V takes nothing returns nothing
call UnitDamageTargetBJ(KA,GetEnumUnit(),YA,ATTACK_TYPE _NORMAL,DAMAGE_TYPE_UNKNOWN)
call AddSpecialEffectTargetUnitBJ("origin",GetEnumUnit( ),"Abilities\\Weapons\\AncientProtectorMissile\\ An cientProtectorMissile.mdl")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function DVV takes nothing returns nothing
set KA=GetTriggerUnit()
set LA=GetOwningPlayer(KA)
set MA=GetUnitLoc(KA)
set PA=GetUnitAbilityLevelSwapped(GetSpellAbilityId(), KA)
set QA='A028'
set SA='A02A'
set TA=75.
set UA=300.
set WA=100.
set YA=(UA+(WA*I2R(PA)))
set ZA=125.
set VN=75.
set EN=(ZA+(VN*I2R(PA)))
set XN=D6(EN,MA,Condition(function C7V))
if(C8V())then
call CreateNUnitsAtLoc(1,'h005',LA,MA,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(1.5,'BTLF',bj_lastCreatedUnit )
call UnitAddAbility(bj_lastCreatedUnit,QA)
call SetUnitAbilityLevelSwapped(QA,bj_lastCreatedUnit,P A)
call IssueImmediateOrderById(bj_lastCreatedUnit,$D022E)
call CreateNUnitsAtLoc(1,'h00A',LA,MA,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(1.5,'BTLF',bj_lastCreatedUnit )
call UnitAddAbility(bj_lastCreatedUnit,SA)
call SetUnitAbilityLevelSwapped(SA,bj_lastCreatedUnit,P A)
call IssueTargetOrderById(bj_lastCreatedUnit,$D00F1,KA)
endif
call ForGroupBJ(XN,function C9V)
call AddSpecialEffectLocBJ(MA,"Objects\\Spawnmodels\\Un dead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(MA,"Abilities\\Spells\\Orc\\ WarStomp\\WarStompCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(MA,"Doodads\\LordaeronSummer \\Terrain\\LoardaeronRockChunks\\LoardaeronRockChu nks0.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(MA)
call DestroyGroup(XN)
endfunction
function DXV takes nothing returns boolean
return(GetSpellAbilityId()=='A02B')
endfunction
function Trig_Napalm_Strike_Func015002003001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCT URE)==false)!=null
endfunction
function Trig_Napalm_Strike_Func015002003002001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Napalm_Strike_Func015002003002002 takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetFilterUnit ()),GetOwningPlayer(ON)))
endfunction
function Trig_Napalm_Strike_Func015002003002 takes nothing returns boolean
return GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(Is PlayerEnemy(GetOwningPlayer(GetFilterUnit()),GetOw ningPlayer(ON))))
endfunction
function DOV takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_STRUCTURE)==false),(GetBooleanAnd((IsUnit AliveBJ(GetFilterUnit())),(IsPlayerEnemy(GetOwning Player(GetFilterUnit()),GetOwningPlayer(ON)))))))! =null
endfunction
function DRV takes nothing returns nothing
call UnitDamageTargetBJ(ON,GetEnumUnit(),CN,ATTACK_TYPE _NORMAL,DAMAGE_TYPE_NORMAL)
call AddSpecialEffectTargetUnitBJ("chest",GetEnumUnit() ,"Abilities\\Weapons\\RedDragonBreath\\RedDrago nMi ssile.mdl")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function DIV takes nothing returns nothing
set ON=GetTriggerUnit()
set RN=GetSpellTargetLoc()
set IN=GetOwningPlayer(ON)
set AN=GetUnitAbilityLevelSwapped(GetSpellAbilityId(), ON)
set NN=225.
set BN=100.
set CN=(BN*I2R(AN))
set DN='A02C'
set FN=D6(NN,RN,Condition(function DOV))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=25
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'h005',IN,RN,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(1.5,'BTLF',bj_lastCreatedUnit )
call SetUnitFlyHeight(bj_lastCreatedUnit,(20.*I2R(bj_fo rLoopAIndex)),.0)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreate dUnit,"Abilities\\Spells\\Human\\Feedback\\SpellBr eakerAttack.mdl")
call DestroyEffect(bj_lastCreatedEffect)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call ForGroupBJ(FN,function DRV)
call AddSpecialEffectLocBJ(RN,"Abilities\\Spells\\Other \\Doom\\DoomDeath.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(RN,"Objects\\Spawnmodels\\Ot her\\NeutralBuildingExplosion\\NeutralBuildingExpl osion.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call CreateNUnitsAtLoc(1,'h005',IN,RN,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(1.5,'BTLF',bj_lastCreatedUnit )
call UnitAddAbility(bj_lastCreatedUnit,DN)
call SetUnitAbilityLevelSwapped(DN,bj_lastCreatedUnit,A N)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,$D0208,R N)
call RemoveLocation(RN)
call DestroyGroup(FN)
endfunction
function DNV takes nothing returns boolean
return(GetSpellAbilityId()=='A02D')
endfunction
function Trig_Thunder_Rage_Func019002003001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_GROUND ))!=null
endfunction
function Trig_Thunder_Rage_Func019002003002001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Thunder_Rage_Func019002003002002001 takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetFilterUnit ()),KN))
endfunction
function Trig_Thunder_Rage_Func019002003002002002 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)) !=null
endfunction
function Trig_Thunder_Rage_Func019002003002002 takes nothing returns boolean
return(GetBooleanAnd((IsPlayerEnemy(GetOwningPlaye r(GetFilterUnit()),KN)),(IsUnitType(GetFilterUnit( ),UNIT_TYPE_HERO))))!=null
endfunction
function Trig_Thunder_Rage_Func019002003002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit( ))),(GetBooleanAnd((IsPlayerEnemy(GetOwningPlayer( GetFilterUnit()),KN)),(IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO))))))!=null
endfunction
function DBV takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_GROUND)),(GetBooleanAnd((IsUnitAliveBJ(Ge tFilterUnit())),(GetBooleanAnd((IsPlayerEnemy(GetO wningPlayer(GetFilterUnit()),KN)),(IsUnitType(GetF ilterUnit(),UNIT_TYPE_HERO))))))))!=null
endfunction
function Trig_Thunder_Rage_Func025Func001Func011Func0050020 03001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCT URE)==false)!=null
endfunction
function Trig_Thunder_Rage_Func025Func001Func011Func0050020 03002001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Thunder_Rage_Func025Func001Func011Func0050020 03002002 takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetFilterUnit ()),KN))
endfunction
function Trig_Thunder_Rage_Func025Func001Func011Func0050020 03002 takes nothing returns boolean
return GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(Is PlayerEnemy(GetOwningPlayer(GetFilterUnit()),KN)))
endfunction
function DCV takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_STRUCTURE)==false),(GetBooleanAnd((IsUnit AliveBJ(GetFilterUnit())),(IsPlayerEnemy(GetOwning Player(GetFilterUnit()),KN))))))!=null
endfunction
function DDV takes nothing returns nothing
call UnitDamageTargetBJ(GN,GetEnumUnit(),TN,ATTACK_TYPE _NORMAL,DAMAGE_TYPE_NORMAL)
call AddSpecialEffectTargetUnitBJ("origin",GetEnumUnit( ),"Abilities\\Spells\\Human\\FlakCannons\\FlakTa rg et.mdl")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function DFV takes nothing returns boolean
return(IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==f alse)!=null
endfunction
function DGV takes nothing returns boolean
return(GetUnitStateSwap(UNIT_STATE_LIFE,GetEnumUni t())<=UN)
endfunction
function DHV takes nothing returns nothing
if(DGV())then
call UnitDamageTargetBJ(GN,GetEnumUnit(),999999.,ATTACK _TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
if(DFV())then
set VB=GetUnitLoc(GetEnumUnit())
set EB=D6(MN,VB,Condition(function DCV))
call RemoveUnit(GetEnumUnit())
call AddSpecialEffectLocBJ(VB,"Objects\\Spawnmodels\\Un dead\\UndeadLargeDeathExplode\\UndeadLargeDeathExp lode.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call ForGroupBJ(EB,function DDV)
call DestroyGroup(EB)
call RemoveLocation(VB)
endif
else
call UnitDamageTargetBJ(GN,GetEnumUnit(),(GetUnitStateS wap(UNIT_STATE_MAX_LIFE,GetEnumUnit())*WN),ATTACK_ TYPE_NORMAL,DAMAGE_TYPE_UNKNOWN)
call AddSpecialEffectTargetUnitBJ("origin",GetEnumUnit( ),"Abilities\\Spells\\Orc\\LightningShield\\Ligh tn ingShieldBuff.mdl")
call DestroyEffect(bj_lastCreatedEffect)
endif
endfunction
function DJV takes nothing returns nothing
set GN=GetTriggerUnit()
set HN=GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GN)
set JN=GetSpellTargetLoc()
set KN=GetOwningPlayer(GN)
set LN=250.
set MN=85.
set PN=100.
set QN=.2
set SN=200.
set TN=(PN*I2R(HN))
set UN=(SN*I2R(HN))
set WN=(QN*I2R(HN))
set YN=D6(LN,JN,Condition(function DBV))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=25
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set ZN=U5(JN,GetRandomReal(0,20.),GetRandomReal(0,360) )
call CreateNUnitsAtLoc(1,'h00B',KN,ZN,GetRandomReal(0,3 60))
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call SetUnitFlyHeight(bj_lastCreatedUnit,(30.*I2R(bj_fo rLoopAIndex)),.0)
call RemoveLocation(ZN)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call ForGroupBJ(YN,function DHV)
call AddSpecialEffectLocBJ(JN,"Abilities\\Spells\\Human \\ThunderClap\\ThunderClapCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(JN,"Abilities\\Spells\\Undea d\\FreezingBreath\\FreezingBreathMissile.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(JN)
call DestroyGroup(YN)
endfunction
function DLV takes nothing returns boolean
return(GetSpellAbilityId()=='A02E')
endfunction
function Trig_Aqua_Burst_Func013002003001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCT URE)==false)!=null
endfunction
function Trig_Aqua_Burst_Func013002003002001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Aqua_Burst_Func013002003002002 takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetFilterUnit ()),GetOwningPlayer(XB)))
endfunction
function Trig_Aqua_Burst_Func013002003002 takes nothing returns boolean
return GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(Is PlayerEnemy(GetOwningPlayer(GetFilterUnit()),GetOw ningPlayer(XB))))
endfunction
function DMV takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_STRUCTURE)==false),(GetBooleanAnd((IsUnit AliveBJ(GetFilterUnit())),(IsPlayerEnemy(GetOwning Player(GetFilterUnit()),GetOwningPlayer(XB)))))))! =null
endfunction
function DPV takes nothing returns nothing
call UnitDamageTargetBJ(XB,GetEnumUnit(),NB,ATTACK_TYPE _NORMAL,DAMAGE_TYPE_UNKNOWN)
call AddSpecialEffectTargetUnitBJ("origin",GetEnumUnit( ),"Abilities\\Spells\\Other\\CrushingWave\\Crush in gWaveDamage.mdl")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function DQV takes nothing returns nothing
set XB=GetTriggerUnit()
set OB=GetSpellTargetLoc()
set RB=GetUnitAbilityLevelSwapped(GetSpellAbilityId(), XB)
set IB=175.
set AB=70.
set NB=(AB*I2R(RB))
set BB=D6(IB,OB,Condition(function DMV))
call ForGroupBJ(BB,function DPV)
call PauseUnit(XB,true)
call SetUnitPositionLoc(XB,OB)
call PauseUnit(XB,false)
call SetUnitAnimation(XB,"birth")
call AddSpecialEffectTargetUnitBJ("origin",XB,"Objects\ \Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(OB)
call DestroyGroup(BB)
endfunction
function DTV takes nothing returns boolean
return(GetSpellAbilityId()=='A02H')
endfunction
function DUV takes nothing returns nothing
set CB=GetUnitLoc(GetTriggerUnit())
set DB=800.
set FB=800.
set GB=RectFromCenterSizeBJ(CB,DB,FB)
set HB=GetUnitAbilityLevelSwapped('A02H',GetTriggerUni t())
call CreateNUnitsAtLocFacingLocBJ(1,'n001',GetOwningPla yer(GetTriggerUnit()),CB,JB)
set KB=bj_lastCreatedUnit
call UnitApplyTimedLifeBJ(3.,'BTLF',KB)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=HB
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=5
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
set JB=GetRandomLocInRect(GB)
call CreateNUnitsAtLocFacingLocBJ(1,'n000',GetOwningPla yer(GetTriggerUnit()),CB,JB)
set KB=bj_lastCreatedUnit
call SetUnitAbilityLevelSwapped('A02G',KB,GetUnitAbilit yLevelSwapped('A02H',GetTriggerUnit()))
call IssuePointOrderByIdLoc(KB,$D0010,JB)
call UnitApplyTimedLifeBJ(1.,'BTLF',KB)
call RemoveLocation(JB)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveRect(GB)
call RemoveLocation(CB)
endfunction
function DYV takes nothing returns boolean
return(GetSpellAbilityId()=='A04G')
endfunction
function Trig_CR_Start_Copy_Copy_Func001001002001 takes nothing returns boolean
return(UnitHasBuffBJ(GetSpellTargetUnit(),'BOmi'))
endfunction
function Trig_CR_Start_Copy_Copy_Func001001002002 takes nothing returns boolean
return(GetFilterUnit()==GetSpellTargetUnit())
endfunction
function DZV takes nothing returns boolean
return GetBooleanAnd((UnitHasBuffBJ(GetSpellTargetUnit(), 'BOmi')),(GetFilterUnit()==GetSpellTargetUnit()))
endfunction
function D_V takes nothing returns nothing
call SetUnitPositionLoc(GetTriggerUnit(),GetUnitLoc(Get EnumUnit()))
call KillUnit(GetEnumUnit())
call AddSpecialEffectLocBJ(GetUnitLoc(GetEnumUnit()),"A bilities\\Spells\\Orc\\FeralSpirit\\feralspirittar get.mdl")
endfunction
function D0V takes nothing returns nothing
call ForGroupBJ(K6(GetOwningPlayer(GetTriggerUnit()),Co ndition(function DZV)),function D_V)
endfunction
function D2V takes nothing returns nothing
call CreateFogModifierRectBJ(true,Player(0),FOG_OF_WAR_ VISIBLE,UU)
call CreateFogModifierRectBJ(true,Player(0),FOG_OF_WAR_ VISIBLE,JW)
call CreateFogModifierRectBJ(true,Player(6),FOG_OF_WAR_ VISIBLE,WU)
call CreateFogModifierRectBJ(true,Player(6),FOG_OF_WAR_ VISIBLE,KW)
endfunction
function D4V takes nothing returns nothing
set XD="Abilities\\Spells\\Human\\MarkOfChaos\\MarkOf C haosTarget.mdl"
set OD="Objects\\Spawnmodels\\Other\\FlameThrower\\Fl a meThrowerSpawnObj.mdl"
set RD=450.
set AD=75.
set ID="FireNova2.mdx"
endfunction
function D6V takes nothing returns boolean
return(GetSpellAbilityId()=='A04J')
endfunction
function D7V takes nothing returns nothing
set BD=GetTriggerUnit()
set DD=GetOwningPlayer(BD)
set FD=GetSpellTargetLoc()
call AddSpecialEffectLocBJ(FD,XD)
call DestroyEffect(bj_lastCreatedEffect)
call CreateNUnitsAtLoc(1,'h00G',DD,FD,bj_UNIT_FACING)
set GD=bj_lastCreatedUnit
call SetUnitFlyHeight(GD,700.,.0)
call UnitApplyTimedLifeBJ(2.,'BTLF',GD)
call UnitAddAbility(GD,'A04I')
set CD=GetUnitAbilityLevelSwapped(GetSpellAbilityId(), BD)
call SetUnitAbilityLevelSwapped('A04I',GD,CD)
call IssuePointOrderByIdLoc(GD,$D02AC,FD)
call RemoveLocation(ND)
call RemoveLocation(FD)
set GD=null
endfunction
function D9V takes nothing returns boolean
return(GetLearnedSkill()=='A04N')
endfunction
function FVV takes nothing returns nothing
set GD=GetLearningUnit()
call IncUnitAbilityLevel(GD,'A04M')
endfunction
function FXV takes nothing returns nothing
call PlayMusicBJ(FY)
endfunction
function FRV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00E')and(G etOwningPlayer(GetDyingUnit())==Player(0))
endfunction
function FIV takes nothing returns nothing
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"|cffff000 0The Alliance's Angel has been defeated !!!|r")
endfunction
function FNV takes nothing returns boolean
return(GetOwningPlayer(GetDyingUnit())==Player(6)) and(GetUnitTypeId(GetDyingUnit())=='h00E')
endfunction
function FBV takes nothing returns nothing
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"|cffff000 0The Horde's Angel has been defeated !!!|r")
endfunction
function FDV takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h00E',Player(0),GetRectCenter (YW),bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Other\\HowlOfTerror\\ HowlCaster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Human\\FlameStrike\\F lameStrike1.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Orc\\WarStomp\\WarSto mpCaster.mdl")
call GroupPointOrderByIdLoc(L6(Player(0),'h00E'),$D000F ,GetRectCenter(YU))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.," |cffff0000ANGELS HAVE SPAWNED FOR BOTH TEAMS !!!|r")
endfunction
function FGV takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h00E',Player(0),GetRectCenter (YW),bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Other\\HowlOfTerror\\ HowlCaster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Human\\FlameStrike\\F lameStrike1.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Orc\\WarStomp\\WarSto mpCaster.mdl")
call GroupPointOrderByIdLoc(L6(Player(0),'h00E'),$D000F ,GetRectCenter(YU))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.," |cffff0000ANGELS HAVE SPAWNED FOR BOTH TEAMS !!!|r")
endfunction
function FJV takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h00E',Player(0),GetRectCenter (YW),bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Other\\HowlOfTerror\\ HowlCaster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Human\\FlameStrike\\F lameStrike1.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Orc\\WarStomp\\WarSto mpCaster.mdl")
call GroupPointOrderByIdLoc(L6(Player(0),'h00E'),$D000F ,GetRectCenter(YU))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.," |cffff0000ANGELS HAVE SPAWNED FOR BOTH TEAMS !!!|r")
endfunction
function FLV takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h00E',Player(0),GetRectCenter (YW),bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Other\\HowlOfTerror\\ HowlCaster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Human\\FlameStrike\\F lameStrike1.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Orc\\WarStomp\\WarSto mpCaster.mdl")
call GroupPointOrderByIdLoc(L6(Player(0),'h00E'),$D000F ,GetRectCenter(YU))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.," |cffff0000ANGELS HAVE SPAWNED FOR BOTH TEAMS !!!|r")
endfunction
function FPV takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h00E',Player(6),GetRectCenter (TW),bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Other\\HowlOfTerror\\ HowlCaster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Human\\FlameStrike\\F lameStrike1.mdl")
call GroupPointOrderByIdLoc(L6(Player(6),'h00E'),$D000F ,GetRectCenter(ZU))
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Orc\\WarStomp\\WarSto mpCaster.mdl")
endfunction
function FSV takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h00E',Player(6),GetRectCenter (TW),bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Other\\HowlOfTerror\\ HowlCaster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Human\\FlameStrike\\F lameStrike1.mdl")
call GroupPointOrderByIdLoc(L6(Player(6),'h00E'),$D000F ,GetRectCenter(ZU))
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Orc\\WarStomp\\WarSto mpCaster.mdl")
endfunction
function FUV takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h00E',Player(6),GetRectCenter (TW),bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Other\\HowlOfTerror\\ HowlCaster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Human\\FlameStrike\\F lameStrike1.mdl")
call GroupPointOrderByIdLoc(L6(Player(6),'h00E'),$D000F ,GetRectCenter(ZU))
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Orc\\WarStomp\\WarSto mpCaster.mdl")
endfunction
function FYV takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h00E',Player(6),GetRectCenter (TW),bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Other\\HowlOfTerror\\ HowlCaster.mdl")
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Human\\FlameStrike\\F lameStrike1.mdl")
call GroupPointOrderByIdLoc(L6(Player(6),'h00E'),$D000F ,GetRectCenter(ZU))
call AddSpecialEffectTargetUnitBJ("overhead",bj_lastCre atedUnit,"Abilities\\Spells\\Orc\\WarStomp\\WarSto mpCaster.mdl")
endfunction
function F_V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='hbar')
endfunction
function F0V takes nothing returns nothing
call SetUnitInvulnerable(P3,false)
call SetUnitInvulnerable(M3,false)
endfunction
function F2V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='obar')
endfunction
function F3V takes nothing returns nothing
call SetUnitInvulnerable(H3,false)
call SetUnitInvulnerable(G3,false)
endfunction
function Trig_invul_fort_Func002001 takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())==GetUnitTypeI d(P3))
endfunction
function Trig_invul_fort_Func002002 takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())==GetUnitTypeI d(M3))
endfunction
function F5V takes nothing returns boolean
return(GetBooleanAnd((GetUnitTypeId(GetDyingUnit() )==GetUnitTypeId(P3)),(GetUnitTypeId(GetDyingUnit( ))==GetUnitTypeId(M3))))
endfunction
function F6V takes nothing returns nothing
call SetUnitInvulnerable(L3,false)
endfunction
function Trig_invul_castle_Func002001 takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())==GetUnitTypeI d(H3))
endfunction
function Trig_invul_castle_Func002002 takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())==GetUnitTypeI d(G3))
endfunction
function F8V takes nothing returns boolean
return(GetBooleanAnd((GetUnitTypeId(GetDyingUnit() )==GetUnitTypeId(H3)),(GetUnitTypeId(GetDyingUnit( ))==GetUnitTypeId(G3))))
endfunction
function F9V takes nothing returns nothing
call SetUnitInvulnerable(J3,false)
endfunction
function GEV takes nothing returns nothing
call CreateQuestBJ(0,"Special Events","Special Events n-|cffff0000 |r|cffff00ffAngels|r|cffff0000 |rwill spawn for each team behind|cffff0000 Top Barracks for The Alliance |rand |cff00ff00Bottom Barracks for the Horde |rat these certain times : |n|cffffff0045,75,105,135 Minutes|n|r-|cff0000ff Team Brawl |rWill be Held every |cff00ff0015 Minutes|r, every winners that is alive will earn |cffdaa5205000 Golds|n|r- Each Member of the Team who killed the|cffff0080 Master Grunt/Swordman |rwill earn |cffdaa5205000 Golds|r","ReplaceableTextures\\CommandButtons\\BTN Flare.blp")
call CreateQuestBJ(0,"Commands","Commands List : |n- Type |cffffa500-ms |rto see your current movement speed.|n- Type |cffffa500-notour |rfor player |cff0000ffBlue|r|n","ReplaceableTextures\\PassiveB uttons\\PASBTNStatUp.blp")
call CreateQuestBJ(0,"Mau Uang Main HVSO?","Mau Duit cuman main HVSO? Caranya gampang.|nSetiap lu Win sebuah game |cffff0000HVSO|r ( |cff00ff00Map harus terbaru di bulan itu |r) dengan jumlah player|cff0000ff 4 vs 4 atau 5 vs 5, |r|cffff80c0ScreenShot ketika keluar tulisan Victory/Win dan Scoreboard Anda|r. Lalu post di thread |cffffcc00http://idgs.in/765077|r sesuai dengan format yang diberitahukan di thread itu.|nUntuk Informasi lebih lanjut, buka link ini n|cffff0000http://idgs.in/764798|r","ReplaceableTextures\\CommandButtons\\BT NChestOfGold.blp")
call CreateQuestBJ(2,"Suggestions","Found any bugs? Have any suggestions? Submit it at |
[email protected] |ror |cff00ff00@yovanjeffz (LINE)|r","ReplaceableTextures\\WorldEditUI\\Edito r-Random-Unit.blp")
call CreateQuestBJ(2,"Credits","This map is made by |cffff0000HIGH_WAR_LORD|r.|nTrigger Maker : |cff0000ffFei~jin-|r|nProtection Manager : |cff00ff00-Revealz,Nx-Garm-|n|rHVSO Team Events : |cffff8000MOONRAKERLOD,HVSO-Valkyrie,VLSUAL_KEY,HVSO-Black,~CR8|n|rMap Testers : |cffffff00HRexxarz,F-Fblz-4,VLSUAL_KEY,HVSO-Valkyrie,lelegoyeng|r|cffff8000|n|r|cffff0000|n|r" ,"ReplaceableTextures\\CommandButtons\\BTNReven ant .blp")
call CreateQuestBJ(2,"Support Us","Support us by Downloading this map from |cffffcc00hiveworkshop.com/threads/hvso-allstars-v1-6a-final.289007/|n|r,leave a comment and rate the map.|cff000000|n|r","ReplaceableTextures\\CommandB uttons\\BTNMirrorImage.blp")
endfunction
function GOV takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=$C
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetPlayerAbilityAvailableBJ(false,'A04Z',Player(-1+(bj_forLoopAIndex)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function GIV takes nothing returns boolean
return(UnitHasBuffBJ(GetAttacker(),'B00Z'))
endfunction
function GAV takes nothing returns boolean
return(GetRandomReal(1.,100.)<=20.)
endfunction
function GNV takes nothing returns nothing
if(GAV())then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'h000',GetOwningPlayer(GetAtta cker()),GetUnitLoc(GetAttacker()),bj_UNIT_FACING)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,$D0264,G etUnitLoc(GetTriggerUnit()))
call TriggerSleepAction(.01)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
endfunction
function GCV takes nothing returns nothing
local timer z=GetExpiredTimer()
local unit c=LoadUnitHandle(HS,GetHandleId(z),0)
if GetUnitAbilityLevel(c,'B011')<=0 then
call VNV(z)
call FlushChildHashtable(HS,GetHandleId(z))
endif
set c=null
endfunction
function GDV takes nothing returns nothing
local unit c=GetTriggerUnit()
local integer i=0
local real x=(((GetUnitX(c))*1.)+(('x')*1.)*Cos(((GetUnitFaci ng(c)-90)*1.)*bj_DEGTORAD))
local real y=(((GetUnitY(c))*1.)+(('x')*1.)*Sin(((GetUnitFaci ng(c)-90)*1.)*bj_DEGTORAD))
local timer z
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(c),' h000',x,y,GetUnitFacing(c)+90)
call SetUnitAnimation(bj_lastCreatedUnit,"spell three")
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',.6)
set z=(VIV(0))
call SaveUnitHandle(HS,GetHandleId(z),0,c)
call TimerStart(z,.05,true,function GCV)
set c=null
endfunction
function GFV takes nothing returns boolean
return GetSpellAbilityId()=='A04W'
endfunction
function GGV takes nothing returns nothing
local unit c=GetAttacker()
local unit t=GetTriggerUnit()
local real x
local real y
local real r=((GetUnitAbilityLevel(c,'A04W')*25)+25)
local real a=W7(GetUnitX(c),GetUnitY(c),GetUnitX(t),GetUnitY( t))
local unit d
call UnitRemoveAbility(c,'B011')
call IssueImmediateOrderById(c,$D0004)
call SetUnitAnimation(c,"spell one")
call TriggerSleepAction(.0)
call DestroyEffect(AddSpecialEffect("war3mapImported\\N ewDirtEXNofire.mdx.mdx",GetUnitX(t),GetUnitY(t)))
call DestroyEffect(AddSpecialEffect("war3mapImported\\S uperBigExplosion.mdx",GetUnitX(t),GetUnitY(t)))
call UnitDamageTarget(c,t,r,true,true,null,DAMAGE_TYPE_ DIVINE,null)
call SetWidgetLife(c,(GetUnitStateSwap(UNIT_STATE_LIFE, c)+200.))
endfunction
function GHV takes nothing returns boolean
return(IsUnitEnemy(GetTriggerUnit(),GetOwningPlaye r(GetAttacker())) and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)== false and GetUnitAbilityLevel(GetAttacker(),'B011')>=1)!=nul l
endfunction
function GJV takes nothing returns nothing
local trigger t=CreateTrigger()
local trigger t2=CreateTrigger()
local integer I7=0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(I7),EVENT_ PLAYER_UNIT_SPELL_EFFECT,null)
call TriggerRegisterPlayerUnitEvent(t2,Player(I7),EVENT _PLAYER_UNIT_ATTACKED,null)
set I7=I7+1
exitwhen I7==16
endloop
call TriggerAddCondition(t,Condition(function GFV))
call TriggerAddAction(t,function GDV)
call TriggerAddCondition(t2,Condition(function GHV))
call TriggerAddAction(t2,function GGV)
set t=null
set t2=null
endfunction
function GKV takes nothing returns boolean
return(GetSpellAbilityId()=='A04T')
endfunction
function GLV takes nothing returns boolean
return(SH==1)
endfunction
function GMV takes nothing returns nothing
set SH=(SH+1)
if(GLV())then
call EnableTrigger(K2)
endif
set TH[SH]=GetTriggerUnit()
call SetUnitAnimation(TH[SH],"Attack Slam")
set UH[SH]=GetUnitLoc(TH[SH])
set WH[SH]=GetSpellTargetLoc()
call CreateNUnitsAtLoc(1,'h00M',GetOwningPlayer(TH[SH]),WH[SH],GetUnitFacing(TH[SH]))
set YH[SH]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreat edUnit,"Abilities\\Weapons\\PhoenixMissile\\Phoeni x_Missile.mdl")
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreat edUnit,"Units\\Demon\\Infernal\\InfernalBirth.mdl" )
set ZH[SH]=bj_lastCreatedEffect
call UnitAddAbility(bj_lastCreatedUnit,'A04P')
call SetUnitAbilityLevelSwapped('A04P',bj_lastCreatedUn it,GetUnitAbilityLevelSwapped('A04T',TH[SH]))
set VJ[SH]=AngleBetweenPoints(UH[SH],WH[SH])
set EJ[SH]=.0
set XJ[SH]=((30.*I2R(GetUnitAbilityLevelSwapped('A04T',TH[SH])))+40.)
call RemoveLocation(UH[SH])
call RemoveLocation(WH[SH])
endfunction
function Trig_Living_Meteor_Loop_Func001Func006Func00200200 3001001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCT URE)==false)!=null
endfunction
function Trig_Living_Meteor_Loop_Func001Func006Func00200200 3001002 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_ IMMUNE)==false)!=null
endfunction
function Trig_Living_Meteor_Loop_Func001Func006Func00200200 3001 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),U NIT_TYPE_STRUCTURE)==false),(IsUnitType(GetFilterU nit(),UNIT_TYPE_MAGIC_IMMUNE)==false)))!=null
endfunction
function Trig_Living_Meteor_Loop_Func001Func006Func00200200 3002001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Living_Meteor_Loop_Func001Func006Func00200200 3002002 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer (YH[OJ])))
endfunction
function Trig_Living_Meteor_Loop_Func001Func006Func00200200 3002 takes nothing returns boolean
return GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(Is UnitEnemy(GetFilterUnit(),GetOwningPlayer(YH[OJ]))))
endfunction
function GQV takes nothing returns boolean
return(GetBooleanAnd((GetBooleanAnd((IsUnitType(Ge tFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(IsUnit Type(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==fals e))),(GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit() )),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(YH[OJ])))))))!=null
endfunction
function GSV takes nothing returns nothing
call UnitDamageTargetBJ(TH[OJ],GetEnumUnit(),(XJ[OJ]+1.),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function GTV takes nothing returns boolean
return(IJ[OJ]>=16)
endfunction
function GUV takes nothing returns boolean
return(SH==0)
endfunction
function GWV takes nothing returns boolean
return(EJ[OJ]>=1200.)
endfunction
function GYV takes nothing returns nothing
set OJ=1
loop
exitwhen OJ>SH
set RJ[OJ]=GetUnitLoc(YH[OJ])
set WH[OJ]=U5(RJ[OJ],12.,VJ[OJ])
call SetUnitPositionLoc(YH[OJ],WH[OJ])
set EJ[OJ]=(EJ[OJ]+12.)
set IJ[OJ]=(IJ[OJ]+1)
if(GTV())then
set IJ[OJ]=0
set AJ[OJ]=D6(250.,WH[OJ],Condition(function GQV))
call ForGroupBJ(AJ[OJ],function GSV)
call AddSpecialEffectLocBJ(WH[OJ],"Objects\\Spawnmodels\\Other\\NeutralBuildingE xpl osion\\NeutralBuildingExplosion.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call DestroyGroup(AJ[OJ])
endif
call RemoveLocation(RJ[OJ])
call RemoveLocation(WH[OJ])
if(GWV())then
set TH[OJ]=TH[SH]
call KillUnit(YH[OJ])
set YH[OJ]=YH[SH]
call DestroyEffect(ZH[OJ])
set IJ[OJ]=IJ[SH]
set ZH[OJ]=ZH[SH]
set EJ[OJ]=EJ[SH]
set XJ[OJ]=XJ[SH]
set VJ[OJ]=VJ[SH]
set OJ=(OJ-1)
set SH=(SH-1)
if(GUV())then
call DisableTrigger(GetTriggeringTrigger())
endif
endif
set OJ=OJ+1
endloop
endfunction
function G_V takes nothing returns boolean
return(GetSpellAbilityId()=='A04U')
endfunction
function G0V takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function G1V takes nothing returns boolean
return(IsUnitEnemy(GetEnumUnit(),GetOwningPlayer(N J)))
endfunction
function G2V takes nothing returns nothing
if(G1V())then
call UnitDamageTargetBJ(GetSpellAbilityUnit(),GetEnumUn it(),CJ,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DIVINE)
call AddSpecialEffectTargetUnitBJ("origin",GetEnumUnit( ),"Abilities\\Spells\\Human\\FlameStrike\\FlameS tr ikeEmbers.mdl")
call DestroyEffect(bj_lastCreatedEffect)
else
call SetPlayerAbilityAvailableBJ(false,'A04U',GetOwning Player(NJ))
call SetPlayerAbilityAvailableBJ(true,'A04Z',GetOwningP layer(NJ))
endif
endfunction
function G3V takes nothing returns nothing
set NJ=GetSpellAbilityUnit()
set BJ=GetSpellTargetLoc()
set CJ=((I2R(GetUnitAbilityLevelSwapped('A04U',NJ))+25 .)+25.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'h00N',GetOwningPlayer(NJ),U5( BJ,GetRandomReal(0,300.),GetRandomReal(0,300.)),bj _UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("origin",GetEnumUnit( ),"Units\\Demon\\Infernal\\InfernalBirth.mdl")
call SetUnitTimeScalePercent(bj_lastCreatedUnit,100.)
call SetUnitScalePercent(bj_lastCreatedUnit,50.,50.,50. )
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call ForGroupBJ(D6(350.,GetUnitLoc(bj_lastCreatedUnit), Condition(function G0V)),function G2V)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function G5V takes nothing returns boolean
return(GetSpellAbilityId()=='A04Z')
endfunction
function G6V takes nothing returns boolean
return(GetUnitTypeId(NJ)=='H00P')
endfunction
function G7V takes nothing returns boolean
return(G6V())
endfunction
function G8V takes nothing returns nothing
if(G7V())then
call SetPlayerAbilityAvailableBJ(false,'A04Z',GetOwning Player(NJ))
call SetPlayerAbilityAvailableBJ(true,'A04U',GetOwningP layer(NJ))
else
call SetPlayerAbilityAvailableBJ(false,'A04Z',GetOwning Player(NJ))
call SetPlayerAbilityAvailableBJ(true,'A04U',GetOwningP layer(NJ))
endif
endfunction
function HVV takes nothing returns boolean
return GetSpellAbilityId()=='A04V'
endfunction
function HEV takes nothing returns nothing
local unit c=GetTriggerUnit()
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local integer i
local unit array d
local real a=W7(GetUnitX(c),GetUnitY(c),x,y)
local real xx=(((GetUnitX(c))*1.)+((450)*1.)*Cos(((a)*1.)*bj_ DEGTORAD))
local real yy=(((GetUnitY(c))*1.)+((450)*1.)*Sin(((a)*1.)*bj_ DEGTORAD))
local real a2
local real r=GetUnitAbilityLevel(c,'A04V')*300
local group g
local unit e
call SetUnitTimeScale(c,0)
call S7(.2,xx,yy,500,1)
call PauseUnit(c,true)
call SetUnitAnimation(c,"spell")
call SetUnitTimeScale(c,1)
set i=(1)-1
loop
set i=i+1
exitwhen i>(1)
set d[i]=CreateUnit(GetOwningPlayer(c),'h00I',x,y,a)
endloop
call EEV(c,x,y,a,1,'h00N',5,$FF,$FF,$FF,$FF)
call EEV(c,x,y,a,1,'h00O',.5,$FF,$FF,$FF,$FF)
call DestroyEffect(AddSpecialEffect("war3mapImported\\N ewDirtEXNofire.mdx.mdx",x,y))
call DestroyEffect(AddSpecialEffect("war3mapImported\\S uperBigExplosion.mdx",x,y))
set g=CreateGroup()
call GroupEnumUnitsInRange(g,x,y,R4,null)
loop
set e=FirstOfGroup(g)
exitwhen e==null
call GroupRemoveUnit(g,e)
if X8(c,e)then
call UnitDamageTarget(c,e,r,true,true,null,DAMAGE_TYPE_ DIVINE,null)
call VCV(c,e,2)
endif
endloop
call SetUnitPosition(d[i],x,y)
call DestroyGroup(g)
call PauseUnit(c,false)
set i=(1)-1
loop
set i=i+1
exitwhen i>(1)
call RemoveUnit(d[i])
set d[i]=null
endloop
set c=null
set g=null
set e=null
endfunction
function HXV takes nothing returns nothing
local trigger t=CreateTrigger()
local integer I7=0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(I7),EVENT_ PLAYER_UNIT_SPELL_EFFECT,null)
set I7=I7+1
exitwhen I7==16
endloop
call TriggerAddCondition(t,Condition(function HVV))
call TriggerAddAction(t,function HEV)
set t=null
endfunction
function HOV takes nothing returns boolean
return(FJ==0)
endfunction
function HRV takes nothing returns boolean
return(MJ)
endfunction
function HIV takes nothing returns boolean
return(GetUnitUserData(JJ[DJ])==0)
endfunction
function HAV takes nothing returns boolean
return(PJ==$F)
endfunction
function HNV takes nothing returns boolean
return(GetUnitUserData(GetFilterUnit())==0)
endfunction
function HBV takes nothing returns nothing
call ExecuteFunc("HCV")
endfunction
function HDV takes nothing returns boolean
local integer HFV=DJ
if(HRV())then
if(HOV())then
set DJ=(HJ+1)
set HJ=DJ
else
set DJ=FJ
set FJ=GJ[DJ]
endif
set JJ[DJ]=GetFilterUnit()
call SetUnitUserData(JJ[DJ],DJ)
set KJ[GJ[0]]=DJ
set GJ[DJ]=GJ[0]
set GJ[0]=DJ
set LJ=.0
set LJ=1.
set LJ=.0
set DJ=HFV
endif
return false
endfunction
function HGV takes nothing returns boolean
local integer HFV=DJ
local integer HHV
set PJ=(PJ+1)
if(HAV())then
set PJ=0
set DJ=GJ[0]
loop
exitwhen DJ==0
if(HIV())then
set HHV=GJ[DJ]
set GJ[KJ[DJ]]=HHV
set KJ[HHV]=KJ[DJ]
set KJ[DJ]=0
set LJ=2.
set LJ=.0
set JJ[DJ]=null
set GJ[DJ]=FJ
set FJ=DJ
set DJ=HHV
else
set DJ=GJ[DJ]
endif
endloop
set DJ=HFV
endif
if(HNV())then
call HDV()
endif
return false
endfunction
function HCV takes nothing returns nothing
local integer i=0
local region re=CreateRegion()
local rect r=GetWorldBounds()
set MJ=true
call RegionAddRect(re,r)
call TriggerRegisterEnterRegion(CreateTrigger(),re,Filt er(function HGV))
call RemoveRect(r)
set re=null
set r=null
loop
call GroupEnumUnitsOfPlayer(bj_lastCreatedGroup,Player( i),Filter(function HDV))
set i=i+1
exitwhen i==16
endloop
set LJ=3.
set LJ=.0
endfunction
function HKV takes nothing returns nothing
set ZP=Rect(0,0,128.,128.)
set VQ=CreateItem('wtlg',0,0)
call SetItemVisible(VQ,false)
set EQ=0
set XQ[0]=null
set QP=GetSpellTargetLoc()
set UP=false
call RemoveLocation(QP)
endfunction
function HMV takes nothing returns nothing
if IsItemVisible(GetEnumItem())then
set XQ[EQ]=GetEnumItem()
call SetItemVisible(XQ[EQ],false)
set EQ=(EQ+1)
endif
endfunction
function HPV takes nothing returns nothing
local real x=GetLocationX(QP)
local real y=GetLocationY(QP)
local real x2=0
local real y2=0
call MoveRectTo(ZP,x,y)
call EnumItemsInRectBJ(ZP,function HMV)
call SetItemPosition(VQ,x,y)
set x2=GetItemX(VQ)
set y2=GetItemY(VQ)
call SetItemVisible(VQ,false)
loop
exitwhen EQ<=0
set EQ=EQ-1
call SetItemVisible(XQ[EQ],true)
set XQ[EQ]=null
endloop
set UP=((x2-x)*(x2-x)+(y2-y)*(y2-y)<='d')and(not IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY))
endfunction
function HSV takes nothing returns nothing
set QJ='A056'
set SJ=4
set TJ="acidbomb"
set UJ='A052'
set WJ='B014'
set YJ='h00Q'
set ZJ[1]=25.
set ZJ[2]=25.
set ZJ[3]=25.
set ZJ[4]=25.
set VK[1]=20.
set VK[2]=30.
set VK[3]=35.
set VK[4]=40.
set EK[1]=15.
set EK[2]=15.
set EK[3]=15.
set EK[4]=15.
set XK[1]=450.
set XK[2]=450.
set XK[3]=450.
set XK[4]=450.
set OK=50.
set RK=60.
set IK[1]=100.
set IK[2]=200.
set IK[3]=300.
set IK[4]=400.
set AK[1]=500.
set AK[2]=500.
set AK[3]=500.
set AK[4]=500.
set NK=ATTACK_TYPE_NORMAL
set BK=DAMAGE_TYPE_MAGIC
set CK=50.
set DK="NoxCloudMissile.mdl"
set FK="chest"
set GK=100.
set HK="Abilities\\Spells\\Other\\AcidBomb\\BottleMis s ile.mdl"
set JK="NoxCloudEffect.mdl"
set KK="chest"
set LK=32.
set MK="There is a nearby cloud."
set WL=CreateSoundFromLabel("InterfaceError",false,fal se,false,$A,$A)
set PK=Player($E)
set QK=.03
call TriggerRegisterTimerEventPeriodic(Y2,QK)
set SK=GetRectCenter(bj_mapInitialPlayableArea)
call CreateNUnitsAtLoc(1,YJ,PK,SK,bj_UNIT_FACING)
set TK=bj_lastCreatedUnit
call UnitAddAbility(TK,UJ)
call RemoveUnit(TK)
set UK=0
set WK[0]=YK[0]
set CK=(CK/ 100.)
set UK=1
loop
exitwhen UK>SJ
set VK[UK]=(VK[UK]*QK)
set UK=UK+1
endloop
endfunction
function HUV takes nothing returns boolean
return(GetSpellAbilityId()==QJ)
endfunction
function HWV takes nothing returns boolean
return(ZK==1)
endfunction
function HYV takes nothing returns boolean
return(VL==0)
endfunction
function HZV takes nothing returns nothing
set ZK=(ZK+1)
if(HWV())then
call EnableTrigger(Y2)
endif
if(HYV())then
set OL=(OL+1)
set EL=OL
else
set VL=(VL-1)
set EL=XL[VL]
endif
set RL[EL]=0
set IL[EL]=IL[0]
set RL[IL[0]]=EL
set IL[0]=EL
set AL[EL]=GetTriggerUnit()
set NL[EL]=GetTriggerPlayer()
set BL[EL]=GetUnitAbilityLevelSwapped(QJ,AL[EL])
set CL[EL]=.0
set DL[EL]=0
if(YL[EL]==null)then
set YL[EL]=CreateGroup()
endif
set FL=GetUnitLoc(AL[EL])
set GL[EL]=GetSpellTargetLoc()
set HL=AngleBetweenPoints(FL,GL[EL])
call CreateNUnitsAtLoc(1,YJ,PK,FL,HL)
set JL[EL]=bj_lastCreatedUnit
call SetUnitX(JL[EL],GetUnitX(AL[EL]))
call SetUnitY(JL[EL],GetUnitY(AL[EL]))
call AddSpecialEffectTargetUnitBJ(FK,JL[EL],DK)
set KL[EL]=bj_lastCreatedEffect
call SetUnitScalePercent(JL[EL],GK,'d','d')
set LL[EL]=.0
set ML[EL]=CosBJ(HL)
set PL[EL]=SinBJ(HL)
set QL[EL]=(DistanceBetweenPoints(FL,GL[EL])+1)
set SL[EL]=(QL[EL]*CK)
set WK[EL]=GetUnitFlyHeight(AL[EL])+GetLocationZ(FL)
set YK[EL]=GetLocationZ(GL[EL])
set TL[GetUnitUserData(JL[EL])]=EL
call RemoveLocation(FL)
endfunction
function H0V takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(QJ,GetTriggerUni t())>=1)and(GetIssuedOrderId()==String2OrderIdBJ(T J))
endfunction
function H1V takes nothing returns boolean
return(DL[EL]==1)and(DistanceBetweenPoints(FL,GL[EL])<=RK)
endfunction
function H2V takes nothing returns nothing
set UL=GetTriggerPlayer()
set FL=GetOrderPointLoc()
set EL=0
set UK=1
loop
exitwhen UK>ZK
set EL=RL[EL]
if(H1V())then
set TK=GetTriggerUnit()
call PauseUnit(TK,true)
call IssueImmediateOrderById(TK,$D0004)
call PauseUnit(TK,false)
if(GetLocalPlayer()==UL)then
call ClearTextMessages()
call DisplayTimedTextToPlayer(UL,.52,.96,2.,"
|cffffcc00"+MK+"|r")
call PlaySoundBJ(WL)
endif
exitwhen true
endif
set UK=UK+1
endloop
call RemoveLocation(FL)
endfunction
function H4V takes nothing returns boolean
return(UnitHasBuffBJ(TK,WJ)==false)
endfunction
function H5V takes nothing returns boolean
return((IsUnitType(TK,UNIT_TYPE_STRUCTURE)==false) and(IsUnitType(TK,UNIT_TYPE_MAGIC_IMMUNE)==false)a nd(IsUnitAliveBJ(TK))and(IsUnitEnemy(TK,NL[EL]))and(GetUnitFlyHeight(TK)<=OK))!=null
endfunction
function H6V takes nothing returns nothing
set TK=GetEnumUnit()
if(H5V())then
call UnitDamageTargetBJ(AL[EL],TK,VK[BL[EL]],NK,BK)
if(H4V())then
call IssueTargetOrderById(JL[EL],$D006B,TK)
call GroupAddUnit(YL[EL],TK)
endif
endif
endfunction
function H7V takes nothing returns boolean
return(IsUnitDeadBJ(TK))or(DistanceBetweenPoints(F L,GL[EL])>XK[BL[EL]])
endfunction
function H8V takes nothing returns boolean
return(H7V())
endfunction
function H9V takes nothing returns nothing
set TK=GetEnumUnit()
set FL=GetUnitLoc(TK)
if(H8V())then
call UnitRemoveAbility(TK,WJ)
call GroupRemoveUnit(YL[EL],TK)
endif
call RemoveLocation(FL)
endfunction
function JVV takes nothing returns boolean
return(DL[EL]==2)or(CL[EL]>=EK[BL[EL]])
endfunction
function JEV takes nothing returns nothing
set TK=GetEnumUnit()
call UnitRemoveAbility(TK,WJ)
call GroupRemoveUnit(YL[EL],TK)
endfunction
function JXV takes nothing returns boolean
return(ZK==0)
endfunction
function JOV takes nothing returns boolean
return(JVV())
endfunction
function JRV takes nothing returns boolean
return(LL[EL]>=QL[EL])
endfunction
function JIV takes nothing returns boolean
return(DL[EL]==0)
endfunction
function JAV takes nothing returns nothing
local real x
local real y
local real JNV
local real JBV
local real JCV
local real JDV
local real JFV
set EL=0
set UK=1
loop
exitwhen UK>ZK
set EL=RL[EL]
if(JIV())then
set x=GetUnitX(JL[EL])+ZJ[BL[EL]]*ML[EL]
set y=GetUnitY(JL[EL])+ZJ[BL[EL]]*PL[EL]
set LL[EL]=(LL[EL]+ZJ[BL[EL]])
set JNV=QL[EL]
set JBV=LL[EL]
call MoveLocation(SK,GetUnitX(JL[EL]),GetUnitY(JL[EL]))
set JCV=WK[EL]
set JDV=YK[EL]
set JFV=JCV-GetLocationZ(SK)
set VM=4*SL[EL]*JBV*(JNV-JBV)/(JNV*JNV)+JBV*(JDV-JCV)/ JNV+JFV
call SetUnitX(JL[EL],x)
call SetUnitY(JL[EL],y)
call SetUnitFlyHeight(JL[EL],VM,.0)
if(JRV())then
call AddSpecialEffectLocBJ(GL[EL],HK)
call DestroyEffect(bj_lastCreatedEffect)
call DestroyEffect(KL[EL])
set DL[EL]=1
call GroupAddUnit(ZL,JL[EL])
call AddSpecialEffectTargetUnitBJ(KK,JL[EL],JK)
set KL[EL]=bj_lastCreatedEffect
call SetUnitScalePercent(JL[EL],LK,'d','d')
call UnitAddAbility(JL[EL],UJ)
call UnitRemoveAbility(JL[EL],'Amov')
endif
else
set CL[EL]=(CL[EL]+QK)
set bj_wantDestroyGroup=true
call ForGroupBJ(G6(XK[BL[EL]],GL[EL]),function H6V)
call ForGroupBJ(YL[EL],function H9V)
if(JOV())then
call GroupRemoveUnit(ZL,JL[EL])
call DestroyEffect(KL[EL])
call KillUnit(JL[EL])
call RemoveLocation(GL[EL])
call ForGroupBJ(YL[EL],function JEV)
call DestroyGroup(YL[EL])
set YL[EL]=null
set XL[VL]=EL
set VL=(VL+1)
set RL[IL[EL]]=RL[EL]
set IL[RL[EL]]=IL[EL]
set ZK=(ZK-1)
if(JXV())then
call DisableTrigger(Y2)
endif
endif
endif
set UK=UK+1
endloop
endfunction
function JHV takes nothing returns boolean
return(IM)
endfunction
function JJV takes nothing returns nothing
set EM='A053'
set XM=4
set OM="blink"
set RM='h00Q'
set IM=true
set AM[1]=800.
set AM[2]=800.
set AM[3]=800.
set AM[4]=800.
set NM[1]=1.
set NM[2]=1.
set NM[3]=1.
set NM[4]=1.
set BM[1]=150.
set BM[2]=225.
set BM[3]=300.
set BM[4]=350.
set CM[1]=80.
set CM[2]=80.
set CM[3]=80.
set CM[4]=80.
set DM=50.
set FM[1]=100.
set FM[2]=100.
set FM[3]=100.
set FM[4]=100.
set GM=ATTACK_TYPE_NORMAL
set HM=DAMAGE_TYPE_MAGIC
set JM="ConflagrateMissile.mdl"
set KM="chest"
set LM=80.
set MM="ConflagrateMissile.mdl"
set PM="origin"
set QM="NoxCloudExplosion.mdx"
set SM="Unable to target there."
set TP=CreateSoundFromLabel("InterfaceError",false,fal se,false,$A,$A)
set TM=Player($E)
set UM=.03
call TriggerRegisterTimerEventPeriodic(X3,UM)
set WM=GetRectCenter(bj_mapInitialPlayableArea)
if(JHV())then
call CreateNUnitsAtLoc(1,'h00Q',TM,WM,bj_UNIT_FACING)
set YM=bj_lastCreatedUnit
call UnitAddAbility(YM,'Ahrl')
endif
call CreateNUnitsAtLoc(1,RM,TM,WM,bj_UNIT_FACING)
call RemoveUnit(bj_lastCreatedUnit)
call RemoveLocation(WM)
set ZM=0
set ZM=1
loop
exitwhen ZM>XM
set VP[ZM]=(AM[ZM]/(NM[ZM]/ UM))
set ZM=ZM+1
endloop
endfunction
function JLV takes nothing returns boolean
return(GetSpellAbilityId()==EM)
endfunction
function JMV takes nothing returns boolean
return(EP==1)
endfunction
function JPV takes nothing returns boolean
return(XP==0)
endfunction
function JQV takes nothing returns nothing
set EP=(EP+1)
if(JMV())then
call EnableTrigger(X3)
endif
if(JPV())then
set IP=(IP+1)
set OP=IP
else
set XP=(XP-1)
set OP=RP[XP]
endif
set AP[OP]=0
set NP[OP]=NP[0]
set AP[NP[0]]=OP
set NP[0]=OP
set BP[OP]=GetTriggerUnit()
set CP[OP]=GetTriggerPlayer()
set DP[OP]=GetUnitAbilityLevelSwapped(EM,BP[OP])
if(YP[OP]==null)then
set YP[OP]=CreateGroup()
endif
set FP=GetUnitLoc(BP[OP])
set WM=GetSpellTargetLoc()
set GP=AngleBetweenPoints(FP,WM)
set HP[OP]=CosBJ(GP)
set JP[OP]=SinBJ(GP)
set KP[OP]=.0
call CreateNUnitsAtLoc(1,RM,TM,FP,GP)
set LP[OP]=bj_lastCreatedUnit
call SetUnitX(LP[OP],GetUnitX(BP[OP]))
call SetUnitY(LP[OP],GetUnitY(BP[OP]))
call AddSpecialEffectTargetUnitBJ(KM,LP[OP],JM)
set MP[OP]=bj_lastCreatedEffect
call SetUnitScalePercent(LP[OP],LM,'d','d')
call RemoveLocation(WM)
call RemoveLocation(FP)
endfunction
function JTV takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(EM,GetTriggerUni t())>=1)and(GetIssuedOrderId()==String2OrderIdBJ(O M))
endfunction
function JUV takes nothing returns boolean
return(UP==false)
endfunction
function JWV takes nothing returns nothing
set PP=GetTriggerPlayer()
set QP=GetOrderPointLoc()
call TriggerExecute(S2)
if(JUV())then
set SP=GetTriggerUnit()
call PauseUnit(SP,true)
call IssueImmediateOrderById(SP,$D0004)
call PauseUnit(SP,false)
if(GetLocalPlayer()==PP)then
call ClearTextMessages()
call DisplayTimedTextToPlayer(PP,.52,.96,2.,"
|cffffcc00"+SM+"|r")
call PlaySoundBJ(TP)
endif
endif
call RemoveLocation(QP)
endfunction
function JZV takes nothing returns boolean
return(GetUnitCurrentOrder(YM)==$D0032)
endfunction
function J_V takes nothing returns boolean
return(IsDestructableAliveBJ(WP))
endfunction
function J0V takes nothing returns nothing
set WP=GetEnumDestructable()
if(J_V())then
call IssueTargetOrderById(YM,$D0032,WP)
if(JZV())then
call KillDestructable(WP)
endif
call IssueImmediateOrderById(YM,$D0004)
endif
endfunction
function J1V takes nothing returns boolean
return(IM)
endfunction
function J2V takes nothing returns boolean
return((IsUnitType(SP,UNIT_TYPE_MAGIC_IMMUNE)==fal se)and(IsUnitAliveBJ(SP))and(IsUnitEnemy(SP,NL[EL])))!=null
endfunction
function J3V takes nothing returns nothing
set SP=GetEnumUnit()
if(J2V())then
call UnitDamageTargetBJ(AL[EL],SP,IK[BL[EL]],NK,BK)
endif
endfunction
function J4V takes nothing returns boolean
return(DistanceBetweenPoints(QP,GL[EL])<=FM[DP[OP]])
endfunction
function J5V takes nothing returns nothing
set EL=TL[GetUnitUserData(GetEnumUnit())]
if(J4V())then
call AddSpecialEffectLocBJ(GL[EL],QM)
call DestroyEffect(bj_lastCreatedEffect)
set DL[EL]=2
set bj_wantDestroyGroup=true
call ForGroupBJ(G6(AK[BL[EL]],GL[EL]),function J3V)
endif
endfunction
function J6V takes nothing returns boolean
return((IsUnitType(SP,UNIT_TYPE_STRUCTURE)==false) and(IsUnitType(SP,UNIT_TYPE_MAGIC_IMMUNE)==false)a nd(IsUnitInGroup(SP,YP[OP])==false)and(IsUnitAliveBJ(SP))and(IsUnitEnemy(SP, CP[OP]))and(GetUnitFlyHeight(SP)<=DM))!=null
endfunction
function J7V takes nothing returns nothing
set SP=GetEnumUnit()
if(J6V())then
call AddSpecialEffectTargetUnitBJ(PM,SP,MM)
call DestroyEffect(bj_lastCreatedEffect)
call UnitDamageTargetBJ(BP[OP],SP,BM[DP[OP]],GM,HM)
call GroupAddUnit(YP[OP],SP)
endif
endfunction
function J8V takes nothing returns boolean
return(UP==false)or(KP[OP]>=AM[DP[OP]])
endfunction
function J9V takes nothing returns boolean
return(EP==0)
endfunction
function KVV takes nothing returns boolean
return(J8V())
endfunction
function KEV takes nothing returns nothing
local real x
local real y
set OP=0
set ZM=1
loop
exitwhen ZM>EP
set OP=AP[OP]
set x=GetUnitX(LP[OP])+VP[DP[OP]]*HP[OP]
set y=GetUnitY(LP[OP])+VP[DP[OP]]*JP[OP]
set KP[OP]=(KP[OP]+VP[DP[OP]])
call SetUnitX(LP[OP],x)
call SetUnitY(LP[OP],y)
set QP=GetUnitLoc(LP[OP])
if(J1V())then
call E6(CM[OP],QP,function J0V)
endif
call ForGroupBJ(ZL,function J5V)
set bj_wantDestroyGroup=true
call ForGroupBJ(G6(CM[DP[OP]],QP),function J7V)
call TriggerExecute(S2)
if(KVV())then
call DestroyEffect(MP[OP])
call KillUnit(LP[OP])
call DestroyGroup(YP[OP])
set YP[OP]=null
set RP[XP]=OP
set XP=(XP+1)
set AP[NP[OP]]=AP[OP]
set NP[AP[OP]]=NP[OP]
set EP=(EP-1)
if(J9V())then
call DisableTrigger(X3)
endif
endif
call RemoveLocation(QP)
set ZM=ZM+1
endloop
endfunction
function KOV takes nothing returns nothing
set OQ='A054'
set RQ='h00Q'
set IQ[1]=60.
set IQ[2]=80.
set IQ[3]=100.
set IQ[4]=120.
set AQ[1]=$A
set AQ[2]=$E
set AQ[3]=16
set AQ[4]=20
set NQ[1]=30.
set NQ[2]=40.
set NQ[3]=50.
set NQ[4]=80.
set BQ[1]=64.
set BQ[2]=64.
set BQ[3]=64.
set BQ[4]=64.
set CQ="DakRespiteOrb.mdl"
set DQ="chest"
set FQ=100.
set GQ="DarkRespiteTarget.mdl"
set HQ="origin"
set JQ=Player($E)
set KQ=.03
call TriggerRegisterTimerEventPeriodic(A3,KQ)
set LQ=GetRectCenter(bj_mapInitialPlayableArea)
call CreateNUnitsAtLoc(1,RQ,JQ,LQ,bj_UNIT_FACING)
call RemoveUnit(bj_lastCreatedUnit)
call RemoveLocation(LQ)
set MQ=0
endfunction
function KIV takes nothing returns boolean
return(GetLearnedSkill()=='A054')
endfunction
function KAV takes nothing returns boolean
return(YQ==1)
endfunction
function KNV takes nothing returns boolean
return(TQ[QQ]==0)
endfunction
function KBV takes nothing returns nothing
set PQ=GetTriggerUnit()
set QQ=GetUnitUserData(PQ)
if(KNV())then
set SQ[QQ]=PQ
set TQ[QQ]=GetUnitAbilityLevelSwapped(OQ,SQ[QQ])
set UQ[QQ]=0
call GroupAddUnit(WQ,SQ[QQ])
set YQ=(YQ+1)
if(KAV())then
call EnableTrigger(I3)
endif
else
set SQ[QQ]=PQ
set TQ[QQ]=GetUnitAbilityLevelSwapped(OQ,SQ[QQ])
endif
endfunction
function KDV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRU CTURE)==false)and(IsUnitInGroup(GetKillingUnit(),W Q))and(IsUnitEnemy(GetTriggerUnit(),GetOwningPlaye r(GetKillingUnit()))))!=null
endfunction
function KFV takes nothing returns boolean
return(ZQ==1)
endfunction
function KGV takes nothing returns boolean
return(VS==0)
endfunction
function KHV takes nothing returns boolean
return(UQ[QQ]<AQ[TQ[QQ]])
endfunction
function KJV takes nothing returns nothing
set PQ=GetKillingUnit()
set QQ=GetUnitUserData(PQ)
if(KHV())then
set UQ[QQ]=(UQ[QQ]+1)
set ZQ=(ZQ+1)
if(KFV())then
call EnableTrigger(A3)
endif
if(KGV())then
set OS=(OS+1)
set ES=OS
else
set VS=(VS-1)
set ES=XS[VS]
endif
set RS[ES]=0
set IS[ES]=IS[0]
set RS[IS[0]]=ES
set IS[0]=ES
set AS[ES]=PQ
set NS[ES]=GetUnitLoc(GetTriggerUnit())
set BS[ES]=TQ[QQ]
set CS[ES]=QQ
set DS[ES]=.0
set FS[ES]=false
call CreateNUnitsAtLoc(1,RQ,JQ,NS[ES],bj_UNIT_FACING)
set GS[ES]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ(DQ,GS[ES],CQ)
set JS[ES]=bj_lastCreatedEffect
call SetUnitScalePercent(GS[ES],FQ,'d','d')
endif
endfunction
function KLV takes nothing returns boolean
return(DistanceBetweenPoints(LQ,NS[ES])<=BQ[BS[ES]])
endfunction
function KMV takes nothing returns boolean
return(ZQ==0)
endfunction
function KPV takes nothing returns boolean
return(FS[ES])or(DS[ES]>=IQ[BS[ES]])
endfunction
function KQV takes nothing returns boolean
return(KPV())
endfunction
function KSV takes nothing returns nothing
set ES=0
set MQ=1
loop
exitwhen MQ>ZQ
set ES=RS[ES]
set DS[ES]=(DS[ES]+KQ)
set LQ=GetUnitLoc(AS[ES])
if(KLV())then
set FS[ES]=true
call AddSpecialEffectTargetUnitBJ(HQ,AS[ES],GQ)
call DestroyEffect(bj_lastCreatedEffect)
call SetUnitManaBJ(AS[ES],(GetUnitStateSwap(UNIT_STATE_MANA,AS[ES])+NQ[BS[ES]]))
endif
if(KQV())then
call DestroyEffect(JS[ES])
call KillUnit(GS[ES])
set UQ[CS[ES]]=(UQ[CS[ES]]-1)
call RemoveLocation(NS[ES])
set XS[VS]=ES
set VS=(VS+1)
set RS[IS[ES]]=RS[ES]
set IS[RS[ES]]=IS[ES]
set ZQ=(ZQ-1)
if(KMV())then
call DisableTrigger(A3)
endif
endif
call RemoveLocation(LQ)
set MQ=MQ+1
endloop
endfunction
function KUV takes nothing returns boolean
return(IsUnitInGroup(JJ[DJ],WQ))
endfunction
function KWV takes nothing returns boolean
return(YQ==0)
endfunction
function KYV takes nothing returns nothing
call BJDebugMsg("Run")
call GroupRemoveUnit(WQ,SQ[DJ])
set SQ[DJ]=null
set TQ[DJ]=0
set UQ[DJ]=0
set YQ=(YQ-1)
if(KWV())then
call DisableTrigger(I3)
endif
endfunction
function K_V takes nothing returns nothing
set KS='A055'
set LS=3
set MS="channel"
set PS='A051'
set QS='h00Q'
set SS[1]=.0
set SS[2]=.0
set SS[3]=.0
set TS[1]=1.
set TS[2]=1.
set TS[3]=1.
set US[1]=525.
set US[2]=725.
set US[3]=1025.
set WS[1]=225.
set WS[2]=325.
set WS[3]=425.
set YS=ATTACK_TYPE_NORMAL
set ZS=DAMAGE_TYPE_MAGIC
set VT=500.
set ET=1200.
set XT="FelMeteor.mdl"
set OT="origin"
set RT=63.
set IT="FelMeteorIndicator.mdl"
set AT="origin"
set NT=150.
set BT="FelMeteorCaster.mdx"
set CT="origin"
set DT=Player($E)
set FT=.03
call TriggerRegisterTimerEventPeriodic(D3,FT)
set GT=GetRectCenter(bj_mapInitialPlayableArea)
call CreateNUnitsAtLoc(1,QS,DT,GT,bj_UNIT_FACING)
set HT=bj_lastCreatedUnit
call UnitAddAbility(HT,PS)
call RemoveUnit(HT)
call RemoveLocation(GT)
set JT=0
set JT=1
loop
exitwhen JT>LS
set KT[JT]=(VT/(TS[JT]/ FT))
set JT=JT+1
endloop
endfunction
function K1V takes nothing returns boolean
return(GetSpellAbilityId()==KS)
endfunction
function K2V takes nothing returns boolean
return(LT==1)
endfunction
function K3V takes nothing returns boolean
return(MT==0)
endfunction
function K4V takes nothing returns nothing
set LT=(LT+1)
if(K2V())then
call EnableTrigger(D3)
endif
if(K3V())then
set ST=(ST+1)
set PT=ST
else
set MT=(MT-1)
set PT=QT[MT]
endif
set TT[PT]=0
set UT[PT]=UT[0]
set TT[UT[0]]=PT
set UT[0]=PT
set WT[PT]=GetTriggerUnit()
set YT[PT]=GetTriggerPlayer()
set ZT[PT]=GetUnitAbilityLevelSwapped(KS,WT[PT])
set VU[PT]=GetSpellTargetLoc()
set EU[PT]=0
set XU[PT]=.0
set OU[PT]=.0
call CreateNUnitsAtLoc(1,QS,DT,VU[PT],bj_UNIT_FACING)
set RU[PT]=bj_lastCreatedUnit
call SetUnitX(RU[PT],GetLocationX(VU[PT]))
call SetUnitY(RU[PT],GetLocationY(VU[PT]))
call AddSpecialEffectTargetUnitBJ(AT,RU[PT],IT)
set IU[PT]=bj_lastCreatedEffect
call SetUnitScalePercent(RU[PT],NT,'d','d')
call SetUnitScalePercent(RU[PT],NT,'d','d')
call AddSpecialEffectTargetUnitBJ(CT,WT[PT],BT)
set AU[PT]=bj_lastCreatedEffect
endfunction
function K6V takes nothing returns boolean
return(LT==0)
endfunction
function K7V takes nothing returns boolean
return(NU==String2OrderIdBJ("stunned"))
endfunction
function K8V takes nothing returns boolean
return(XU[PT]>=SS[ZT[PT]])
endfunction
function K9V takes nothing returns boolean
return(NU!=String2OrderIdBJ(MS))
endfunction
function LVV takes nothing returns boolean
return((IsUnitType(HT,UNIT_TYPE_MAGIC_IMMUNE)==fal se)and(IsUnitAliveBJ(HT))and(IsUnitEnemy(HT,YT[PT])))!=null
endfunction
function LEV takes nothing returns nothing
set HT=GetEnumUnit()
if(LVV())then
call UnitDamageTargetBJ(WT[PT],HT,US[ZT[PT]],YS,ZS)
call IssueTargetOrderById(FU[PT],$D006B,HT)
endif
endfunction
function LXV takes nothing returns boolean
return(DistanceBetweenPoints(VU[PT],GL[EL])<=WS[ZT[PT]])
endfunction
function LOV takes nothing returns nothing
set EL=TL[GetUnitUserData(GetEnumUnit())]
if(LXV())then
call AddSpecialEffectLocBJ(GL[EL],QM)
call DestroyEffect(bj_lastCreatedEffect)
set DL[EL]=2
endif
endfunction
function LRV takes nothing returns boolean
return(OU[PT]>=VT)
endfunction
function LIV takes nothing returns boolean
return(EU[PT]==0)
endfunction
function LAV takes nothing returns boolean
return(EU[PT]==2)
endfunction
function LNV takes nothing returns nothing
local real x
local real y
set PT=0
set JT=1
loop
exitwhen JT>LT
set PT=TT[PT]
if(LAV())then
call DestroyEffect(IU[PT])
call KillUnit(RU[PT])
call RemoveLocation(VU[PT])
set QT[MT]=PT
set MT=(MT+1)
set TT[UT[PT]]=TT[PT]
set UT[TT[PT]]=UT[PT]
set LT=(LT-1)
if(K6V())then
call DisableTrigger(D3)
endif
else
if(LIV())then
set NU=GetUnitCurrentOrder(WT[PT])
if(K9V())then
call DestroyEffect(AU[PT])
set EU[PT]=2
if(K7V())then
call IssueImmediateOrderById(WT[PT],$D0004)
endif
else
set XU[PT]=(XU[PT]+FT)
if(K8V())then
call DestroyEffect(AU[PT])
set EU[PT]=1
set BU=GetRandomReal(0,360)
set CU[PT]=CosBJ(BU)
set DU[PT]=SinBJ(BU)
set GT=U5(VU[PT],VT,(BU+180.))
call CreateNUnitsAtLoc(1,QS,DT,GT,BU)
set FU[PT]=bj_lastCreatedUnit
call SetUnitX(FU[PT],GetLocationX(GT))
call SetUnitY(FU[PT],GetLocationY(GT))
call AddSpecialEffectTargetUnitBJ(OT,FU[PT],XT)
set GU[PT]=bj_lastCreatedEffect
set JU[PT]=ET+(GetLocationZ(GT)*-1)
set HU[PT]=(JU[PT]/(TS[ZT[PT]]/ FT))
call SetUnitScalePercent(FU[PT],RT,'d','d')
call SetUnitFlyHeight(FU[PT],JU[PT],.0)
call RemoveLocation(GT)
endif
endif
else
set x=GetUnitX(FU[PT])+KT[ZT[PT]]*CU[PT]
set y=GetUnitY(FU[PT])+KT[ZT[PT]]*DU[PT]
set OU[PT]=(OU[PT]+KT[ZT[PT]])
set JU[PT]=(JU[PT]-HU[PT])
call SetUnitX(FU[PT],x)
call SetUnitY(FU[PT],y)
call SetUnitFlyHeight(FU[PT],JU[PT],.0)
if(LRV())then
call UnitAddAbility(FU[PT],PS)
call UnitRemoveAbility(FU[PT],'Amov')
set bj_wantDestroyGroup=true
call ForGroupBJ(G6(WS[ZT[PT]],VU[PT]),function LEV)
call ForGroupBJ(ZL,function LOV)
set EU[PT]=2
call DestroyEffect(GU[PT])
call KillUnit(FU[PT])
endif
endif
endif
set JT=JT+1
endloop
endfunction
function InitCustomTeams takes nothing returns nothing
call SetPlayerTeam(Player(0),0)
call SetPlayerState(Player(0),PLAYER_STATE_ALLIED_VICTO RY,1)
call SetPlayerTeam(Player(1),0)
call SetPlayerState(Player(1),PLAYER_STATE_ALLIED_VICTO RY,1)
call SetPlayerTeam(Player(2),0)
call SetPlayerState(Player(2),PLAYER_STATE_ALLIED_VICTO RY,1)
call SetPlayerTeam(Player(3),0)
call SetPlayerState(Player(3),PLAYER_STATE_ALLIED_VICTO RY,1)
call SetPlayerTeam(Player(4),0)
call SetPlayerState(Player(4),PLAYER_STATE_ALLIED_VICTO RY,1)
call SetPlayerTeam(Player(5),0)
call SetPlayerState(Player(5),PLAYER_STATE_ALLIED_VICTO RY,1)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(1),t rue)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(2),t rue)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(3),t rue)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(4),t rue)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(5),t rue)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(0),t rue)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(2),t rue)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(3),t rue)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(4),t rue)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(5),t rue)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(0),t rue)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(1),t rue)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(3),t rue)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(4),t rue)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(5),t rue)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(0),t rue)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(1),t rue)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(2),t rue)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(4),t rue)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(5),t rue)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(0),t rue)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(1),t rue)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(2),t rue)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(3),t rue)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(5),t rue)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(0),t rue)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(1),t rue)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(2),t rue)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(3),t rue)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(4),t rue)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(1) ,true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(2) ,true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(3) ,true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(4) ,true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(5) ,true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(0) ,true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(2) ,true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(3) ,true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(4) ,true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(5) ,true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(0) ,true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(1) ,true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(3) ,true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(4) ,true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(5) ,true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(0) ,true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(1) ,true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(2) ,true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(4) ,true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(5) ,true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(0) ,true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(1) ,true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(2) ,true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(3) ,true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(5) ,true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(0) ,true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(1) ,true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(2) ,true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(3) ,true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(4) ,true)
call SetPlayerTeam(Player(6),1)
call SetPlayerState(Player(6),PLAYER_STATE_ALLIED_VICTO RY,1)
call SetPlayerTeam(Player(7),1)
call SetPlayerState(Player(7),PLAYER_STATE_ALLIED_VICTO RY,1)
call SetPlayerTeam(Player(8),1)
call SetPlayerState(Player(8),PLAYER_STATE_ALLIED_VICTO RY,1)
call SetPlayerTeam(Player(9),1)
call SetPlayerState(Player(9),PLAYER_STATE_ALLIED_VICTO RY,1)
call SetPlayerTeam(Player($A),1)
call SetPlayerState(Player($A),PLAYER_STATE_ALLIED_VICT ORY,1)
call SetPlayerTeam(Player($B),1)
call SetPlayerState(Player($B),PLAYER_STATE_ALLIED_VICT ORY,1)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(7),t rue)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(8),t rue)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(9),t rue)
call SetPlayerAllianceStateAllyBJ(Player(6),Player($A), true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player($B), true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(6),t rue)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(8),t rue)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(9),t rue)
call SetPlayerAllianceStateAllyBJ(Player(7),Player($A), true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player($B), true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(6),t rue)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(7),t rue)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(9),t rue)
call SetPlayerAllianceStateAllyBJ(Player(8),Player($A), true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player($B), true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(6),t rue)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(7),t rue)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(8),t rue)
call SetPlayerAllianceStateAllyBJ(Player(9),Player($A), true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player($B), true)
call SetPlayerAllianceStateAllyBJ(Player($A),Player(6), true)
call SetPlayerAllianceStateAllyBJ(Player($A),Player(7), true)
call SetPlayerAllianceStateAllyBJ(Player($A),Player(8), true)
call SetPlayerAllianceStateAllyBJ(Player($A),Player(9), true)
call SetPlayerAllianceStateAllyBJ(Player($A),Player($B) ,true)
call SetPlayerAllianceStateAllyBJ(Player($B),Player(6), true)
call SetPlayerAllianceStateAllyBJ(Player($B),Player(7), true)
call SetPlayerAllianceStateAllyBJ(Player($B),Player(8), true)
call SetPlayerAllianceStateAllyBJ(Player($B),Player(9), true)
call SetPlayerAllianceStateAllyBJ(Player($B),Player($A) ,true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(7) ,true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(8) ,true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(9) ,true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player($A ),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player($B ),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(6) ,true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(8) ,true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(9) ,true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player($A ),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player($B ),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(6) ,true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(7) ,true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(9) ,true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player($A ),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player($B ),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(6) ,true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(7) ,true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(8) ,true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player($A ),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player($B ),true)
call SetPlayerAllianceStateVisionBJ(Player($A),Player(6 ),true)
call SetPlayerAllianceStateVisionBJ(Player($A),Player(7 ),true)
call SetPlayerAllianceStateVisionBJ(Player($A),Player(8 ),true)
call SetPlayerAllianceStateVisionBJ(Player($A),Player(9 ),true)
call SetPlayerAllianceStateVisionBJ(Player($A),Player($ B),true)
call SetPlayerAllianceStateVisionBJ(Player($B),Player(6 ),true)
call SetPlayerAllianceStateVisionBJ(Player($B),Player(7 ),true)
call SetPlayerAllianceStateVisionBJ(Player($B),Player(8 ),true)
call SetPlayerAllianceStateVisionBJ(Player($B),Player(9 ),true)
call SetPlayerAllianceStateVisionBJ(Player($B),Player($ A),true)
endfunction
Share This Thread