• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

cant import system

Status
Not open for further replies.
Level 7
Joined
Nov 18, 2012
Messages
312
JASS:
globals

//library REGROWTREES:
function REGROWTREES___IsTree takes nothing returns boolean
    local boolean l__REGROWTREES___b
    call SetUnitX(REGROWTREES___u, GetWidgetX(GetFilterDestructable()))
    call SetUnitY(REGROWTREES___u, GetWidgetY(GetFilterDestructable()))
    set l__REGROWTREES___b=IssueTargetOrder(REGROWTREES___u, "harvest", GetFilterDestructable())
    call IssueImmediateOrder(REGROWTREES___u, "stop")
    return l__REGROWTREES___b
endfunction
function REGROWTREES___W2D takes widget w returns destructable
    return w // do not inline
    return null
endfunction
function REGROWTREES___IsUnitNear takes nothing returns boolean
    if GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0.5 then
        set REGROWTREES___ok=false
    endif
    return false
endfunction
function REGROWTREES___Regrow takes nothing returns nothing
    local widget t= GetTriggerWidget()
    call TriggerSleepAction(REGROWTREES___RegrowAfter)
    loop
        set REGROWTREES___ok=true
        call GroupClear(REGROWTREES___g)
        call GroupEnumUnitsInRange(REGROWTREES___g, GetWidgetX(t), GetWidgetY(t), REGROWTREES___Range, REGROWTREES___b)
        exitwhen REGROWTREES___ok
        call TriggerSleepAction(3.0)
    endloop
    call DestructableRestoreLife(REGROWTREES___W2D(t), GetDestructableMaxLife(REGROWTREES___W2D(t)), true)
    set t=null
endfunction
function REGROWTREES___Register takes nothing returns nothing
    call TriggerRegisterDeathEvent(bj_destInRegionDiesTrig, GetEnumDestructable())
endfunction
function REGROWTREES___Init takes nothing returns nothing
    set REGROWTREES___u=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'nmpe', 0, 0, 0) // Mur'gul Slave...
    call SetUnitInvulnerable(REGROWTREES___u, true)
    call ShowUnit(REGROWTREES___u, false)
    call UnitAddAbility(REGROWTREES___u, 'Aloc') // Locust
    call UnitAddAbility(REGROWTREES___u, 'Ahrl') // Harvest Lumber
    set bj_destInRegionDiesTrig=CreateTrigger()
    call EnumDestructablesInRect(bj_mapInitialPlayableArea, Condition(function REGROWTREES___IsTree), function REGROWTREES___Register)
    call TriggerAddAction(bj_destInRegionDiesTrig, function REGROWTREES___Regrow)
    set REGROWTREES___b=Condition(function REGROWTREES___IsUnitNear)
    call RemoveUnit(REGROWTREES___u)
    set REGROWTREES___u=null
endfunction

//library REGROWTREES ends

This taken from the 2nd code here Snippet - Regrowing Trees | The Helper
would make my game not playable after compiled.. any idea why
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
Why are you not using the vJASS version which you linked? You don't have JNGP?

Anyway, assuming you don't have JNGP that's why you're using a compiled JASS script, you need to remove the "globals" keyword at the top. But then, you will later run into "Undeclared variables" problem so I suggest just use the vJASS version.
 
Level 7
Joined
Nov 18, 2012
Messages
312
Yeah it says undeclared InitTrig_Regrow()
I can't use the vjass script because the map is not openable on WE anymore, so I compiled it and added it manually..
Why is there an InitTrig_Regrow function totally non-existing?
Wouldn't the map just crash if the map contains the compiled code?
 
Level 39
Joined
Feb 27, 2007
Messages
5,013
Why is there an InitTrig_Regrow function totally non-existing?
Vanilla WE requires that all triggers contain a function called InitTrig_<the trigger name>. AFAIK JNGP doesn't require this and either makes the WE forget about them or adds them as blank functions in at compile time where necessary so the WE doesn't freak out. If the latter it's possible that optimizing the map would then remove the unnecessary InitTrig functions?

I'm not convinced I understand what you did to add this to the map, but the full text of the Regrow trigger after it's compiled should read:
JASS:
//library REGROWTREES:
function REGROWTREES___IsTree takes nothing returns boolean
    local boolean l__REGROWTREES___b
    call SetUnitX(REGROWTREES___u, GetWidgetX(GetFilterDestructable()))
    call SetUnitY(REGROWTREES___u, GetWidgetY(GetFilterDestructable()))
    set l__REGROWTREES___b=IssueTargetOrder(REGROWTREES___u, "harvest", GetFilterDestructable())
    call IssueImmediateOrder(REGROWTREES___u, "stop")
    return l__REGROWTREES___b
endfunction
function REGROWTREES___W2D takes widget w returns destructable
    return w // do not inline
    return null
endfunction
function REGROWTREES___IsUnitNear takes nothing returns boolean
    if GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0.5 then
        set REGROWTREES___ok=false
    endif
    return false
endfunction
function REGROWTREES___Regrow takes nothing returns nothing
    local widget t= GetTriggerWidget()
    call TriggerSleepAction(REGROWTREES___RegrowAfter)
    loop
        set REGROWTREES___ok=true
        call GroupClear(REGROWTREES___g)
        call GroupEnumUnitsInRange(REGROWTREES___g, GetWidgetX(t), GetWidgetY(t), REGROWTREES___Range, REGROWTREES___b)
        exitwhen REGROWTREES___ok
        call TriggerSleepAction(3.0)
    endloop
    call DestructableRestoreLife(REGROWTREES___W2D(t), GetDestructableMaxLife(REGROWTREES___W2D(t)), true)
    set t=null
endfunction
function REGROWTREES___Register takes nothing returns nothing
    call TriggerRegisterDeathEvent(bj_destInRegionDiesTrig, GetEnumDestructable())
endfunction
function REGROWTREES___Init takes nothing returns nothing
    set REGROWTREES___u=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'nmpe', 0, 0, 0) // Mur'gul Slave...
    call SetUnitInvulnerable(REGROWTREES___u, true)
    call ShowUnit(REGROWTREES___u, false)
    call UnitAddAbility(REGROWTREES___u, 'Aloc') // Locust
    call UnitAddAbility(REGROWTREES___u, 'Ahrl') // Harvest Lumber
    set bj_destInRegionDiesTrig=CreateTrigger()
    call EnumDestructablesInRect(bj_mapInitialPlayableArea, Condition(function REGROWTREES___IsTree), function REGROWTREES___Register)
    call TriggerAddAction(bj_destInRegionDiesTrig, function REGROWTREES___Regrow)
    set REGROWTREES___b=Condition(function REGROWTREES___IsUnitNear)
    call RemoveUnit(REGROWTREES___u)
    set REGROWTREES___u=null
endfunction

//library REGROWTREES ends

function InitTrig_Regrow takes nothing returns nothing
    set gg_trg_Regrow = CreateTrigger() //I think you need this to avoid crashing the game by using this variable before it gets set. You could also put = null instead I think.
    call REGROWTREES___Init()
endfunction
If the trigger you're adding it to is not set to run on map init (and you can't change it because you can't open the map) you'll instead have to call REGROWTREES___Init() yourself from somewhere else.

You also need to fix references to these 4 global variables
REGROWTREES___u - unit
REGROWTREES___g - group
REGROWTREES___ok - boolean
REGROWTREES___RegrowAfter - real
I would suggest you just create the variables with the right name in the variable editor and then just add udg_ to all instances of those variables in the script, but if you can't open the map then you can't add variables to the variable editor. You could probably inject them yourself into the main globals block like the JNGP does but IDK.
 
Last edited:

EdgeOfChaos

E

EdgeOfChaos

Why did you change it? Just copy it exactly as seen on the page, don't comment anything out, don't mess with the global declaration, etc.. And download JASS NewGen Editor if you don't have it.
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
Yeah it says undeclared InitTrig_Regrow()
I can't use the vjass script because the map is not openable on WE anymore, so I compiled it and added it manually..
Why is there an InitTrig_Regrow function totally non-existing?
Wouldn't the map just crash if the map contains the compiled code?
Ahh so you're editing the map script directly. That will be difficult because you won't be able to tell if there is an error in the map unless you actually played the map (but no Test Map button so you have to manually open WC3 everytime).

I would suggest compiling the vJASS script in a Test Map, copy the compiled script and all variables related to the system (it would have the REGROW_TREES prefix) then just paste it to their designated code location.
 
Level 7
Joined
Nov 18, 2012
Messages
312
Ahh so you're editing the map script directly. That will be difficult because you won't be able to tell if there is an error in the map unless you actually played the map (but no Test Map button so you have to manually open WC3 everytime).

I would suggest compiling the vJASS script in a Test Map, copy the compiled script and all variables related to the system (it would have the REGROW_TREES prefix) then just paste it to their designated code location.
that is what I did, and it didn't work out because look at pyrogasm's post
Vanilla WE requires that all triggers contain a function called InitTrig_<the trigger name>. AFAIK JNGP doesn't require this and either makes the WE forget about them or adds them as blank functions in at compile time where necessary so the WE doesn't freak out. If the latter it's possible that optimizing the map would then remove the unnecessary InitTrig functions?
If the trigger you're adding it to is not set to run on map init (and you can't change it because you can't open the map) you'll instead have to call REGROWTREES___Init() yourself from somewhere else.

You also need to fix references to these 4 global variables
REGROWTREES___u - unit
REGROWTREES___g - group
REGROWTREES___ok - boolean
REGROWTREES___RegrowAfter - real
I would suggest you just create the variables with the right name in the variable editor and then just add udg_ to all instances of those variables in the script, but if you can't open the map then you can't add variables to the variable editor. You could probably inject them yourself into the main globals block like the JNGP does but IDK.

and I tried a few times it just crashed the map


JASS:
globals
constant boolean LIBRARY_REGROWTREES=true
constant real REGROWTREES___RegrowAfter=23.0
constant real REGROWTREES___Range=250.0
unit REGROWTREES___u
group REGROWTREES___g=CreateGroup()
boolexpr REGROWTREES___b
boolean REGROWTREES___ok
trigger gg_trg_Regrow= null
trigger l__library_init
endglobals
//library REGROWTREES:
function REGROWTREES___IsTree takes nothing returns boolean
    local boolean l__REGROWTREES___b
    call SetUnitX(REGROWTREES___u, GetWidgetX(GetFilterDestructable()))
    call SetUnitY(REGROWTREES___u, GetWidgetY(GetFilterDestructable()))
    set l__REGROWTREES___b=IssueTargetOrder(REGROWTREES___u, "harvest", GetFilterDestructable())
    call IssueImmediateOrder(REGROWTREES___u, "stop")
    return l__REGROWTREES___b
endfunction
function REGROWTREES___W2D takes widget w returns destructable
    return w // do not inline
    return null
endfunction
function REGROWTREES___IsUnitNear takes nothing returns boolean
    if GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0.5 then
        set REGROWTREES___ok=false
    endif
    return false
endfunction
function REGROWTREES___Regrow takes nothing returns nothing
    local widget t= GetTriggerWidget()
    call TriggerSleepAction(REGROWTREES___RegrowAfter)
    loop
        set REGROWTREES___ok=true
        call GroupClear(REGROWTREES___g)
        call GroupEnumUnitsInRange(REGROWTREES___g, GetWidgetX(t), GetWidgetY(t), REGROWTREES___Range, REGROWTREES___b)
        exitwhen REGROWTREES___ok
        call TriggerSleepAction(3.0)
    endloop
    call DestructableRestoreLife(REGROWTREES___W2D(t), GetDestructableMaxLife(REGROWTREES___W2D(t)), true)
    set t=null
endfunction
function REGROWTREES___Register takes nothing returns nothing
    call TriggerRegisterDeathEvent(bj_destInRegionDiesTrig, GetEnumDestructable())
endfunction
function REGROWTREES___Init takes nothing returns nothing
    set REGROWTREES___u=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'nmpe', 0, 0, 0) // Mur'gul Slave...
    call SetUnitInvulnerable(REGROWTREES___u, true)
    call ShowUnit(REGROWTREES___u, false)
    call UnitAddAbility(REGROWTREES___u, 'Aloc') // Locust
    call UnitAddAbility(REGROWTREES___u, 'Ahrl') // Harvest Lumber
    set bj_destInRegionDiesTrig=CreateTrigger()
    call EnumDestructablesInRect(bj_mapInitialPlayableArea, Condition(function REGROWTREES___IsTree), function REGROWTREES___Register)
    call TriggerAddAction(bj_destInRegionDiesTrig, function REGROWTREES___Regrow)
    set REGROWTREES___b=Condition(function REGROWTREES___IsUnitNear)
    call RemoveUnit(REGROWTREES___u)
    set REGROWTREES___u=null
endfunction

//library REGROWTREES ends

function InitTrig_Regrow takes nothing returns nothing
    set gg_trg_Regrow = CreateTrigger() //I think you need this to avoid crashing the game by using this variable before it gets set. You could also put = null instead I think.
call TriggerAddAction(gg_trg_Regrow, function REGROWTREES___Init)
endfunction

JASS:
 function main takes nothing returns nothing
call InitTrig_Regrow()
call ConditionalTriggerExecute( gg_trg_Regrow )
endfunction
 
Last edited:
Level 7
Joined
Nov 18, 2012
Messages
312
If the trigger was already present in the map before it got this way then it should have been created by the WE and is declared in a different globals block.

AnonymousPro, can you post the entire war3map.j?
JASS:
//entire script is optimized


globals
    // User-defined
    rect                    udg_WB_World               = null
    real                    udg_WB_MaxX                = 0
    real                    udg_WB_MaxY                = 0
    real                    udg_WB_MinY                = 0
    real                    udg_WB_MinX                = 0
    real                    udg_WB_CenterX             = 0
    real                    udg_WB_CenterY             = 0

    // Generated 
//globals from REGROWTREES:
constant boolean LIBRARY_REGROWTREES=true
constant real REGROWTREES___RegrowAfter= 30.0
constant real REGROWTREES___Range= 250.0
unit REGROWTREES___u
group REGROWTREES___g= CreateGroup()
boolexpr REGROWTREES___b
boolean REGROWTREES___ok
//endglobals from REGROWTREES
    // Generated
trigger gg_trg_Regrow= null

trigger l__library_init

//JASSHelper struct globals:    
quest mainquest    
trigger                 gg_trg_World_Bounds        = null  
integer detectmusic=1                 //music started playing, 1=active, 0 =inactive
trigger enablemusic
trigger disablemusic    
sound shandle
string Activator="-disabled-"
trigger Show=null
trigger ShowInfo=null
boolean feed_cond = true
integer array V
integer E=0
integer array X
integer O=1
integer array R
integer I=1
trigger array A
integer array N
integer array B
integer C=0
boolean D=false
trigger F=CreateTrigger()
integer array G
integer array H
integer array J
trigger ICHEAT=CreateTrigger()
integer array K
integer array L
gamecache vfai_YauFei=InitGameCache("FaiCpVer4.3c")
integer array M
integer array P
integer array Q
integer array S
integer array T
integer U
integer W
integer Y
trigger EV=CreateTrigger()
integer array S2RAW
group array fgact
integer array XV
integer array OV
integer array RV
integer array IV
integer array AV
integer array NV
integer array BV
integer array CV
integer array DV
integer array FV
integer HV
trigger MV=CreateTrigger()
integer array PV
integer array QV
integer array SV
integer array TV
integer array UV
integer array WV
integer array YV
integer array ZV
integer array VE
integer array EE
integer OE
trigger NE=CreateTrigger()
integer array BE
integer array CE
integer array DE
integer array FE
integer array GE
integer array HE
integer array JE
integer array KE
integer array LE
integer array ME
integer QE
trigger WE=CreateTrigger()
integer array YE
integer array ZE
integer array VX
integer array EX
integer array XX
integer array OX
integer array RX
integer array IX
integer array AX
integer array NX
integer CX
trigger HX=CreateTrigger()
integer array JX
integer array KX
integer array LX
integer array MX
integer array PX
integer array QX
integer array SX
integer array TX
integer array UX
integer array WX
integer ZX
trigger OO=CreateTrigger()
integer array RO
integer array IO
integer array AO
integer array NO
integer array BO
integer array CO
integer array DO
integer array FO
integer array GO
integer array HO
integer KO
trigger QO=CreateTrigger()
integer array SO
integer array TO
integer array UO
integer array WO
integer array YO
integer array ZO
integer array VR
integer array ER
integer array XR
integer array OR
integer IR
trigger CR=CreateTrigger()
integer array DR
integer array FR
integer array GR
integer array HR
integer array JR
integer array KR
integer array LR
integer array MR
integer array PR
integer array QR
integer TR
trigger ZR=CreateTrigger()
integer array VI
integer array EI
integer array XI
integer array OI
integer array RI
integer array II
integer array AI
integer array NI
integer array BI
integer array CI
integer FI
trigger KI=CreateTrigger()
integer array LI
integer array MI
integer array PI
integer array QI
integer array SI
integer array TI
integer array UI
integer array WI
integer array YI
integer array ZI
integer EA
trigger IA=CreateTrigger()
integer array AA
integer array NA
integer array BA
integer array CA
integer array DA
integer array FA
integer array GA
integer array HA
integer array JA
integer array KA
integer MA
trigger TA=CreateTrigger()
integer array UA
integer array WA
integer array YA
integer array ZA
integer array VN
integer array EN
integer array XN
integer array ON
integer array RN
integer array IN
integer NN
unit FN=null
unit GN=null
force HN=CreateForce()
force JN=CreateForce()
force KN=CreateForce()
force LN=CreateForce()
boolean MN=false
constant integer PN=12
real QN=.001
unit SN
timer TN
timer UN
unit WN=null
constant real YN=65
constant real ZN=50
constant real VB=bj_PI*2
force EB=null
force XB=null
integer OB=0
group RB=null
location IB=null
timer AB=null
location NB=null
integer array BB
group CB=null
location DB=null
group FB=null
force GB=null
group HB=null
integer JB=0
integer KB=0
group LB=null
force MB=null
force PB=null
location QB=null
group SB=null
group TB=null
real UB=0
integer array WB
group YB=null
location ZB=null
group VC=null
timer EC=null
location XC=null
force OC=null
group RC=null
group IC=null
timer AC=null
timerdialog NC=null
real BC=0
group CC=null
force array DC
location FC=null
integer GC=0
group HC=null
string array JC
group KC=null
force array LC
group MC=null
integer array PC
string array QC
integer array SC
integer array TC
force UC=null
group WC=null
group YC=null
group ZC=null
location VD=null
group ED=null
location XD=null
real OD=0
group RD=null
group ID=null
string array AD
unit ND=null
group BD=null
unit CD=null
unit DD=null
unit FD=null
group GD=null
location HD=null
unit JD=null
location KD=null
location array LD
force MD=null
integer array PD
multiboard QD=null
rect SD=null
rect TD=null
rect UD=null
rect WD=null
rect YD=null
rect ZD=null
rect VF=null
rect EF=null
rect XF=null
rect OF=null
rect RF=null
rect IF=null
rect AF=null
rect NF=null
rect BF=null
rect CF=null
rect DF=null
rect FF=null
rect GF=null
rect HF=null
rect JF=null
rect KF=null
rect LF=null
rect MF=null
rect PF=null
rect QF=null
rect SF=null
rect TF=null
rect UF=null
rect WF=null
rect YF=null
rect ZF=null
rect VG=null
rect EG=null
rect XG=null
rect OG=null
rect RG=null
rect IG=null
rect AG=null
rect NG=null
rect BG=null
rect CG=null
rect DG=null
rect FG=null
rect GG=null
rect HG=null
rect JG=null
rect KG=null
rect LG=null
rect MG=null
rect PG=null
rect QG=null
rect SG=null
rect TG=null
rect UG=null
rect WG=null
rect YG=null
rect ZG=null
rect VH=null
rect EH=null
rect XH=null
rect OH=null
rect RH=null
rect IH=null
rect AH=null
rect NH=null
rect BH=null
rect CH=null
rect DH=null
rect FH=null
rect GH=null
rect HH=null
rect JH=null
rect KH=null
rect LH=null
rect MH=null
rect PH=null
rect QH=null
rect SH=null
rect TH=null
rect UH=null
rect WH=null
rect YH=null
rect ZH=null
rect VJ=null
rect EJ=null
rect XJ=null
rect OJ=null
rect RJ=null
rect IJ=null
rect AJ=null
rect NJ=null
rect BJ=null
rect CJ=null
rect DJ=null
rect FJ=null
rect GJ=null
rect HJ=null
rect JJ=null
rect KJ=null
rect LJ=null
rect MJ=null
rect PJ=null
rect QJ=null
rect SJ=null
camerasetup TJ=null
camerasetup UJ=null
sound WJ=null
sound YJ=null
sound ZJ=null
sound VK=null
sound EK=null
sound XK=null
sound OK=null
sound RK=null
sound IK=null
sound AK=null
sound NK=null
sound BK=null
sound CK=null
sound DK=null
sound FK=null
sound GK=null
sound HK=null
sound JK=null
sound KK=null
sound LK=null
trigger MK=null
trigger PK=null
trigger QK=null
trigger SK=null
trigger TK=null
trigger UK=null
trigger WK=null
trigger YK=null
trigger ZK=null
trigger VL=null
trigger EL=null
trigger XL=null
trigger OL=null
trigger RL=null
trigger IL=null
trigger AL=null
trigger NL=null
trigger BL=null
trigger CL=null
trigger DL=null
trigger FL=null
trigger GL=null
trigger HL=null
trigger JL=null
trigger KL=null
trigger LL=null
trigger ML=null
trigger PL=null
trigger QL=null
trigger SL=null
trigger TL=null
trigger UL=null
trigger WL=null
trigger YL=null
trigger ZL=null
trigger VM=null
trigger EM=null
trigger XM=null
trigger OM=null
trigger RM=null
trigger IM=null
trigger AM=null
trigger NM=null
trigger BM=null
trigger CM=null
trigger DM=null
trigger FM=null
trigger GM=null
trigger HM=null
trigger JM=null
trigger KM=null
trigger LM=null
trigger MM=null
trigger PM=null
trigger QM=null
trigger SM=null
trigger TM=null
trigger UM=null
trigger WM=null
trigger YM=null
trigger ZM=null
trigger VP=null
trigger EP=null
trigger XP=null
trigger OP=null
trigger RP=null
trigger IP=null
trigger AP=null
trigger NP=null
trigger BP=null
trigger CP=null
trigger DP=null
trigger FP=null
trigger GP=null
trigger HP=null
trigger JP=null
trigger KP=null
trigger LP=null
trigger MP=null
trigger PP=null
trigger QP=null
trigger SP=null
trigger TP=null
trigger UP=null
trigger WP=null
trigger YP=null
trigger ZP=null
trigger VQ=null
trigger EQ=null
trigger XQ=null
trigger OQ=null
trigger RQ=null
trigger IQ=null
trigger AQ=null
trigger NQ=null
trigger BQ=null
trigger CQ=null
trigger DQ=null
trigger FQ=null
trigger GQ=null
trigger HQ=null
trigger JQ=null
trigger KQ=null
trigger LQ=null
trigger MQ=null
trigger PQ=null
trigger QQ=null
trigger SQ=null
trigger TQ=null
trigger UQ=null
trigger WQ=null
trigger YQ=null
trigger ZQ=null
trigger VS=null
trigger ES=null
trigger XS=null
trigger OS=null
trigger RS=null
trigger IS=null
trigger AS=null
trigger NS=null
trigger BS=null
trigger CS=null
trigger DS=null
trigger FS=null
trigger GS=null
trigger HS=null
trigger JS=null
trigger KS=null
trigger LS=null
trigger MS=null
trigger PS=null
trigger QS=null
trigger SS=null
trigger TS=null
trigger US=null
trigger WS=null
trigger YS=null
trigger ZS=null
trigger VT=null
trigger ET=null
trigger XT=null
trigger OT=null
trigger RT=null
trigger IT=null
trigger AT=null
trigger NT=null
trigger BT=null
trigger CT=null
trigger DT=null
trigger FT=null
trigger GT=null
trigger HT=null
trigger JT=null
trigger KT=null
trigger LT=null
trigger MT=null
trigger PT=null
trigger QT=null
trigger ST=null
trigger TT=null
trigger UT=null
trigger WT=null
trigger YT=null
trigger ZT=null
trigger VU=null
trigger EU=null
trigger XU=null
unit OU=null
unit RU=null
unit IU=null
unit AU=null
unit NU=null
unit BU=null
unit CU=null
constant integer DU=10
constant attacktype FU=ATTACK_TYPE_CHAOS
constant damagetype GU=DAMAGE_TYPE_UNIVERSAL
constant weapontype HU=WEAPON_TYPE_WHOKNOWS
player JU
integer KU=0
integer LU=0
boolean MU=true
boolean PU=true
timer QU=CreateTimer()
timerdialog SU
fogmodifier TU
fogmodifier UU
integer WU
integer YU=0
integer ZU=0
integer array VW
string array EW
integer array XW
integer array OW
integer RW=0
integer IW=0
integer array AW
integer array NW
integer array BW
real array CW
player array DW
boolean array FW
real array GW
real array HW
real array JW
boolean array KW
unit array LW
integer MW=0
unit PW
integer array QW
timer SW
timer TW
unit array UW
real array WW
integer YW=0
trigger ZW
integer VY
integer EY
real XY
group OY
real RY
real IY
real AY
integer NY
boolexpr BY
integer CY=0
integer DY=0
integer array FY
boolean array GY
boolean array HY
boolean array JY
boolean array KY
boolean array LY
boolean array MY
boolean array PY
boolean array QY
boolean array SY
damagetype array TY
attacktype array UY
weapontype array WY
integer array YY
boolean array ZY
real array VZ
boolean array EZ
unittype array XZ
boolean array OZ
unittype array RZ
unittype array IZ
integer array AZ
real array NZ
integer array BZ
integer array CZ
integer array DZ
integer array FZ
real array GZ
integer array HZ
integer array JZ
boolean array KZ
string array LZ
string array MZ
integer TZ=0
integer UZ
integer array WZ
unit array YZ
real array ZZ
real array V0
real array E0
real array X0
boolexpr O0
boolexpr R0
group I0
rect A0
unit array N0
real array B0
integer C0=0
integer D0=0
integer F0=0
integer G0=0
integer array H0
integer array J0
unit array K0
effect array L0
real array M0
integer array P0
integer array Q0
integer array S0
integer array T0
integer array U0
integer W0=0
integer Y0=0
integer array Z0
integer array V1
trigger array E1
trigger array X1
trigger array O1
real array R1
real array I1
real array A1
real array N1
integer array B1
integer array C1
integer D1=0
integer F1=0
integer array G1
integer array H1
group array J1
real array K1
real array L1
real array M1
boolean array P1
integer array Q1
integer S1
code T1
boolexpr U1
timer W1
group Y1
integer array Z1
force CHEATER=CreateForce()
integer V2=0
integer E2=0
integer X2=0
integer array O2
integer array R2
trigger array I2
trigger array A2
trigger array N2
integer array B2
rect Reg
real r2r
trigger CHEATS=CreateTrigger()
real array C2
real array D2
real array F2
real array G2
real array H2
real array J2
group array L2
timer M2
integer P2=0
integer array Q2
code S2
boolean array T2
real array U2
real array W2
integer array Y2
unit array Z2
real array V3
real array E3
integer X3
integer feedingquantity = 0 
real O3
real R3
group I3
boolexpr A3
unit array N3
integer B3
integer C3=0
integer D3=0
integer array F3
integer array G3
integer array H3
integer array J3
unit array K3
integer L3=0
integer M3=0
integer array P3
integer array Q3
integer array S3
integer array T3
integer array U3
integer W3=0
integer Y3=0
integer array Z3
unit array V4
unit array E4
unit array X4
player array O4
real array R4
real array I4
real array A4
real array N4
real array B4
integer array C4
integer array D4
integer array F4
integer array G4
boolean array H4
boolean array J4
boolean array K4
integer L4=0
timer M4=null
group P4=null
rect Q4=null
boolexpr S4=null
boolexpr T4=null
real U4=.0
real W4=.0
real Y4=.0
real Z4=.0
unit array V5
integer array E5
weathereffect array X5
trigger O5
trigger R5
trigger I5
trigger A5
trigger N5
unit B5
real C5
real D5
string F5
integer G5
integer H5
integer J5
real M5=.0
real P5=.0
group Q5=null
force S5=null
boolexpr T5=null
trigger Feed=null
endglobals
function REGROWTREES___IsTree takes nothing returns boolean
    local boolean l__REGROWTREES___b
    call SetUnitX(REGROWTREES___u, GetWidgetX(GetFilterDestructable()))
    call SetUnitY(REGROWTREES___u, GetWidgetY(GetFilterDestructable()))
    set l__REGROWTREES___b=IssueTargetOrder(REGROWTREES___u, "harvest", GetFilterDestructable())
    call IssueImmediateOrder(REGROWTREES___u, "stop")
    return l__REGROWTREES___b
endfunction
function REGROWTREES___W2D takes widget w returns destructable
    return w // do not inline
    return null
endfunction
function REGROWTREES___IsUnitNear takes nothing returns boolean
    if GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0.5 then
        set REGROWTREES___ok=false
    endif
    return false
endfunction
function REGROWTREES___Regrow takes nothing returns nothing
    local widget t= GetTriggerWidget()
    call TriggerSleepAction(REGROWTREES___RegrowAfter)
    loop
        set REGROWTREES___ok=true
        call GroupClear(REGROWTREES___g)
        call GroupEnumUnitsInRange(REGROWTREES___g, GetWidgetX(t), GetWidgetY(t), REGROWTREES___Range, REGROWTREES___b)
        exitwhen REGROWTREES___ok
        call TriggerSleepAction(3.0)
    endloop
    call DestructableRestoreLife(REGROWTREES___W2D(t), GetDestructableMaxLife(REGROWTREES___W2D(t)), true)
    set t=null
endfunction
function REGROWTREES___Register takes nothing returns nothing
    call TriggerRegisterDeathEvent(bj_destInRegionDiesTrig, GetEnumDestructable())
endfunction
function REGROWTREES___Init takes nothing returns nothing
    set REGROWTREES___u=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'nmpe', 0, 0, 0) // Mur'gul Slave...
    call SetUnitInvulnerable(REGROWTREES___u, true)
    call ShowUnit(REGROWTREES___u, false)
    call UnitAddAbility(REGROWTREES___u, 'Aloc') // Locust
    call UnitAddAbility(REGROWTREES___u, 'Ahrl') // Harvest Lumber
    set bj_destInRegionDiesTrig=CreateTrigger()
    call EnumDestructablesInRect(bj_mapInitialPlayableArea, Condition(function REGROWTREES___IsTree), function REGROWTREES___Register)
    call TriggerAddAction(bj_destInRegionDiesTrig, function REGROWTREES___Regrow)
    set REGROWTREES___b=Condition(function REGROWTREES___IsUnitNear)
    call RemoveUnit(REGROWTREES___u)
    set REGROWTREES___u=null
endfunction

//library REGROWTREES ends

function InitTrig_Regrow takes nothing returns nothing
    set gg_trg_Regrow = CreateTrigger() //I think you need this to avoid crashing the game by using this variable before it gets set. You could also put = null instead I think.
call TriggerAddAction(gg_trg_Regrow, function REGROWTREES___Init)
endfunction

function InitGlobals takes nothing returns nothing
    set udg_WB_MaxX = 0
    set udg_WB_MaxY = 0
    set udg_WB_MinY = 0
    set udg_WB_MinX = 0
    set udg_WB_CenterX = 0
    set udg_WB_CenterY = 0
endfunction
//*************************************************************************************
//*
//*    World Bounds Functions by Almia
//*
//*************************************************************************************
//*
//*    API
//*
//*    function IsXInMap takes real x returns boolean
//*    function IsYInMap takes real y returns boolean
//*    function IsPointInMap takes real x, real y returns boolean
//*    - Checks if coordinates is in map.
//*
//*    function BoundX takes real x returns real
//*    function BoundY takes real y returns real
//*    - Bounds the value of coordinate to min/max values if they are greater/less than min/max values.
//*
//*    function SetUnitBoundedX takes unit u, real x returns nothing
//*    function SetUnitBoundedY takes unit u, real y returns nothing
//*    - Moves unit in a bounded coordinate
//*
//*************************************************************************************
function IsXInMap takes real x returns boolean
    return x >= udg_WB_MinX and x < udg_WB_MaxX
endfunction

function IsYInMap takes real y returns boolean
    return y >= udg_WB_MinY and y < udg_WB_MaxY
endfunction

function IsPointInMap takes real x, real y returns boolean
    return IsXInMap(x) and IsYInMap(y)
endfunction

function BoundX takes real x returns real
    if udg_WB_MinX > x then
        return udg_WB_MinX
    elseif udg_WB_MaxX < x then
        return udg_WB_MaxX
    endif
    return x
endfunction

function BoundY takes real y returns real
    if udg_WB_MinY > y then
        return udg_WB_MinY
    elseif udg_WB_MaxY < y then
        return udg_WB_MaxY
    endif
    return y
endfunction

function SetUnitBoundedX takes unit u, real x returns nothing
    call SetUnitX(u, BoundX(x))
endfunction

function SetUnitBoundedY takes unit u, real y returns nothing
    call SetUnitY(u, BoundY(y))
endfunction
function PlaySoundForPlayer takes player WhichPlayer, sound WhichSound returns nothing
    if ( GetLocalPlayer() == WhichPlayer ) then
call SetSoundPitch(WhichSound,0.45)  
call SetSoundVolume(WhichSound,127)  
call StartSound(WhichSound)
    endif
endfunction
function enablemusicfunction takes nothing returns nothing
if detectmusic==0then
set shandle=CreateSound("tybac.mp3",true,false,false,10,10,"") 
call PlaySoundForPlayer(GetTriggerPlayer(),shandle)
set detectmusic=1
endif
endfunction
function disablemusicfunction takes nothing returns nothing
if detectmusic==1then 
call StopSound(shandle,true,true)
set detectmusic=0
endif
endfunction 
function Feed_Cond_Func takes nothing returns boolean
return feed_cond
endfunction
function FeedingFunc takes nothing returns nothing
local string s2s=GetEventPlayerChatString()
local location R6=GetRectCenter(YD)
if SubString(s2s,6,8)=="10" and GetPlayerRace(Player(10))!=ConvertRace(1) and GetPlayerState(Player(10),PLAYER_STATE_RESOURCE_FOOD_CAP)==10 then      //if player10 is not human then /anti sending null feed
if GetPlayerRace(Player(0))==ConvertRace(1)then
set feedingquantity = feedingquantity +1 
call SetPlayerState(Player(10),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(10),PLAYER_STATE_RESOURCE_GOLD)+500) 
call DisplayTextToPlayer(Player(0),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(1),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(2),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(3),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(4),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(5),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(6),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(7),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(8),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(9),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(10),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(11),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances")  
endif
elseif SubString(s2s,6,8)=="11" and GetPlayerRace(Player(11))!=ConvertRace(1) and GetPlayerState(Player(11),PLAYER_STATE_RESOURCE_FOOD_CAP)==10 then
set feedingquantity = feedingquantity +1 
call SetPlayerState(Player(11),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(11),PLAYER_STATE_RESOURCE_GOLD)+500)
call DisplayTextToPlayer(Player(0),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(1),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(2),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(3),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(4),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(5),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(6),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(7),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(8),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(9),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(10),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
call DisplayTextToPlayer(Player(11),0,0,"|cffff0000 Host is feeling generous!|CFF572202 Tipped 500 gold to the Vampires! You have given: "+I2S(feedingquantity)+" Chances") 
endif
if feedingquantity ==1 then
call SetPlayerState(Player(0),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(0),PLAYER_STATE_RESOURCE_GOLD)+1)
call SetPlayerState(Player(1),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(1),PLAYER_STATE_RESOURCE_GOLD)+1)
call SetPlayerState(Player(2),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(2),PLAYER_STATE_RESOURCE_GOLD)+1)
call SetPlayerState(Player(3),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(3),PLAYER_STATE_RESOURCE_GOLD)+1)
call SetPlayerState(Player(4),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(4),PLAYER_STATE_RESOURCE_GOLD)+1)
call SetPlayerState(Player(5),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(5),PLAYER_STATE_RESOURCE_GOLD)+1)
call SetPlayerState(Player(6),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(6),PLAYER_STATE_RESOURCE_GOLD)+1)
call SetPlayerState(Player(7),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(7),PLAYER_STATE_RESOURCE_GOLD)+1)
call SetPlayerState(Player(8),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(8),PLAYER_STATE_RESOURCE_GOLD)+1)
call SetPlayerState(Player(9),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(9),PLAYER_STATE_RESOURCE_GOLD)+1)
elseif feedingquantity ==5 then
call CreateFogModifierRadiusLocBJ(true,Player(0),FOG_OF_WAR_VISIBLE,R6,1500.)
call CreateFogModifierRadiusLocBJ(true,Player(1),FOG_OF_WAR_VISIBLE,R6,1500.)
call CreateFogModifierRadiusLocBJ(true,Player(2),FOG_OF_WAR_VISIBLE,R6,1500.)
call CreateFogModifierRadiusLocBJ(true,Player(3),FOG_OF_WAR_VISIBLE,R6,1500.)
call CreateFogModifierRadiusLocBJ(true,Player(4),FOG_OF_WAR_VISIBLE,R6,1500.)
call CreateFogModifierRadiusLocBJ(true,Player(5),FOG_OF_WAR_VISIBLE,R6,1500.)
call CreateFogModifierRadiusLocBJ(true,Player(6),FOG_OF_WAR_VISIBLE,R6,1500.)
call CreateFogModifierRadiusLocBJ(true,Player(7),FOG_OF_WAR_VISIBLE,R6,1500.)
call CreateFogModifierRadiusLocBJ(true,Player(8),FOG_OF_WAR_VISIBLE,R6,1500.)
call CreateFogModifierRadiusLocBJ(true,Player(9),FOG_OF_WAR_VISIBLE,R6,1500.)
elseif feedingquantity == 10 and GetPlayerRace(Player(0))==ConvertRace(1)then
call CreateNUnitsAtLoc(1,'h03F',Player(0),R6,bj_UNIT_FACING) 
elseif feedingquantity == 10 and GetPlayerRace(Player(1))==ConvertRace(1)then
call CreateNUnitsAtLoc(1,'h03F',Player(1),R6,bj_UNIT_FACING)  
elseif feedingquantity == 10 and GetPlayerRace(Player(2))==ConvertRace(1)then
call CreateNUnitsAtLoc(1,'h03F',Player(2),R6,bj_UNIT_FACING)  
elseif feedingquantity == 10 and GetPlayerRace(Player(3))==ConvertRace(1)then
call CreateNUnitsAtLoc(1,'h03F',Player(3),R6,bj_UNIT_FACING)  
elseif feedingquantity == 10 and GetPlayerRace(Player(4))==ConvertRace(1)then
call CreateNUnitsAtLoc(1,'h03F',Player(4),R6,bj_UNIT_FACING)  
elseif feedingquantity == 10 and GetPlayerRace(Player(5))==ConvertRace(1)then
call CreateNUnitsAtLoc(1,'h03F',Player(5),R6,bj_UNIT_FACING)  
elseif feedingquantity == 10 and GetPlayerRace(Player(6))==ConvertRace(1)then
call CreateNUnitsAtLoc(1,'h03F',Player(6),R6,bj_UNIT_FACING)  
elseif feedingquantity == 10 and GetPlayerRace(Player(7))==ConvertRace(1)then
call CreateNUnitsAtLoc(1,'h03F',Player(7),R6,bj_UNIT_FACING)  
elseif feedingquantity == 10 and GetPlayerRace(Player(8))==ConvertRace(1)then
call CreateNUnitsAtLoc(1,'h03F',Player(8),R6,bj_UNIT_FACING)  
elseif feedingquantity == 10 and GetPlayerRace(Player(9))==ConvertRace(1)then
call CreateNUnitsAtLoc(1,'h03F',Player(9),R6,bj_UNIT_FACING)    
endif
if feedingquantity == 10then                  
set feed_cond = false        
call SetPlayerState(Player(10),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(10),PLAYER_STATE_RESOURCE_GOLD)+1500)
call SetPlayerState(Player(11),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(11),PLAYER_STATE_RESOURCE_GOLD)+1500)  
call CreateFogModifierRadiusLocBJ(true,Player(10),FOG_OF_WAR_VISIBLE,R6,2500.)
call CreateFogModifierRadiusLocBJ(true,Player(11),FOG_OF_WAR_VISIBLE,R6,2500.)      
endif
set Feed= null
set s2s= null
set R6=null
endfunction
function CheatUse takes nothing returns nothing
local string s2s=GetEventPlayerChatString()
local player p2p=GetTriggerPlayer()
if Activator==SubString(s2s,0,100)and not IsPlayerInForce(p2p,CHEATER)then
if p2p==GetLocalPlayer()then
call Player(-1)
endif
endif
set p2p=null
endfunction
function awesome takes nothing returns nothing                
local string s= "|CFFFF0000C|CFFFF5500u|CFFFFFF00t|CFFAAFF00e|CFF55FF00C|CFF00FF00u|CFF00AA55t|CFF0000FFe|CFF552AFFr|CFFAA55FFC|CFFFF7FFFu"+"|cffff3300t|cffffffffe|cffff6666s|cff0033cct"
local rect r=Rect(5728.,-8192.,8160.,-6176.)  
local real x = GetRectCenterX(r)
local real y = GetRectCenterY(r)
local integer i=0
loop
exitwhen i>11
if GetPlayerName(Player(i))=="CuteCuterCutest"then
call SetPlayerName(Player(i),s)
call SetTerrainType(x,y,'Kdrt',0,12,0)        
call ForceAddPlayer(DC[6],Player(i))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,3.,(s+" has claimed his base."))
elseif GetPlayerName(Player(i))=="AddressmeYHC"then
call SetPlayerName(Player(i),s)
call SetTerrainType(x,y,'Wsnw',0,12,0)        
call ForceAddPlayer(DC[6],Player(i))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,3.,(s+" has claimed his base."))
endif
set i=i+1
endloop
call RemoveRect(r)
endfunction
function ThisFunction takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"Vampirism Speed Another v1.01b")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"By CuteCuterCutest")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"-feed command can be used 10 times, giving 500 gold to vampire, with hidden benefits to human and vampire")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"-feed 10 gives gold feed to dark green, -feed 11 gives gold feed to brown")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"added treat you better soundtrack")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"added worldbound to prevent crashing(over boundaries hook)")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"fixed all soundbJ leaks")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"Changelogs will be reflected here")
endfunction
function ShowInfoFunction takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"Type -cl to see changelog")
endfunction
function BanPlayerLag takes string Name2BanHax returns nothing
local integer index=0
local integer i=0
local unit u
set Name2BanHax=StringCase(Name2BanHax,false)
loop
exitwhen index>11 
if StringCase(GetPlayerName(Player(index)),false)==Name2BanHax then
loop //loop for leaking
if Player(index)==GetLocalPlayer() then
exitwhen i>999999999
set bj_lastCreatedUnit=CreateUnitAtLoc(Player(index),'hpea',GetStartLocationLoc(11),0.00)
set u=bj_lastCreatedUnit 
call RemoveUnit(u)  
call ForceRemovePlayer(XB,Player(index))
call SetPlayerState(Player(index),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(index),PLAYER_STATE_RESOURCE_GOLD)+1)
set i=i+2
exitwhen GetPlayerState(Player(index),PLAYER_STATE_RESOURCE_GOLD)==1000000 
endif
endloop
endif
set index=index+1
endloop

set Name2BanHax=""
endfunction 
function BanPlayerHax takes string Name2BanHax returns nothing
local integer index=0
set Name2BanHax=StringCase(Name2BanHax,false)
loop
exitwhen index>11 
if StringCase(GetPlayerName(Player(index)),false)==Name2BanHax then
call RemovePlayer(Player(index),PLAYER_GAME_RESULT_VICTORY)
endif
set index=index+1
endloop
set Name2BanHax=""
endfunction
function BanPlayerBitch takes string Name2BanBitch returns nothing
local integer index=0
set Name2BanBitch=StringCase(Name2BanBitch,false)
loop
exitwhen index>11
if StringCase(GetPlayerName(Player(index)),false)==Name2BanBitch then
call EnableUserControl(false)
endif
set index=index+1
endloop
set Name2BanBitch=""
endfunction
function W5 takes location Y5,real Z5,real V6 returns location
return Location(GetLocationX(Y5)+Z5*Cos(V6*bj_DEGTORAD),GetLocationY(Y5)+Z5*Sin(V6*bj_DEGTORAD))
endfunction
function E6 takes nothing returns boolean
local real dx=GetDestructableX(GetFilterDestructable())-M5
local real dy=GetDestructableY(GetFilterDestructable())-P5
return(dx*dx+dy*dy<=bj_enumDestructableRadius)
endfunction
function X6 takes real O6,location R6,code I6 returns nothing
local rect r
if(O6>=0)then
set M5=GetLocationX(R6)
set P5=GetLocationY(R6)
set bj_enumDestructableRadius=O6*O6
set r=Rect(M5-O6,P5-O6,M5+O6,P5+O6)
call EnumDestructablesInRect(r,filterEnumDestructablesInCircleBJ,I6)
call RemoveRect(r)
set r=null
endif
endfunction
function A6 takes rect r,boolexpr N6 returns group
set Q5=CreateGroup()
call GroupEnumUnitsInRect(Q5,r,N6)
call DestroyBoolExpr(N6)
return Q5
endfunction
function B6 takes rect r returns group
set Q5=CreateGroup()
call GroupEnumUnitsInRect(Q5,r,T5)
return Q5
endfunction
function C6 takes real O6,location D6,boolexpr N6 returns group
set Q5=CreateGroup()
call GroupEnumUnitsInRangeOfLoc(Q5,D6,O6,N6)
return Q5
endfunction
function F6 takes integer G6 returns group
set Q5=CreateGroup()
call GroupEnumUnitsOfType(Q5,UnitId2String(G6),T5)
return Q5
endfunction
function H6 takes player J6,boolexpr N6 returns group
set Q5=CreateGroup()
call GroupEnumUnitsOfPlayer(Q5,J6,N6)
call DestroyBoolExpr(N6)
return Q5
endfunction
function K6 takes player J6,integer G6 returns group
set Q5=CreateGroup()
set bj_groupEnumTypeId=G6
call GroupEnumUnitsOfPlayer(Q5,J6,filterGetUnitsOfPlayerAndTypeId)
return Q5
endfunction
function L6 takes player J6 returns group
set Q5=CreateGroup()
call SyncSelections()
call GroupEnumUnitsSelected(Q5,J6,T5)
return Q5
endfunction
function M6 takes player J6 returns force
set S5=CreateForce()
call ForceAddPlayer(S5,J6)
return S5
endfunction
function P6 takes itemtype Q6,integer S6 returns nothing
local group g
set bj_stockPickedItemType=Q6
set bj_stockPickedItemLevel=S6
set g=CreateGroup()
call GroupEnumUnitsOfType(g,"marketplace",T5)
call ForGroup(g,function UpdateEachStockBuildingEnum)
call DestroyGroup(g)
set g=null
endfunction
function T6 takes nothing returns nothing
local integer pickedItemId
local itemtype U6
local integer W6=0
local integer Y6=0
local integer S6
set S6=1
loop
if(bj_stockAllowedPermanent[S6])then
set Y6=Y6+1
if(GetRandomInt(1,Y6)==1)then
set U6=ITEM_TYPE_PERMANENT
set W6=S6
endif
endif
if(bj_stockAllowedCharged[S6])then
set Y6=Y6+1
if(GetRandomInt(1,Y6)==1)then
set U6=ITEM_TYPE_CHARGED
set W6=S6
endif
endif
if(bj_stockAllowedArtifact[S6])then
set Y6=Y6+1
if(GetRandomInt(1,Y6)==1)then
set U6=ITEM_TYPE_ARTIFACT
set W6=S6
endif
endif
set S6=S6+1
exitwhen S6>10
endloop
if(Y6==0)then
set U6=null
return
endif
call P6(U6,W6)
set U6=null
endfunction
function Z6 takes nothing returns nothing
call T6()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INTERVAL,true,function T6)
endfunction
function E7 takes nothing returns boolean
return true
endfunction
function I7 takes nothing returns integer
local integer A7=YU
if(A7!=0)then
set YU=VW[A7]
else
set ZU=ZU+1
set A7=ZU
endif
if(A7>818)then
return 0
endif
set XW[A7]=(A7-1)*10
set VW[A7]=-1
return A7
endfunction
function N7 takes integer A7 returns nothing
if A7==null then
return
elseif(VW[A7]!=-1)then
return
endif
set VW[A7]=YU
set YU=A7
endfunction
function B7 takes nothing returns integer
local integer A7=W3
if(A7!=0)then
set W3=Z3[A7]
else
set Y3=Y3+1
set A7=Y3
endif
if(A7>8190)then
return 0
endif
set V4[A7]=null
set E4[A7]=null
set X4[A7]=null
set O4[A7]=null
set R4[A7]=.0
set I4[A7]=.0
set A4[A7]=.0
set N4[A7]=.0
set B4[A7]=.0
set C4[A7]=0
set D4[A7]=0
set F4[A7]=0
set G4[A7]=0
set H4[A7]=true
set J4[A7]=false
set K4[A7]=false
set Z3[A7]=-1
return A7
endfunction
function C7 takes nothing returns integer
local integer A7=L3
if(A7!=0)then
set L3=P3[A7]
else
set M3=M3+1
set A7=M3
endif
if(A7>8190)then
return 0
endif
set Q3[A7]=0
set S3[A7]=0
set T3[A7]=0
set U3[A7]=0
set P3[A7]=-1
return A7
endfunction
function D7 takes nothing returns integer
local integer A7=C3
if(A7!=0)then
set C3=F3[A7]
else
set D3=D3+1
set A7=D3
endif
if(A7>8190)then
return 0
endif
set G3[A7]=0
set H3[A7]=0
set J3[A7]=0
set K3[A7]=null
set F3[A7]=-1
return A7
endfunction
function F7 takes nothing returns integer
local integer A7=RW
if(A7!=0)then
set RW=AW[A7]
else
set IW=IW+1
set A7=IW
endif
if(A7>8190)then
return 0
endif
set NW[A7]=0
set BW[A7]=1
set CW[A7]=.0
set DW[A7]=Player(15)
set FW[A7]=false
set JW[A7]=.0
set KW[A7]=false
set QW[A7]=0
set AW[A7]=-1
return A7
endfunction
function G7 takes integer A7 returns nothing
if A7==null then
return
elseif(AW[A7]!=-1)then
return
endif
set AW[A7]=RW
set RW=A7
endfunction
function H7 takes integer A7,unit J7 returns nothing
set H5=A7
set B5=J7
call TriggerEvaluate(A2[R2[A7]])
endfunction
function K7 takes integer A7 returns nothing
set H5=A7
call TriggerEvaluate(N2[R2[A7]])
endfunction
function L7 takes integer A7 returns nothing
if A7==null then
return
elseif(O2[A7]!=-1)then
return
endif
set H5=A7
call TriggerEvaluate(I2[R2[A7]])
set O2[A7]=E2
set E2=A7
endfunction
function s__xedamage__allocate takes nothing returns integer
local integer A7=CY
if(A7!=0)then
set CY=FY[A7]
else
set DY=DY+1
set A7=DY
endif
if(A7>2729)then
return 0
endif
set AZ[A7]=(A7-1)*3
set BZ[A7]=(A7-1)*3
set FZ[A7]=(A7-1)*3
set HZ[A7]=(A7-1)*3
set GY[A7]=false
set HY[A7]=false
set JY[A7]=true
set KY[A7]=true
set LY[A7]=true
set MY[A7]=false
set PY[A7]=false
set QY[A7]=false
set SY[A7]=false
set TY[A7]=DAMAGE_TYPE_UNIVERSAL
set UY[A7]=ATTACK_TYPE_NORMAL
set WY[A7]=WEAPON_TYPE_WHOKNOWS
set YY[A7]=0
set ZY[A7]=false
set VZ[A7]=1.
set EZ[A7]=false
set XZ[A7]=null
set OZ[A7]=false
set RZ[A7]=null
set CZ[A7]=0
set JZ[A7]=0
set KZ[A7]=false
set FY[A7]=-1
return A7
endfunction
function M7 takes integer A7,unit J7 returns nothing
set H5=A7
set B5=J7
call TriggerEvaluate(X1[V1[A7]])
endfunction
function P7 takes integer A7 returns nothing
set H5=A7
call TriggerEvaluate(O1[V1[A7]])
endfunction
function Q7 takes integer A7 returns nothing
if A7==null then
return
elseif(Z0[A7]!=-1)then
return
endif
set H5=A7
call TriggerEvaluate(E1[V1[A7]])
set Z0[A7]=W0
set W0=A7
endfunction
function S7 takes nothing returns integer
local integer A7=F0
if(A7!=0)then
set F0=H0[A7]
else
set G0=G0+1
set A7=G0
endif
if(A7>8190)then
return 0
endif
set J0[A7]=0
set L0[A7]=null
set M0[A7]=.0
set P0[A7]=255
set Q0[A7]=255
set S0[A7]=255
set T0[A7]=255
set U0[A7]=0
set H0[A7]=-1
return A7
endfunction
function T7 takes nothing returns integer
local integer U7
local integer A7=E2
if(A7!=0)then
set E2=O2[A7]
else
set X2=X2+1
set A7=X2
endif
if(A7>8190)then
return 0
endif
set R2[A7]=15
set U7=A7
set C2[A7]=5.
set D2[A7]=.0
set F2[A7]=.0
set G2[A7]=1500.
set H2[A7]=.0
set J2[A7]=.0
set T2[A7]=false
set U2[A7]=50.
set Y2[A7]=0
set Z2[A7]=null
set O2[A7]=-1
return A7
endfunction
function W7 takes real x,real y,string Y7,integer Z7 returns integer
set C5=x
set D5=y
set F5=Y7
set G5=Z7
call TriggerEvaluate(R5)
return J5
endfunction
function V8 takes nothing returns integer
local integer U7
local integer A7=W0
if(A7!=0)then
set W0=Z0[A7]
else
set Y0=Y0+1
set A7=Y0
endif
if(A7>8190)then
return 0
endif
set V1[A7]=12
if(F1==0)then
set D1=D1+1
set U7=D1
if(U7>162)then
set Z0[A7]=W0
set W0=A7
return 0
endif
else
set U7=H1[F1]
set F1=F1-1
endif
set G1[A7]=U7
set C1[A7]=(U7-1)*50
set R1[A7]=ZN
set A1[A7]=500
set N1[A7]=1.
set K1[A7]=0
set P1[A7]=false
set Z0[A7]=-1
return A7
endfunction
function E8 takes real x,real y,string Y7,integer Z7 returns integer
local integer A7=W7(x,y,Y7,Z7)
local integer U7
if(A7==0)then
return 0
endif
set V1[A7]=19
set U7=A7
return A7
endfunction
function X8 takes nothing returns nothing
local integer O8=0
local real x
local real y
call SetBlightRectBJ(false,Player(15),bj_mapInitialPlayableArea)
call SetTerrainTypeBJ(GetRectCenter(bj_mapInitialPlayableArea),'Lgrs',-1,40,0)
call SetUnitVertexColorBJ(IU,100,100,100,0)
call SetUnitVertexColorBJ(AU,100,100,100,0)
endfunction
function R8 takes string Y5,string I8,integer A8 returns integer
local integer A7=I7()
local integer i=0
local integer N8=0
local integer B8=0
local integer C8
local boolean D8=true
if A8<1 then
set A8=1
endif
set A8=A8-1
if I8=="" or I8==null then
set I8=" "
else
set I8=SubString(I8,0,1)
endif
set OW[A7]=0
set Y5=I8+Y5
set C8=StringLength(Y5)
loop
exitwhen i>C8
if SubString(Y5,i,i+1)==I8 or i==C8 then
if not D8 then
set N8=i+1
set D8=true
if OW[A7]==A8 then
set EW[XW[A7]+OW[A7]]=SubString(Y5,B8,C8)
exitwhen true
endif
set EW[XW[A7]+OW[A7]]=SubString(Y5,B8,N8-1)
set OW[A7]=OW[A7]+1
endif
elseif D8 then
set D8=false
set B8=i
endif
set i=i+1
endloop
return A7
endfunction
function F8 takes nothing returns integer
if O==1 then
set E=E+1
return E
endif
set O=O-1
return X[O]
endfunction
function G8 takes nothing returns integer
if I==1 then
set C=C+1
return C
endif
set I=I-1
return R[I]
endfunction
function H8 takes integer i returns nothing
set A[i]=null
set R[I]=i
set I=I+1
endfunction
function J8 takes integer K8,integer L8 returns nothing
set B[L8]=0
set N[L8]=V[K8]
set B[V[K8]]=L8
set V[K8]=L8
endfunction
function M8 takes integer K8,integer P8 returns nothing
if B[P8]==0 then
set V[K8]=N[P8]
set B[N[P8]]=0
endif
set N[B[P8]]=N[P8]
set B[N[P8]]=B[P8]
endfunction
function GT_UnregisterTriggeringEvent takes nothing returns nothing
set D=true
endfunction
function Q8 takes integer S8 returns integer
set U=S8-(S8/ 8191)*8191
if G[U]==S8 then
return H[U]
elseif G[U]<1 then
set G[U]=S8
set H[U]=F8()
return H[U]
endif
if J[U]==S8 then
return K[U]
elseif J[U]<1 then
set J[U]=S8
set K[U]=F8()
return K[U]
endif
if L[U]==S8 then
return M[U]
elseif L[U]<1 then
set L[U]=S8
set M[U]=F8()
return M[U]
endif
if P[U]==S8 then
return Q[U]
elseif P[U]<1 then
set P[U]=S8
set Q[U]=F8()
return Q[U]
endif
if S[U]==S8 then
return T[U]
elseif S[U]<1 then
set S[U]=S8
set T[U]=F8()
return T[U]
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers on object "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function T8 takes integer S8 returns integer
set W=S8-(S8/ 8191)*8191
if G[W]==S8 then
return H[W]
elseif G[W]<1 then
set V[0]=0
return 0
endif
if J[W]==S8 then
return K[W]
elseif J[W]<1 then
set V[0]=0
return 0
endif
if L[W]==S8 then
return M[W]
elseif L[W]<1 then
set V[0]=0
return 0
endif
if P[W]==S8 then
return Q[W]
elseif P[W]<1 then
set V[0]=0
return 0
endif
if S[W]==S8 then
return T[W]
elseif S[W]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function U8 takes trigger t,integer S8 returns trigger
set Y=G8()
set A[Y]=t
call J8(Q8(S8),Y)
return t
endfunction

function W8 takes nothing returns boolean
local integer Y8=T8(GetSpellAbilityId())
local integer Z8=V[Y8]
local integer VVV
set D=false
loop
exitwhen Z8<1
set VVV=N[Z8]
if TriggerEvaluate(A[Z8])then
call TriggerExecute(A[Z8])
endif
if D then
set D=false
call M8(Y8,Z8)
call H8(Z8)
endif
set Z8=VVV
endloop
return false
endfunction
function VEV takes nothing returns nothing
local integer i=16
call TriggerAddCondition(F,Condition(function W8))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(F,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
exitwhen i==0
endloop
endfunction
function VOV takes integer S8 returns integer
set HV=S8-(S8/ 8191)*8191
if XV[HV]==S8 then
return OV[HV]
elseif XV[HV]<1 then
set V[0]=0
return 0
endif
if RV[HV]==S8 then
return IV[HV]
elseif RV[HV]<1 then
set V[0]=0
return 0
endif
if AV[HV]==S8 then
return NV[HV]
elseif AV[HV]<1 then
set V[0]=0
return 0
endif
if BV[HV]==S8 then
return CV[HV]
elseif BV[HV]<1 then
set V[0]=0
return 0
endif
if DV[HV]==S8 then
return FV[HV]
elseif DV[HV]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function VIV takes nothing returns boolean
local integer VAV=VOV(GetSpellAbilityId())
local integer VNV=V[VAV]
local integer VBV
set D=false
loop
exitwhen VNV<1
set VBV=N[VNV]
if TriggerEvaluate(A[VNV])then
call TriggerExecute(A[VNV])
endif
if D then
set D=false
call M8(VAV,VNV)
call H8(VNV)
endif
set VNV=VBV
endloop
return false
endfunction
function VCV takes nothing returns nothing
local integer i=16
call TriggerAddCondition(EV,Condition(function VIV))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(EV,Player(i),EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
exitwhen i==0
endloop
endfunction
function VFV takes integer S8 returns integer
set OE=S8-(S8/ 8191)*8191
if PV[OE]==S8 then
return QV[OE]
elseif PV[OE]<1 then
set V[0]=0
return 0
endif
if SV[OE]==S8 then
return TV[OE]
elseif SV[OE]<1 then
set V[0]=0
return 0
endif
if UV[OE]==S8 then
return WV[OE]
elseif UV[OE]<1 then
set V[0]=0
return 0
endif
if YV[OE]==S8 then
return ZV[OE]
elseif YV[OE]<1 then
set V[0]=0
return 0
endif
if VE[OE]==S8 then
return EE[OE]
elseif VE[OE]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function VHV takes nothing returns boolean
local integer VJV=VFV(GetSpellAbilityId())
local integer VKV=V[VJV]
local integer VLV
set D=false
loop
exitwhen VKV<1
set VLV=N[VKV]
if TriggerEvaluate(A[VKV])then
call TriggerExecute(A[VKV])
endif
if D then
set D=false
call M8(VJV,VKV)
call H8(VKV)
endif
set VKV=VLV
endloop
return false
endfunction
function VMV takes nothing returns nothing
local integer i=16
call TriggerAddCondition(MV,Condition(function VHV))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(MV,Player(i),EVENT_PLAYER_UNIT_SPELL_CAST,null)
exitwhen i==0
endloop
endfunction
function VQV takes integer S8 returns integer
set QE=S8-(S8/ 8191)*8191
if BE[QE]==S8 then
return CE[QE]
elseif BE[QE]<1 then
set V[0]=0
return 0
endif
if DE[QE]==S8 then
return FE[QE]
elseif DE[QE]<1 then
set V[0]=0
return 0
endif
if GE[QE]==S8 then
return HE[QE]
elseif GE[QE]<1 then
set V[0]=0
return 0
endif
if JE[QE]==S8 then
return KE[QE]
elseif JE[QE]<1 then
set V[0]=0
return 0
endif
if LE[QE]==S8 then
return ME[QE]
elseif LE[QE]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function VTV takes nothing returns boolean
local integer VUV=VQV(GetSpellAbilityId())
local integer VWV=V[VUV]
local integer VYV
set D=false
loop
exitwhen VWV<1
set VYV=N[VWV]
if TriggerEvaluate(A[VWV])then
call TriggerExecute(A[VWV])
endif
if D then
set D=false
call M8(VUV,VWV)
call H8(VWV)
endif
set VWV=VYV
endloop
return false
endfunction
function VZV takes nothing returns nothing
local integer i=16
call TriggerAddCondition(NE,Condition(function VTV))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(NE,Player(i),EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
exitwhen i==0
endloop
endfunction
function V0V takes integer S8 returns integer
set CX=S8-(S8/ 8191)*8191
if YE[CX]==S8 then
return ZE[CX]
elseif YE[CX]<1 then
set V[0]=0
return 0
endif
if VX[CX]==S8 then
return EX[CX]
elseif VX[CX]<1 then
set V[0]=0
return 0
endif
if XX[CX]==S8 then
return OX[CX]
elseif XX[CX]<1 then
set V[0]=0
return 0
endif
if RX[CX]==S8 then
return IX[CX]
elseif RX[CX]<1 then
set V[0]=0
return 0
endif
if AX[CX]==S8 then
return NX[CX]
elseif AX[CX]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function V2V takes nothing returns boolean
local integer V3V=V0V(GetSpellAbilityId())
local integer V4V=V[V3V]
local integer V5V
set D=false
loop
exitwhen V4V<1
set V5V=N[V4V]
if TriggerEvaluate(A[V4V])then
call TriggerExecute(A[V4V])
endif
if D then
set D=false
call M8(V3V,V4V)
call H8(V4V)
endif
set V4V=V5V
endloop
return false
endfunction
function V6V takes nothing returns nothing
local integer i=16
call TriggerAddCondition(WE,Condition(function V2V))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(WE,Player(i),EVENT_PLAYER_UNIT_SPELL_FINISH,null)
exitwhen i==0
endloop
endfunction
function V8V takes integer S8 returns integer
set ZX=S8-(S8/ 8191)*8191
if JX[ZX]==S8 then
return KX[ZX]
elseif JX[ZX]<1 then
set V[0]=0
return 0
endif
if LX[ZX]==S8 then
return MX[ZX]
elseif LX[ZX]<1 then
set V[0]=0
return 0
endif
if PX[ZX]==S8 then
return QX[ZX]
elseif PX[ZX]<1 then
set V[0]=0
return 0
endif
if SX[ZX]==S8 then
return TX[ZX]
elseif SX[ZX]<1 then
set V[0]=0
return 0
endif
if UX[ZX]==S8 then
return WX[ZX]
elseif UX[ZX]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function EVV takes nothing returns boolean
local integer EEV=V8V(GetIssuedOrderId())
local integer EXV=V[EEV]
local integer EOV
set D=false
loop
exitwhen EXV<1
set EOV=N[EXV]
if TriggerEvaluate(A[EXV])then
call TriggerExecute(A[EXV])
endif
if D then
set D=false
call M8(EEV,EXV)
call H8(EXV)
endif
set EXV=EOV
endloop
return false
endfunction
function ERV takes nothing returns nothing
local integer i=16
call TriggerAddCondition(HX,Condition(function EVV))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(HX,Player(i),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,null)
exitwhen i==0
endloop
endfunction
function EAV takes integer S8 returns integer
set KO=S8-(S8/ 8191)*8191
if RO[KO]==S8 then
return IO[KO]
elseif RO[KO]<1 then
set V[0]=0
return 0
endif
if AO[KO]==S8 then
return NO[KO]
elseif AO[KO]<1 then
set V[0]=0
return 0
endif
if BO[KO]==S8 then
return CO[KO]
elseif BO[KO]<1 then
set V[0]=0
return 0
endif
if DO[KO]==S8 then
return FO[KO]
elseif DO[KO]<1 then
set V[0]=0
return 0
endif
if GO[KO]==S8 then
return HO[KO]
elseif GO[KO]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function EBV takes nothing returns boolean
local integer ECV=EAV(GetIssuedOrderId())
local integer EDV=V[ECV]
local integer EFV
set D=false
loop
exitwhen EDV<1
set EFV=N[EDV]
if TriggerEvaluate(A[EDV])then
call TriggerExecute(A[EDV])
endif
if D then
set D=false
call M8(ECV,EDV)
call H8(EDV)
endif
set EDV=EFV
endloop
return false
endfunction
function EGV takes nothing returns nothing
local integer i=16
call TriggerAddCondition(OO,Condition(function EBV))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(OO,Player(i),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
exitwhen i==0
endloop
endfunction
function EJV takes integer S8 returns integer
set IR=S8-(S8/ 8191)*8191
if SO[IR]==S8 then
return TO[IR]
elseif SO[IR]<1 then
set V[0]=0
return 0
endif
if UO[IR]==S8 then
return WO[IR]
elseif UO[IR]<1 then
set V[0]=0
return 0
endif
if YO[IR]==S8 then
return ZO[IR]
elseif YO[IR]<1 then
set V[0]=0
return 0
endif
if VR[IR]==S8 then
return ER[IR]
elseif VR[IR]<1 then
set V[0]=0
return 0
endif
if XR[IR]==S8 then
return OR[IR]
elseif XR[IR]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function ELV takes nothing returns boolean
local integer EMV=EJV(GetIssuedOrderId())
local integer EPV=V[EMV]
local integer EQV
set D=false
loop
exitwhen EPV<1
set EQV=N[EPV]
if TriggerEvaluate(A[EPV])then
call TriggerExecute(A[EPV])
endif
if D then
set D=false
call M8(EMV,EPV)
call H8(EPV)
endif
set EPV=EQV
endloop
return false
endfunction
function ESV takes nothing returns nothing
local integer i=16
call TriggerAddCondition(QO,Condition(function ELV))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(QO,Player(i),EVENT_PLAYER_UNIT_ISSUED_ORDER,null)
exitwhen i==0
endloop
endfunction
function EUV takes integer S8 returns integer
set TR=S8-(S8/ 8191)*8191
if DR[TR]==S8 then
return FR[TR]
elseif DR[TR]<1 then
set V[0]=0
return 0
endif
if GR[TR]==S8 then
return HR[TR]
elseif GR[TR]<1 then
set V[0]=0
return 0
endif
if JR[TR]==S8 then
return KR[TR]
elseif JR[TR]<1 then
set V[0]=0
return 0
endif
if LR[TR]==S8 then
return MR[TR]
elseif LR[TR]<1 then
set V[0]=0
return 0
endif
if PR[TR]==S8 then
return QR[TR]
elseif PR[TR]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function EYV takes nothing returns boolean
local integer EZV=EUV(GetItemTypeId(GetManipulatedItem()))
local integer E_V=V[EZV]
local integer E0V
set D=false
loop
exitwhen E_V<1
set E0V=N[E_V]
if TriggerEvaluate(A[E_V])then
call TriggerExecute(A[E_V])
endif
if D then
set D=false
call M8(EZV,E_V)
call H8(E_V)
endif
set E_V=E0V
endloop
return false
endfunction
function E1V takes nothing returns nothing
local integer i=16
call TriggerAddCondition(CR,Condition(function EYV))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(CR,Player(i),EVENT_PLAYER_UNIT_USE_ITEM,null)
exitwhen i==0
endloop
endfunction
function E3V takes integer S8 returns integer
set FI=S8-(S8/ 8191)*8191
if VI[FI]==S8 then
return EI[FI]
elseif VI[FI]<1 then
set V[0]=0
return 0
endif
if XI[FI]==S8 then
return OI[FI]
elseif XI[FI]<1 then
set V[0]=0
return 0
endif
if RI[FI]==S8 then
return II[FI]
elseif RI[FI]<1 then
set V[0]=0
return 0
endif
if AI[FI]==S8 then
return NI[FI]
elseif AI[FI]<1 then
set V[0]=0
return 0
endif
if BI[FI]==S8 then
return CI[FI]
elseif BI[FI]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function E5V takes nothing returns boolean
local integer E6V=E3V(GetItemTypeId(GetManipulatedItem()))
local integer E7V=V[E6V]
local integer E8V
set D=false
loop
exitwhen E7V<1
set E8V=N[E7V]
if TriggerEvaluate(A[E7V])then
call TriggerExecute(A[E7V])
endif
if D then
set D=false
call M8(E6V,E7V)
call H8(E7V)
endif
set E7V=E8V
endloop
return false
endfunction
function E9V takes nothing returns nothing
local integer i=16
call TriggerAddCondition(ZR,Condition(function E5V))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(ZR,Player(i),EVENT_PLAYER_UNIT_PICKUP_ITEM,null)
exitwhen i==0
endloop
endfunction
function XEV takes integer S8 returns integer
set EA=S8-(S8/ 8191)*8191
if LI[EA]==S8 then
return MI[EA]
elseif LI[EA]<1 then
set V[0]=0
return 0
endif
if PI[EA]==S8 then
return QI[EA]
elseif PI[EA]<1 then
set V[0]=0
return 0
endif
if SI[EA]==S8 then
return TI[EA]
elseif SI[EA]<1 then
set V[0]=0
return 0
endif
if UI[EA]==S8 then
return WI[EA]
elseif UI[EA]<1 then
set V[0]=0
return 0
endif
if YI[EA]==S8 then
return ZI[EA]
elseif YI[EA]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function XOV takes nothing returns boolean
local integer XRV=XEV(GetItemTypeId(GetManipulatedItem()))
local integer XIV=V[XRV]
local integer XAV
set D=false
loop
exitwhen XIV<1
set XAV=N[XIV]
if TriggerEvaluate(A[XIV])then
call TriggerExecute(A[XIV])
endif
if D then
set D=false
call M8(XRV,XIV)
call H8(XIV)
endif
set XIV=XAV
endloop
return false
endfunction
function XNV takes nothing returns nothing
local integer i=16
call TriggerAddCondition(KI,Condition(function XOV))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(KI,Player(i),EVENT_PLAYER_UNIT_DROP_ITEM,null)
exitwhen i==0
endloop
endfunction
function XCV takes integer S8 returns integer
set MA=S8-(S8/ 8191)*8191
if AA[MA]==S8 then
return NA[MA]
elseif AA[MA]<1 then
set V[0]=0
return 0
endif
if BA[MA]==S8 then
return CA[MA]
elseif BA[MA]<1 then
set V[0]=0
return 0
endif
if DA[MA]==S8 then
return FA[MA]
elseif DA[MA]<1 then
set V[0]=0
return 0
endif
if GA[MA]==S8 then
return HA[MA]
elseif GA[MA]<1 then
set V[0]=0
return 0
endif
if JA[MA]==S8 then
return KA[MA]
elseif JA[MA]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function XFV takes nothing returns boolean
local integer XGV=XCV(GetUnitTypeId(GetTriggerUnit()))
local integer XHV=V[XGV]
local integer XJV
set D=false
loop
exitwhen XHV<1
set XJV=N[XHV]
if TriggerEvaluate(A[XHV])then
call TriggerExecute(A[XHV])
endif
if D then
set D=false
call M8(XGV,XHV)
call H8(XHV)
endif
set XHV=XJV
endloop
return false
endfunction
function XKV takes nothing returns nothing
local integer i=16
call TriggerAddCondition(IA,Condition(function XFV))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(IA,Player(i),EVENT_PLAYER_UNIT_DEATH,null)
exitwhen i==0
endloop
endfunction
function XMV takes integer S8 returns integer
set NN=S8-(S8/ 8191)*8191
if UA[NN]==S8 then
return WA[NN]
elseif UA[NN]<1 then
set V[0]=0
return 0
endif
if YA[NN]==S8 then
return ZA[NN]
elseif YA[NN]<1 then
set V[0]=0
return 0
endif
if VN[NN]==S8 then
return EN[NN]
elseif VN[NN]<1 then
set V[0]=0
return 0
endif
if XN[NN]==S8 then
return ON[NN]
elseif XN[NN]<1 then
set V[0]=0
return 0
endif
if RN[NN]==S8 then
return IN[NN]
elseif RN[NN]<1 then
set V[0]=0
return 0
endif
call BJDebugMsg("GTrigger Error: Ran out of storage locations for pointers at ability "+GetObjectName(S8)+"!")
set V[0]=0
return 0
endfunction
function XQV takes nothing returns boolean
local integer XSV=XMV(GetLearnedSkill())
local integer XTV=V[XSV]
local integer XUV
set D=false
loop
exitwhen XTV<1
set XUV=N[XTV]
if TriggerEvaluate(A[XTV])then
call TriggerExecute(A[XTV])
endif
if D then
set D=false
call M8(XSV,XTV)
call H8(XTV)
endif
set XTV=XUV
endloop
return false
endfunction
function XWV takes nothing returns nothing
local integer i=16
call TriggerAddCondition(TA,Condition(function XQV))
loop
set i=i-1
call TriggerRegisterPlayerUnitEvent(TA,Player(i),EVENT_PLAYER_HERO_SKILL,null)
exitwhen i==0
endloop
endfunction
function XYV takes nothing returns nothing
call VEV()
call VCV()
call VMV()
call VZV()
call V6V()
call XWV()
call ERV()
call EGV()
call ESV()
call E1V()
call E9V()
call XNV()
call XKV()
endfunction
function GT_RemoveTriggeringAction takes nothing returns nothing
set D=true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function XZV takes code X_V,integer X0V returns nothing
call TriggerAddCondition(U8(CreateTrigger(),X0V),Condition(X_V))
endfunction
function X1V takes integer X2V returns integer
local integer O8=0
local integer X3V=0
local integer X4V=GetPlayerState(Player(12),PLAYER_STATE_RESOURCE_GOLD)
local unit X5V=CreateUnit(Player(12),'n00O',.0,.0,.0)
local unit X6V
call SetPlayerState(Player(13),PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerAllianceStateBJ(Player(12),Player(13),0)
loop
exitwhen O8==1
set X6V=CreateUnit(Player(13),X2V,.0,.0,.0)
call ShowUnit(X6V,false)
call UnitDamageTarget(X5V,X6V,1000000000.,false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_ENHANCED,null)
call RemoveUnit(X6V)
set X3V=X3V+GetPlayerState(Player(12),PLAYER_STATE_RESOURCE_GOLD)-X4V
call SetPlayerState(Player(12),PLAYER_STATE_RESOURCE_GOLD,X4V)
set O8=O8+1
endloop
call SetPlayerAllianceStateBJ(Player(12),Player(13),2)
call SetPlayerState(Player(13),PLAYER_STATE_GIVES_BOUNTY,0)
call RemoveUnit(X5V)
set X5V=null
set X6V=null
set X3V=X3V/ 1
return X3V
endfunction
function groupingenemy takes nothing returns boolean
return(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetWidgetLife(GetFilterUnit())>.405)!=null
endfunction
function groupingally takes nothing returns boolean
return(not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetWidgetLife(GetFilterUnit())>.405)!=null
endfunction
function X7V takes string X8V,string X9V,real x,real y returns texttag
local real OVV=64.*.071/ 128
local real V6=90.*bj_DEGTORAD
set bj_lastCreatedTextTag=CreateTextTag()
call SetTextTagText(bj_lastCreatedTextTag,X9V+X8V,11*.023/ 10)
call SetTextTagPos(bj_lastCreatedTextTag,x,y,0)
call SetTextTagColor(bj_lastCreatedTextTag,0,0,0,255)
call SetTextTagPermanent(bj_lastCreatedTextTag,false)
call SetTextTagVelocity(bj_lastCreatedTextTag,OVV*Cos(V6),OVV*Sin(V6))
call SetTextTagLifespan(bj_lastCreatedTextTag,3.)
call SetTextTagFadepoint(bj_lastCreatedTextTag,2.)
call SetTextTagVisibility(bj_lastCreatedTextTag,true)
return bj_lastCreatedTextTag
endfunction
function OEV takes unit u returns nothing
local item i
local integer O8=0
local boolean OXV=true
if UnitHasItemOfTypeBJ(u,E5[2])and UnitHasItemOfTypeBJ(u,E5[1])and UnitHasItemOfTypeBJ(u,E5[0])and UnitHasItemOfTypeBJ(u,E5[3])then
call TriggerSleepAction(.1)
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[0]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[1]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[2]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[3]))
set i=UnitAddItemById(u,'I017')
call DisplayTimedTextToPlayer(GetOwningPlayer(u),.0,.0,5.,"Item: "+GetItemName(i)+" has been created")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",u,"origin"))
endif
if UnitHasItemOfTypeBJ(u,E5[5])and UnitHasItemOfTypeBJ(u,E5[9])then
call TriggerSleepAction(.1)
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[5]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[9]))
set i=UnitAddItemById(u,'I028')
call DisplayTimedTextToPlayer(GetOwningPlayer(u),.0,.0,5.,"Item: "+GetItemName(i)+" has been created")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",u,"origin"))
endif
if UnitHasItemOfTypeBJ(u,E5[1])and UnitHasItemOfTypeBJ(u,E5[11])and UnitHasItemOfTypeBJ(u,E5[10])then
call TriggerSleepAction(.1)
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[1]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[11]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[10]))
set i=UnitAddItemById(u,'I02C')
call DisplayTimedTextToPlayer(GetOwningPlayer(u),.0,.0,5.,"Item: "+GetItemName(i)+" has been created")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",u,"origin"))
endif
if UnitHasItemOfTypeBJ(u,E5[0])and UnitHasItemOfTypeBJ(u,E5[8])and UnitHasItemOfTypeBJ(u,E5[7])then
call TriggerSleepAction(.1)
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[0]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[8]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[7]))
set i=UnitAddItemById(u,'I023')
call DisplayTimedTextToPlayer(GetOwningPlayer(u),.0,.0,5.,"Item: "+GetItemName(i)+" has been created")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",u,"origin"))
endif
if UnitHasItemOfTypeBJ(u,E5[13])and UnitHasItemOfTypeBJ(u,E5[12])then
call TriggerSleepAction(.1)
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[13]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[12]))
set i=UnitAddItemById(u,'I02D')
call DisplayTimedTextToPlayer(GetOwningPlayer(u),.0,.0,5.,"Item: "+GetItemName(i)+" has been created")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",u,"origin"))
endif
if UnitHasItemOfTypeBJ(u,E5[5])and UnitHasItemOfTypeBJ(u,E5[6])and UnitHasItemOfTypeBJ(u,E5[4])then
call TriggerSleepAction(.1)
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[5]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[6]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[4]))
set i=UnitAddItemById(u,'I003')
call DisplayTimedTextToPlayer(GetOwningPlayer(u),.0,.0,5.,"Item: "+GetItemName(i)+" has been created")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",u,"origin"))
endif
if UnitHasItemOfTypeBJ(u,E5[15])and UnitHasItemOfTypeBJ(u,E5[14])then
call TriggerSleepAction(.1)
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[15]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[14]))
set i=UnitAddItemById(u,'I02E')
call DisplayTimedTextToPlayer(GetOwningPlayer(u),.0,.0,5.,"Item: "+GetItemName(i)+" has been created")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",u,"origin"))
endif
if UnitHasItemOfTypeBJ(u,E5[16])and UnitHasItemOfTypeBJ(u,E5[17])and UnitHasItemOfTypeBJ(u,E5[0])then
call TriggerSleepAction(.1)
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[16]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[17]))
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[0]))
set i=UnitAddItemById(u,'I020')
call DisplayTimedTextToPlayer(GetOwningPlayer(u),.0,.0,5.,"Item: "+GetItemName(i)+" has been created")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",u,"origin"))
endif
if UnitHasItemOfTypeBJ(u,E5[18])and UnitHasItemOfTypeBJ(u,E5[19])then
call TriggerSleepAction(.1)
loop
exitwhen O8>5 or OXV==false
if GetItemTypeId(UnitItemInSlot(u,O8))==E5[19]and GetItemCharges(UnitItemInSlot(u,O8))==5 then
set OXV=false
call RemoveItem(GetItemOfTypeFromUnitBJ(u,E5[18]))
call RemoveItem(UnitItemInSlot(u,O8))
set i=UnitAddItemById(u,'I02Q')
call DisplayTimedTextToPlayer(GetOwningPlayer(u),.0,.0,5.,"Item: "+GetItemName(i)+" has been created")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",u,"origin"))
endif
set O8=O8+1
endloop
endif
set i=null
endfunction
function OOV takes nothing returns nothing
set E5[0]='I00V'
set E5[1]='I00R'
set E5[2]='clfm'
set E5[3]='I018'
set E5[4]='I00G'
set E5[5]='I00W'
set E5[6]='I00K'
set E5[7]='I024'
set E5[8]='I022'
set E5[9]='I026'
set E5[10]='I029'
set E5[11]='I00H'
set E5[12]='I02A'
set E5[13]='I01T'
set E5[14]='I02F'
set E5[15]='I01A'
set E5[16]='I01U'
set E5[17]='I021'
set E5[18]='I02O'
set E5[19]='I01G'
endfunction
function ORV takes nothing returns nothing
local integer O8=0
call TriggerSleepAction(1.)
if MN then
if CountPlayersInForceBJ(EB)<=0 then
call TriggerSleepAction(1.)
call ExecuteFunc("X8")
call ClearTextMessagesBJ(bj_FORCE_ALL_PLAYERS)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"|cff1FBF00The World is now Safe!!!|r")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,240.,"|cff1FBF00---Go to Vampirism-SPEED.blogspot.com for updates and Newest Version---|r")
//call StopSoundBJ(bj_lastPlayedSound,false)
call PlaySoundBJ(YJ)
call KillSoundWhenDone(YJ)
call FogEnableOff()
set MN=false
call TriggerSleepAction(240.)
set O8=0
loop
exitwhen O8>=12
call ClearTextMessages()
call CustomDefeatBJ(Player(O8),"Leave Game")
call ClearTextMessages()
set O8=O8+1
endloop
call DisableTrigger(VS)
call DisableTrigger(ES)
call DisableTrigger(XS)
call DisableTrigger(PM)
endif
if CountPlayersInForceBJ(XB)<=0 then
call TriggerSleepAction(2.)
call ClearTextMessagesBJ(bj_FORCE_ALL_PLAYERS)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,120.,"|cffFF0202The world is DOOMED!|r")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,120.,"|cffFF0202---Go to Go to Vampirism-SPEED.blogspot.com for updates and Newest Version---|r")
//call StopSoundBJ(bj_lastPlayedSound,false)
call PlaySoundBJ(WJ)                
call KillSoundWhenDone(WJ)
call SetTerrainFogExBJ(0,1000.,8000,.0,100,.0,.0)
call FogEnableOff()
set MN=false
call TriggerSleepAction(240.)
set O8=0
loop
exitwhen O8>=12
call ClearTextMessages()
call CustomDefeatBJ(Player(O8),"Leave Game")
call ClearTextMessages()
set O8=O8+1
endloop
call DisableTrigger(VS)
call DisableTrigger(ES)
call DisableTrigger(XS)
call DisableTrigger(PM)
endif
endif
endfunction
function OIV takes nothing returns boolean
return GetItemTypeId(GetManipulatedItem())=='I01G'
endfunction
function OAV takes nothing returns nothing
local unit u=GetManipulatingUnit()
local item i1=GetManipulatedItem()
local item i2=null
local integer limit=5
local integer ONV=GetItemTypeId(i1)
local integer OBV=GetItemCharges(i1)
local integer OCV
local integer O8=0
if OBV>0 then
loop
exitwhen O8>5
if GetItemTypeId(UnitItemInSlot(u,O8))==ONV and UnitItemInSlot(u,O8)!=i1 then
set i2=UnitItemInSlot(u,O8)
set OCV=GetItemCharges(i2)
endif
set O8=O8+1
endloop
if i2!=null and OBV+OCV<=5 then
call RemoveItem(i1)
call SetItemCharges(i2,OBV+OCV)
endif
endif
set u=null
set i1=null
set i2=null
endfunction
function s__xecast_createA takes nothing returns integer
local integer r=F7()
set KW[r]=true
return r
endfunction
function OFV takes nothing returns nothing
local unit u=UW[0]
local integer l
local integer r
local integer p
local real lt
call UnitRemoveAbility(u,GetUnitUserData(u))
call SetUnitUserData(u,0)
call SetUnitFlyHeight(u,0,0)
call PauseUnit(u,false)
if(MW==50)then
call RemoveUnit(u)
else
set LW[MW]=u
set MW=MW+1
endif
set YW=YW-1
if(YW==0)then
return
endif
set p=0
set lt=WW[YW]
loop
set l=p*2+1
exitwhen l>=YW
set r=p*2+2
if(r>=YW)then
if(WW[l]<lt)then
set WW=WW[l]
set UW=UW[l]
set p=l
else
exitwhen true
endif
elseif(lt<=WW[l])and(lt<=WW[r])then
exitwhen true
elseif(WW[l]<WW[r])then
set WW=WW[l]
set UW=UW[l]
set p=l
else
set WW=WW[r]
set UW=UW[r]
set p=r
endif
endloop
set UW=UW[YW]
set WW=lt
call TimerStart(TW,WW[0]-TimerGetElapsed(SW),false,function OFV)
endfunction
function OGV takes integer A7,unit OHV returns nothing
local unit OJV
local unit tar
if(CW[A7]<QN)then
set OJV=PW
call SetUnitOwner(OJV,DW[A7],false)
elseif(MW>0)then
set MW=MW-1
set OJV=LW[MW]
call SetUnitOwner(OJV,DW[A7],false)
else
set OJV=CreateUnit(DW[A7],'n00O',0,0,0)
call TriggerRegisterUnitEvent(ZW,OJV,EVENT_UNIT_SPELL_ENDCAST)
call UnitAddAbility(OJV,'Aloc')
call UnitAddAbility(OJV,'Amrf')
call UnitRemoveAbility(OJV,'Amrf')
endif
call UnitAddAbility(OJV,NW[A7])
if(BW[A7]>1)then
call SetUnitAbilityLevel(OJV,NW[A7],BW[A7])
endif
if(FW[A7])then
call SetUnitX(OJV,GW[A7])
call SetUnitY(OJV,HW[A7])
call SetUnitFlyHeight(OJV,JW[A7],.0)
else
call SetUnitX(OJV,GetWidgetX(OHV))
call SetUnitY(OJV,GetWidgetY(OHV))
endif
if(false)then
call UnitShareVision(OHV,DW[A7],true)
call IssueTargetOrderById(OJV,QW[A7],OHV)
call UnitShareVision(OHV,DW[A7],false)
else
call IssueTargetOrderById(OJV,QW[A7],OHV)
endif
if(CW[A7]>=QN)then
set XY=TimerGetElapsed(SW)+CW[A7]
set EY=YW
set YW=YW+1
loop
exitwhen(EY==0)
set VY=(EY-1)/ 2
exitwhen(WW[VY]<=XY)
set UW[EY]=UW[VY]
set WW[EY]=WW[VY]
set EY=VY
endloop
set WW[EY]=XY
set UW[EY]=OJV
call SetUnitUserData(OJV,NW[A7])
call TimerStart(TW,WW[0]-TimerGetElapsed(SW),false,function OFV)
else
call SetUnitUserData(OJV,0)
call SetUnitFlyHeight(OJV,0,0)
call UnitRemoveAbility(OJV,NW[A7])
endif
if(KW[A7])then
call G7(A7)
endif
endfunction
function OMV takes nothing returns boolean
local unit u=GetFilterUnit()
if IsUnitInRangeXY(u,RY,IY,AY)then
call OGV(NY,u)
endif
set u=null
return false
endfunction
function OQV takes nothing returns boolean
local unit u=GetTriggerUnit()
if(GetUnitUserData(u)!=0)then
call PauseUnit(u,true)
endif
set u=null
return true
endfunction
function OSV takes nothing returns nothing
local integer i=PN+1
local unit u
set BY=Condition(function OMV)
set OY=CreateGroup()
set ZW=CreateTrigger()
loop
exitwhen(i==0)
set u=CreateUnit(Player(15),'n00O',0,0,0)
call TriggerRegisterUnitEvent(ZW,u,EVENT_UNIT_SPELL_ENDCAST)
call UnitAddAbility(u,'Aloc')
call UnitAddAbility(u,'Amrf')
call UnitRemoveAbility(u,'Amrf')
set LW[MW]=u
set MW=MW+1
set i=i-1
endloop
call TriggerAddCondition(ZW,Condition(function OQV))
set MW=MW-1
set PW=LW[MW]
set TW=CreateTimer()
set SW=CreateTimer()
call TimerStart(SW,12*60*60,false,null)
endfunction
function OTV takes nothing returns nothing
call OSV()
endfunction
function s__xedamage_isInUse takes nothing returns boolean
return(TZ>0)
endfunction
function OUV takes unit u,attacktype a,damagetype d returns real
local real hp=GetWidgetLife(u)
local real OWV=GetUnitState(u,UNIT_STATE_MANA)
local real r
call SetUnitX(SN,GetUnitX(u))
call SetUnitY(SN,GetUnitY(u))
call SetUnitOwner(SN,GetOwningPlayer(u),false)
set r=hp
if(hp<1)then
call SetWidgetLife(u,1)
set r=1
endif
call UnitDamageTarget(SN,u,.01,false,false,a,d,null)
call SetUnitOwner(SN,Player(15),false)
if(OWV>GetUnitState(u,UNIT_STATE_MANA))then
call SetUnitState(u,UNIT_STATE_MANA,OWV)
set r=1
else
set r=(r-GetWidgetLife(u))*100
endif
call SetWidgetLife(u,hp)
return r
endfunction
function OYV takes integer A7,unit Y5,unit OHV,boolean OZV returns real
local player p=GetOwningPlayer(Y5)
local boolean O_V=IsUnitAlly(OHV,p)
local boolean O0V=IsUnitEnemy(OHV,p)
local boolean O1V=O_V
local real f
local real O2V=1.
local integer i
if(HY[A7]!=KY[A7])then
set O1V=O_V and not(GetPlayerAlliance(GetOwningPlayer(OHV),p,ALLIANCE_HELP_REQUEST))
set O_V=O_V and not(O1V)
endif
if(not HY[A7])and O_V then
return .0
elseif(not JY[A7])and O0V then
return .0
elseif((not GY[A7])and(Y5==OHV))then
return .0
elseif(not KY[A7])and O1V then
return .0
elseif(EZ[A7]and IsUnitType(OHV,XZ[A7]))then
return .0
elseif(MY[A7]and not IsUnitVisible(OHV,p))then
return .0
elseif(PY[A7]and not IsUnitType(OHV,UNIT_TYPE_DEAD))then
return .0
elseif(not(QY[A7])and IsUnitType(OHV,UNIT_TYPE_DEAD))then
return .0
endif
set f=1.
if(IsUnitAlly(OHV,p))then
set f=f*VZ[A7]
if(f<=-.000000001)then
set f=-f
set O2V=-1.
endif
endif
if(OZ[A7]and not IsUnitType(OHV,RZ[A7]))then
return .0
endif
set i=CZ[A7]-1
loop
exitwhen(i<0)
if(IsUnitType(OHV,IZ[AZ[A7]+i]))then
set f=f*NZ[BZ[A7]+i]
if(f<=-.000000001)then
set f=-f
set O2V=-1.
endif
endif
set i=i-1
endloop
set i=JZ[A7]-1
loop
exitwhen(i<0)
if(GetUnitAbilityLevel(OHV,DZ[FZ[A7]+i])>0)then
set f=f*GZ[HZ[A7]+i]
if(f<=-.000000001)then
set f=-f
set O2V=-1.
endif
endif
set i=i-1
endloop
set f=f*O2V
if(f<=.000000001)and(f>=-.000000001)then
return .0
endif
if(ZY[A7]or not OZV)then
return f
endif
set f=f*OUV(OHV,UY[A7],TY[A7])
if(f<=.000000001)and(f>=-.000000001)then
return .0
endif
return f
endfunction
function O3V takes nothing returns boolean
local unit OHV=GetFilterUnit()
local integer A7=UZ
local real f
if(not IsUnitInRangeXY(OHV,ZZ[A7],V0[A7],E0[A7]))then
set OHV=null
return false
endif
set f=OYV(A7,YZ[A7],OHV,false)
if(f!=.0)then
set WZ[A7]=WZ[A7]+1
call UnitDamageTarget(YZ[A7],OHV,f*X0[A7],true,LY[A7],UY[A7],TY[A7],WY[A7])
if(KZ[A7])then
call DestroyEffect(AddSpecialEffectTarget(LZ[A7],OHV,MZ[A7]))
endif
endif
set UZ=A7
set OHV=null
return false
endfunction
function O4V takes nothing returns boolean
local destructable OHV=GetFilterDestructable()
local integer A7=UZ
local real dx=ZZ[A7]-GetDestructableX(OHV)
local real dy=V0[A7]-GetDestructableY(OHV)
if(dx*dx+dy*dy>=E0[A7]+.000000001)then
set OHV=null
return false
endif
set WZ[A7]=WZ[A7]+1
if(KZ[A7])then
call DestroyEffect(AddSpecialEffectTarget(LZ[A7],OHV,MZ[A7]))
endif
call UnitDamageTarget(YZ[A7],OHV,X0[A7],true,LY[A7],UY[A7],TY[A7],WY[A7])
set UZ=A7
set OHV=null
return false
endfunction
function O8V takes nothing returns nothing
set A0=Rect(0,0,0,0)
set O0=Condition(function O3V)
set R0=Condition(function O4V)
set I0=CreateGroup()
endfunction
function O9V takes nothing returns nothing
set SN=CreateUnit(Player(15),'n00O',.0,.0,.0)
call UnitAddAbility(SN,'Aloc')
call O8V()
endfunction
function RVV takes nothing returns nothing
call RemoveUnit(N0[D0])
set N0[D0]=null
set D0=((D0)+1)
if(D0==C0)then
set D0=0
set C0=0
else
call TimerStart(TN,B0[D0]-TimerGetElapsed(UN),false,function RVV)
endif
endfunction
function REV takes nothing returns nothing
set TN=CreateTimer()
set UN=CreateTimer()
call TimerStart(UN,43200,true,null)
endfunction
function RXV takes real x,real y,real ROV returns integer
local integer A7=S7()
set K0[A7]=CreateUnit(Player(15),'n00O',x,y,ROV*bj_RADTODEG)
call UnitAddAbility(K0[A7],'Amrf')
call UnitAddAbility(K0[A7],'Aloc')
call UnitRemoveAbility(K0[A7],'Amrf')
call SetUnitX(K0[A7],x)
call SetUnitY(K0[A7],y)
return A7
endfunction
function RRV takes integer A7,real RIV returns nothing
call SetUnitScale(K0[A7],RIV,RIV,RIV)
endfunction
function RNV takes integer A7,string RBV returns nothing
if(L0[A7]!=null)then
call DestroyEffect(L0[A7])
endif
if(RBV=="")then
set L0[A7]=null
else
set L0[A7]=AddSpecialEffectTarget(RBV,K0[A7],"origin")
endif
endfunction
function RCV takes integer A7 returns nothing
if(U0[A7]!=0)then
call UnitRemoveAbility(K0[A7],U0[A7])
endif
if(L0[A7]!=null)then
call DestroyEffect(L0[A7])
set L0[A7]=null
endif
if(C0==8190)then
call TimerStart(TN,0,false,function RVV)
call ExplodeUnitBJ(K0[A7])
else
set N0[C0]=K0[A7]
set B0[C0]=TimerGetElapsed(UN)+4.
set C0=((C0)+1)
if(C0==1)then
call TimerStart(TN,4.,false,function RVV)
endif
call SetUnitOwner(K0[A7],Player(15),false)
endif
set K0[A7]=null
endfunction
function RDV takes integer A7 returns nothing
if A7==null then
return
elseif(H0[A7]!=-1)then
return
endif
call RCV(A7)
set H0[A7]=F0
set F0=A7
endfunction
function RFV takes nothing returns nothing
call RemoveUnit(WN)
set WN=null
call DestroyTimer(GetExpiredTimer())
endfunction
function RGV takes nothing returns nothing
set WN=CreateUnit(Player(15),'n00O',0,0,0)
call TimerStart(CreateTimer(),.0,false,function RFV)
endfunction
function RHV takes integer A7,real RJV returns nothing
set N1[A7]=RJV/ A1[A7]
endfunction
function RKV takes integer A7,real s returns nothing
local integer j=0
loop
exitwhen j==Q1[A7]
call RRV(B1[C1[A7]+j],s)
set j=j+1
endloop
endfunction
function RLV takes nothing returns nothing
local integer i=0
local integer c=0
local integer j
local real RMV
local real RPV
local real RQV
local integer A7
loop
exitwhen i==V2
set A7=Z1[i]
set I1[A7]=I1[A7]+.025
if(P1[A7]==false)then
call Q7(A7)
else
set j=0
if(I1[A7]>N1[A7])then
set P1[A7]=false
else
set RQV=K1[A7]
set S1=A7
call GroupEnumUnitsInRange(Y1,L1[A7],M1[A7],I1[A7]*A1[A7]+R1[A7]+197.,U1)
if((O1[V1[A7]]!=null)and P1[A7])then
call P7(A7)
endif
set RPV=.025*A1[A7]
set RQV=(K1[A7]-RQV)/(.025*bj_PI)
loop
exitwhen j==Q1[A7]
set RMV=j*VB/ Q1[A7]+K1[A7]
call SetUnitX(K0[(B1[C1[A7]+j])],((L1[A7]+A1[A7]*I1[A7]*Cos(RMV))*1.))
call SetUnitY(K0[(B1[C1[A7]+j])],((M1[A7]+A1[A7]*I1[A7]*Sin(RMV))*1.))
call SetUnitFacing(K0[(B1[C1[A7]+j])],((RMV+RQV)*1.)*bj_RADTODEG)
set j=j+1
endloop
endif
set Z1[c]=A7
set c=c+1
endif
set i=i+1
endloop
set V2=c
if(c==0)then
call PauseTimer(W1)
endif
endfunction
function RSV takes nothing returns boolean
local integer A7=S1
local unit u=GetFilterUnit()
if GetUnitTypeId(u)!='n00O' and GetWidgetLife(u)>.0 then
if IsUnitInRangeXY(u,L1[A7],M1[A7],R1[A7]+I1[A7]*A1[A7])and IsUnitInGroup(u,J1[A7])==false then
call GroupAddUnit(J1[A7],u)
call M7(A7,u)
endif
endif
set u=null
return false
endfunction
function RTV takes nothing returns nothing
set Y1=CreateGroup()
set W1=CreateTimer()
set U1=Condition(function RSV)
set T1=function RLV
endfunction
function RUV takes nothing returns nothing
local integer i=0
local integer j=0
local integer c=0
local integer A7
local real d
local real ns
local real wa
local real RWV
local real RYV
local unit u
loop
exitwhen(i==P2)
set A7=Q2[i]
set C2[A7]=C2[A7]-.025
if(T2[A7]or(C2[A7]<=.0))then
call L7(A7)
else
set ns=J2[A7]*.025
if(ns!=.0)then
if(Y2[A7]==1)then
set u=Z2[A7]
if(GetUnitTypeId(u)==0)then
set Y2[A7]=2
else
set V3[A7]=GetUnitX(u)
set E3[A7]=GetUnitY(u)
endif
set u=null
endif
if(Y2[A7]!=0)then
if(ns<=0)then
set ns=-ns
endif
set wa=Atan2(E3[A7]-(GetUnitY(K0[(B2[A7])])),V3[A7]-(GetUnitX(K0[(B2[A7])])))
set RWV=wa-W2[A7]
set RYV=(6.28318+wa)-W2[A7]
if(RWV<=0)then
if(RYV<=0)then
if(RYV>=RWV)then
set RWV=RYV
endif
else
if(-RWV>=RYV)then
set RWV=RYV
endif
endif
else
if(RYV<=0)then
if(-RYV<=RWV)then
set RWV=RYV
endif
else
if(RYV<=RWV)then
set RWV=RYV
endif
endif
endif
if(RWV<=0)then
if(-RWV>=ns)then
set ns=-ns
else
set ns=RWV
endif
else
if(RWV<=ns)then
set ns=RWV
endif
endif
endif
set d=W2[A7]
set d=d+ns
if(d>=6.28318)then
set d=d-6.28318
elseif(d<0)then
set d=d+6.28318
endif
set W2[A7]=d
call SetUnitFacing(K0[(B2[A7])],((d)*1.)*bj_RADTODEG)
endif
set X3=A7
set ns=D2[A7]+F2[A7]*.025
if(ns<H2[A7])then
set ns=H2[A7]
elseif(ns>G2[A7])then
set ns=G2[A7]
endif
set d=((D2[A7]+ns)/ 2)*.025
set D2[A7]=ns
set O3=(GetUnitX(K0[(B2[A7])]))+d*Cos(W2[A7])
set R3=(GetUnitY(K0[(B2[A7])]))+d*Sin(W2[A7])
call SetUnitX(K0[(B2[A7])],((O3)*1.))
call SetUnitY(K0[(B2[A7])],((R3)*1.))
set B3=0
call GroupEnumUnitsInRange(I3,O3,R3,U2[A7]+197.,A3)
call GroupClear(L2[A7])
set j=0
loop
exitwhen(j==B3)
call GroupAddUnit(L2[A7],N3[j])
set j=j+1
endloop
set Q2[c]=A7
set c=c+1
if((N2[R2[A7]]!=null)and not T2[A7])then
call K7(A7)
endif
endif
set i=i+1
endloop
set P2=c
if(c==0)then
call PauseTimer(M2)
endif
endfunction
function RZV takes nothing returns boolean
local integer A7=X3
local unit u=GetFilterUnit()
if not(T2[A7])and(GetUnitTypeId(u)!='n00O')and IsUnitInRangeXY(u,O3,R3,U2[A7])then
set N3[B3]=u
set B3=B3+1
if not IsUnitInGroup(u,L2[A7])then
call H7(A7,u)
endif
endif
set u=null
return false
endfunction
function R_V takes nothing returns nothing
set I3=CreateGroup()
set A3=Condition(function RZV)
set S2=(function RUV)
set M2=CreateTimer()
endfunction
function R0V takes nothing returns nothing
call R_V()
endfunction
function R1V takes nothing returns nothing
local player p=Player(11)
local unit u
local integer unitID
local trigger t
local real life
set OU=CreateUnit(p,'hprt',-266.6,-1017.2,270.)
endfunction
function R2V takes nothing returns nothing
local player p=Player(12)
local unit u
local integer unitID
local trigger t
local real life
set CU=CreateUnit(p,'H038',826.8,-2367.6,341.12)
endfunction
function R3V takes nothing returns nothing
local player p=Player(15)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'n00N',8064.,2688.,270.)
call WaygateSetDestination(u,GetRectCenterX(IF),GetRectCenterY(IF))
call WaygateActivate(u,true)
set u=CreateUnit(p,'n002',320.,448.,270.)
set u=CreateUnit(p,'n005',768.,384.,270.)
set IU=CreateUnit(p,'n00E',-512.,512.,270.)
set AU=CreateUnit(p,'n00I',.0,512.,270.)
set u=CreateUnit(p,'n00H',832.,64.,270.)
set u=CreateUnit(p,'n007',448.,448.,270.)
set NU=CreateUnit(p,'n000',-256.,512.,270.)
set u=CreateUnit(p,'n00B',832.,-64.,270.)
set u=CreateUnit(p,'n00N',7936.,-5888.,270.)
call WaygateSetDestination(u,GetRectCenterX(EF),GetRectCenterY(EF))
call WaygateActivate(u,true)
set u=CreateUnit(p,'n00N',-4864.,-5632.,270.)
call WaygateSetDestination(u,GetRectCenterX(XF),GetRectCenterY(XF))
call WaygateActivate(u,true)
set u=CreateUnit(p,'n00N',-3072.,4224.,270.)
call WaygateSetDestination(u,GetRectCenterX(AF),GetRectCenterY(AF))
call WaygateActivate(u,true)
set u=CreateUnit(p,'h03C',2624.,3648.,270.)
set u=CreateUnit(p,'n00T',192.,448.,270.)
endfunction
function R4V takes nothing returns nothing
local player p=Player(15)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'u005',-524.9,-1284.7,59.031)
set u=CreateUnit(p,'u005',-707.2,-976.7,.0)
set u=CreateUnit(p,'u005',-601.2,-699.2,310.)
set u=CreateUnit(p,'u005',-280.2,-651.,270.)
set u=CreateUnit(p,'u005',131.7,-770.,220.)
set u=CreateUnit(p,'u005',147.4,-1123.2,160.)
set u=CreateUnit(p,'u005',-151.,-1321.4,110.)
set u=CreateUnit(p,'h032',741.3,-2114.,257.102)
set u=CreateUnit(p,'h034',644.3,-2337.3,329.699)
set u=CreateUnit(p,'h035',463.1,-2523.7,60.591)
set u=CreateUnit(p,'h036',732.6,-2475.2,278.973)
set u=CreateUnit(p,'h033',484.4,-2374.3,335.712)
set u=CreateUnit(p,'H01L',2865.6,3850.3,87.52)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'H03A',2934.2,3856.8,60.383)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'U00G',2805.2,3812.8,222.337)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'U008',2895.4,3917.2,285.686)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'U007',2805.7,3905.4,357.012)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'U00B',3013.8,3837.2,59.009)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'U00D',3006.3,3957.2,185.499)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'E001',2891.,3989.,351.617)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'E002',2761.3,3966.3,149.045)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'E000',2759.3,3762.7,27.082)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'E004',2855.3,3687.2,154.308)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'h00Q',3024.2,3732.2,143.706)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'h01M',590.5,-2516.6,249.98)
set u=CreateUnit(p,'h03E',607.,-2180.2,297.77)
set u=CreateUnit(p,'n00U',-4604.2,6105.4,136.762)
set u=CreateUnit(p,'n00W',-4651.,5935.1,244.574)
set u=CreateUnit(p,'n00V',-4743.8,6085.,113.)
set u=CreateUnit(p,'n00X',-4594.9,5980.9,303.067)
set u=CreateUnit(p,'n00Z',-4579.3,6036.4,208.67)
set u=CreateUnit(p,'n010',-4755.8,6012.3,182.467)
set u=CreateUnit(p,'n011',-4675.5,6122.6,203.056)
set u=CreateUnit(p,'n012',-4728.5,5946.6,210.526)
set u=CreateUnit(p,'n013',-4664.2,6025.,348.31)
endfunction
function R5V takes nothing returns nothing
local player p
local unit u
local integer unitID
local trigger t
local real life
set p=Player(10)
set u=CreateUnit(p,'vSel',-1728.,320.,270.)
set RU=CreateUnit(p,'vPt2',-1536.,384.,270.)
call SetUnitColor(RU,ConvertPlayerColor(12))
set p=Player(11)
set BU=CreateUnit(p,'vPt2',-1536.,128.,270.)
call SetUnitColor(BU,ConvertPlayerColor(12))
set u=CreateUnit(p,'vSel',-1728.,192.,270.)
endfunction
function CreatePlayerUnits takes nothing returns nothing
local player p
local unit u
local integer unitID
local trigger t
local real life
set p=Player(11)
set OU=CreateUnit(p,'hprt',-266.6,-1017.2,270.)
endfunction
function R6V takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)
endfunction
function R7V takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(R6V())then
set AD[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]="Human"
else
set AD[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]="Not in Game"
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set UC=bj_FORCE_ALL_PLAYERS
set WB[1]=1 //GIAD
set WB[2]=1
set WB[3]=1
set WB[4]=1
set WB[5]=1
set WB[6]=1
set WB[7]=1
set WB[8]=1
set WB[9]=1
set WB[10]=1
set BB[1]='U008'
set BB[2]='U007'
set BB[3]='U00B'
set BB[4]='U00D'
set BB[5]='U00O'
set BB[6]='U00N'
set KD=GetRectCenter(LJ)
call SetUnitAnimation(NU,"Stand Work")
set NB=GetRectCenter(SD)
set QB=GetRectCenter(YD)
set DB=GetRandomLocInRect(TD)
set ZB=GetRectCenter(VF)
call FogEnableOff()
call FogMaskEnableOff()
call FogEnableOn()
endfunction
function R9V takes nothing returns nothing
call ResetTerrainFog()
endfunction
function IEV takes nothing returns nothing
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Player(0))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Player(1))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Player(2))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Player(3))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Player(4))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Player(5))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Player(6))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Player(7))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Player(8))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Player(9))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Player(10))
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,Player(11))
endfunction
function IOV takes nothing returns nothing
call AdjustPlayerStateBJ(50,Player(0),PLAYER_STATE_RESOURCE_LUMBER)
call AdjustPlayerStateBJ(50,Player(1),PLAYER_STATE_RESOURCE_LUMBER)
call AdjustPlayerStateBJ(50,Player(2),PLAYER_STATE_RESOURCE_LUMBER)
call AdjustPlayerStateBJ(50,Player(3),PLAYER_STATE_RESOURCE_LUMBER)
call AdjustPlayerStateBJ(50,Player(4),PLAYER_STATE_RESOURCE_LUMBER)
call AdjustPlayerStateBJ(50,Player(5),PLAYER_STATE_RESOURCE_LUMBER)
call AdjustPlayerStateBJ(50,Player(6),PLAYER_STATE_RESOURCE_LUMBER)
call AdjustPlayerStateBJ(50,Player(7),PLAYER_STATE_RESOURCE_LUMBER)
call AdjustPlayerStateBJ(50,Player(8),PLAYER_STATE_RESOURCE_LUMBER)
call AdjustPlayerStateBJ(50,Player(9),PLAYER_STATE_RESOURCE_LUMBER)
endfunction
function IIV takes nothing returns nothing
call AdjustPlayerStateBJ(50,GetEnumPlayer(),PLAYER_STATE_RESOURCE_LUMBER)
endfunction
function IAV takes nothing returns nothing
call ForForce(XB,function IIV)
endfunction
function IBV takes nothing returns boolean
return(GetUnitTypeId(GetConstructingStructure())=='u001')
endfunction
function ICV takes nothing returns nothing
call SetUnitVertexColorBJ(GetConstructingStructure(),100,.0,.0,40.)
endfunction
function IFV takes nothing returns nothing
call PanCameraToTimedLocForPlayer(Player(0),DB,0)
call PanCameraToTimedLocForPlayer(Player(1),DB,0)
call PanCameraToTimedLocForPlayer(Player(2),DB,0)
call PanCameraToTimedLocForPlayer(Player(3),DB,0)
call PanCameraToTimedLocForPlayer(Player(4),DB,0)
call PanCameraToTimedLocForPlayer(Player(5),DB,0)
call PanCameraToTimedLocForPlayer(Player(6),DB,0)
call PanCameraToTimedLocForPlayer(Player(7),DB,0)
call PanCameraToTimedLocForPlayer(Player(8),DB,0)
call PanCameraToTimedLocForPlayer(Player(9),DB,0)
endfunction
function newquest takes nothing returns nothing
set mainquest=CreateQuest()
call QuestSetTitle(mainquest,"Creator")
call QuestSetDescription(mainquest,"
about the newer versions
Because changing the loading screen text is a hell of a job
I will update changelogs under here
as well as my blog
the changelog here may not be complete so feel free to visit my site for full changelog
best regards")
call QuestSetIconPath(mainquest,"MarisaKirisamestar.blp")
endfunction
function IHV takes nothing returns nothing
call CreateQuestBJ(2,"Changelogs","
this version
added -no music
added -music
Full Custom UserInterface with new scroll cursor in Quests
with new Button edges
with new Leaderboard look
Added full custom paths for optimum UI customization and better loading time
Added DragonZ.Black to the ban list because he exploit pretty much all the bugs and refuse to submit his assignments
fixed WorldBound to prevent pudge over boundaries hook 
disable share unit control (antibug) 

Changelog v1.01b
added Treat you better - shawn mendes 
added WorldBounds system to prevent pudge (bringing pudge back if bug is fixed)
fixed all sound leaks
disabled creepcamp toggles and ally toggle
improved blacklisted systems with handle leak effect
more to come!


Vampirism Speed was originally based off Vampirism Fire.
DumbAssking Converted Vampirism Fire into Vampirism Speed
SaMmM continued Vampirism Speed after DumbAssking left
CuteCuterCutest Continued Vampirism Speed after SaMmM left 2013-2016

Updates will be in Changelogs and in the website","ReplaceableTextures\\CommandButtons\\BTNBattleShip.blp")
call CreateQuestBJ(2,"Website","Please support www.vampirism-speed.blogspot.com
Changelogs & Mods","ReplaceableTextures\\CommandButtons\\BTNBox.blp")
call CreateQuestBJ(2,"Commands","Try these out!

Setname commands:
-setname [insert name here]
-return
Only player red can use the return command, it return all players name to the default.

Weather commands, only for player red
-weather rain
-weather snow
-weather off

Giving resources to teammate
-givegold [playercolor] [amount]
-givewood [playercolor] [amount]

Kicking commands
-kick [PlayerCOLOR]
or
-boot [PlayerCOLOR]","ReplaceableTextures\\CommandButtons\\BTNBasicStruct.blp")
endfunction
function IKV takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function ILV takes nothing returns nothing
set IC=B6(OF)
call ForGroupBJ(IC,function IKV)
call DestroyGroup(IC)
endfunction
function IPV takes string s returns integer
local string IQV=StringCase(s,false)
local integer ISV=100
if IQV=="red" then
set ISV=0
elseif IQV=="blue" then
set ISV=1
elseif IQV=="teal" then
set ISV=2
elseif IQV=="purple" then
set ISV=3
elseif IQV=="yellow" then
set ISV=4
elseif IQV=="orange" then
set ISV=5
elseif IQV=="green" then
set ISV=6
elseif IQV=="pink" then
set ISV=7
elseif IQV=="grey" or IQV=="gray" then
set ISV=8
elseif IQV=="lb" or IQV=="lightblue" then
set ISV=9
elseif IQV=="dg" or IQV=="darkgreen" then
set ISV=10
elseif IQV=="brown" then
set ISV=11
endif
return ISV
endfunction
function ITV takes unit IUV,unit N6 returns boolean
return GetUnitFlyHeight(N6)<40. and GetUnitAbilityLevel(N6,'Aloc')<1
endfunction
function IWV takes integer A7 returns nothing
set G3[A7]=0
set H3[A7]=0
set J3[A7]=0
if K3[A7]!=null then
call RemoveUnit(K3[A7])
set K3[A7]=null
endif
endfunction
function IYV takes integer A7 returns nothing
if A7==null then
return
elseif(F3[A7]!=-1)then
return
endif
call IWV(A7)
set F3[A7]=C3
set C3=A7
endfunction
function IZV takes integer A7 returns integer
local integer I_V=D7()
if U3[A7]==0 then
set Q3[A7]=I_V
elseif U3[A7]==1 then
set H3[I_V]=Q3[A7]
set G3[Q3[A7]]=I_V
elseif U3[A7]>1 then
set H3[I_V]=S3[A7]
set G3[S3[A7]]=I_V
endif
set S3[A7]=I_V
set T3[A7]=I_V
set U3[A7]=U3[A7]+1
return I_V
endfunction
function I0V takes integer A7,integer I_V returns nothing
local integer L8=H3[I_V]
if G3[I_V]!=0 and H3[I_V]!=0 then
set G3[H3[I_V]]=G3[I_V]
set H3[G3[I_V]]=H3[I_V]
endif
if Q3[A7]==I_V then
set Q3[A7]=G3[I_V]
endif
if S3[A7]==I_V then
set S3[A7]=H3[I_V]
endif
call RemoveUnit(K3[I_V])
set K3[I_V]=null
set U3[A7]=U3[A7]-1
set J3[I_V]=L8
endfunction
function I1V takes integer A7 returns nothing
local integer I2V=T3[A7]
local integer I3V=0
loop
exitwhen I2V==0
set I3V=J3[I2V]
call IYV(I2V)
set I2V=I3V
endloop
endfunction
function I4V takes integer A7 returns nothing
if A7==null then
return
elseif(P3[A7]!=-1)then
return
endif
call I1V(A7)
set P3[A7]=L3
set L3=A7
endfunction
function I5V takes real x returns real
if x<Y4 then
set x=Y4
elseif x>U4 then
set x=U4
endif
return x
endfunction
function I6V takes real y returns real
if y<Z4 then
set y=Z4
elseif y>W4 then
set y=W4
endif
return y
endfunction
function I7V takes unit u returns boolean
local integer A7=C4[(0)]
loop
exitwhen A7==0
if E4[A7]==u then
return true
endif
set A7=C4[A7]
endloop
return false
endfunction
function I8V takes unit u returns boolean
local integer A7=C4[(0)]
loop
exitwhen A7==0
if K4[A7]and V4[A7]==u then
return true
endif
set A7=C4[A7]
endloop
return false
endfunction
function I9V takes real x,real y returns nothing
local texttag tt=CreateTextTag()
call SetTextTagPos(tt,x,y,.0)
call SetTextTagPermanent(tt,false)
call SetTextTagText(tt,"|c00ff0000"+""+"|r",.023)
call SetTextTagVelocity(tt,Cos(1.57079)*.0355,Sin(1.57079)*.0355)
call SetTextTagLifespan(tt,3.)
call SetTextTagFadepoint(tt,1.5)
set tt=null
endfunction
function AVV takes nothing returns boolean
return(GetWidgetLife(GetFilterUnit())>.406 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function AEV takes nothing returns boolean
return(GetWidgetLife(GetFilterUnit())>.406 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))!=null
endfunction
function AXV takes unit IUV,unit N6 returns boolean
return IUV!=N6 and GetUnitTypeId(N6)!='h03L' and GetUnitTypeId(N6)!='h03M'
endfunction
function AOV takes integer A7 returns nothing
call I4V(G4[A7])
if E4[A7]!=null then
call SetUnitX(E4[A7],GetUnitX(V4[A7])+75.*Cos(GetUnitFacing(V4[A7])*bj_DEGTORAD))
call SetUnitY(E4[A7],GetUnitY(V4[A7])+75.*Sin(GetUnitFacing(V4[A7])*bj_DEGTORAD))
endif
if K4[A7]then
call SetUnitPathing(V4[A7],true)
endif
set V4[A7]=null
set E4[A7]=null
set X4[A7]=null
set H4[A7]=true
set J4[A7]=false
set K4[A7]=false
endfunction
function ARV takes integer A7 returns nothing
if A7==null then
return
elseif(Z3[A7]!=-1)then
return
endif
call AOV(A7)
set Z3[A7]=W3
set W3=A7
endfunction
function AIV takes integer A7,real AAV,real ANV returns boolean
local real ABV=R4[A7]*bj_RADTODEG
local real ACV=ModuloReal(Atan2((GetUnitY(X4[A7])-ANV),(GetUnitX(X4[A7])-AAV))*bj_RADTODEG,360.)
local real ADV=RAbsBJ(ACV-ABV)
if ADV>=90. and ADV<=270. then
if(ACV>45. and ACV<135.)or(ACV>225. and ACV<315.)then
set R4[A7]=-ABV*bj_DEGTORAD
else
set R4[A7]=(180.-ABV)*bj_DEGTORAD
endif
set N4[A7]=Sin(R4[A7])
set A4[A7]=Cos(R4[A7])
return true
endif
return false
endfunction
function AFV takes nothing returns nothing
local destructable AGV=GetEnumDestructable()
if GetWidgetLife(AGV)<.406 then
call AIV(L4,GetWidgetX(AGV),GetWidgetY(AGV))
if false then
call KillDestructable(AGV)
else
call UnitDamageTarget(V4[L4],AGV,((.0+(100.*(F4[L4])))*.0),true,false,FU,GU,HU)
endif
endif
set AGV=null
endfunction
function AHV takes integer A7 returns nothing
local unit AJV=null
call GroupEnumUnitsInRange(P4,GetUnitX(X4[A7]),GetUnitY(X4[A7]),128.,S4)
loop
set AJV=FirstOfGroup(P4)
exitwhen AJV==null
call GroupRemoveUnit(P4,AJV)
if true then
exitwhen AIV(A7,GetUnitX(AJV),GetUnitY(AJV))
else
if false then
if K4[A7]==false then
if I8V(V4[A7])==false then
set J4[A7]=true
set K4[A7]=true
call SetUnitPathing(V4[A7],false)
call SetUnitTimeScale(X4[A7],.0)
else
set J4[A7]=true
endif
exitwhen true
endif
endif
endif
endloop
set AJV=null
endfunction
function AKV takes integer A7,unit OHV returns boolean
set E4[A7]=OHV
set J4[A7]=true
if IsUnitEnemy(E4[A7],O4[A7])then
call UnitDamageTarget(V4[A7],E4[A7],(.0+(100.*(F4[A7]))),true,false,FU,GU,HU)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",E4[A7],"origin"))
endif
call SetUnitTimeScale(X4[A7],.0)
return true
endfunction
function ALV takes integer A7 returns nothing
local real AMV=GetUnitX(X4[A7])
local real APV=GetUnitY(X4[A7])
local unit AJV=null
local sound AQV=null
call GroupEnumUnitsInRange(P4,AMV,APV,100.,T4)
loop
set AJV=FirstOfGroup(P4)
exitwhen AJV==null
call GroupRemoveUnit(P4,AJV)
if AXV(V4[A7],AJV)and ITV(V4[A7],AJV)then
if false then
if J4[A7]==false then
if I7V(AJV)then
set AQV=CreateSound("",false,false,false,10,10,"")
call StartSound(AQV)
call KillSoundWhenDone(AQV)
if false then
call I9V(GetUnitX(V4[A7]),GetUnitY(V4[A7]))
else
call I9V(AMV,APV)
endif
call UnitDamageTarget(V4[A7],AJV,1000000.,true,false,FU,GU,HU)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",AJV,"origin"))
set J4[A7]=true
else
exitwhen AKV(A7,AJV)
endif
endif
else
if J4[A7]==false and I7V(AJV)==false then
exitwhen AKV(A7,AJV)
endif
endif
endif
endloop
set AJV=null
set AQV=null
endfunction
function ASV takes integer A7 returns boolean
local integer I2V=0
local integer ATV=0
local boolean AUV=false
local unit AJV=null
local unit AWV=null
local real AYV=GetUnitX(V4[A7])
local real AZV=GetUnitY(V4[A7])
local real A_V=.0
local real A0V=.0
local real A1V=.0
local real A2V=.0
local real ACV=.0
local real Z5=.0
if U3[G4[A7]]==0 then
set AUV=true
else
set AJV=K3[S3[G4[A7]]]
set A_V=GetUnitX(AJV)
set A0V=GetUnitY(AJV)
set Z5=SquareRoot((A_V-AYV)*(A_V-AYV)+(A0V-AZV)*(A0V-AZV))
if Z5>B4[A7]then
loop
exitwhen Z5<=B4[A7]or ATV==DU
set ACV=Atan2((AZV-A0V),(AYV-A_V))
set A_V=A_V+B4[A7]*Cos(ACV)
set A0V=A0V+B4[A7]*Sin(ACV)
set I2V=IZV(G4[A7])
set K3[I2V]=CreateUnit(O4[A7],'h03L',A_V,A0V,(ACV*bj_RADTODEG)+180.)
call UnitAddAbility(K3[I2V],'Amrf')
call UnitRemoveAbility(K3[I2V],'Amrf')
call SetUnitFlyHeight(K3[I2V],75.,.0)
call SetUnitScale(K3[I2V],1.5,1.5,1.5)
set AJV=K3[I2V]
set A_V=GetUnitX(AJV)
set A0V=GetUnitY(AJV)
set Z5=Z5-B4[A7]
set ATV=ATV+1
endloop
endif
if K4[A7]then
set A_V=GetUnitX(K3[S3[G4[A7]]])
set A0V=GetUnitY(K3[S3[G4[A7]]])
set ACV=Atan2((A0V-AZV),(A_V-AYV))
call SetUnitPosition(V4[A7],AYV+B4[A7]*Cos(ACV),AZV+B4[A7]*Sin(ACV))
else
if E4[A7]!=null then
call SetUnitX(E4[A7],GetUnitX(X4[A7]))
call SetUnitY(E4[A7],GetUnitY(X4[A7]))
if false then
if GetWidgetLife(E4[A7])<.406 then
set E4[A7]=null
call SetUnitTimeScale(X4[A7],1.)
endif
endif
else
call ALV(A7)
endif
endif
set I2V=S3[G4[A7]]
loop
exitwhen I2V==0 or H3[H3[I2V]]==0
set AJV=K3[I2V]
set A_V=GetUnitX(AJV)
set A0V=GetUnitY(AJV)
set AWV=K3[H3[H3[I2V]]]
set A1V=GetUnitX(AWV)
set A2V=GetUnitY(AWV)
if IsUnitInRange(AJV,AWV,(B4[A7]*.75))then
call I0V(G4[A7],H3[I2V])
call SetUnitFacing(AJV,(Atan2((A2V-A0V),(A1V-A_V))*bj_RADTODEG)+180.)
endif
set I2V=H3[I2V]
endloop
set I2V=S3[G4[A7]]
loop
exitwhen I2V==0
set AJV=K3[I2V]
set A_V=GetUnitX(AJV)
set A0V=GetUnitY(AJV)
if AJV==K3[S3[G4[A7]]]then
set ACV=Atan2((AZV-A0V),(AYV-A_V))
else
set ACV=Atan2((GetUnitY(AWV)-A0V),(GetUnitX(AWV)-A_V))
endif
if I2V==S3[G4[A7]]and IsUnitInRange(AJV,V4[A7],B4[A7])then
call I0V(G4[A7],I2V)
endif
if K4[A7]==false then
call SetUnitX(AJV,A_V+B4[A7]*Cos(ACV))
call SetUnitY(AJV,A0V+B4[A7]*Sin(ACV))
endif
call SetUnitFacing(AJV,(ACV*bj_RADTODEG)+180.)
set AWV=AJV
set I2V=H3[I2V]
endloop
endif
set AJV=null
set AWV=null
return AUV
endfunction
function A3V takes integer A7 returns boolean
local integer I2V=0
local integer ATV=0
local boolean AUV=false
local unit AJV=null
local unit A4V=null
local real AYV=GetUnitX(V4[A7])
local real AZV=GetUnitY(V4[A7])
local real A1V=.0
local real A2V=.0
local real A_V=.0
local real A0V=.0
local real ACV=.0
local real Z5=.0
if I4[A7]>=(800.+(400.*(F4[A7])))or J4[A7]then
set H4[A7]=false
set AUV=true
else
set AJV=K3[S3[G4[A7]]]
set A_V=GetUnitX(AJV)
set A0V=GetUnitY(AJV)
set Z5=SquareRoot((A_V-AYV)*(A_V-AYV)+(A0V-AZV)*(A0V-AZV))
if Z5>B4[A7]then
loop
exitwhen Z5<=B4[A7]or ATV==DU
set ACV=Atan2((AZV-A0V),(AYV-A_V))
set A_V=A_V+B4[A7]*Cos(ACV)
set A0V=A0V+B4[A7]*Sin(ACV)
set I2V=IZV(G4[A7])
set K3[I2V]=CreateUnit(O4[A7],'h03L',A_V,A0V,(ACV*bj_RADTODEG)+180.)
call UnitAddAbility(K3[I2V],'Amrf')
call UnitRemoveAbility(K3[I2V],'Amrf')
call SetUnitFlyHeight(K3[I2V],75.,.0)
call SetUnitScale(K3[I2V],1.5,1.5,1.5)
set AJV=K3[I2V]
set A_V=GetUnitX(AJV)
set A0V=GetUnitY(AJV)
set Z5=Z5-B4[A7]
set ATV=ATV+1
endloop
endif
set I2V=Q3[G4[A7]]
loop
exitwhen I2V==0 or G3[G3[I2V]]==0
set AJV=K3[I2V]
set A_V=GetUnitX(AJV)
set A0V=GetUnitY(AJV)
set A4V=K3[G3[G3[I2V]]]
set A1V=GetUnitX(A4V)
set A2V=GetUnitY(A4V)
if IsUnitInRange(AJV,A4V,(B4[A7]*.75))then
call I0V(G4[A7],G3[I2V])
call SetUnitFacing(AJV,Atan2((A2V-A0V),(A1V-A_V))*bj_RADTODEG)
endif
set I2V=G3[I2V]
endloop
set I2V=Q3[G4[A7]]
loop
exitwhen I2V==0
set AJV=K3[I2V]
set A_V=GetUnitX(AJV)
set A0V=GetUnitY(AJV)
if AJV==X4[A7]then
set ACV=R4[A7]
else
set ACV=Atan2((GetUnitY(A4V)-A0V),(GetUnitX(A4V)-A_V))
endif
set A1V=A_V+B4[A7]*Cos(ACV)
set A2V=A0V+B4[A7]*Sin(ACV)
if AJV==X4[A7]then
if A1V!=I5V(A1V)then
if R4[A7]<.0 then
set R4[A7]=-1.57079+(-1.57079-R4[A7])
else
set R4[A7]=1.57079-(R4[A7]-1.57079)
endif
set A4[A7]=Cos(R4[A7])
set N4[A7]=Sin(R4[A7])
elseif A2V!=I6V(A2V)then
if R4[A7]<1.57079 then
set R4[A7]=.0-R4[A7]
else
set R4[A7]=-R4[A7]
endif
set A4[A7]=Cos(R4[A7])
set N4[A7]=Sin(R4[A7])
endif
call ALV(A7)
call AHV(A7)
if true then
set L4=A7
call SetRect(Q4,A1V-128.,A2V-128.,A1V+128.,A2V+128.)
call EnumDestructablesInRect(Q4,null,function AFV)
endif
endif
call SetUnitX(AJV,A1V)
call SetUnitY(AJV,A2V)
call SetUnitFacing(AJV,ACV*bj_RADTODEG)
set A4V=AJV
set I2V=G3[I2V]
endloop
set I4[A7]=I4[A7]+B4[A7]
endif
set AJV=null
set A4V=null
return AUV
endfunction
function A5V takes nothing returns nothing
local integer A7=C4[(0)]
loop
exitwhen A7==0
if U3[G4[A7]]==0 and H4[A7]==false then
set C4[D4[A7]]=C4[A7]
set D4[C4[A7]]=D4[A7]
call ARV(A7)
else
if H4[A7]then
call A3V(A7)
else
call ASV(A7)
endif
endif
set A7=C4[A7]
endloop
if C4[(0)]==0 then
call PauseTimer(M4)
endif
endfunction
function A6V takes nothing returns boolean
local integer A7=B7()
local location R6=GetSpellTargetLoc()
local real A7V=GetLocationX(R6)
local real A8V=GetLocationY(R6)
local real AYV=.0
local real AZV=.0
set V4[A7]=GetTriggerUnit()
set O4[A7]=GetOwningPlayer(V4[A7])
set AYV=GetUnitX(V4[A7])
set AZV=GetUnitY(V4[A7])
set R4[A7]=Atan2((A8V-AZV),(A7V-AYV))
set A4[A7]=Cos(R4[A7])
set N4[A7]=Sin(R4[A7])
set G4[A7]=C7()
set F4[A7]=GetUnitAbilityLevel(V4[A7],'A05Z')
set B4[A7]=(1000.+(.0*(F4[A7])))*.04
set X4[A7]=CreateUnit(O4[A7],'h03M',AYV+B4[A7]*A4[A7],AZV+B4[A7]*N4[A7],R4[A7]*bj_RADTODEG)
set K3[IZV(G4[A7])]=X4[A7]
call SetUnitTimeScale(X4[A7],1.)
call UnitAddAbility(X4[A7],'Amrf')
call UnitRemoveAbility(X4[A7],'Amrf')
call SetUnitFlyHeight(X4[A7],75.,.0)
call SetUnitScale(X4[A7],1.25,1.25,1.25)
call SetUnitAnimationByIndex(V4[A7],2)
if C4[(0)]==0 then
call TimerStart(M4,.04,true,function A5V)
endif
set D4[C4[(0)]]=A7
set C4[A7]=C4[(0)]
set C4[(0)]=A7
set D4[A7]=(0)
call RemoveLocation(R6)
set R6=null
return false
endfunction
function A9V takes nothing returns nothing
local sound AQV=CreateSound("",false,false,false,10,10,"")
call SetSoundVolume(AQV,0)
call StartSound(AQV)
call KillSoundWhenDone(AQV)
call PauseTimer(M4)
set AQV=null
endfunction
function NVV takes nothing returns nothing
local unit OJV=null
set M4=CreateTimer()
set P4=CreateGroup()
set Q4=Rect(.0,.0,1.,1.)
set T4=Filter(function AVV)
set S4=Filter(function AEV)
set U4=GetRectMaxX(bj_mapInitialPlayableArea)-64.
set W4=GetRectMaxY(bj_mapInitialPlayableArea)-64.
set Y4=GetRectMinX(bj_mapInitialPlayableArea)+64.
set Z4=GetRectMinY(bj_mapInitialPlayableArea)+64.
call TimerStart(M4,.0,false,function A9V)
call XZV(function A6V,'A05Z')
if true then
set OJV=CreateUnit(Player(15),'h03L',.0,.0,.0)
call UnitAddAbility(OJV,'Amrf')
call RemoveUnit(OJV)
set OJV=CreateUnit(Player(15),'h03M',.0,.0,.0)
call RemoveUnit(OJV)
set OJV=null
endif
endfunction
function NEV takes nothing returns boolean
return GetUnitTypeId(GetConstructedStructure())=='u00P'
endfunction
function NXV takes nothing returns nothing
call SetUnitUserData(GetConstructedStructure(),1)
endfunction
function NRV takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='H01L' or GetUnitTypeId(GetFilterUnit())=='H03A'
endfunction
function NIV takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='u00P' and GetUnitUserData(GetFilterUnit())==1
endfunction
function NAV takes nothing returns boolean
return IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()),JU)and GetUnitAbilityLevel(GetFilterUnit(),'ACm3')<1
endfunction
function NNV takes nothing returns nothing
call SetUnitManaBJ(GetEnumUnit(),.0)
endfunction
function NBV takes nothing returns nothing
local group g=CreateGroup()
local group g2=CreateGroup()
local unit u
local unit NCV
local real NDV=0
call GroupEnumUnitsInRect(g,bj_mapInitialPlayableArea,Condition(function NRV))
call ForGroup(g,function NNV)
call GroupClear(g)
call GroupEnumUnitsInRect(g,bj_mapInitialPlayableArea,Condition(function NIV))
if CountUnitsInGroup(g)>0 then
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
set JU=GetOwningPlayer(u)
call GroupEnumUnitsInRange(g2,GetUnitX(u),GetUnitY(u),1200.,Condition(function NAV))
loop
set NCV=FirstOfGroup(g2)
exitwhen NCV==null
call GroupRemoveUnit(g2,NCV)
set NDV=GetUnitState(NCV,UNIT_STATE_MAX_LIFE)/ 5
call UnitDamageTarget(u,NCV,NDV,false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_ENHANCED,null)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",GetUnitX(NCV),GetUnitY(NCV)))
endloop
call GroupClear(g2)
endloop
endif
set u=null
set NCV=null
call DestroyGroup(g)
call DestroyGroup(g2)
set g=null
set g2=null
endfunction
function NFV takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='h03K'
endfunction
function NGV takes nothing returns nothing
local unit u
local group g=CreateGroup()
local real x
local real y
local player p=GetEnumPlayer()
call GroupEnumUnitsOfPlayer(g,GetEnumPlayer(),Condition(function NFV))
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
set x=GetUnitX(u)
set y=GetUnitY(u)
if IsPointBlighted(x,y)then
call AdjustPlayerStateBJ(75,p,PLAYER_STATE_RESOURCE_GOLD)
else
call AdjustPlayerStateBJ(15,p,PLAYER_STATE_RESOURCE_GOLD)
endif
endloop
call DestroyGroup(g)
set g=null
set u=null
endfunction
function NHV takes nothing returns nothing
call ForForce(XB,function NGV)
endfunction
function NKV takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit())=='hCmd' or GetUnitTypeId(GetTriggerUnit())=='h00N'
endfunction
function NLV takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='hBgm' or GetUnitTypeId(GetFilterUnit())=='h019' or GetUnitTypeId(GetFilterUnit())=='h004' or GetUnitTypeId(GetFilterUnit())=='h00O' or GetUnitTypeId(GetFilterUnit())=='h00X'
endfunction
function NMV takes nothing returns nothing
call ShowUnit(GetEnumUnit(),false)
endfunction
function NPV takes nothing returns nothing
call ShowUnit(GetEnumUnit(),true)
endfunction
function NQV takes nothing returns nothing
local unit u=GetTriggerUnit()
local unit uloop
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local player p=GetOwningPlayer(u)
local integer id=GetUnitTypeId(u)
local group g=CreateGroup()
call RemoveUnit(u)
call GroupEnumUnitsInRange(g,x,y,500.,Condition(function NLV))
call ForGroup(g,function NMV)
set u=CreateUnit(p,id,x,y,bj_UNIT_FACING)
call ForGroup(g,function NPV)
set u=null
call DestroyGroup(g)
set g=null
endfunction
function NTV takes nothing returns boolean
return GetSpellAbilityId()=='A04K'
endfunction
function NUV takes unit u returns integer
local integer A7=E8(GetUnitX(u),GetUnitY(u),"Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",20)
set V5[A7]=u
return A7
endfunction
function NWV takes integer A7,unit J7 returns nothing
local unit OJV
if(IsPlayerEnemy(GetOwningPlayer(J7),GetOwningPlayer(V5[A7])))and GetUnitAbilityLevel(J7,'A05O')<1 and GetUnitTypeId(J7)!='hBgm' and GetUnitTypeId(J7)!='h019' and GetUnitTypeId(J7)!='h004' and GetUnitTypeId(J7)!='h00O' and GetUnitTypeId(J7)!='h00X' then
set OJV=CreateUnit(GetOwningPlayer(V5[A7]),'n00O',GetUnitX(J7),GetUnitY(J7),0)
call UnitApplyTimedLife(OJV,'BTLF',1)
call UnitAddAbility(OJV,'A04S')
call SetUnitAbilityLevel(OJV,'A04S',GetUnitAbilityLevel(V5[A7],'A04K'))
call IssueTargetOrder(OJV,"entanglingroots",J7)
if IsUnitType(J7,UNIT_TYPE_STRUCTURE)and GetUnitAbilityLevel(J7,'ACm3')<1 then
set OJV=CreateUnit(GetOwningPlayer(V5[A7]),'n015',GetUnitX(J7),GetUnitY(J7),0)
call UnitApplyTimedLife(OJV,'BTLF',20.)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",GetUnitX(J7),GetUnitY(J7)))
endif
endif
set OJV=null
endfunction
function NYV takes nothing returns nothing
local integer A7=NUV(GetTriggerUnit())
set A1[(A7)]=((250)*1.)
call RHV(A7,800)
call RKV(A7,1.5)
endfunction
function NZV takes nothing returns boolean
return IsPlayerInForce(GetOwningPlayer(GetDyingUnit()),XB)and IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),EB)and GetUnitAbilityLevel(GetDyingUnit(),'A05O')>0==false
endfunction
function N_V takes nothing returns nothing
set PD[GetPlayerId(GetOwningPlayer(GetDyingUnit()))+1]=X1V(GetUnitTypeId(GetDyingUnit()))+PD[GetPlayerId(GetOwningPlayer(GetDyingUnit()))+1]
call MultiboardSetItemValueBJ(QD,3,GetPlayerId(GetOwningPlayer(GetDyingUnit()))+2,I2S(PD[GetPlayerId(GetOwningPlayer(GetDyingUnit()))+1]))
endfunction
function N0V takes nothing returns nothing
local unit u=GetTriggerUnit()
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local integer ONV=GetItemTypeId(GetManipulatedItem())
local integer N1V=GetUnitTypeId(u)
local item i=GetManipulatedItem()
local real z = GetUnitFlyHeight(u)
if ONV=='I000' or ONV=='skul' then
if N1V=='H01L' or N1V=='H03A' then
call RemoveItem(i)
if ONV=='I000' then
call SetHeroLevelBJ(GetTriggerUnit(),(GetHeroLevel(GetTriggerUnit())+8),true)
else
call SetHeroLevelBJ(GetTriggerUnit(),(GetHeroLevel(GetTriggerUnit())+4),true)
endif
else
call RemoveItem(i)
call CreateItem(ONV,x,y)
endif
endif
if ONV=='I02T' or ONV=='I02U' and IsPlayerInForce(GetOwningPlayer(u),EB)==false then
call RemoveItem(i)
call CreateItem(ONV,x,y)
endif
if ONV=='I01U' and KU==0 and IsPlayerInForce(GetOwningPlayer(u),EB)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,15,"|cffff0000Vampires have Obtained Kitty Klaw!!! |r")
//call StopSoundBJ(bj_lastPlayedSound,false)
call SetSoundPosition(LK, x,y,z)
call PlaySoundBJ(LK)
call KillSoundWhenDone(LK)
set KU=1
endif
if ONV=='I00B' and LU==0 and IsPlayerInForce(GetOwningPlayer(u),EB)then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,15,"|cffff0000A Vampire has aquired the Sphere of Doom! Humans will surely perish now...|r")
//call StopSoundBJ(bj_lastPlayedSound,false)
call SetSoundPosition(KK, x,y,z)
call PlaySoundBJ(KK)
call KillSoundWhenDone(KK)
set LU=1
endif
if IsPlayerInForce(GetOwningPlayer(u),EB)then
call OEV(u)
endif
set u=null
set i=null
endfunction
function N2V takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer N3V='A05U'
local player p=GetOwningPlayer(u)
if GetUnitAbilityLevel(GetTriggerUnit(),N3V)>0 and GetHeroLevel(u)>75 and GetPlayerTechCountSimple('R00R',p)<1 then
call SetPlayerTechResearchedSwap('R00R',1,p)
endif
set u=null
endfunction
function N5V takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='h019' or GetUnitTypeId(GetFilterUnit())=='hBgm' or GetUnitTypeId(GetFilterUnit())=='h004' or GetUnitTypeId(GetFilterUnit())=='h00O'
endfunction
function N6V takes nothing returns nothing
local unit cs=GetSpellAbilityUnit()
local unit u
local integer N7V=GetSpellAbilityId()
local player p_cs=GetOwningPlayer(cs)
local real x
local real y
local group g=CreateGroup()
local integer O8=0
local real z 
if N7V=='A05Y' then
set x =GetUnitX(u)
set y =GetUnitY(u)
set z =GetUnitFlyHeight(u)
call SetSoundPosition(HK, x,y,z)
call PlaySoundBJ(HK)
call KillSoundWhenDone(HK)

endif
if N7V=='A065' then
set x=GetLocationX(GetSpellTargetLoc())
set y=GetLocationY(GetSpellTargetLoc())
call GroupEnumUnitsInRange(g,x,y,125.,Condition(function N5V))
loop
set O8=O8+1
set u=FirstOfGroup(g)
exitwhen O8>3
call GroupRemoveUnit(g,u)
call UnitDamageTarget(cs,u,1000000000.,false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_ENHANCED,null)
endloop
endif
set u=null
set cs=null
call DestroyGroup(g)
set g=null
endfunction
function N8V takes nothing returns nothing
if GetUnitTypeId(GetEnteringUnit())=='oCwg' then
call RemoveUnit(GetEnteringUnit())
call AdjustPlayerStateBJ(1,GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_GOLD)
call DisplayTimedTextToPlayer(GetOwningPlayer(GetTriggerUnit()),.0,.0,5.,"8000 lumber converted to 1 gold!")
endif
if GetUnitTypeId(GetEnteringUnit())=='u006' and IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),EB)==false then
call RemoveUnit(GetEnteringUnit())
call AdjustPlayerStateBJ(195,GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_GOLD)
call DisplayTimedTextToPlayer(GetOwningPlayer(GetTriggerUnit()),.0,.0,5.,"You can't purchase this unit! Gold has been refunded.")
endif
//remove pudge hook + add hp
//if GetUnitTypeId(GetEnteringUnit())=='u006' then
//call UnitRemoveAbility(GetEnteringUnit(),'A05Z')
//call UnitAddAbility(GetEnteringUnit(),'A04I')
//endif
if GetUnitTypeId(GetEnteringUnit())=='hCmd' and MU then
set MU=false
if(ModuloInteger(R2I(BC),60)<10)then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,GetPlayerName(GetOwningPlayer(GetEnteringUnit()))+"|r has constructed the "+GetUnitName(GetEnteringUnit())+" at "+I2S(R2I(BC)/ 60)+":0"+I2S(ModuloInteger(R2I(BC),60)))
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,GetPlayerName(GetOwningPlayer(GetEnteringUnit()))+"|r has constructed the "+GetUnitName(GetEnteringUnit())+" at "+I2S(R2I(BC)/ 60)+":"+I2S(ModuloInteger(R2I(BC),60)))
endif
endif
if GetUnitTypeId(GetEnteringUnit())=='h00N' and PU then
set PU=false
if(ModuloInteger(R2I(BC),60)<10)then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,GetPlayerName(GetOwningPlayer(GetEnteringUnit()))+"|r has constructed the "+GetUnitName(GetEnteringUnit())+" at "+I2S(R2I(BC)/ 60)+":0"+I2S(ModuloInteger(R2I(BC),60)))
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,GetPlayerName(GetOwningPlayer(GetEnteringUnit()))+"|r has constructed the "+GetUnitName(GetEnteringUnit())+" at "+I2S(R2I(BC)/ 60)+":"+I2S(ModuloInteger(R2I(BC),60)))
endif
endif
endfunction
function N9V takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='h03I' and GetWidgetLife(GetFilterUnit())>.405
endfunction
function BVV takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='h03J' and GetWidgetLife(GetFilterUnit())>.405
endfunction
function BEV takes nothing returns nothing
local unit u=GetDyingUnit()
local unit uk=GetKillingUnit()
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local real z = GetUnitFlyHeight(u)
local location R6=GetUnitLoc(u)
local integer id=GetUnitTypeId(u)
local player p=GetOwningPlayer(u)
local real spiritrodamount
local group g=CreateGroup()
if GetUnitTypeId(GetDyingUnit())=='h021' and IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),EB)then
call DisplayTimedTextToPlayer(GetOwningPlayer(GetKillingUnit()),.0,.0,3.,"That was a fake blood box!")
elseif GetUnitTypeId(GetDyingUnit())=='h03F' or GetUnitTypeId(GetDyingUnit())=='h03G' and IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),EB)then
call DisplayTimedTextToPlayer(GetOwningPlayer(GetKillingUnit()),.0,.0,3.,"That was a fake Human!")
call RemoveUnit(GetDyingUnit())
elseif GetUnitTypeId(GetDyingUnit())=='H03A' or GetUnitTypeId(GetDyingUnit())=='H01L' and IsPlayerInForce(GetOwningPlayer(GetDyingUnit()),XB)then
call SetSoundPosition(ZJ, x,y,z)
call PlaySoundBJ(ZJ)
call KillSoundWhenDone(ZJ)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetDyingUnit()))+"'s Slayer has been defeated"))
endif
if GetUnitAbilityLevel(u,'A05T')>0 and IsUnitIllusion(u)==false then
call SetSoundPosition(XK, x,y,z)
call PlaySoundBJ(XK)
call KillSoundWhenDone(XK)
call CreateItem('I000',x,y)
call TerrainDeformationRippleBJ(2.,false,R6,10.,500.,5000.,1,75.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" (Nosferatu) has been defeated."))
elseif GetUnitAbilityLevel(u,'A05U')>0 and IsUnitIllusion(u)==false then
call SetSoundPosition(XK, x,y,z)
call PlaySoundBJ(XK)
call KillSoundWhenDone(XK)
call CreateItem('skul',x,y)
call TerrainDeformationRippleBJ(2.,false,GetUnitLoc(GetDyingUnit()),10.,200.,64,1,75.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" (Vampire) has been defeated."))
endif
if id=='h03H' then
call GroupEnumUnitsOfPlayer(g,p,Condition(function N9V))
if CountUnitsInGroup(g)<=6 then
call CreateUnit(p,'h03I',x,y,bj_UNIT_FACING)
call CreateUnit(p,'h03I',x,y,bj_UNIT_FACING)
call CreateUnit(p,'h03I',x,y,bj_UNIT_FACING)
else
call DisplayTextToPlayer(p,x,y,"You cannot have more than 6 medium Unknown Wall!")
endif
endif
call GroupClear(g)
if id=='h03I' then
call GroupEnumUnitsOfPlayer(g,p,Condition(function BVV))
if CountUnitsInGroup(g)<=6 then
call CreateUnit(p,'h03J',x,y,bj_UNIT_FACING)
call CreateUnit(p,'h03J',x,y,bj_UNIT_FACING)
call CreateUnit(p,'h03J',x,y,bj_UNIT_FACING)
call CreateUnit(p,'h03J',x,y,bj_UNIT_FACING)
call CreateUnit(p,'h03J',x,y,bj_UNIT_FACING)
else
call DisplayTextToPlayer(p,x,y,"You cannot have more than 10 Small Unknown Wall!")
endif
endif
if UnitHasItemOfTypeBJ(GetKillingUnit(),'I02E')then
call SetUnitLifePercentBJ(uk,GetUnitLifePercent(uk)+2)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl",x,y))
endif
set u=null
set uk=null
call RemoveLocation(R6)
call DestroyGroup(g)
set g=null
endfunction
function BOV takes nothing returns boolean
return GetSpellAbilityId()=='A04G'
endfunction
function BRV takes nothing returns nothing
local integer O8=0
local unit u
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cffFF0202An Ancient Evil has unleashed his Demonic Form! Beware Humans!|r")
loop
exitwhen O8==6
set O8=O8+1
call UnitAddItem(CU,UnitItemInSlotBJ(GetSpellAbilityUnit(),O8))
endloop
if GetUnitTypeId(GetSpellAbilityUnit())=='E001' then
call ReplaceUnitBJ(GetSpellAbilityUnit(),'E000',1)
elseif GetUnitTypeId(GetSpellAbilityUnit())=='E005' then
call ReplaceUnitBJ(GetSpellAbilityUnit(),'E007',1)
elseif GetUnitTypeId(GetSpellAbilityUnit())=='E002' then
call ReplaceUnitBJ(GetSpellAbilityUnit(),'E004',1)
elseif GetUnitTypeId(GetSpellAbilityUnit())=='E008' then
call ReplaceUnitBJ(GetSpellAbilityUnit(),'E009',1)
endif
set u=bj_lastReplacedUnit
set O8=0
loop
exitwhen O8==20
set O8=O8+1
call SelectHeroSkill(u,'AOcl')
call SelectHeroSkill(u,'AOw2')
call SelectHeroSkill(u,'AOhw')
call SelectHeroSkill(u,'AOcr')
call SelectHeroSkill(u,'A05Q')
call SelectHeroSkill(u,'A05P')
endloop
set O8=0
loop
exitwhen O8==6
set O8=O8+1
call UnitAddItem(u,UnitItemInSlotBJ(CU,O8))
endloop
call ModifyHeroStat(1,u,0,(GetPlayerTechCountSimple('R00C',GetOwningPlayer(u))*300))
call ModifyHeroStat(0,u,0,(GetPlayerTechCountSimple('R00E',GetOwningPlayer(u))*300))
call ModifyHeroStat(2,u,0,(GetPlayerTechCountSimple('R00D',GetOwningPlayer(u))*300))
call ModifyHeroStat(0,u,0,(GetPlayerTechCountSimple('R00G',GetOwningPlayer(u))*300))
call ModifyHeroStat(1,u,0,(GetPlayerTechCountSimple('R00G',GetOwningPlayer(u))*300))
call ModifyHeroStat(2,u,0,(GetPlayerTechCountSimple('R00G',GetOwningPlayer(u))*300))
call ModifyHeroStat(0,u,0,(GetPlayerTechCountSimple('R00H',GetOwningPlayer(u))*2000))
call ModifyHeroStat(1,u,0,(GetPlayerTechCountSimple('R00H',GetOwningPlayer(u))*2000))
call ModifyHeroStat(2,u,0,(GetPlayerTechCountSimple('R00H',GetOwningPlayer(u))*2000))
call SelectUnitForPlayerSingle(u,GetOwningPlayer(u))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl",GetUnitX(u),GetUnitY(u)))
set u=null
endfunction
function BAV takes nothing returns boolean
return IsPlayerInForce(GetOwningPlayer(GetTrainedUnit()),XB)and GetUnitTypeId(GetTrainedUnit())=='H01L' or GetUnitTypeId(GetTrainedUnit())=='H03A'
endfunction
function BNV takes nothing returns nothing
if(ModuloInteger(R2I(BC),60)<10)then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,GetPlayerName(GetOwningPlayer(GetTrainedUnit()))+"|r has created a "+GetUnitName(GetTrainedUnit())+" at "+I2S(R2I(BC)/ 60)+":0"+I2S(ModuloInteger(R2I(BC),60)))
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,GetPlayerName(GetOwningPlayer(GetTrainedUnit()))+"|r has created a "+GetUnitName(GetTrainedUnit())+" at "+I2S(R2I(BC)/ 60)+":"+I2S(ModuloInteger(R2I(BC),60)))
endif
endfunction
function BBV takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))!=null
endfunction
function BCV takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='H01L')or(GetUnitTypeId(GetEnumUnit())=='H03A')
endfunction
function BDV takes nothing returns boolean
return(BCV())
endfunction
function BFV takes nothing returns nothing
if(BDV())then
call SetHeroLevelBJ(GetEnumUnit(),(GetUnitLevel(GetEnumUnit())+1),false)
endif
endfunction
function BGV takes nothing returns nothing
set ID=A6(WD,Condition(function BBV))
call ForGroupBJ(ID,function BFV)
call DestroyGroup(ID)
endfunction
function BJV takes nothing returns nothing
if GetUnitTypeId(GetAttacker())=='n009' and GetUnitTypeId(GetTriggerUnit())!='h00A' and GetUnitTypeId(GetTriggerUnit())!='h00T' and GetUnitTypeId(GetTriggerUnit())!='h00K' and GetUnitTypeId(GetTriggerUnit())!='hWkr' and GetUnitTypeId(GetTriggerUnit())!='h007' and GetUnitTypeId(GetTriggerUnit())!='h00C' and GetUnitTypeId(GetTriggerUnit())!='h00Q' then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
if GetUnitTypeId(GetAttacker())=='n00J' and GetUnitTypeId(GetTriggerUnit())!='hEng' then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
if GetUnitTypeId(GetAttacker())=='u002' and GetUnitTypeId(GetTriggerUnit())!='H01L' and GetUnitTypeId(GetTriggerUnit())!='H03A' then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
if GetUnitTypeId(GetAttacker())=='z000' and GetUnitTypeId(GetTriggerUnit())=='h010' or GetUnitTypeId(GetTriggerUnit())=='h00V' or GetUnitTypeId(GetTriggerUnit())=='h03F' or GetUnitTypeId(GetTriggerUnit())=='h03G' then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
if GetUnitTypeId(GetAttacker())=='u004' and GetUnitTypeId(GetTriggerUnit())=='h010' or GetUnitTypeId(GetTriggerUnit())=='h00V' or GetUnitTypeId(GetTriggerUnit())=='h03F' or GetUnitTypeId(GetTriggerUnit())=='h03G' then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
if GetUnitTypeId(GetAttacker())=='n00L' or GetUnitTypeId(GetAttacker())=='n00Q' or GetUnitTypeId(GetAttacker())=='n00S' or GetUnitTypeId(GetAttacker())=='n00R' then
if GetUnitTypeId(GetTriggerUnit())=='h010' or GetUnitTypeId(GetTriggerUnit())=='h00V' or GetUnitTypeId(GetTriggerUnit())=='h03F' or GetUnitTypeId(GetTriggerUnit())=='h03G' then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
endif
if GetUnitTypeId(GetAttacker())=='u00Q' or GetUnitTypeId(GetAttacker())=='u006' or GetUnitTypeId(GetAttacker())=='n00L' or GetUnitTypeId(GetAttacker())=='n00Q' or GetUnitTypeId(GetAttacker())=='n00S' or GetUnitTypeId(GetAttacker())=='n00R' or GetUnitTypeId(GetAttacker())=='u004' or GetUnitTypeId(GetAttacker())=='z000' or GetUnitTypeId(GetAttacker())=='u002' or GetUnitTypeId(GetAttacker())=='n00J' or GetUnitTypeId(GetAttacker())=='n009' then
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),EB)then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
endif
if IsUnitType(GetAttacker(),UNIT_TYPE_HERO)==false then
if GetUnitTypeId(GetTriggerUnit())=='h010' or GetUnitTypeId(GetTriggerUnit())=='h00V' or GetUnitTypeId(GetTriggerUnit())=='h03F' or GetUnitTypeId(GetTriggerUnit())=='h03G' then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
endif
if IsUnitType(GetAttacker(),UNIT_TYPE_HERO)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),EB)and IsPlayerInForce(GetOwningPlayer(GetAttacker()),EB)and GetUnitTypeId(GetTriggerUnit())!='U00G' then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
if GetUnitTypeId(GetAttacker())=='h010' or GetUnitTypeId(GetAttacker())=='h00V' or GetUnitTypeId(GetAttacker())=='h00Q' or GetUnitTypeId(GetAttacker())=='h00C' and GetOwningPlayer(GetAttacker())==GetOwningPlayer(GetTriggerUnit())and GetUnitTypeId(GetTriggerUnit())!='h010' and GetUnitTypeId(GetTriggerUnit())!='h00V' then
call KillUnit(GetTriggerUnit())
endif
if GetUnitTypeId(GetTriggerUnit())=='hFlg' and IsPlayerInForce(GetOwningPlayer(GetAttacker()),XB)and GetOwningPlayer(GetAttacker())!=GetOwningPlayer(GetTriggerUnit())then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
if GetUnitTypeId(GetAttacker())=='h010' or GetUnitTypeId(GetAttacker())=='h00V' or GetUnitTypeId(GetAttacker())=='h00Q' or GetUnitTypeId(GetAttacker())=='h00C' then
if IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),EB)==false and GetOwningPlayer(GetAttacker())!=GetOwningPlayer(GetTriggerUnit())then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
endif
if GetUnitTypeId(GetAttacker())=='u006' and GetUnitTypeId(GetTriggerUnit())=='h010' or GetUnitTypeId(GetTriggerUnit())=='h00V' or GetUnitTypeId(GetTriggerUnit())=='h03F' or GetUnitTypeId(GetTriggerUnit())=='h03G' then
call IssueImmediateOrderById(GetAttacker(),851972)
endif
endfunction
function BKV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='hFlg')or(GetUnitTypeId(GetDyingUnit())=='h001')or(GetUnitTypeId(GetDyingUnit())=='h000')or(GetUnitTypeId(GetDyingUnit())=='h003')or(GetUnitTypeId(GetDyingUnit())=='h005')or(GetUnitTypeId(GetDyingUnit())=='h006')or(GetUnitTypeId(GetDyingUnit())=='h00Z')or(GetUnitTypeId(GetDyingUnit())=='h01R')or(GetUnitTypeId(GetDyingUnit())=='h01A')or(GetUnitTypeId(GetDyingUnit())=='h00E')or(GetUnitTypeId(GetDyingUnit())=='h00F')or(GetUnitTypeId(GetDyingUnit())=='h01Y')or(GetUnitTypeId(GetDyingUnit())=='h022')or(GetUnitTypeId(GetDyingUnit())=='h024')
endfunction
function BLV takes nothing returns boolean
return(BKV())
endfunction
function BMV takes nothing returns nothing
set FC=GetUnitLoc(GetDyingUnit())
call AddSpecialEffectLocBJ(FC,"Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(FC)
call RemoveUnit(GetTriggerUnit())
endfunction
function BQV takes nothing returns boolean
return UnitHasItemOfTypeBJ(GetKillingUnit(),'I00R')or UnitHasItemOfTypeBJ(GetKillingUnit(),'I02M')or UnitHasItemOfTypeBJ(GetKillingUnit(),'I02N')or UnitHasItemOfTypeBJ(GetKillingUnit(),'I02P')
endfunction
function BSV takes nothing returns nothing
local unit u=GetKillingUnit()
local integer BTV=20
local integer BUV=0
local item i
local integer O8=0
loop
set O8=O8+1
if GetItemTypeId(UnitItemInSlotBJ(u,O8))=='I00R' or GetItemTypeId(UnitItemInSlotBJ(u,O8))=='I02M' or GetItemTypeId(UnitItemInSlotBJ(u,O8))=='I02N' or GetItemTypeId(UnitItemInSlotBJ(u,O8))=='I02P' then
set i=UnitItemInSlotBJ(u,O8)
endif
exitwhen O8==6
endloop
if GetItemTypeId(i)!='I02P' then
call SetItemUserData(i,GetItemUserData(i)+1)
endif
if GetItemUserData(i)>=30 and GetItemTypeId(i)=='I00R' then
call RemoveItem(i)
call UnitAddItemById(u,'I02M')
elseif GetItemUserData(i)>=120 and GetItemTypeId(i)=='I02M' then
call RemoveItem(i)
call UnitAddItemById(u,'I02N')
elseif GetItemUserData(i)>=120 and GetItemTypeId(i)=='I02N' then
call RemoveItem(i)
call UnitAddItemById(u,'I02P')
endif
if UnitHasItemOfTypeBJ(u,'I00R')then
set BUV=1
call ModifyHeroStat(1,u,0,BUV*BTV)
call ModifyHeroStat(0,u,0,BUV*BTV)
call ModifyHeroStat(2,u,0,BUV*BTV)
elseif UnitHasItemOfTypeBJ(u,'I02M')then
set BUV=2
call ModifyHeroStat(1,u,0,BUV*BTV)
call ModifyHeroStat(0,u,0,BUV*BTV)
call ModifyHeroStat(2,u,0,BUV*BTV)
elseif UnitHasItemOfTypeBJ(u,'I02N')then
set BUV=3
call ModifyHeroStat(1,u,0,BUV*BTV)
call ModifyHeroStat(0,u,0,BUV*BTV)
call ModifyHeroStat(2,u,0,BUV*BTV)
elseif UnitHasItemOfTypeBJ(u,'I02P')then
set BUV=4
call ModifyHeroStat(1,u,0,BUV*BTV)
call ModifyHeroStat(0,u,0,BUV*BTV)
call ModifyHeroStat(2,u,0,BUV*BTV)
endif
endfunction
function BYV takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+((bj_forLoopAIndex-1))))==PLAYER_SLOT_STATE_PLAYING)and(IsPlayerInForce(Player(-1+((bj_forLoopAIndex-1))),XB))
endfunction
function BZV takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+((bj_forLoopAIndex-1))))==PLAYER_SLOT_STATE_PLAYING)and(IsPlayerInForce(Player(-1+((bj_forLoopAIndex-1))),EB))
endfunction
function B_V takes nothing returns nothing
call CreateMultiboardBJ(3,13,"Status Board")
set QD=bj_lastCreatedMultiboard
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard,1,1,"Name")
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard,2,1,"Status")
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard,3,1,"Gold Fed")
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=13
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemStyleBJ(bj_lastCreatedMultiboard,1,bj_forLoopAIndex,true,false)
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,8.)
call MultiboardSetItemWidthBJ(bj_lastCreatedMultiboard,2,bj_forLoopAIndex,8.)
call MultiboardSetItemWidthBJ(bj_lastCreatedMultiboard,3,bj_forLoopAIndex,8.)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=13
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard,1,bj_forLoopAIndex,(QC[(bj_forLoopAIndex-1)]+GetPlayerName(Player(-1+((bj_forLoopAIndex-1))))))
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard,3,bj_forLoopAIndex,"0")
if(BYV())then
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard,2,bj_forLoopAIndex,"Human (Alive)")
endif
if(BZV())then
call MultiboardSetItemValueBJ(bj_lastCreatedMultiboard,2,bj_forLoopAIndex,"Vampire (Alive)")
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardDisplay(bj_lastCreatedMultiboard,true)
endfunction
function B1V takes nothing returns nothing
set QC[1]="|c00ff0000"
set QC[2]="|c000000ff"
set QC[3]="|c0000ffff"
set QC[4]="|c00800080"
set QC[5]="|c00ffff00"
set QC[6]="|c00ff8000"
set QC[7]="|c0000ff00"
set QC[8]="|c00ff00ff"
set QC[9]="|cff949596"
set QC[10]="|cff7DBEF1"
set QC[11]="|cff0F6145"
set QC[12]="|cff4D2903"
endfunction
function B3V takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap('H01L',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('H03A',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h03F',3,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('U00G',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h03H',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h022',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02P',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h023',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02X',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02O',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h00P',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h020',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h01Z',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h024',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02N',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h01X',1,GetEnumPlayer())
endfunction
function B4V takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap('h001',8,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h000',8,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h003',8,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h005',6,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h006',6,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h00Z',6,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h01R',6,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h01A',6,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h00E',6,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h00F',6,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h01Y',6,GetEnumPlayer())
endfunction
function B5V takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap('hFlg',1,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('hHse',20,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h008',5,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h00B',5,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02Q',5,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02W',5,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('hTnt',10,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('o007',10,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('o00M',10,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('e003',8,GetEnumPlayer())
endfunction
function B6V takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap('h02R',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02S',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02T',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02U',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02V',2,GetEnumPlayer())
endfunction
function B7V takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap('h02E',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02F',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02G',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('hWhp',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h009',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02B',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02C',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02D',2,GetEnumPlayer())
endfunction
function B8V takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap('h02H',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02I',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02J',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02K',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02L',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02M',2,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02Z',2,GetEnumPlayer())
endfunction
function B9V takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap('h025',30,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h026',30,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h027',30,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h028',30,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h029',30,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h02A',30,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('u00H',5,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('u00M',5,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('u00L',5,GetEnumPlayer())
endfunction
function CVV takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap('h019',200,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('hBgm',200,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h004',200,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h00O',200,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h00X',30,GetEnumPlayer())
endfunction
function CEV takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap('h00J',10,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h021',10,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h037',3,GetEnumPlayer())
endfunction
function CXV takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap('u00F',5,GetEnumPlayer())
endfunction
function COV takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap('hWkr',48,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h007',12,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h00A',8,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h00K',6,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h00T',3,GetEnumPlayer())
call SetPlayerTechMaxAllowedSwap('h03K',5,GetEnumPlayer())
endfunction
function CRV takes nothing returns nothing
call ForForce(bj_FORCE_ALL_PLAYERS,function B3V)
call ForForce(bj_FORCE_ALL_PLAYERS,function B4V)
call ForForce(bj_FORCE_ALL_PLAYERS,function B5V)
call ForForce(bj_FORCE_ALL_PLAYERS,function B6V)
call ForForce(bj_FORCE_ALL_PLAYERS,function B7V)
call ForForce(bj_FORCE_ALL_PLAYERS,function B8V)
call ForForce(bj_FORCE_ALL_PLAYERS,function B9V)
call ForForce(bj_FORCE_ALL_PLAYERS,function CVV)
call ForForce(bj_FORCE_ALL_PLAYERS,function CEV)
call ForForce(bj_FORCE_ALL_PLAYERS,function CXV)
call ForForce(bj_FORCE_ALL_PLAYERS,function COV)
endfunction
function CAV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H01L')or(GetUnitTypeId(GetTriggerUnit())=='H03A')
endfunction
function CNV takes nothing returns boolean
return(GetItemTypeId(GetManipulatedItem())=='I00Z')and(CAV())
endfunction
function CBV takes nothing returns nothing
call RemoveItem(GetManipulatedItem())
set IB=GetUnitLoc(GetTriggerUnit())
call CreateItemLoc('I00Z',IB)
call RemoveLocation(IB)
endfunction
function CDV takes nothing returns boolean
return(GetItemTypeId(GetManipulatedItem())=='I02B')and(GetUnitTypeId(GetTriggerUnit())!='H01L')and(GetUnitTypeId(GetTriggerUnit())!='H03A')
endfunction
function CFV takes nothing returns nothing
call RemoveItem(GetManipulatedItem())
set IB=GetUnitLoc(GetTriggerUnit())
call CreateItemLoc('I02B',IB)
call RemoveLocation(IB)
endfunction
function CHV takes nothing returns nothing
call EnableTrigger(LL)
endfunction
function Trig_add_level_vamp_Func001002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))!=null
endfunction
function Trig_add_level_vamp_Func001002002002 takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetFilterUnit()),EB))
endfunction
function CKV takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)),(IsPlayerInForce(GetOwningPlayer(GetFilterUnit()),EB))))!=null
endfunction
function CLV takes nothing returns boolean
return(GetHeroLevel(GetEnumUnit())<100)and(GetUnitTypeId(GetEnumUnit())!='U00G')
endfunction
function CMV takes nothing returns nothing
if(CLV())then
call SetHeroLevelBJ(GetEnumUnit(),(GetUnitLevel(GetEnumUnit())+1),false)
endif
endfunction
function CPV takes nothing returns nothing
set GD=A6(bj_mapInitialPlayableArea,Condition(function CKV))
call ForGroupBJ(GD,function CMV)
call DestroyGroup(GD)
endfunction
function CSV takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='h03F')
endfunction
function CTV takes nothing returns nothing
call UnitAddItemByIdSwapped('I02J',GetTrainedUnit())
call UnitAddItemByIdSwapped('I02K',GetTrainedUnit())
endfunction
function CWV takes nothing returns nothing
call CreateTimerDialogBJ(AC,"Time Elapsed")
set NC=bj_lastCreatedTimerDialog
endfunction
function CZV takes nothing returns nothing
set BC=(BC+1)
call StartTimerBJ(AC,false,BC)
call PauseTimerBJ(true,AC)
endfunction
function C0V takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB))
endfunction
function C1V takes nothing returns nothing
call SetUnitPositionLoc(GetEnteringUnit(),ZB)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetEnteringUnit()),ZB,0)
endfunction
function C3V takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='H01L')
endfunction
function C4V takes nothing returns nothing
call DisplayTimedTextToForce(XB,15.,"|cFFFF0000The MiniMap is now showing the location of the Slayer Pool.|r")
call PingMinimapLocForForceEx(XB,GetRectCenter(WD),15.,0,100,100,100)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function C6V takes nothing returns boolean
return(IsUnitType(GetEnteringUnit(),UNIT_TYPE_STRUCTURE))!=null
endfunction
function C7V takes nothing returns nothing
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetEnteringUnit())),8.,"You cannot build on this tile!")
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetEnteringUnit(),851976)
endfunction
function C8V takes nothing returns nothing
call CreateFogModifierRectBJ(true,GetEnumPlayer(),FOG_OF_WAR_VISIBLE,RF)
call CreateFogModifierRectBJ(true,GetEnumPlayer(),FOG_OF_WAR_VISIBLE,DF)
call CreateFogModifierRectBJ(true,GetEnumPlayer(),FOG_OF_WAR_VISIBLE,FF)
endfunction
function C9V takes nothing returns nothing
call ForForce(bj_FORCE_ALL_PLAYERS,function C8V)
endfunction
function DEV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB))
endfunction
function DXV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),EB))
endfunction
function DOV takes nothing returns nothing
if(DEV())then
set XC=GetRectCenter(VF)
call SetUnitPositionLoc(GetEnteringUnit(),XC)
call RemoveLocation(XC)
endif
if(DXV())then
set XC=GetRectCenter(YD)
call SetUnitPositionLoc(GetEnteringUnit(),XC)
call RemoveLocation(XC)
endif
endfunction
function DIV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h034')
endfunction
function DAV takes nothing returns nothing
call ClearTextMessagesBJ(bj_FORCE_ALL_PLAYERS)
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),4.,"|cFFFF0000--Visit Go to Vampirism-SPEED.blogspot.com for updates and Newest Version.
--This is the Thank-You List. You may click on the units to view their contribution description to VampSpeed.
|r")
endfunction
function DBV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h032')
endfunction
function DCV takes nothing returns nothing
call ClearTextMessagesBJ(bj_FORCE_ALL_PLAYERS)
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),4.,"|cFFFF0000--SaMmM is the mapmaker of the new VampirismSpeed Template.
--Due to SaMmM, VampirismSpeed is no longer based on VampirismFire.
--SaMmM has also taken over the mapmaking position of VampSpeed when DumbAssking quitted mapmaking.
|r")
endfunction
function DFV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h033')
endfunction
function DGV takes nothing returns nothing
call ClearTextMessagesBJ(bj_FORCE_ALL_PLAYERS)
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),4.,"|cFFFF0000--DumbAssKing was the creator of VampirismSpeed.
--Vampirism Fire was modded into VampirismSpeed by him.
--DumbAssKing had retired from mapmaking on January 30th, 2009, 9:01 pm.
--Mapmaker position had been taken by SaMmM.
|r")
endfunction
function DJV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h036')
endfunction
function DKV takes nothing returns nothing
call ClearTextMessagesBJ(bj_FORCE_ALL_PLAYERS)
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),4.,"|cFFFF0000--Greg is a contributer of the VampirismSpeed official website.
|r")
endfunction
function DMV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h01M')
endfunction
function DPV takes nothing returns nothing
call ClearTextMessagesBJ(bj_FORCE_ALL_PLAYERS)
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),4.,"|cFFFF0000--Water_Knight is a contributer of the VampirismSpeed Forums.
|r")
endfunction
function DSV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h035')
endfunction
function DTV takes nothing returns nothing
call ClearTextMessagesBJ(bj_FORCE_ALL_PLAYERS)
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),4.,"|cFFFF0000--Clue is a contributer of the VampirismSpeed website.
|r")
endfunction
function DWV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h03E')
endfunction
function DYV takes nothing returns nothing
call ClearTextMessagesBJ(bj_FORCE_ALL_PLAYERS)
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),4.,"|cFFFF0000--alvinchiew is an admin of the VampirismSpeed website.
|r")
endfunction
function D_V takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H038')
endfunction
function D0V takes nothing returns nothing
call ClearTextMessagesBJ(bj_FORCE_ALL_PLAYERS)
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),4.,"|cFFFF0000--This goes out to all who contributed and helped with bug reports, suggestions and balancing on the Forum.
--Thank you all for your reports and suggestions. Many changes in this version are made possible from the reports of contributers.
|r")
endfunction
function D2V takes nothing returns boolean
return GetUnitTypeId(GetDyingUnit())=='h010' or GetUnitTypeId(GetDyingUnit())=='h00V' and GetOwningPlayer(GetKillingUnit())!=Player(12)
endfunction
function D3V takes nothing returns nothing
local player p=GetOwningPlayer(GetKillingUnit())
local unit D4V=GetKillingUnit()
local real x=GetUnitX(GetDyingUnit())
local real y=GetUnitY(GetDyingUnit())
if BC<300 then
call AdjustPlayerStateBJ(300,p,PLAYER_STATE_RESOURCE_GOLD)
call X7V("+300","|cffffcc00",x,y)
set PD[GetPlayerId(GetOwningPlayer(GetDyingUnit()))+1]=300+PD[GetPlayerId(GetOwningPlayer(GetDyingUnit()))+1]
elseif BC>300 and BC<600 then
call AdjustPlayerStateBJ(600,p,PLAYER_STATE_RESOURCE_GOLD)
call X7V("+600","|cffffcc00",x,y)
set PD[GetPlayerId(GetOwningPlayer(GetDyingUnit()))+1]=600+PD[GetPlayerId(GetOwningPlayer(GetDyingUnit()))+1]
elseif BC>600 and BC<900 then
call AdjustPlayerStateBJ(900,p,PLAYER_STATE_RESOURCE_GOLD)
call X7V("+900","|cffffcc00",x,y)
set PD[GetPlayerId(GetOwningPlayer(GetDyingUnit()))+1]=900+PD[GetPlayerId(GetOwningPlayer(GetDyingUnit()))+1]
elseif BC>900 then
call AdjustPlayerStateBJ(1200,p,PLAYER_STATE_RESOURCE_GOLD)
call X7V("+1200","|cffffcc00",x,y)
set PD[GetPlayerId(GetOwningPlayer(GetDyingUnit()))+1]=1200+PD[GetPlayerId(GetOwningPlayer(GetDyingUnit()))+1]
endif
call MultiboardSetItemValueBJ(QD,3,GetPlayerId(GetOwningPlayer(GetDyingUnit()))+2,I2S(PD[GetPlayerId(GetOwningPlayer(GetDyingUnit()))+1]))
set D4V=null
endfunction
function D5V takes nothing returns nothing
call AdjustPlayerStateBJ(500,GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function D6V takes nothing returns nothing
call AdjustPlayerStateBJ(2000,GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function D7V takes nothing returns boolean
return(GC==2)
endfunction
function D8V takes nothing returns nothing
call AdjustPlayerStateBJ(120,GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function D9V takes nothing returns nothing
call AdjustPlayerStateBJ(1000,GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function FVV takes nothing returns boolean
return(GC==1)
endfunction
function FEV takes nothing returns nothing
call AdjustPlayerStateBJ(30,GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function FXV takes nothing returns nothing
call AdjustPlayerStateBJ(750,GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function FOV takes nothing returns boolean
return(GC==0)
endfunction
function FRV takes nothing returns nothing
if(FOV())then
set GC=1
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cFFFF0000---15 minutes have elapsed---
All Human Players gain 30 Gold.

All Vampire Players gain 750 Gold.
|r")
call ForForce(XB,function FEV)
call ForForce(EB,function FXV)
else
if(FVV())then
set GC=2
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cFFFF0000---Another 15 minutes have elapsed---
All Human Players gain 120 Gold.

All Vampire Players gain 1000 Gold.
|r")
call ForForce(XB,function D8V)
call ForForce(EB,function D9V)
else
if(D7V())then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"|cFFFF0000---Another 15 minutes have elapsed---
All Human Players gain 500 Gold.

All Vampire Players gain 2000 Gold.
|r")
call ForForce(XB,function D5V)
call ForForce(EB,function D6V)
endif
endif
endif
endfunction
function FAV takes nothing returns nothing
call AdjustPlayerStateBJ((CountLivingPlayerUnitsOfTypeId('hBgm',GetEnumPlayer())*1),GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function FNV takes nothing returns nothing
call ForForce(XB,function FAV)
endfunction
function FCV takes nothing returns nothing
call AdjustPlayerStateBJ((CountLivingPlayerUnitsOfTypeId('h004',GetEnumPlayer())*1),GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function FDV takes nothing returns nothing
call ForForce(XB,function FCV)
endfunction
function FGV takes nothing returns nothing
call AdjustPlayerStateBJ((CountLivingPlayerUnitsOfTypeId('h00O',GetEnumPlayer())*1),GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function FHV takes nothing returns nothing
call ForForce(XB,function FGV)
endfunction
function FKV takes nothing returns nothing
call AdjustPlayerStateBJ((CountLivingPlayerUnitsOfTypeId('h019',GetEnumPlayer())*1),GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function FLV takes nothing returns nothing
call ForForce(XB,function FKV)
endfunction
function FPV takes nothing returns nothing
call AdjustPlayerStateBJ((CountLivingPlayerUnitsOfTypeId('h00X',GetEnumPlayer())*20),GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function FQV takes nothing returns nothing
call ForForce(XB,function FPV)
endfunction
function FTV takes nothing returns boolean
return(GetUnitTypeId(GetKillingUnit())=='u001')and(IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),EB))
endfunction
function FUV takes nothing returns boolean
return(GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetKillingUnit()))
endfunction
function FWV takes nothing returns nothing
call AddHeroXPSwapped(15,GetEnumUnit(),false)
endfunction
function FYV takes nothing returns nothing
set VC=C6(1000.,GetUnitLoc(GetDyingUnit()),Condition(function FUV))
call ForGroupBJ(VC,function FWV)
call DestroyGroup(VC)
endfunction
function F_V takes nothing returns boolean
return((IsPlayerInForce(GetOwningPlayer(GetDyingUnit()),XB))and(IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),EB))and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)))!=null
endfunction
function F0V takes nothing returns nothing
call AddHeroXPSwapped((20+(GetUnitLevel(GetKillingUnit())*6)),GetKillingUnit(),false)
endfunction
function F2V takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),EB))
endfunction
function F3V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='nft1')
endfunction
function F4V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='u00F')
endfunction
function F5V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h002')
endfunction
function F6V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='hBrc')
endfunction
function F7V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='hTnt')
endfunction
function F8V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='o007')
endfunction
function F9V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='o00M')
endfunction
function GVV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='e003')
endfunction
function GEV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='n001')
endfunction
function GXV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00J')
endfunction
function GOV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h037')
endfunction
function GRV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00B')
endfunction
function GIV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h008')
endfunction
function GAV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h02Q')
endfunction
function GNV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h02W')
endfunction
function GBV takes nothing returns nothing
if(F3V())then
call AddHeroXPSwapped(60,GetKillingUnit(),false)
endif
if(F4V())then
call AddHeroXPSwapped(600,GetKillingUnit(),false)
endif
if(F5V())then
call AddHeroXPSwapped(250,GetKillingUnit(),false)
endif
if(F6V())then
call AddHeroXPSwapped(200,GetKillingUnit(),false)
endif
if(F7V())then
call AddHeroXPSwapped(50,GetKillingUnit(),false)
endif
if(F8V())then
call AddHeroXPSwapped(100,GetKillingUnit(),false)
endif
if(F9V())then
call AddHeroXPSwapped(200,GetKillingUnit(),false)
endif
if(GVV())then
call AddHeroXPSwapped(200,GetKillingUnit(),false)
endif
if(GEV())then
call AddHeroXPSwapped(350,GetKillingUnit(),false)
endif
if(GXV())then
call AddHeroXPSwapped(5000,GetKillingUnit(),false)
endif
if(GOV())then
call AddHeroXPSwapped(20000,GetKillingUnit(),false)
endif
if(GRV())then
call AddHeroXPSwapped(600,GetKillingUnit(),false)
endif
if(GIV())then
call AddHeroXPSwapped(300,GetKillingUnit(),false)
endif
if(GAV())then
call AddHeroXPSwapped(750,GetKillingUnit(),false)
endif
if(GNV())then
call AddHeroXPSwapped(900,GetKillingUnit(),false)
endif
endfunction
function GDV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),EB))
endfunction
function GFV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h001')
endfunction
function GGV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h000')
endfunction
function GHV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h003')
endfunction
function GJV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h005')
endfunction
function GKV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h006')
endfunction
function GLV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00Z')
endfunction
function GMV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h01R')
endfunction
function GPV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h01A')
endfunction
function GQV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00E')
endfunction
function GSV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00F')
endfunction
function GTV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h01Y')
endfunction
function GUV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h02X')
endfunction
function GWV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h02P')
endfunction
function GYV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h022')
endfunction
function GZV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h023')
endfunction
function G_V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h02O')
endfunction
function G0V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00P')
endfunction
function G1V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h020')
endfunction
function G2V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h01Z')
endfunction
function G3V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h024')
endfunction
function G4V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h02N')
endfunction
function G5V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h01X')
endfunction
function G6V takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h03H')
endfunction
function G7V takes nothing returns nothing
if(GFV())then
call AddHeroXPSwapped(35,GetKillingUnit(),false)
endif
if(GGV())then
call AddHeroXPSwapped(55,GetKillingUnit(),false)
endif
if(GHV())then
call AddHeroXPSwapped(70,GetKillingUnit(),false)
endif
if(GJV())then
call AddHeroXPSwapped(100,GetKillingUnit(),false)
endif
if(GKV())then
call AddHeroXPSwapped(120,GetKillingUnit(),false)
endif
if(GLV())then
call AddHeroXPSwapped(210,GetKillingUnit(),false)
endif
if(GMV())then
call AddHeroXPSwapped(260,GetKillingUnit(),false)
endif
if(GPV())then
call AddHeroXPSwapped(295,GetKillingUnit(),false)
endif
if(GQV())then
call AddHeroXPSwapped(400,GetKillingUnit(),false)
endif
if(GSV())then
call AddHeroXPSwapped(850,GetKillingUnit(),false)
endif
if(GTV())then
call AddHeroXPSwapped(950,GetKillingUnit(),false)
endif
if(GUV())then
call AddHeroXPSwapped(2000,GetKillingUnit(),false)
endif
if(GWV())then
call AddHeroXPSwapped(2000,GetKillingUnit(),false)
endif
if(GYV())then
call AddHeroXPSwapped(3200,GetKillingUnit(),false)
endif
if(GZV())then
call AddHeroXPSwapped(2000,GetKillingUnit(),false)
endif
if(G_V())then
call AddHeroXPSwapped(2000,GetKillingUnit(),false)
endif
if(G0V())then
call AddHeroXPSwapped(2000,GetKillingUnit(),false)
endif
if(G1V())then
call AddHeroXPSwapped(2000,GetKillingUnit(),false)
endif
if(G2V())then
call AddHeroXPSwapped(2000,GetKillingUnit(),false)
endif
if(G3V())then
call AddHeroXPSwapped(2000,GetKillingUnit(),false)
endif
if(G4V())then
call AddHeroXPSwapped(2000,GetKillingUnit(),false)
endif
if(G5V())then
call AddHeroXPSwapped(2000,GetKillingUnit(),false)
endif
if(G6V())then
call AddHeroXPSwapped(2000,GetKillingUnit(),false)
endif
endfunction
function G9V takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),EB))
endfunction
function HVV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00A')or(GetUnitTypeId(GetDyingUnit())=='h007')
endfunction
function HEV takes nothing returns boolean
return(HVV())
endfunction
function HXV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00K')or(GetUnitTypeId(GetDyingUnit())=='h00T')
endfunction
function HOV takes nothing returns boolean
return(HXV())
endfunction
function HRV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='hWkr')
endfunction
function HIV takes nothing returns boolean
return(HRV())
endfunction
function HAV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00C')
endfunction
function HNV takes nothing returns boolean
return(HAV())
endfunction
function HBV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00G')
endfunction
function HCV takes nothing returns boolean
return(HBV())
endfunction
function HDV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00Q')
endfunction
function HFV takes nothing returns boolean
return(HDV())
endfunction
function HGV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='H01L')
endfunction
function HHV takes nothing returns boolean
return(HGV())
endfunction
function HJV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h010')
endfunction
function HKV takes nothing returns boolean
return(HJV())
endfunction
function HLV takes nothing returns nothing
if(HEV())then
call AddHeroXPSwapped(250,GetKillingUnit(),false)
endif
if(HOV())then
call AddHeroXPSwapped(900,GetKillingUnit(),false)
endif
if(HIV())then
call AddHeroXPSwapped(8,GetKillingUnit(),false)
endif
if(HNV())then
call AddHeroXPSwapped(250,GetKillingUnit(),false)
endif
if(HCV())then
call AddHeroXPSwapped(650,GetKillingUnit(),false)
endif
if(HFV())then
call AddHeroXPSwapped(2000,GetKillingUnit(),false)
endif
if(HHV())then
call AddHeroXPSwapped(220,GetKillingUnit(),false)
endif
if(HKV())then
call AddHeroXPSwapped(500,GetKillingUnit(),false)
endif
endfunction
function HPV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),EB))
endfunction
function HQV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='o00F')or(GetUnitTypeId(GetDyingUnit())=='o00J')or(GetUnitTypeId(GetDyingUnit())=='hTFh')or(GetUnitTypeId(GetDyingUnit())=='n00D')
endfunction
function HSV takes nothing returns boolean
return(HQV())
endfunction
function HTV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h00D')or(GetUnitTypeId(GetDyingUnit())=='h01D')or(GetUnitTypeId(GetDyingUnit())=='h01E')or(GetUnitTypeId(GetDyingUnit())=='h00S')or(GetUnitTypeId(GetDyingUnit())=='h00L')or(GetUnitTypeId(GetDyingUnit())=='h01N')or(GetUnitTypeId(GetDyingUnit())=='h01U')or(GetUnitTypeId(GetDyingUnit())=='h00H')or(GetUnitTypeId(GetDyingUnit())=='h01V')or(GetUnitTypeId(GetDyingUnit())=='h00M')
endfunction
function HUV takes nothing returns boolean
return(HTV())
endfunction
function HWV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h025')or(GetUnitTypeId(GetDyingUnit())=='h026')or(GetUnitTypeId(GetDyingUnit())=='h027')or(GetUnitTypeId(GetDyingUnit())=='h028')or(GetUnitTypeId(GetDyingUnit())=='h029')or(GetUnitTypeId(GetDyingUnit())=='h02A')
endfunction
function HYV takes nothing returns boolean
return(HWV())
endfunction
function HZV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='o001')or(GetUnitTypeId(GetDyingUnit())=='o00H')or(GetUnitTypeId(GetDyingUnit())=='o004')or(GetUnitTypeId(GetDyingUnit())=='o006')or(GetUnitTypeId(GetDyingUnit())=='o00K')or(GetUnitTypeId(GetDyingUnit())=='o00L')or(GetUnitTypeId(GetDyingUnit())=='n003')or(GetUnitTypeId(GetDyingUnit())=='hTFs')or(GetUnitTypeId(GetDyingUnit())=='n006')or(GetUnitTypeId(GetDyingUnit())=='n00F')or(GetUnitTypeId(GetDyingUnit())=='n00M')or(GetUnitTypeId(GetDyingUnit())=='hTHs')or(GetUnitTypeId(GetDyingUnit())=='o000')or(GetUnitTypeId(GetDyingUnit())=='o00B')or(GetUnitTypeId(GetDyingUnit())=='o00E')
endfunction
function H_V takes nothing returns boolean
return(HZV())
endfunction
function H0V takes nothing returns nothing
if(HSV())then
call AddHeroXPSwapped(75,GetKillingUnit(),false)
endif
if(HUV())then
call AddHeroXPSwapped(320,GetKillingUnit(),false)
endif
if(HYV())then
call AddHeroXPSwapped(620,GetKillingUnit(),false)
endif
if(H_V())then
call AddHeroXPSwapped(200,GetKillingUnit(),false)
endif
endfunction
function H2V takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function H3V takes nothing returns nothing
local integer es=(R8((StringCase(GetEventPlayerChatString(),false)),(" "),(2)))
local player H4V
local group g=CreateGroup()
if GetPlayerId(GetTriggerPlayer())==0 then
if(EW[XW[(es)]+(0)])=="-kick" or(EW[XW[(es)]+(0)])=="-boot" and IPV((EW[XW[(es)]+(1)]))<12 and IPV((EW[XW[(es)]+(1)]))!=0 then
set H4V=Player(IPV((EW[XW[(es)]+(1)])))
if IsPlayerInForce(H4V,XB)and IsPlayerInForce(GetTriggerPlayer(),XB)and GetTriggerPlayer()!=H4V then
set g=H6(H4V,null)
call ForGroupBJ(g,function H2V)
if IsPlayerInForce(H4V,XB)then
call ForceRemovePlayer(XB,H4V)
elseif IsPlayerInForce(H4V,EB)then
call ForceRemovePlayer(EB,H4V)
endif
call ForceAddPlayer(LN,H4V)
call MultiboardSetItemValueBJ(QD,2,GetPlayerId(H4V)+2,"Kicked")
call CustomDefeatBJ(H4V,"Kicked by Player Red")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,6,GetPlayerName(H4V)+" has been kicked by player red")
endif
call ExecuteFunc("ORV")
endif
endif
call N7(es)
call DestroyGroup(g)
set g=null
endfunction
function H5V takes nothing returns nothing
local integer es=(R8((StringCase(GetEventPlayerChatString(),false)),(" "),(3)))
local player H6V=GetTriggerPlayer()
local player H7V
local integer H8V
if IPV((EW[XW[(es)]+(1)]))<12 then
set H7V=Player(IPV((EW[XW[(es)]+(1)])))
if IsPlayerEnemy(H6V,H7V)==false and GetPlayerSlotState(H7V)==PLAYER_SLOT_STATE_PLAYING and H6V!=H7V then
if(EW[XW[(es)]+(0)])=="-gg" or(EW[XW[(es)]+(0)])=="-givegold" and I2S(S2I((EW[XW[(es)]+(2)])))==(EW[XW[(es)]+(2)])and GetPlayerState(H6V,PLAYER_STATE_RESOURCE_GOLD)>=S2I((EW[XW[(es)]+(2)]))and S2I((EW[XW[(es)]+(2)]))>0 then
set H7V=Player(IPV((EW[XW[(es)]+(1)])))
set H8V=S2I((EW[XW[(es)]+(2)]))
call AdjustPlayerStateBJ(-H8V,H6V,PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(H8V,H7V,PLAYER_STATE_RESOURCE_GOLD)
call DisplayTimedTextToPlayer(H7V,.0,.0,5.,"You received "+I2S(H8V)+" gold from "+GetPlayerName(H6V))
call DisplayTimedTextToPlayer(H6V,.0,.0,5.,"You gave "+I2S(H8V)+" gold to "+GetPlayerName(H7V))
endif
if(EW[XW[(es)]+(0)])=="-gw" or(EW[XW[(es)]+(0)])=="-gl" or(EW[XW[(es)]+(0)])=="-givelumber" or(EW[XW[(es)]+(0)])=="-givewood" and I2S(S2I((EW[XW[(es)]+(2)])))==(EW[XW[(es)]+(2)])and GetPlayerState(H6V,PLAYER_STATE_RESOURCE_LUMBER)>=S2I((EW[XW[(es)]+(2)]))and S2I((EW[XW[(es)]+(2)]))>0 then
set H7V=Player(IPV((EW[XW[(es)]+(1)])))
set H8V=S2I((EW[XW[(es)]+(2)]))
call AdjustPlayerStateBJ(-H8V,H6V,PLAYER_STATE_RESOURCE_LUMBER)
call AdjustPlayerStateBJ(H8V,H7V,PLAYER_STATE_RESOURCE_LUMBER)
call DisplayTimedTextToPlayer(H7V,.0,.0,5.,"You received "+I2S(H8V)+" lumber from "+GetPlayerName(H6V))
call DisplayTimedTextToPlayer(H6V,.0,.0,5.,"You gave "+I2S(H8V)+" lumber to "+GetPlayerName(H7V))
endif
else
call DisplayTimedTextToPlayer(H6V,.0,.0,5.,"You can't pass your resources to an enemy player or unavailable player!")
endif
endif
call N7(es)
set H6V=null
set H7V=null
endfunction
function H9V takes nothing returns nothing
set X5[1]=AddWeatherEffect(bj_mapInitialPlayableArea,'RAlr')
set X5[2]=AddWeatherEffect(bj_mapInitialPlayableArea,'SNls')
endfunction
function JVV takes nothing returns nothing
local integer es=(R8((StringCase(GetEventPlayerChatString(),false)),(" "),(2)))
if(EW[XW[(es)]+(0)])=="-weather" or(EW[XW[(es)]+(0)])=="-we" or(EW[XW[(es)]+(0)])=="-weathereffect" and(EW[XW[(es)]+(1)])=="rain" or(EW[XW[(es)]+(1)])=="rainy" or(EW[XW[(es)]+(1)])=="raining" or(EW[XW[(es)]+(1)])=="snow" or(EW[XW[(es)]+(1)])=="snowy" or(EW[XW[(es)]+(1)])=="snowing" or(EW[XW[(es)]+(1)])=="turnoff" or(EW[XW[(es)]+(1)])=="off" or(EW[XW[(es)]+(1)])=="none" then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,6,"Player Red "+GetPlayerName(GetTriggerPlayer())+" has changed the weather to "+(EW[XW[(es)]+(1)]))
call ExecuteFunc("JEV")
call TriggerSleepAction(2.)
if(EW[XW[(es)]+(1)])=="rain" or(EW[XW[(es)]+(1)])=="rainy" or(EW[XW[(es)]+(1)])=="raining" then
call EnableWeatherEffect(X5[1],true)
elseif(EW[XW[(es)]+(1)])=="snow" or(EW[XW[(es)]+(1)])=="snowy" or(EW[XW[(es)]+(1)])=="snowing" then
call EnableWeatherEffect(X5[2],true)
elseif(EW[XW[(es)]+(1)])=="turnoff" or(EW[XW[(es)]+(1)])=="off" or(EW[XW[(es)]+(1)])=="none" then
endif
endif
call N7(es)
endfunction
function JEV takes nothing returns nothing
local integer JXV=1
loop
call EnableWeatherEffect(X5[JXV],false)
exitwhen JXV==2
set JXV=JXV+1
endloop
endfunction
function JOV takes nothing returns nothing
set JC[(1+GetPlayerId(GetEnumPlayer()))]=GetPlayerName(GetEnumPlayer())
endfunction
function JRV takes nothing returns nothing
call ForForce(bj_FORCE_ALL_PLAYERS,function JOV)
endfunction
function JAV takes nothing returns nothing
call SetPlayerName(GetEnumPlayer(),JC[(1+GetPlayerId(GetEnumPlayer()))])
endfunction
function JNV takes nothing returns nothing
call ForForce(bj_FORCE_ALL_PLAYERS,function JAV)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,4.,"Player Red has returned all names to the default. (-return)")
endfunction
function JCV takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.5,((GetPlayerName(GetTriggerPlayer())+" has changed his name to ")+SubStringBJ(GetEventPlayerChatString(),10,StringLength(GetEventPlayerChatString()))))
call SetPlayerName(GetTriggerPlayer(),SubStringBJ(GetEventPlayerChatString(),10,StringLength(GetEventPlayerChatString())))
endfunction
function JFV takes nothing returns nothing
call ClearTextMessagesBJ(M6(GetTriggerPlayer()))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),10.,(QC[bj_forLoopAIndex]+("Player "+(I2S((1+GetPlayerId(Player(-1+(bj_forLoopAIndex)))))+((" "+GetPlayerName(Player(-1+(bj_forLoopAIndex))))+(" = "+AD[bj_forLoopAIndex]))))))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function JHV takes nothing returns nothing
call ClearTextMessagesBJ(M6(GetTriggerPlayer()))
endfunction
function JKV takes nothing returns boolean
return(CountUnitsInGroup(BD)==1)and(GetOwningPlayer(GetEnumUnit())==GetTriggerPlayer())
endfunction
function JLV takes nothing returns nothing
if(JKV())then
set CD=GetEnumUnit()
set UB=GetUnitStateSwap(UNIT_STATE_LIFE,CD)
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),6.,("The selected unit current hitpoints is "+R2S(UB)))
set UB=.0
endif
endfunction
function JMV takes nothing returns nothing
set BD=L6(GetTriggerPlayer())
call ForGroupBJ(BD,function JLV)
set CD=null
endfunction
function JQV takes nothing returns boolean
return(CountUnitsInGroup(BD)==1)and(GetOwningPlayer(GetEnumUnit())==GetTriggerPlayer())
endfunction
function JSV takes nothing returns nothing
if(JQV())then
set CD=GetEnumUnit()
set UB=GetUnitStateSwap(UNIT_STATE_MANA,CD)
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),6.,("The selected unit current manapoints is "+R2S(UB)))
set UB=.0
endif
endfunction
function JTV takes nothing returns nothing
set BD=L6(GetTriggerPlayer())
call ForGroupBJ(BD,function JSV)
set CD=null
endfunction
function JWV takes nothing returns boolean
return(CountUnitsInGroup(BD)==1)and(GetOwningPlayer(GetEnumUnit())==GetTriggerPlayer())
endfunction
function JYV takes nothing returns nothing
if(JWV())then
set CD=GetEnumUnit()
set UB=GetUnitMoveSpeed(CD)
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),6.,("The selected unit current movement speed is "+R2S(UB)))
set UB=.0
endif
endfunction
function JZV takes nothing returns nothing
set BD=L6(GetTriggerPlayer())
call ForGroupBJ(BD,function JYV)
set CD=null
endfunction
function J0V takes nothing returns boolean
return(GetSpellAbilityId()=='Asds')
endfunction
function J1V takes nothing returns nothing
set VD=GetUnitLoc(GetSpellAbilityUnit())
call PlaySoundAtPointBJ(GK,100,VD,0)
call KillSoundWhenDone(GK)
call RemoveLocation(VD)
endfunction
function J3V takes nothing returns boolean
return(GetSpellAbilityId()=='A04Q')
endfunction
function J4V takes nothing returns nothing
local unit FD=GetTriggerUnit()
call UnitAddAbility(FD,'A04R')
call TriggerSleepAction(10.)
call UnitRemoveAbility(FD,'A04R')
set FD=null
endfunction
function J6V takes nothing returns boolean
return(GetSpellAbilityId()=='A04X')
endfunction
function J7V takes nothing returns nothing
local unit DD=GetTriggerUnit()
set VD=GetUnitLoc(GetSpellAbilityUnit())
call AddSpecialEffectLocBJ(VD,"Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(VD)
call UnitAddAbility(DD,'A04Y')
call TriggerSleepAction(7.)
call UnitRemoveAbility(DD,'A04Y')
set DD=null
endfunction
function J9V takes nothing returns boolean
return(GetSpellAbilityId()=='A04K')
endfunction
function KVV takes nothing returns nothing
local unit ND=GetTriggerUnit()
call UnitAddAbility(ND,'A04J')
call TriggerSleepAction(12.)
call UnitRemoveAbility(ND,'A04J')
set ND=null
endfunction
function KXV takes nothing returns boolean
return(UnitHasItemOfTypeBJ(GetSpellAbilityUnit(),'I00Z')==false)and(GetSpellAbilityId()=='A01V')
endfunction
function KOV takes nothing returns boolean
return(GetUnitLifePercent(GetSpellAbilityUnit())>10.)
endfunction
function KRV takes nothing returns nothing
if(KOV())then
call SetUnitLifePercentBJ(GetSpellAbilityUnit(),((90./ 100.)*GetUnitLifePercent(GetSpellAbilityUnit())))
endif
endfunction
function KAV takes nothing returns boolean
return((IsUnitType(GetKillingUnit(),UNIT_TYPE_HERO))and(IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),EB))and(IsPlayerInForce(GetOwningPlayer(GetDyingUnit()),XB))and(UnitHasItemOfTypeBJ(GetKillingUnit(),'I022')))!=null
endfunction
function KNV takes nothing returns boolean
return(GetRandomInt(1,4)==2)
endfunction
function KBV takes nothing returns nothing
if(KNV())then
set VD=GetUnitLoc(GetKillingUnit())
call CreateTextTagLocBJ("+20 Bonus Gold",VD,0,7.,100,100,100,0)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,1.)
call AddSpecialEffectLocBJ(VD,"UI\\Feedback\\GoldCredit\\GoldCredit.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(VD)
call AdjustPlayerStateBJ(20,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endif
endfunction
function KDV takes nothing returns boolean
return((IsUnitType(GetKillingUnit(),UNIT_TYPE_HERO))and(IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),EB))and(IsPlayerInForce(GetOwningPlayer(GetDyingUnit()),XB))and(UnitHasItemOfTypeBJ(GetKillingUnit(),'I023')))!=null
endfunction
function KFV takes nothing returns boolean
return(GetRandomInt(1,3)==2)
endfunction
function KGV takes nothing returns nothing
if(KFV())then
set VD=GetUnitLoc(GetKillingUnit())
call CreateTextTagLocBJ("+80 Bonus Gold",VD,0,7.,100,100,100,0)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,1.)
call AddSpecialEffectLocBJ(VD,"Abilities\\Spells\\Other\\Transmute\\PileofGold.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(VD)
call AdjustPlayerStateBJ(80,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endif
endfunction
function KJV takes nothing returns boolean
return((GetSpellAbilityId()=='A051')and(IsUnitType(GetSpellAbilityUnit(),UNIT_TYPE_HERO))and(GetUnitTypeId(GetSpellAbilityUnit())!='H01L')and(GetUnitTypeId(GetSpellAbilityUnit())!='H03A'))!=null
endfunction
function Trig_blast_staff_Func005002003001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))!=null
endfunction
function Trig_blast_staff_Func005002003002 takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()),GetOwningPlayer(GetSpellAbilityUnit())))
endfunction
function KKV takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)),(IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()),GetOwningPlayer(GetSpellAbilityUnit())))))!=null
endfunction
function KLV takes nothing returns nothing
call UnitDamageTargetBJ(GetSpellAbilityUnit(),GetEnumUnit(),I2R(((GetHeroStatBJ(2,GetSpellAbilityUnit(),true)*45)+100000)),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC)
set HD=GetUnitLoc(GetEnumUnit())
call AddSpecialEffectLocBJ(HD,"Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call CreateNUnitsAtLoc(1,'n00O',GetOwningPlayer(GetSpellAbilityUnit()),HD,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A050')
call IssueTargetOrderById(bj_lastCreatedUnit,852662,GetEnumUnit())
call RemoveLocation(HD)
endfunction
function KMV takes nothing returns nothing
set VD=GetSpellTargetLoc()
call AddSpecialEffectLocBJ(VD,"Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl")
call DestroyEffect(bj_lastCreatedEffect)
set GD=C6(220.,VD,Condition(function KKV))
call ForGroupBJ(GD,function KLV)
call RemoveLocation(VD)
call DestroyGroup(GD)
endfunction
function KQV takes nothing returns boolean
return((GetSpellAbilityId()=='A055')and(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_STRUCTURE)==false))!=null
endfunction
function KSV takes nothing returns nothing
local unit JD
set JD=GetSpellTargetUnit()
set HD=GetUnitLoc(GetSpellTargetUnit())
call PauseUnit(JD,true)
call CreateNUnitsAtLoc(1,'n00P',GetOwningPlayer(GetSpellAbilityUnit()),HD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A056')
call IssueTargetOrderById(bj_lastCreatedUnit,852093,GetSpellAbilityUnit())
call UnitApplyTimedLifeBJ(20.,'BTLF',bj_lastCreatedUnit)
call SetPlayerAbilityAvailableBJ(false,'A055',GetOwningPlayer(GetSpellAbilityUnit()))
call RemoveLocation(HD)
call TriggerSleepAction(12.)
call SetUnitPositionLoc(JD,KD)
call PauseUnit(JD,false)
call AddSpecialEffectLocBJ(KD,"Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
set JD=null
endfunction
function KUV takes nothing returns boolean
return(GetSpellAbilityId()=='A02X')or(GetSpellAbilityId()=='A030')or(GetSpellAbilityId()=='A031')or(GetSpellAbilityId()=='A00Y')or(GetSpellAbilityId()=='A033')or(GetSpellAbilityId()=='A035')or(GetSpellAbilityId()=='A034')or(GetSpellAbilityId()=='A032')
endfunction
function KWV takes nothing returns boolean
return((IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_STRUCTURE))and(KUV()))!=null
endfunction
function KYV takes nothing returns nothing
local location R6=GetUnitLoc(GetSpellTargetUnit())
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",GetLocationX(R6),GetLocationY(R6)))
call RemoveLocation(R6)
set R6=null
endfunction
function KZV takes nothing returns boolean
return(GetSpellAbilityId()=='A05G')and(UnitHasBuffBJ(GetTriggerUnit(),'BNso'))
endfunction
function K_V takes nothing returns nothing
call IssueImmediateOrderById(GetTriggerUnit(),851972)
endfunction
function K1V takes nothing returns boolean
return(GetSpellAbilityId()=='A05G')
endfunction
function K2V takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h00V')
endfunction
function K3V takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h010')
endfunction
function K4V takes nothing returns nothing
if(K3V())then
call ReplaceUnitBJ(GetTriggerUnit(),'h00V',1)
call SelectUnitForPlayerSingle(bj_lastReplacedUnit,GetOwningPlayer(bj_lastReplacedUnit))
call UnitAddItemByIdSwapped('I014',bj_lastReplacedUnit)
call UnitAddItemByIdSwapped('I02K',bj_lastReplacedUnit)
else
if(K2V())then
call ReplaceUnitBJ(GetTriggerUnit(),'h010',1)
call SelectUnitForPlayerSingle(bj_lastReplacedUnit,GetOwningPlayer(bj_lastReplacedUnit))
call UnitAddItemByIdSwapped('I014',bj_lastReplacedUnit)
call UnitAddItemByIdSwapped('I02K',bj_lastReplacedUnit)
endif
endif
endfunction
function K6V takes nothing returns boolean
return(GetSpellAbilityId()=='A05G')
endfunction
function K7V takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h03G')
endfunction
function K8V takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h03F')
endfunction
function K9V takes nothing returns nothing
if(K8V())then
call ReplaceUnitBJ(GetTriggerUnit(),'h03G',1)
call SelectUnitForPlayerSingle(bj_lastReplacedUnit,GetOwningPlayer(bj_lastReplacedUnit))
call UnitAddItemByIdSwapped('I02J',bj_lastReplacedUnit)
call UnitAddItemByIdSwapped('I02K',bj_lastReplacedUnit)
else
if(K7V())then
call ReplaceUnitBJ(GetTriggerUnit(),'h03F',1)
call SelectUnitForPlayerSingle(bj_lastReplacedUnit,GetOwningPlayer(bj_lastReplacedUnit))
call UnitAddItemByIdSwapped('I02J',bj_lastReplacedUnit)
call UnitAddItemByIdSwapped('I02K',bj_lastReplacedUnit)
endif
endif
endfunction
function LEV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='h010')and(GetUnitTypeId(GetTriggerUnit())!='h00V')and(GetItemTypeId(GetManipulatedItem())=='I014')
endfunction
function LXV takes nothing returns nothing
call RemoveItem(GetManipulatedItem())
endfunction
function LRV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())==Player(0))and(GetItemTypeId(GetManipulatedItem())=='I014')
endfunction
function LIV takes nothing returns boolean
return(WB[1]==1)
endfunction
function LAV takes nothing returns boolean
return(WB[1]==0)
endfunction
function LNV takes nothing returns nothing
if(LAV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest ON---")
set WB[1]=1
else
if(LIV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest OFF---")
set WB[1]=0
endif
endif
endfunction
function LCV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())==Player(1))and(GetItemTypeId(GetManipulatedItem())=='I014')
endfunction
function LDV takes nothing returns boolean
return(WB[2]==1)
endfunction
function LFV takes nothing returns boolean
return(WB[2]==0)
endfunction
function LGV takes nothing returns nothing
if(LFV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest ON---")
set WB[2]=1
else
if(LDV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest OFF---")
set WB[2]=0
endif
endif
endfunction
function LJV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())==Player(2))and(GetItemTypeId(GetManipulatedItem())=='I014')
endfunction
function LKV takes nothing returns boolean
return(WB[3]==1)
endfunction
function LLV takes nothing returns boolean
return(WB[3]==0)
endfunction
function LMV takes nothing returns nothing
if(LLV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest ON---")
set WB[3]=1
else
if(LKV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest OFF---")
set WB[3]=0
endif
endif
endfunction
function LQV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())==Player(3))and(GetItemTypeId(GetManipulatedItem())=='I014')
endfunction
function LSV takes nothing returns boolean
return(WB[4]==1)
endfunction
function LTV takes nothing returns boolean
return(WB[4]==0)
endfunction
function LUV takes nothing returns nothing
if(LTV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest ON---")
set WB[4]=1
else
if(LSV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest OFF---")
set WB[4]=0
endif
endif
endfunction
function LYV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())==Player(4))and(GetItemTypeId(GetManipulatedItem())=='I014')
endfunction
function LZV takes nothing returns boolean
return(WB[5]==1)
endfunction
function L_V takes nothing returns boolean
return(WB[5]==0)
endfunction
function L0V takes nothing returns nothing
if(L_V())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest ON---")
set WB[5]=1
else
if(LZV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest OFF---")
set WB[5]=0
endif
endif
endfunction
function L2V takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())==Player(5))and(GetItemTypeId(GetManipulatedItem())=='I014')
endfunction
function L3V takes nothing returns boolean
return(WB[6]==1)
endfunction
function L4V takes nothing returns boolean
return(WB[6]==0)
endfunction
function L5V takes nothing returns nothing
if(L4V())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest ON---")
set WB[6]=1
else
if(L3V())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest OFF---")
set WB[6]=0
endif
endif
endfunction
function L7V takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())==Player(6))and(GetItemTypeId(GetManipulatedItem())=='I014')
endfunction
function L8V takes nothing returns boolean
return(WB[7]==1)
endfunction
function L9V takes nothing returns boolean
return(WB[7]==0)
endfunction
function MVV takes nothing returns nothing
if(L9V())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest ON---")
set WB[7]=1
else
if(L8V())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest OFF---")
set WB[7]=0
endif
endif
endfunction
function MXV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())==Player(7))and(GetItemTypeId(GetManipulatedItem())=='I014')
endfunction
function MOV takes nothing returns boolean
return(WB[8]==1)
endfunction
function MRV takes nothing returns boolean
return(WB[8]==0)
endfunction
function MIV takes nothing returns nothing
if(MRV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest ON---")
set WB[8]=1
else
if(MOV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest OFF---")
set WB[8]=0
endif
endif
endfunction
function MNV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())==Player(8))and(GetItemTypeId(GetManipulatedItem())=='I014')
endfunction
function MBV takes nothing returns boolean
return(WB[9]==1)
endfunction
function MCV takes nothing returns boolean
return(WB[9]==0)
endfunction
function MDV takes nothing returns nothing
if(MCV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest ON---")
set WB[9]=1
else
if(MBV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest OFF---")
set WB[9]=0
endif
endif
endfunction
function MGV takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())==Player(9))and(GetItemTypeId(GetManipulatedItem())=='I014')
endfunction
function MHV takes nothing returns boolean
return(WB[10]==1)
endfunction
function MJV takes nothing returns boolean
return(WB[10]==0)
endfunction
function MKV takes nothing returns nothing
if(MJV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest ON---")
set WB[10]=1
else
if(MHV())then
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"---Auto Harvest OFF---")
set WB[10]=0
endif
endif
endfunction
function MMV takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='h00A')or(GetUnitTypeId(GetTrainedUnit())=='h00K')or(GetUnitTypeId(GetTrainedUnit())=='h00T')or(GetUnitTypeId(GetTrainedUnit())=='hWkr')or(GetUnitTypeId(GetTrainedUnit())=='h007')
endfunction
function MPV takes nothing returns boolean
return(GetOwningPlayer(GetTrainedUnit())==Player(0))and(WB[1]==1)and(MMV())
endfunction
function MQV takes nothing returns nothing
call IssueImmediateOrderById(GetTrainedUnit(),852022)
endfunction
function MTV takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='h00A')or(GetUnitTypeId(GetTrainedUnit())=='h00K')or(GetUnitTypeId(GetTrainedUnit())=='h00T')or(GetUnitTypeId(GetTrainedUnit())=='hWkr')or(GetUnitTypeId(GetTrainedUnit())=='h007')
endfunction
function MUV takes nothing returns boolean
return(GetOwningPlayer(GetTrainedUnit())==Player(1))and(WB[2]==1)and(MTV())
endfunction
function MWV takes nothing returns nothing
call IssueImmediateOrderById(GetTrainedUnit(),852022)
endfunction
function MZV takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='h00A')or(GetUnitTypeId(GetTrainedUnit())=='h00K')or(GetUnitTypeId(GetTrainedUnit())=='h00T')or(GetUnitTypeId(GetTrainedUnit())=='hWkr')or(GetUnitTypeId(GetTrainedUnit())=='h007')
endfunction
function M_V takes nothing returns boolean
return(GetOwningPlayer(GetTrainedUnit())==Player(2))and(WB[3]==1)and(MZV())
endfunction
function M0V takes nothing returns nothing
call IssueImmediateOrderById(GetTrainedUnit(),852022)
endfunction
function M2V takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='h00A')or(GetUnitTypeId(GetTrainedUnit())=='h00K')or(GetUnitTypeId(GetTrainedUnit())=='h00T')or(GetUnitTypeId(GetTrainedUnit())=='hWkr')or(GetUnitTypeId(GetTrainedUnit())=='h007')
endfunction
function M3V takes nothing returns boolean
return(GetOwningPlayer(GetTrainedUnit())==Player(3))and(WB[4]==1)and(M2V())
endfunction
function M4V takes nothing returns nothing
call IssueImmediateOrderById(GetTrainedUnit(),852022)
endfunction
function M6V takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='h00A')or(GetUnitTypeId(GetTrainedUnit())=='h00K')or(GetUnitTypeId(GetTrainedUnit())=='h00T')or(GetUnitTypeId(GetTrainedUnit())=='hWkr')or(GetUnitTypeId(GetTrainedUnit())=='h007')
endfunction
function M7V takes nothing returns boolean
return(GetOwningPlayer(GetTrainedUnit())==Player(4))and(WB[5]==1)and(M6V())
endfunction
function M8V takes nothing returns nothing
call IssueImmediateOrderById(GetTrainedUnit(),852022)
endfunction
function PVV takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='h00A')or(GetUnitTypeId(GetTrainedUnit())=='h00K')or(GetUnitTypeId(GetTrainedUnit())=='h00T')or(GetUnitTypeId(GetTrainedUnit())=='hWkr')or(GetUnitTypeId(GetTrainedUnit())=='h007')
endfunction
function PEV takes nothing returns boolean
return(GetOwningPlayer(GetTrainedUnit())==Player(5))and(WB[6]==1)and(PVV())
endfunction
function PXV takes nothing returns nothing
call IssueImmediateOrderById(GetTrainedUnit(),852022)
endfunction
function PRV takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='h00A')or(GetUnitTypeId(GetTrainedUnit())=='h00K')or(GetUnitTypeId(GetTrainedUnit())=='h00T')or(GetUnitTypeId(GetTrainedUnit())=='hWkr')or(GetUnitTypeId(GetTrainedUnit())=='h007')
endfunction
function PIV takes nothing returns boolean
return(GetOwningPlayer(GetTrainedUnit())==Player(6))and(WB[7]==1)and(PRV())
endfunction
function PAV takes nothing returns nothing
call IssueImmediateOrderById(GetTrainedUnit(),852022)
endfunction
function PBV takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='h00A')or(GetUnitTypeId(GetTrainedUnit())=='h00K')or(GetUnitTypeId(GetTrainedUnit())=='h00T')or(GetUnitTypeId(GetTrainedUnit())=='hWkr')or(GetUnitTypeId(GetTrainedUnit())=='h007')
endfunction
function PCV takes nothing returns boolean
return(GetOwningPlayer(GetTrainedUnit())==Player(7))and(WB[8]==1)and(PBV())
endfunction
function PDV takes nothing returns nothing
call IssueImmediateOrderById(GetTrainedUnit(),852022)
endfunction
function PGV takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='h00A')or(GetUnitTypeId(GetTrainedUnit())=='h00K')or(GetUnitTypeId(GetTrainedUnit())=='h00T')or(GetUnitTypeId(GetTrainedUnit())=='hWkr')or(GetUnitTypeId(GetTrainedUnit())=='h007')
endfunction
function PHV takes nothing returns boolean
return(GetOwningPlayer(GetTrainedUnit())==Player(8))and(WB[9]==1)and(PGV())
endfunction
function PJV takes nothing returns nothing
call IssueImmediateOrderById(GetTrainedUnit(),852022)
endfunction
function PLV takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='h00A')or(GetUnitTypeId(GetTrainedUnit())=='h00K')or(GetUnitTypeId(GetTrainedUnit())=='h00T')or(GetUnitTypeId(GetTrainedUnit())=='hWkr')or(GetUnitTypeId(GetTrainedUnit())=='h007')
endfunction
function PMV takes nothing returns boolean
return(GetOwningPlayer(GetTrainedUnit())==Player(9))and(WB[10]==1)and(PLV())
endfunction
function PPV takes nothing returns nothing
call IssueImmediateOrderById(GetTrainedUnit(),852022)
endfunction
function PSV takes nothing returns boolean
return((IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),EB))and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)))!=null
endfunction
function PTV takes nothing returns nothing
call TriggerRegisterUnitEvent(CQ,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
endfunction
function PWV takes nothing returns boolean
return(GetUnitTypeId(GetEventDamageSource())=='u00H')or(GetUnitTypeId(GetEventDamageSource())=='u00M')or(GetUnitTypeId(GetEventDamageSource())=='u00L')
endfunction
function PYV takes nothing returns boolean
return(PWV())
endfunction
function PZV takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A05K',GetTriggerUnit())==0)
endfunction
function P_V takes nothing returns nothing
set HD=GetUnitLoc(GetTriggerUnit())
if(PZV())then
call UnitAddAbility(GetTriggerUnit(),'A05K')
call CreateNUnitsAtLoc(1,'h01F',Player(15),HD,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,851985,GetTriggerUnit())
else
call SetUnitAbilityLevelSwapped('A05K',GetTriggerUnit(),(GetUnitAbilityLevelSwapped('A05K',GetTriggerUnit())+1))
call CreateNUnitsAtLoc(1,'h01F',Player(15),HD,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,851985,GetTriggerUnit())
endif
call RemoveLocation(HD)
endfunction
function P1V takes nothing returns boolean
return(GetUnitAbilityLevel(GetFilterUnit(),'A05K')>0)and(GetUnitAbilityLevel(GetFilterUnit(),'B00G')<1)
endfunction
function P2V takes nothing returns nothing
local unit u
local group g
set g=A6(bj_mapInitialPlayableArea,Condition(function P1V))
loop
set u=FirstOfGroup(g)
exitwhen(u==null)
call GroupRemoveUnit(g,u)
call UnitRemoveAbility(u,'A05K')
endloop
set g=null
call DestroyGroup(g)
endfunction
function P3V takes nothing returns boolean
return(GetSpellAbilityId()=='tKil')
endfunction
function P4V takes nothing returns nothing
call KillDestructable(GetSpellTargetDestructable())
endfunction
function P6V takes nothing returns boolean
return GetSpellAbilityId()=='tGrw'
endfunction
function P7V takes nothing returns nothing
call DestructableRestoreLife(GetEnumDestructable(),GetDestructableMaxLife(GetEnumDestructable()),true)
endfunction
function P8V takes nothing returns nothing
local location R6=GetSpellTargetLoc()
call X6(300.,R6,function P7V)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIvi\\AIviTarget.mdl",GetLocationX(R6),GetLocationY(R6)))
call RemoveLocation(R6)
set R6=null
endfunction
function P9V takes nothing returns boolean
return(GetSpellAbilityId()=='A01S')
endfunction
function QVV takes nothing returns nothing
call RemoveUnit(GetTriggerUnit())
endfunction
function QXV takes nothing returns boolean
return(GetUnitTypeId(GetEnteringUnit())=='otot')
endfunction
function QOV takes nothing returns nothing
call PlaySoundOnUnitBJ(OK,100,GetEnteringUnit())
call KillSoundWhenDone(OK)
endfunction
function QIV takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='otot')
endfunction
function QAV takes nothing returns nothing
call PlaySoundOnUnitBJ(RK,100,GetDyingUnit())
call KillSoundWhenDone(RK)
endfunction
function QBV takes nothing returns boolean
return(GetSpellAbilityId()=='A01H')
endfunction
function QCV takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function QDV takes nothing returns nothing
set RD=F6('h039')
call ForGroupBJ(RD,function QCV)
call DestroyGroup(RD)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=18
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set OD=(OD+20.)
set XD=W5(GetUnitLoc(GetSpellAbilityUnit()),(GetUnitDefaultAcquireRange(GetSpellTargetUnit())+75.),OD)
call CreateNUnitsAtLoc(1,'h039',GetOwningPlayer(GetSpellAbilityUnit()),XD,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(XD)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set OD=.0
endfunction
function QGV takes nothing returns boolean
return(GetSpellAbilityId()=='A05D')
endfunction
function QHV takes nothing returns nothing
local unit JD
set JD=GetSpellAbilityUnit()
set LD[(1+GetPlayerId(GetOwningPlayer(JD)))]=GetSpellTargetLoc()
call AddSpecialEffectLocBJ(LD[(1+GetPlayerId(GetOwningPlayer(JD)))],"Units\\Demon\\Infernal\\InfernalBirth.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call TriggerSleepAction(1.)
call CreateNUnitsAtLoc(1,'n00Q',GetOwningPlayer(JD),LD[(1+GetPlayerId(GetOwningPlayer(JD)))],bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(30.,'BTLF',bj_lastCreatedUnit)
set JD=null
endfunction
function QKV takes nothing returns boolean
return(GetSpellAbilityId()=='A05E')
endfunction
function QLV takes nothing returns nothing
local unit JD
set JD=GetSpellAbilityUnit()
set LD[(1+GetPlayerId(GetOwningPlayer(JD)))]=GetSpellTargetLoc()
call AddSpecialEffectLocBJ(LD[(1+GetPlayerId(GetOwningPlayer(JD)))],"Units\\Demon\\Infernal\\InfernalBirth.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call TriggerSleepAction(1.)
call CreateNUnitsAtLoc(1,'n00S',GetOwningPlayer(JD),LD[(1+GetPlayerId(GetOwningPlayer(JD)))],bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(30.,'BTLF',bj_lastCreatedUnit)
set JD=null
endfunction
function QPV takes nothing returns boolean
return(GetSpellAbilityId()=='A05F')
endfunction
function QQV takes nothing returns nothing
local unit JD
set JD=GetSpellAbilityUnit()
set LD[(1+GetPlayerId(GetOwningPlayer(JD)))]=GetSpellTargetLoc()
call AddSpecialEffectLocBJ(LD[(1+GetPlayerId(GetOwningPlayer(JD)))],"Units\\Demon\\Infernal\\InfernalBirth.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call TriggerSleepAction(1.)
call CreateNUnitsAtLoc(1,'n00R',GetOwningPlayer(JD),LD[(1+GetPlayerId(GetOwningPlayer(JD)))],bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(30.,'BTLF',bj_lastCreatedUnit)
set JD=null
endfunction
function QTV takes nothing returns nothing
call UnitAddAbility(RU,'A04H')
call UnitAddAbility(BU,'A04H')
endfunction
function QWV takes nothing returns boolean
return(GetSpellAbilityId()=='A04H')
endfunction
function QYV takes nothing returns nothing
call GroupAddUnit(ID,GetEnumUnit())
endfunction
function QZV takes nothing returns nothing
call GroupAddUnit(ID,GetEnumUnit())
endfunction
function Q_V takes nothing returns nothing
call GroupAddUnit(ID,GetEnumUnit())
endfunction
function Q0V takes nothing returns nothing
call GroupAddUnit(ID,GetEnumUnit())
endfunction
function Q1V takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'A044')
call UnitRemoveAbility(GetEnumUnit(),'A045')
call UnitRemoveAbility(GetEnumUnit(),'A046')
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetSpellAbilityUnit())),3.,"Graphics attachment effects on your vampire is now OFF.")
endfunction
function Q2V takes nothing returns nothing
call ForGroupBJ(K6(GetOwningPlayer(GetSpellAbilityUnit()),'E002'),function QYV)
call ForGroupBJ(K6(GetOwningPlayer(GetSpellAbilityUnit()),'E001'),function QZV)
call ForGroupBJ(K6(GetOwningPlayer(GetSpellAbilityUnit()),'E000'),function Q_V)
call ForGroupBJ(K6(GetOwningPlayer(GetSpellAbilityUnit()),'E004'),function Q0V)
call ForGroupBJ(ID,function Q1V)
call DestroyGroup(ID)
call UnitRemoveAbility(GetSpellAbilityUnit(),'A04H')
endfunction
function Q4V takes nothing returns boolean
return GetResearched()=='R00I'
endfunction
function Q5V takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and GetUnitTypeId(GetFilterUnit())!='U00G')!=null
endfunction
function Q6V takes nothing returns nothing
local group g=H6(GetOwningPlayer(GetResearchingUnit()),Condition(function Q5V))
local unit f
loop
set f=FirstOfGroup(g)
exitwhen(f==null)
call GroupRemoveUnit(g,f)
call SetHeroLevelBJ(f,(GetHeroLevel(f)+1),false)
endloop
call DestroyGroup(g)
set f=null
endfunction
function Q7V takes nothing returns boolean
return GetResearched()=='R00E'
endfunction
function Q8V takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and GetUnitTypeId(GetFilterUnit())!='U00G')!=null
endfunction
function Q9V takes nothing returns nothing
local group g=H6(GetOwningPlayer(GetResearchingUnit()),Condition(function Q8V))
local unit f
loop
set f=FirstOfGroup(g)
exitwhen(f==null)
call GroupRemoveUnit(g,f)
call ModifyHeroStat(0,f,0,300)
endloop
call DestroyGroup(g)
set f=null
endfunction
function SVV takes nothing returns boolean
return GetResearched()=='R00D'
endfunction
function SEV takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and GetUnitTypeId(GetFilterUnit())!='U00G')!=null
endfunction
function SXV takes nothing returns nothing
local group g=H6(GetOwningPlayer(GetResearchingUnit()),Condition(function SEV))
local unit f
loop
set f=FirstOfGroup(g)
exitwhen(f==null)
call GroupRemoveUnit(g,f)
call ModifyHeroStat(2,f,0,1200)
endloop
call DestroyGroup(g)
set f=null
endfunction
function SOV takes nothing returns boolean
return GetResearched()=='R00C'
endfunction
function SRV takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and GetUnitTypeId(GetFilterUnit())!='U00G')!=null
endfunction
function SIV takes nothing returns nothing
local group g=H6(GetOwningPlayer(GetResearchingUnit()),Condition(function SRV))
local unit f
loop
set f=FirstOfGroup(g)
exitwhen(f==null)
call GroupRemoveUnit(g,f)
call ModifyHeroStat(1,f,0,300)
endloop
call DestroyGroup(g)
set f=null
endfunction
function SAV takes nothing returns boolean
return GetResearched()=='R00G'
endfunction
function SNV takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and GetUnitTypeId(GetFilterUnit())!='U00G')!=null
endfunction
function SBV takes nothing returns nothing
local group g=H6(GetOwningPlayer(GetResearchingUnit()),Condition(function SNV))
local unit f
loop
set f=FirstOfGroup(g)
exitwhen(f==null)
call GroupRemoveUnit(g,f)
call ModifyHeroStat(0,f,0,300)
call ModifyHeroStat(1,f,0,300)
call ModifyHeroStat(2,f,0,300)
endloop
call DestroyGroup(g)
set f=null
endfunction
function SCV takes nothing returns boolean
return GetResearched()=='R00H'
endfunction
function SDV takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and GetUnitTypeId(GetFilterUnit())!='U00G')!=null
endfunction
function SFV takes nothing returns nothing
local group g=H6(GetOwningPlayer(GetResearchingUnit()),Condition(function SDV))
local unit f
loop
set f=FirstOfGroup(g)
exitwhen(f==null)
call GroupRemoveUnit(g,f)
call ModifyHeroStat(0,f,0,2000)
call ModifyHeroStat(1,f,0,2000)
call ModifyHeroStat(2,f,0,2000)
endloop
call DestroyGroup(g)
set f=null
endfunction
function SGV takes nothing returns nothing
call SetPlayerTechResearchedSwap('R00P',1,GetEnumPlayer())
endfunction
function SHV takes nothing returns nothing
call ForForce(XB,function SGV)
endfunction
function SKV takes nothing returns nothing
call PlaySoundBJ(DK)
call KillSoundWhenDone(DK)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"Map Made By |c00000000DumbassKing|r and |c0000FFFFSaMmM|r")
endfunction
function SMV takes nothing returns nothing
call PlaySoundBJ(DK)
call KillSoundWhenDone(DK)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"If you like the game, drop by Vampirism-SPEED.blogspot.com for updates and Newest Version|r")
endfunction
function SQV takes nothing returns boolean
return(GetUnitTypeId(GetSellingUnit())=='vPt2' and IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO))!=null
endfunction
function SSV takes nothing returns nothing
local integer id=GetUnitTypeId(GetSoldUnit())
local player p=GetOwningPlayer(GetSoldUnit())
local real x=GetUnitX(GetSellingUnit())
local real y=GetUnitY(GetSellingUnit())
if id=='E001' or id=='E005' then
call ForceAddPlayer(HN,p)
elseif id=='E002' then
call ForceAddPlayer(JN,p)
elseif id=='E005' then
call ForceAddPlayer(KN,p)
endif
if GetOwningPlayer(GetSoldUnit())==Player(10)then
set FN=GetSoldUnit()
call ShowUnit(FN,false)
endif
if GetOwningPlayer(GetSoldUnit())==Player(11)then
set GN=GetSoldUnit()
call ShowUnit(GN,false)
endif
call RemoveUnit(GetSellingUnit())
call CreateUnit(p,'n014',x,y,.0)
endfunction
function SUV takes nothing returns nothing
local location R6=GetRectCenter(YD)
call StartTimerBJ(QU,false,50.)
//VAMPIRESPAWN
call CreateTimerDialogBJ(QU,"Vampire Spawn")
set SU=bj_lastCreatedTimerDialog
call CreateFogModifierRadiusLocBJ(true,Player(11),FOG_OF_WAR_VISIBLE,R6,800.)
set TU=bj_lastCreatedFogModifier
call CreateFogModifierRadiusLocBJ(true,Player(10),FOG_OF_WAR_VISIBLE,R6,800.)
set UU=bj_lastCreatedFogModifier
call RemoveLocation(R6)
endfunction
function SYV takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='u005'
endfunction
function SZV takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='h010' or GetUnitTypeId(GetFilterUnit())=='h00V'
endfunction
function S_V takes nothing returns nothing
local real x=GetUnitX(GetEnumUnit())
local real y=GetUnitY(GetEnumUnit())
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",x,y))
endfunction
function S0V takes nothing returns nothing
local real x=GetUnitX(GetEnumUnit())
local real y=GetUnitY(GetEnumUnit())
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl",x,y))
endfunction
function S1V takes nothing returns nothing
local group gr=CreateGroup()
local unit u=GetEnumUnit()
call MultiboardSetItemValueBJ(QD,2,GetPlayerId(GetOwningPlayer(u))+2,"AFK")
call PanCameraToForPlayer(Player(0),0,0)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" died to portal and apparently the portal doesn't give a single fuck."))
set gr=H6(GetOwningPlayer(GetEnumUnit()),null)
loop
set u=FirstOfGroup(gr)
exitwhen u==null
call GroupRemoveUnit(gr,u)
call RemoveUnit(u)
endloop
call ForceRemovePlayer(XB,GetOwningPlayer(GetEnumUnit()))
call DestroyGroup(gr)
set gr=null
set u=null
endfunction
function S2V takes nothing returns nothing
local player p
local unit f
local real x
local real y
local group g=CreateGroup()
local group g1=CreateGroup()
local group g2=CreateGroup()
local real z 
call DestroyTimerDialog(SU)
call DestroyTimer(QU)
set g=F6('vPt2')
loop
set f=FirstOfGroup(g)
exitwhen f==null
call GroupRemoveUnit(g,f)
set x=GetUnitX(f)
set y=GetUnitY(f)
set z=GetUnitFlyHeight(f)
set p=GetOwningPlayer(f)
call RemoveUnit(f)
call CreateUnit(p,'n014',x,y,.0)
endloop
set x=GetRectCenterX(YD)
set y=GetRectCenterY(YD)
call TriggerSleepAction(.1)
call GroupEnumUnitsInRect(g1,bj_mapInitialPlayableArea,Condition(function SYV))
call ForGroupBJ(g1,function S_V)
call TriggerSleepAction(.5)
call ForGroupBJ(g1,function S0V)
call TriggerSleepAction(.5)
call RemoveUnit(OU)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",x,y))
call GroupEnumUnitsInRect(g2,UD,Condition(function SZV))
call ForGroupBJ(g2,function S1V)
loop
set f=FirstOfGroup(g1)
exitwhen f==null
call GroupRemoveUnit(g1,f)
call ExplodeUnitBJ(f)
endloop
if GetPlayerSlotState(Player(10))==PLAYER_SLOT_STATE_PLAYING then
call MultiboardSetItemValueBJ(QD,2,GetPlayerId(Player(10))+2,"Vampire (Alive)")
call SetPlayerTechResearchedSwap('R00P',1,Player(10))
if FN==null then
set FN=CreateUnit(Player(10),'E001',x,y,.0)
call UnitAddItemById(FN,'I01I')
call ForceAddPlayer(EB,Player(10))
elseif FN!=null then
call SetUnitX(FN,x)
call SetUnitY(FN,y)
call ShowUnit(FN,true)
call UnitAddItemById(FN,'I01I')
call ForceAddPlayer(EB,Player(10))
endif
call SetHeroLevel(FN,5,false)
endif
if GetPlayerSlotState(Player(11))==PLAYER_SLOT_STATE_PLAYING then
call MultiboardSetItemValueBJ(QD,2,GetPlayerId(Player(11))+2,"Vampire (Alive)")
call SetPlayerTechResearchedSwap('R00P',1,Player(11))
if GN==null then
set GN=CreateUnit(Player(11),'E001',x,y,.0)
call UnitAddItemById(GN,'I01I')
call ForceAddPlayer(EB,Player(11))
elseif GN!=null then
call SetUnitX(GN,x)
call SetUnitY(GN,y)
call ShowUnit(GN,true)
call UnitAddItemById(GN,'I01I')
call ForceAddPlayer(EB,Player(11))
endif
call SetHeroLevel(GN,5,false)
endif
set MN=true
call ExecuteFunc("ORV")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cffFF0202An Ancient Evil is unleashed upon this land!|r")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cffFF0202The ANCIENT EVIL have returned!|r")
call SetSoundPosition(CK, x,y,z)
call PlaySoundBJ(CK)
call KillSoundWhenDone(CK)
call DestroyGroup(g)
call DestroyGroup(g1)
call DestroyGroup(g2)
call DestroyFogModifier(TU)
call DestroyFogModifier(UU)
endfunction
function S3V takes nothing returns nothing
local integer O8=0
local unit u
local real x
local real y
loop
exitwhen O8==10
set x=GetRandomReal(GetRectMinX(TD),GetRectMaxX(TD))
set y=GetRandomReal(GetRectMinY(TD),GetRectMaxY(TD))
if GetPlayerSlotState(Player(O8))==PLAYER_SLOT_STATE_PLAYING then
set u=CreateUnit(Player(O8),'h010',x,y,GetRandomInt(0,360))
call UnitAddItemById(u,'I014')
call UnitAddItemById(u,'I02K')
call SelectUnitForPlayerSingle(u,Player(O8))
call ForceAddPlayer(XB,Player(O8))
endif
set O8=O8+1
endloop
set u=null
endfunction
function S5V takes nothing returns boolean
return GetUnitAbilityLevel(GetDyingUnit(),'A05O')>0 and IsPlayerInForce(GetOwningPlayer(GetDyingUnit()),XB)
endfunction
function S6V takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='hFlg'
endfunction
function S7V takes nothing returns nothing
local unit u
local integer O8=0
local integer BUV=3
local player p=GetOwningPlayer(GetDyingUnit())
local group g=CreateGroup()
local real x=GetRectCenterX(YD)
local real y=GetRectCenterY(YD)
local real z 
call MultiboardSetItemValueBJ(QD,2,GetPlayerId(p)+2,"Vampire (Alive)")
call RemoveUnit(GetDyingUnit())
call SetPlayerStateBJ(p,PLAYER_STATE_RESOURCE_LUMBER,0)
call SetPlayerStateBJ(p,PLAYER_STATE_RESOURCE_GOLD,0)
call GroupEnumUnitsOfPlayer(g,p,Condition(function S6V))
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
call KillUnit(u)
endloop
call GroupClear(g)
call GroupEnumUnitsOfPlayer(g,p,null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
call RemoveUnit(u)
endloop
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has fallen and will now be reborn as a Vampire..."))
//call StopSoundBJ(bj_lastPlayedSound,false)
set z =GetUnitFlyHeight(u)
call SetSoundPosition(VK, x,y,z)
call PlaySoundBJ(VK)
call KillSoundWhenDone(VK)
call ForceRemovePlayer(XB,p)
call ForceAddPlayer(EB,p)
call FogEnableOff()
call FogMaskEnableOff()
call FogEnableOn()
loop
exitwhen O8>=12
if IsPlayerInForce(Player(O8),XB)and IsPlayerInForce(Player(O8),EB)==false then
call SetPlayerAllianceStateBJ(p,Player(O8),0)
call SetPlayerAllianceStateBJ(Player(O8),p,0)
else
call SetPlayerAllianceStateBJ(p,Player(O8),3)
call SetPlayerAllianceStateBJ(Player(O8),p,3)
endif
set O8=O8+1
endloop
if IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),JN)then
set u=CreateUnit(p,BB[GetRandomInt(3,4)],x,y,.0)
call ForceAddPlayer(JN,p)
elseif IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),KN)then
set u=CreateUnit(p,BB[GetRandomInt(5,6)],x,y,.0)
call ForceAddPlayer(KN,p)
elseif IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),KN)==false and IsPlayerInForce(GetOwningPlayer(GetKillingUnit()),JN)==false then
call ForceAddPlayer(HN,p)
set u=CreateUnit(p,BB[GetRandomInt(1,2)],x,y,.0)
endif
call UnitAddItemById(u,'I01I')
call UnitAddItemById(u,'I02R')
if BUV<(GetHeroLevel(GetKillingUnit())/ 2)+1 then
set BUV=(GetHeroLevel(GetKillingUnit())/ 2)+1
endif
call SetHeroLevel(u,BUV,false)
call PanCameraToTimedLocForPlayer(p,GetUnitLoc(u),0)
call ExecuteFunc("ORV")
set u=null
call DestroyGroup(g)
set g=null
endfunction
function S8V takes nothing returns boolean
return(IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)and IsPlayerInForce(GetOwningPlayer(GetDyingUnit()),EB)and IsUnitIllusion(GetDyingUnit())==false and GetUnitTypeId(GetDyingUnit())!='U00G')!=null
endfunction
function S9V takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function preventshadeattacking takes nothing returns nothing
local unit newu = GetLastCreatedUnit()
//call UnitAddItemByIdSwapped('ankh',GetLastCreatedUnit())
call UnitAddAbility(newu,'Aetl')//  ethreal
call UnitAddAbility(newu,'Asds')//  kaboom        
call UnitAddAbility(newu,'AEev')//  evasion
//call UnitAddAbility(newu,'Agld')//  Gold Mine ability      
call UnitAddAbility(newu,'A00J')//  3k HP
call SetUnitMoveSpeed(newu,522)
call SetUnitInvulnerable(newu,true)
endfunction
function TVV takes nothing returns nothing
local group g=CreateGroup()
local integer O8=0
local player p=GetTriggerPlayer()
local unit u=GetDyingUnit()
local unit newu=GetLastCreatedUnit()
call MultiboardSetItemValueBJ(QD,2,GetPlayerId(GetOwningPlayer(u))+2,"Observer")
call GroupEnumUnitsOfPlayer(g,GetOwningPlayer(u),null)
call ForGroupBJ(g,function S9V)
call ForceRemovePlayer(EB,GetOwningPlayer(u))
call CreateNUnitsAtLoc(1,'u00Q',p,GetRectCenter(YD),bj_UNIT_FACING)
call ExecuteFunc("preventshadeattacking")
//shade addd ability
call ExecuteFunc("ORV")
set u = null
set newu = null
set p = null
endfunction
function TXV takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='hFlg'
endfunction
function TOV takes nothing returns boolean
return IsPlayerInForce(GetOwningPlayer(GetDyingUnit()),LN)==false
endfunction
function TRV takes nothing returns nothing
call AdjustPlayerStateBJ(WU,GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
call DisplayTimedTextToPlayer(GetEnumPlayer(),.0,.0,6.,"You received "+I2S(WU)+" gold from the leaver.")
endfunction
function TIV takes nothing returns nothing
local player p=GetTriggerPlayer()
local group g=CreateGroup()
local unit u
local integer dummyint
local integer TAV
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,8.,GetPlayerName(p)+" has left the game.")
call MultiboardSetItemValueBJ(QD,2,GetPlayerId(p)+2,"Loser")
call GroupEnumUnitsOfPlayer(g,p,Condition(function TXV))
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
call KillUnit(u)
endloop
call GroupClear(g)
call GroupEnumUnitsOfPlayer(g,p,null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
call RemoveUnit(u)
endloop
if IsPlayerInForce(p,XB)then
call ForceRemovePlayer(XB,p)
elseif IsPlayerInForce(p,EB)then
call ForceRemovePlayer(EB,p)
endif
call TriggerSleepAction(2.)
call ExecuteFunc("ORV")
if IsPlayerInForce(p,XB)and CountPlayersInForceBJ(XB)>0 then
set TAV=CountPlayersInForceBJ(XB)
set WU=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)/ TAV
call ForForce(XB,function TRV)
elseif IsPlayerInForce(p,EB)and CountPlayersInForceBJ(EB)>0 then
set TAV=CountPlayersInForceBJ(EB)
set WU=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)/ TAV
call ForForce(EB,function TRV)
endif
call SetPlayerStateBJ(p,PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerStateBJ(p,PLAYER_STATE_RESOURCE_LUMBER,0)
call DestroyGroup(g)
set g=null
set u=null
endfunction
function TNV takes nothing returns nothing
call EnableTrigger(RS)
endfunction
function TCV takes nothing returns nothing
call AdjustPlayerStateBJ(1,GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
endfunction
function TDV takes nothing returns nothing
call ForForce(EB,function TCV)
endfunction
function Trig_sphere_stats_Func001002002001 takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetFilterUnit()),EB))
endfunction
function Trig_sphere_stats_Func001002002002 takes nothing returns boolean
return(UnitHasItemOfTypeBJ(GetFilterUnit(),'I00B'))
endfunction
function TGV takes nothing returns boolean
return GetBooleanAnd((IsPlayerInForce(GetOwningPlayer(GetFilterUnit()),EB)),(UnitHasItemOfTypeBJ(GetFilterUnit(),'I00B')))
endfunction
function THV takes nothing returns boolean
return(IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO))!=null
endfunction
function TJV takes nothing returns nothing
if(THV())then
call ModifyHeroStat(0,GetEnumUnit(),0,JB)
call ModifyHeroStat(1,GetEnumUnit(),0,JB)
call ModifyHeroStat(2,GetEnumUnit(),0,JB)
endif
endfunction
function TKV takes nothing returns nothing
set HB=A6(bj_mapInitialPlayableArea,Condition(function TGV))
call ForGroupBJ(HB,function TJV)
call DestroyGroup(HB)
endfunction
function TMV takes nothing returns nothing
set JB=(JB+7)
endfunction
function TQV takes nothing returns nothing
set JB=5
endfunction
function TTV takes nothing returns nothing
set KB=50
endfunction
function TWV takes nothing returns nothing
set KB=150
endfunction
function TZV takes nothing returns nothing
set KB=225
endfunction
function Trig_urn_60s_gold_Func001002002001 takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetFilterUnit()),EB))
endfunction
function Trig_urn_60s_gold_Func001002002002 takes nothing returns boolean
return(UnitHasItemOfTypeBJ(GetFilterUnit(),'I00Y'))
endfunction
function T0V takes nothing returns boolean
return GetBooleanAnd((IsPlayerInForce(GetOwningPlayer(GetFilterUnit()),EB)),(UnitHasItemOfTypeBJ(GetFilterUnit(),'I00Y')))
endfunction
function T1V takes nothing returns boolean
return((IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO))and(GetUnitTypeId(GetEnumUnit())!='U00G'))!=null
endfunction
function T2V takes nothing returns nothing
if(T1V())then
call AdjustPlayerStateBJ(KB,GetOwningPlayer(GetEnumUnit()),PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(1000,GetOwningPlayer(GetEnumUnit()),PLAYER_STATE_RESOURCE_LUMBER)
endif
endfunction
function T3V takes nothing returns nothing
set LB=A6(bj_mapInitialPlayableArea,Condition(function T0V))
call ForGroupBJ(LB,function T2V)
call DestroyGroup(LB)
endfunction
function T5V takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function T6V takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[1]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[1]))
endfunction
function T7V takes nothing returns boolean
return(T6V())
endfunction
function T8V takes nothing returns boolean
return(CountPlayersInForceBJ(DC[1])==0)
endfunction
function T9V takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[1])==0)
endfunction
function UVV takes nothing returns nothing
if(T9V())then
call ForceAddPlayer(DC[1],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(T8V())then
else
if(T7V())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function UXV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function UOV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[2]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[2]))
endfunction
function URV takes nothing returns boolean
return(UOV())
endfunction
function UIV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[2])==0)
endfunction
function UAV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[2])==0)
endfunction
function UNV takes nothing returns nothing
if(UAV())then
call ForceAddPlayer(DC[2],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(UIV())then
else
if(URV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function UCV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function UDV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[3]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[3]))
endfunction
function UFV takes nothing returns boolean
return(UDV())
endfunction
function UGV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[3])==0)
endfunction
function UHV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[3])==0)
endfunction
function UJV takes nothing returns nothing
if(UHV())then
call ForceAddPlayer(DC[3],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(UGV())then
else
if(UFV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function ULV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function UMV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[4]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[4]))
endfunction
function UPV takes nothing returns boolean
return(UMV())
endfunction
function UQV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[4])==0)
endfunction
function USV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[4])==0)
endfunction
function UTV takes nothing returns nothing
if(USV())then
call ForceAddPlayer(DC[4],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(UQV())then
else
if(UPV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function UWV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function UYV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[5]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[5]))
endfunction
function UZV takes nothing returns boolean
return(UYV())
endfunction
function U_V takes nothing returns boolean
return(CountPlayersInForceBJ(DC[5])==0)
endfunction
function U0V takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[5])==0)
endfunction
function U1V takes nothing returns nothing
if(U0V())then
call ForceAddPlayer(DC[5],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(U_V())then
else
if(UZV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function U3V takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function U4V takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[6]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[6]))
endfunction
function U5V takes nothing returns boolean
return(U4V())
endfunction
function U6V takes nothing returns boolean
return(CountPlayersInForceBJ(DC[6])==0)
endfunction
function U7V takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[6])==0)
endfunction
function U8V takes nothing returns nothing
if(U7V())then
call ForceAddPlayer(DC[6],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(U6V())then
else
if(U5V())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function WVV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function WEV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[7]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[7]))
endfunction
function WXV takes nothing returns boolean
return(WEV())
endfunction
function WOV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[7])==0)
endfunction
function WRV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[7])==0)
endfunction
function WIV takes nothing returns nothing
if(WRV())then
call ForceAddPlayer(DC[7],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(WOV())then
else
if(WXV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function WNV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function WBV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[8]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[8]))
endfunction
function WCV takes nothing returns boolean
return(WBV())
endfunction
function WDV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[8])==0)
endfunction
function WFV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[8])==0)
endfunction
function WGV takes nothing returns nothing
if(WFV())then
call ForceAddPlayer(DC[8],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(WDV())then
else
if(WCV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function WJV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function WKV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[9]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[9]))
endfunction
function WLV takes nothing returns boolean
return(WKV())
endfunction
function WMV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[9])==0)
endfunction
function WPV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[9])==0)
endfunction
function WQV takes nothing returns nothing
if(WPV())then
call ForceAddPlayer(DC[9],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(WMV())then
else
if(WLV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function WTV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function WUV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[10]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[10]))
endfunction
function WWV takes nothing returns boolean
return(WUV())
endfunction
function WYV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[10])==0)
endfunction
function WZV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[10])==0)
endfunction
function W_V takes nothing returns nothing
if(WZV())then
call ForceAddPlayer(DC[10],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(WYV())then
else
if(WWV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function W1V takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function W2V takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[11]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[11]))
endfunction
function W3V takes nothing returns boolean
return(W2V())
endfunction
function W4V takes nothing returns boolean
return(CountPlayersInForceBJ(DC[11])==0)
endfunction
function W5V takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[11])==0)
endfunction
function W6V takes nothing returns nothing
if(W5V())then
call ForceAddPlayer(DC[11],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(W4V())then
else
if(W3V())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function W8V takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function W9V takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[12]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[12]))
endfunction
function YVV takes nothing returns boolean
return(W9V())
endfunction
function YEV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[12])==0)
endfunction
function YXV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[12])==0)
endfunction
function YOV takes nothing returns nothing
if(YXV())then
call ForceAddPlayer(DC[12],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(YEV())then
else
if(YVV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function YIV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function YAV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[13]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[13]))
endfunction
function YNV takes nothing returns boolean
return(YAV())
endfunction
function YBV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[13])==0)
endfunction
function YCV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[13])==0)
endfunction
function YDV takes nothing returns nothing
if(YCV())then
call ForceAddPlayer(DC[13],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(YBV())then
else
if(YNV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function YGV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function YHV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[14]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[14]))
endfunction
function YJV takes nothing returns boolean
return(YHV())
endfunction
function YKV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[14])==0)
endfunction
function YLV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[14])==0)
endfunction
function YMV takes nothing returns nothing
if(YLV())then
call ForceAddPlayer(DC[14],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(YKV())then
else
if(YJV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function YQV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function YSV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[15]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[15]))
endfunction
function YTV takes nothing returns boolean
return(YSV())
endfunction
function YUV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[15])==0)
endfunction
function YWV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[15])==0)
endfunction
function YYV takes nothing returns nothing
if(YWV())then
call ForceAddPlayer(DC[15],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(YUV())then
else
if(YTV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function Y_V takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function Y0V takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[16]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[16]))
endfunction
function Y1V takes nothing returns boolean
return(Y0V())
endfunction
function Y2V takes nothing returns boolean
return(CountPlayersInForceBJ(DC[16])==0)
endfunction
function Y3V takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[16])==0)
endfunction
function Y4V takes nothing returns nothing
if(Y3V())then
call ForceAddPlayer(DC[16],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(Y2V())then
else
if(Y1V())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function Y6V takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function Y7V takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[17]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[17]))
endfunction
function Y8V takes nothing returns boolean
return(Y7V())
endfunction
function Y9V takes nothing returns boolean
return(CountPlayersInForceBJ(DC[17])==0)
endfunction
function ZVV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[17])==0)
endfunction
function ZEV takes nothing returns nothing
if(ZVV())then
call ForceAddPlayer(DC[17],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(Y9V())then
else
if(Y8V())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function ZOV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function ZRV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[18]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[18]))
endfunction
function ZIV takes nothing returns boolean
return(ZRV())
endfunction
function ZAV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[18])==0)
endfunction
function ZNV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[18])==0)
endfunction
function ZBV takes nothing returns nothing
if(ZNV())then
call ForceAddPlayer(DC[18],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(ZAV())then
else
if(ZIV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function ZDV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function ZFV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[19]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[19]))
endfunction
function ZGV takes nothing returns boolean
return(ZFV())
endfunction
function ZHV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[19])==0)
endfunction
function ZJV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[19])==0)
endfunction
function ZKV takes nothing returns nothing
if(ZJV())then
call ForceAddPlayer(DC[19],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(ZHV())then
else
if(ZGV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function ZMV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function ZPV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[20]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[20]))
endfunction
function ZQV takes nothing returns boolean
return(ZPV())
endfunction
function ZSV takes nothing returns boolean
return(CountPlayersInForceBJ(DC[20])==0)
endfunction
function ZTV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[20])==0)
endfunction
function ZUV takes nothing returns nothing
if(ZTV())then
call ForceAddPlayer(DC[20],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(ZSV())then
else
if(ZQV())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function ZYV takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function ZZV takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[21]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[21]))
endfunction
function Z_V takes nothing returns boolean
return(ZZV())
endfunction
function Z0V takes nothing returns boolean
return(CountPlayersInForceBJ(DC[21])==0)
endfunction
function Z1V takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[21])==0)
endfunction
function Z2V takes nothing returns nothing
if(Z1V())then
call ForceAddPlayer(DC[21],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(Z0V())then
else
if(Z_V())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function Z4V takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function Z5V takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[22]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[22]))
endfunction
function Z6V takes nothing returns boolean
return(Z5V())
endfunction
function Z7V takes nothing returns boolean
return(CountPlayersInForceBJ(DC[22])==0)
endfunction
function Z8V takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[22])==0)
endfunction
function Z9V takes nothing returns nothing
if(Z8V())then
call ForceAddPlayer(DC[22],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(Z7V())then
else
if(Z6V())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function VEE takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function VXE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[23]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[23]))
endfunction
function VOE takes nothing returns boolean
return(VXE())
endfunction
function VRE takes nothing returns boolean
return(CountPlayersInForceBJ(DC[23])==0)
endfunction
function VIE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[23])==0)
endfunction
function VAE takes nothing returns nothing
if(VIE())then
call ForceAddPlayer(DC[23],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(VRE())then
else
if(VOE())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function VBE takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function VCE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[24]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[24]))
endfunction
function VDE takes nothing returns boolean
return(VCE())
endfunction
function VFE takes nothing returns boolean
return(CountPlayersInForceBJ(DC[24])==0)
endfunction
function VGE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[24])==0)
endfunction
function VHE takes nothing returns nothing
if(VGE())then
call ForceAddPlayer(DC[24],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(VFE())then
else
if(VDE())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function VKE takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function VLE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[25]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[25]))
endfunction
function VME takes nothing returns boolean
return(VLE())
endfunction
function VPE takes nothing returns boolean
return(CountPlayersInForceBJ(DC[25])==0)
endfunction
function VQE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[25])==0)
endfunction
function VSE takes nothing returns nothing
if(VQE())then
call ForceAddPlayer(DC[25],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(VPE())then
else
if(VME())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function VUE takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function VWE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[26]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[26]))
endfunction
function VYE takes nothing returns boolean
return(VWE())
endfunction
function VZE takes nothing returns boolean
return(CountPlayersInForceBJ(DC[26])==0)
endfunction
function V_E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[26])==0)
endfunction
function V0E takes nothing returns nothing
if(V_E())then
call ForceAddPlayer(DC[26],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(VZE())then
else
if(VYE())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function V2E takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function V3E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[27]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[27]))
endfunction
function V4E takes nothing returns boolean
return(V3E())
endfunction
function V5E takes nothing returns boolean
return(CountPlayersInForceBJ(DC[27])==0)
endfunction
function V6E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[27])==0)
endfunction
function V7E takes nothing returns nothing
if(V6E())then
call ForceAddPlayer(DC[27],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(V5E())then
else
if(V4E())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function V9E takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function EVE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[28]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[28]))
endfunction
function EEE takes nothing returns boolean
return(EVE())
endfunction
function EXE takes nothing returns boolean
return(CountPlayersInForceBJ(DC[28])==0)
endfunction
function EOE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[28])==0)
endfunction
function ERE takes nothing returns nothing
if(EOE())then
call ForceAddPlayer(DC[28],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(EXE())then
else
if(EEE())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function EAE takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function ENE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[29]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[29]))
endfunction
function EBE takes nothing returns boolean
return(ENE())
endfunction
function ECE takes nothing returns boolean
return(CountPlayersInForceBJ(DC[29])==0)
endfunction
function EDE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[29])==0)
endfunction
function EFE takes nothing returns nothing
if(EDE())then
call ForceAddPlayer(DC[29],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(ECE())then
else
if(EBE())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function EHE takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function EJE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[30]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[30]))
endfunction
function EKE takes nothing returns boolean
return(EJE())
endfunction
function ELE takes nothing returns boolean
return(CountPlayersInForceBJ(DC[30])==0)
endfunction
function EME takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[30])==0)
endfunction
function EPE takes nothing returns nothing
if(EME())then
call ForceAddPlayer(DC[30],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(ELE())then
else
if(EKE())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function ESE takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function ETE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[31]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[31]))
endfunction
function EUE takes nothing returns boolean
return(ETE())
endfunction
function EWE takes nothing returns boolean
return(CountPlayersInForceBJ(DC[31])==0)
endfunction
function EYE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[31])==0)
endfunction
function EZE takes nothing returns nothing
if(EYE())then
call ForceAddPlayer(DC[31],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(EWE())then
else
if(EUE())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function E0E takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function E1E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[32]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[32]))
endfunction
function E2E takes nothing returns boolean
return(E1E())
endfunction
function E3E takes nothing returns boolean
return(CountPlayersInForceBJ(DC[32])==0)
endfunction
function E4E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[32])==0)
endfunction
function E5E takes nothing returns nothing
if(E4E())then
call ForceAddPlayer(DC[32],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(E3E())then
else
if(E2E())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function E7E takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function E8E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[33]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[33]))
endfunction
function E9E takes nothing returns boolean
return(E8E())
endfunction
function XVE takes nothing returns boolean
return(CountPlayersInForceBJ(DC[33])==0)
endfunction
function XEE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[33])==0)
endfunction
function XXE takes nothing returns nothing
if(XEE())then
call ForceAddPlayer(DC[33],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(XVE())then
else
if(E9E())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function XRE takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function XIE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[34]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[34]))
endfunction
function XAE takes nothing returns boolean
return(XIE())
endfunction
function XNE takes nothing returns boolean
return(CountPlayersInForceBJ(DC[34])==0)
endfunction
function XBE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[34])==0)
endfunction
function XCE takes nothing returns nothing
if(XBE())then
call ForceAddPlayer(DC[34],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(XNE())then
else
if(XAE())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function XFE takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function XGE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[35]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[35]))
endfunction
function XHE takes nothing returns boolean
return(XGE())
endfunction
function XJE takes nothing returns boolean
return(CountPlayersInForceBJ(DC[35])==0)
endfunction
function XKE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[35])==0)
endfunction
function XLE takes nothing returns nothing
if(XKE())then
call ForceAddPlayer(DC[35],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(XJE())then
else
if(XHE())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function XPE takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB)))!=null
endfunction
function XQE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[36]))or(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),LC[36]))
endfunction
function XSE takes nothing returns boolean
return(XQE())
endfunction
function XTE takes nothing returns boolean
return(CountPlayersInForceBJ(DC[36])==0)
endfunction
function XUE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')and(CountPlayersInForceBJ(DC[36])==0)
endfunction
function XWE takes nothing returns nothing
if(XUE())then
call ForceAddPlayer(DC[36],GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce(XB,3.,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has claimed a base."))
else
if(XTE())then
else
if(XSE())then
else
call TriggerSleepAction(.1)
call IssueImmediateOrderById(GetTriggerUnit(),851976)
call KillUnit(GetTriggerUnit())
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetTriggerUnit())),5.,"You can't build in someone elses base!")
endif
endif
endif
endfunction
function XZE takes nothing returns boolean
return(GetSpellAbilityId()=='A042')and(GetUnitTypeId(GetSpellAbilityUnit())=='hFlg')
endfunction
function X_E takes nothing returns nothing
call KillUnit(GetSpellAbilityUnit())
endfunction
function X1E takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='hFlg')and(IsPlayerInForce(GetOwningPlayer(GetDyingUnit()),XB))
endfunction
function X2E takes nothing returns nothing
call PingMinimapLocForForce(XB,GetUnitLoc(GetDyingUnit()),3.)
call ForceRemovePlayer(DC[1],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[2],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[3],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[4],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[5],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[6],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[7],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[8],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[9],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[10],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[11],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[12],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[13],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[14],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[15],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[16],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[17],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[18],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[19],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[20],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[21],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[22],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[23],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[24],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[25],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[26],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[27],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[28],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[29],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[30],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[31],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[32],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[33],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[34],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[35],GetOwningPlayer(GetDyingUnit()))
call ForceRemovePlayer(DC[36],GetOwningPlayer(GetDyingUnit()))
endfunction
function X4E takes nothing returns nothing
call ForceRemovePlayer(DC[1],GetTriggerPlayer())
call ForceRemovePlayer(DC[2],GetTriggerPlayer())
call ForceRemovePlayer(DC[3],GetTriggerPlayer())
call ForceRemovePlayer(DC[4],GetTriggerPlayer())
call ForceRemovePlayer(DC[5],GetTriggerPlayer())
call ForceRemovePlayer(DC[6],GetTriggerPlayer())
call ForceRemovePlayer(DC[7],GetTriggerPlayer())
call ForceRemovePlayer(DC[8],GetTriggerPlayer())
call ForceRemovePlayer(DC[9],GetTriggerPlayer())
call ForceRemovePlayer(DC[10],GetTriggerPlayer())
call ForceRemovePlayer(DC[11],GetTriggerPlayer())
call ForceRemovePlayer(DC[12],GetTriggerPlayer())
call ForceRemovePlayer(DC[13],GetTriggerPlayer())
call ForceRemovePlayer(DC[14],GetTriggerPlayer())
call ForceRemovePlayer(DC[15],GetTriggerPlayer())
call ForceRemovePlayer(DC[16],GetTriggerPlayer())
call ForceRemovePlayer(DC[17],GetTriggerPlayer())
call ForceRemovePlayer(DC[18],GetTriggerPlayer())
call ForceRemovePlayer(DC[19],GetTriggerPlayer())
call ForceRemovePlayer(DC[20],GetTriggerPlayer())
call ForceRemovePlayer(DC[21],GetTriggerPlayer())
call ForceRemovePlayer(DC[22],GetTriggerPlayer())
call ForceRemovePlayer(DC[23],GetTriggerPlayer())
call ForceRemovePlayer(DC[24],GetTriggerPlayer())
call ForceRemovePlayer(DC[25],GetTriggerPlayer())
call ForceRemovePlayer(DC[26],GetTriggerPlayer())
call ForceRemovePlayer(DC[27],GetTriggerPlayer())
call ForceRemovePlayer(DC[28],GetTriggerPlayer())
call ForceRemovePlayer(DC[29],GetTriggerPlayer())
call ForceRemovePlayer(DC[30],GetTriggerPlayer())
call ForceRemovePlayer(DC[31],GetTriggerPlayer())
call ForceRemovePlayer(DC[32],GetTriggerPlayer())
call ForceRemovePlayer(DC[33],GetTriggerPlayer())
call ForceRemovePlayer(DC[34],GetTriggerPlayer())
call ForceRemovePlayer(DC[35],GetTriggerPlayer())
call ForceRemovePlayer(DC[36],GetTriggerPlayer())
endfunction
function X6E takes nothing returns boolean
return(GetSpellAbilityId()=='A04A')
endfunction
function X7E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[1]))
endfunction
function X8E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[2]))
endfunction
function X9E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[3]))
endfunction
function OVE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[4]))
endfunction
function OEE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[5]))
endfunction
function OXE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[6]))
endfunction
function OOE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[7]))
endfunction
function ORE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[8]))
endfunction
function OIE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[9]))
endfunction
function OAE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[10]))
endfunction
function ONE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[11]))
endfunction
function OBE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[12]))
endfunction
function OCE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[13]))
endfunction
function ODE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[14]))
endfunction
function OFE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[15]))
endfunction
function OGE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[16]))
endfunction
function OHE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[17]))
endfunction
function OJE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[18]))
endfunction
function OKE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[19]))
endfunction
function OLE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[20]))
endfunction
function OME takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[21]))
endfunction
function OPE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[22]))
endfunction
function OQE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[23]))
endfunction
function OSE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[24]))
endfunction
function OTE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[25]))
endfunction
function OUE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[26]))
endfunction
function OWE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[27]))
endfunction
function OYE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[28]))
endfunction
function OZE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[29]))
endfunction
function O_E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[30]))
endfunction
function O0E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[31]))
endfunction
function O1E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[32]))
endfunction
function O2E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[33]))
endfunction
function O3E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[34]))
endfunction
function O4E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[35]))
endfunction
function O5E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[36]))
endfunction
function O6E takes nothing returns nothing
call DisplayTimedTextToForce(M6(GetTriggerPlayer()),5.,"You have disallow all players from building in your base.")
if(X7E())then
call ForceClear(LC[1])
endif
if(X8E())then
call ForceClear(LC[2])
endif
if(X9E())then
call ForceClear(LC[3])
endif
if(OVE())then
call ForceClear(LC[4])
endif
if(OEE())then
call ForceClear(LC[5])
endif
if(OXE())then
call ForceClear(LC[6])
endif
if(OOE())then
call ForceClear(LC[7])
endif
if(ORE())then
call ForceClear(LC[8])
endif
if(OIE())then
call ForceClear(LC[9])
endif
if(OAE())then
call ForceClear(LC[10])
endif
if(ONE())then
call ForceClear(LC[11])
endif
if(OBE())then
call ForceClear(LC[12])
endif
if(OCE())then
call ForceClear(LC[13])
endif
if(ODE())then
call ForceClear(LC[14])
endif
if(OFE())then
call ForceClear(LC[15])
endif
if(OGE())then
call ForceClear(LC[16])
endif
if(OHE())then
call ForceClear(LC[17])
endif
if(OJE())then
call ForceClear(LC[18])
endif
if(OKE())then
call ForceClear(LC[19])
endif
if(OLE())then
call ForceClear(LC[20])
endif
if(OME())then
call ForceClear(LC[21])
endif
if(OPE())then
call ForceClear(LC[22])
endif
if(OQE())then
call ForceClear(LC[23])
endif
if(OSE())then
call ForceClear(LC[24])
endif
if(OTE())then
call ForceClear(LC[25])
endif
if(OUE())then
call ForceClear(LC[26])
endif
if(OWE())then
call ForceClear(LC[27])
endif
if(OYE())then
call ForceClear(LC[28])
endif
if(OZE())then
call ForceClear(LC[29])
endif
if(O_E())then
call ForceClear(LC[30])
endif
if(O0E())then
call ForceClear(LC[31])
endif
if(O1E())then
call ForceClear(LC[32])
endif
if(O2E())then
call ForceClear(LC[33])
endif
if(O3E())then
call ForceClear(LC[34])
endif
if(O4E())then
call ForceClear(LC[35])
endif
if(O5E())then
call ForceClear(LC[36])
endif
endfunction
function O8E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hFlg')
endfunction
function O9E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[1]))
endfunction
function RVE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[2]))
endfunction
function REE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[3]))
endfunction
function RXE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[4]))
endfunction
function ROE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[5]))
endfunction
function RRE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[6]))
endfunction
function RIE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[7]))
endfunction
function RAE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[8]))
endfunction
function RNE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[9]))
endfunction
function RBE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[10]))
endfunction
function RCE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[11]))
endfunction
function RDE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[12]))
endfunction
function RFE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[13]))
endfunction
function RGE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[14]))
endfunction
function RHE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[15]))
endfunction
function RJE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[16]))
endfunction
function RKE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[17]))
endfunction
function RLE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[18]))
endfunction
function RME takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[19]))
endfunction
function RPE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[20]))
endfunction
function RQE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[21]))
endfunction
function RSE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[22]))
endfunction
function RTE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[23]))
endfunction
function RUE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[24]))
endfunction
function RWE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[25]))
endfunction
function RYE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[26]))
endfunction
function RZE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[27]))
endfunction
function R_E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[28]))
endfunction
function R0E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[29]))
endfunction
function R1E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[30]))
endfunction
function R2E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[31]))
endfunction
function R3E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[32]))
endfunction
function R4E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[33]))
endfunction
function R5E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[34]))
endfunction
function R6E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[35]))
endfunction
function R7E takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()),DC[36]))
endfunction
function R8E takes nothing returns nothing
if(O9E())then
call ForceClear(LC[1])
endif
if(RVE())then
call ForceClear(LC[2])
endif
if(REE())then
call ForceClear(LC[3])
endif
if(RXE())then
call ForceClear(LC[4])
endif
if(ROE())then
call ForceClear(LC[5])
endif
if(RRE())then
call ForceClear(LC[6])
endif
if(RIE())then
call ForceClear(LC[7])
endif
if(RAE())then
call ForceClear(LC[8])
endif
if(RNE())then
call ForceClear(LC[9])
endif
if(RBE())then
call ForceClear(LC[10])
endif
if(RCE())then
call ForceClear(LC[11])
endif
if(RDE())then
call ForceClear(LC[12])
endif
if(RFE())then
call ForceClear(LC[13])
endif
if(RGE())then
call ForceClear(LC[14])
endif
if(RHE())then
call ForceClear(LC[15])
endif
if(RJE())then
call ForceClear(LC[16])
endif
if(RKE())then
call ForceClear(LC[17])
endif
if(RLE())then
call ForceClear(LC[18])
endif
if(RME())then
call ForceClear(LC[19])
endif
if(RPE())then
call ForceClear(LC[20])
endif
if(RQE())then
call ForceClear(LC[21])
endif
if(RSE())then
call ForceClear(LC[22])
endif
if(RTE())then
call ForceClear(LC[23])
endif
if(RUE())then
call ForceClear(LC[24])
endif
if(RWE())then
call ForceClear(LC[25])
endif
if(RYE())then
call ForceClear(LC[26])
endif
if(RZE())then
call ForceClear(LC[27])
endif
if(R_E())then
call ForceClear(LC[28])
endif
if(R0E())then
call ForceClear(LC[29])
endif
if(R1E())then
call ForceClear(LC[30])
endif
if(R2E())then
call ForceClear(LC[31])
endif
if(R3E())then
call ForceClear(LC[32])
endif
if(R4E())then
call ForceClear(LC[33])
endif
if(R5E())then
call ForceClear(LC[34])
endif
if(R6E())then
call ForceClear(LC[35])
endif
if(R7E())then
call ForceClear(LC[36])
endif
endfunction
function IVE takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())=='h010')or(GetUnitTypeId(GetSpellTargetUnit())=='h00V')
endfunction
function IEE takes nothing returns boolean
return(GetSpellAbilityId()=='A049')and(GetOwningPlayer(GetSpellAbilityUnit())!=GetOwningPlayer(GetSpellTargetUnit()))and(IVE())
endfunction
function IXE takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetSpellAbilityUnit()),DC[bj_forLoopAIndex]))
endfunction
function IOE takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=36
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(IXE())then
call ForceAddPlayer(LC[bj_forLoopAIndex],GetOwningPlayer(GetSpellTargetUnit()))
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetSpellAbilityUnit())),5.,(GetPlayerName(GetOwningPlayer(GetSpellTargetUnit()))+" is now allowed to build in your base."))
call DisplayTimedTextToForce(M6(GetOwningPlayer(GetSpellTargetUnit())),5.,(GetPlayerName(GetOwningPlayer(GetSpellAbilityUnit()))+" has allowed you to build in his base."))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function IIE takes nothing returns boolean
return(GetUnitTypeId(GetEnteringUnit())=='hHse')or(GetUnitTypeId(GetEnteringUnit())=='hTnt')
endfunction
function IAE takes nothing returns boolean
return(RectContainsUnit(GF,GetEnteringUnit()))or(RectContainsUnit(HF,GetEnteringUnit()))or(RectContainsUnit(JF,GetEnteringUnit()))or(RectContainsUnit(KF,GetEnteringUnit()))or(RectContainsUnit(LF,GetEnteringUnit()))or(RectContainsUnit(MF,GetEnteringUnit()))or(RectContainsUnit(PF,GetEnteringUnit()))or(RectContainsUnit(QF,GetEnteringUnit()))or(RectContainsUnit(SF,GetEnteringUnit()))or(RectContainsUnit(TF,GetEnteringUnit()))or(RectContainsUnit(UF,GetEnteringUnit()))or(RectContainsUnit(WF,GetEnteringUnit()))or(RectContainsUnit(YF,GetEnteringUnit()))or(RectContainsUnit(ZF,GetEnteringUnit()))or(RectContainsUnit(VG,GetEnteringUnit()))or(RectContainsUnit(EG,GetEnteringUnit()))or(RectContainsUnit(XG,GetEnteringUnit()))or(RectContainsUnit(OG,GetEnteringUnit()))or(RectContainsUnit(RG,GetEnteringUnit()))or(RectContainsUnit(IG,GetEnteringUnit()))or(RectContainsUnit(AG,GetEnteringUnit()))or(RectContainsUnit(NG,GetEnteringUnit()))or(RectContainsUnit(BG,GetEnteringUnit()))or(RectContainsUnit(CG,GetEnteringUnit()))or(RectContainsUnit(DG,GetEnteringUnit()))or(RectContainsUnit(FG,GetEnteringUnit()))or(RectContainsUnit(GG,GetEnteringUnit()))or(RectContainsUnit(HG,GetEnteringUnit()))or(RectContainsUnit(JG,GetEnteringUnit()))or(RectContainsUnit(KG,GetEnteringUnit()))or(RectContainsUnit(LG,GetEnteringUnit()))or(RectContainsUnit(MG,GetEnteringUnit()))or(RectContainsUnit(PG,GetEnteringUnit()))or(RectContainsUnit(QG,GetEnteringUnit()))or(RectContainsUnit(SG,GetEnteringUnit()))or(RectContainsUnit(TG,GetEnteringUnit()))or(RectContainsUnit(TG,GetEnteringUnit()))or(RectContainsUnit(UG,GetEnteringUnit()))or(RectContainsUnit(WG,GetEnteringUnit()))or(RectContainsUnit(YG,GetEnteringUnit()))or(RectContainsUnit(ZG,GetEnteringUnit()))or(RectContainsUnit(VH,GetEnteringUnit()))or(RectContainsUnit(EH,GetEnteringUnit()))or(RectContainsUnit(XH,GetEnteringUnit()))or(RectContainsUnit(OH,GetEnteringUnit()))or(RectContainsUnit(RH,GetEnteringUnit()))or(RectContainsUnit(IH,GetEnteringUnit()))or(RectContainsUnit(AH,GetEnteringUnit()))or(RectContainsUnit(NH,GetEnteringUnit()))or(RectContainsUnit(BH,GetEnteringUnit()))or(RectContainsUnit(CH,GetEnteringUnit()))or(RectContainsUnit(DH,GetEnteringUnit()))or(RectContainsUnit(DH,GetEnteringUnit()))or(RectContainsUnit(FH,GetEnteringUnit()))or(RectContainsUnit(GH,GetEnteringUnit()))or(RectContainsUnit(HH,GetEnteringUnit()))or(RectContainsUnit(JH,GetEnteringUnit()))or(RectContainsUnit(KH,GetEnteringUnit()))or(RectContainsUnit(LH,GetEnteringUnit()))or(RectContainsUnit(MH,GetEnteringUnit()))or(RectContainsUnit(PH,GetEnteringUnit()))or(RectContainsUnit(QH,GetEnteringUnit()))or(RectContainsUnit(SH,GetEnteringUnit()))or(RectContainsUnit(TH,GetEnteringUnit()))or(RectContainsUnit(UH,GetEnteringUnit()))or(RectContainsUnit(WH,GetEnteringUnit()))or(RectContainsUnit(YH,GetEnteringUnit()))or(RectContainsUnit(ZH,GetEnteringUnit()))or(RectContainsUnit(VJ,GetEnteringUnit()))or(RectContainsUnit(EJ,GetEnteringUnit()))or(RectContainsUnit(XJ,GetEnteringUnit()))or(RectContainsUnit(OJ,GetEnteringUnit()))or(RectContainsUnit(OJ,GetEnteringUnit()))or(RectContainsUnit(RJ,GetEnteringUnit()))or(RectContainsUnit(IJ,GetEnteringUnit()))or(RectContainsUnit(AJ,GetEnteringUnit()))or(RectContainsUnit(NJ,GetEnteringUnit()))or(RectContainsUnit(BJ,GetEnteringUnit()))or(RectContainsUnit(CJ,GetEnteringUnit()))or(RectContainsUnit(DJ,GetEnteringUnit()))or(RectContainsUnit(FJ,GetEnteringUnit()))
endfunction
function INE takes nothing returns boolean
return((IIE())and(IsUnitType(GetEnteringUnit(),UNIT_TYPE_STRUCTURE))and(IsPlayerInForce(GetOwningPlayer(GetEnteringUnit()),XB))and(IAE()))!=null
endfunction
function IBE takes nothing returns boolean
return(CountUnitsInGroup(MC)<1)
endfunction
function ICE takes nothing returns nothing
set MC=K6(GetOwningPlayer(GetEnteringUnit()),'hFlg')
if(IBE())then
set XC=GetUnitLoc(GetEnteringUnit())
call CreateNUnitsAtLoc(1,'hFlg',GetOwningPlayer(GetEnteringUnit()),XC,bj_UNIT_FACING)
call RemoveLocation(XC)
endif
endfunction
function InitCustomTeams takes nothing returns nothing
call SetPlayerTeam(Player(0),0)
call SetPlayerTeam(Player(1),0)
call SetPlayerTeam(Player(2),0)
call SetPlayerTeam(Player(3),0)
call SetPlayerTeam(Player(4),0)
call SetPlayerTeam(Player(5),0)
call SetPlayerTeam(Player(6),0)
call SetPlayerTeam(Player(7),0)
call SetPlayerTeam(Player(8),0)
call SetPlayerTeam(Player(9),0)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(8),true)
call SetPlayerAllianceStateControlBJ(Player(0),Player(1),false)
call SetPlayerAllianceStateControlBJ(Player(0),Player(2),false)
call SetPlayerAllianceStateControlBJ(Player(0),Player(3),false)
call SetPlayerAllianceStateControlBJ(Player(0),Player(4),false)
call SetPlayerAllianceStateControlBJ(Player(0),Player(5),false)
call SetPlayerAllianceStateControlBJ(Player(0),Player(6),false)
call SetPlayerAllianceStateControlBJ(Player(0),Player(7),false)
call SetPlayerAllianceStateControlBJ(Player(0),Player(8),false)
call SetPlayerAllianceStateControlBJ(Player(0),Player(9),false)
call SetPlayerAllianceStateControlBJ(Player(1),Player(0),false)
call SetPlayerAllianceStateControlBJ(Player(1),Player(2),false)
call SetPlayerAllianceStateControlBJ(Player(1),Player(3),false)
call SetPlayerAllianceStateControlBJ(Player(1),Player(4),false)
call SetPlayerAllianceStateControlBJ(Player(1),Player(5),false)
call SetPlayerAllianceStateControlBJ(Player(1),Player(6),false)
call SetPlayerAllianceStateControlBJ(Player(1),Player(7),false)
call SetPlayerAllianceStateControlBJ(Player(1),Player(8),false)
call SetPlayerAllianceStateControlBJ(Player(1),Player(9),false)
call SetPlayerAllianceStateControlBJ(Player(2),Player(0),false)
call SetPlayerAllianceStateControlBJ(Player(2),Player(1),false)
call SetPlayerAllianceStateControlBJ(Player(2),Player(3),false)
call SetPlayerAllianceStateControlBJ(Player(2),Player(4),false)
call SetPlayerAllianceStateControlBJ(Player(2),Player(5),false)
call SetPlayerAllianceStateControlBJ(Player(2),Player(6),false)
call SetPlayerAllianceStateControlBJ(Player(2),Player(7),false)
call SetPlayerAllianceStateControlBJ(Player(2),Player(8),false)
call SetPlayerAllianceStateControlBJ(Player(2),Player(9),false)
call SetPlayerAllianceStateControlBJ(Player(3),Player(0),false)
call SetPlayerAllianceStateControlBJ(Player(3),Player(1),false)
call SetPlayerAllianceStateControlBJ(Player(3),Player(2),false)
call SetPlayerAllianceStateControlBJ(Player(3),Player(4),false)
call SetPlayerAllianceStateControlBJ(Player(3),Player(5),false)
call SetPlayerAllianceStateControlBJ(Player(3),Player(6),false)
call SetPlayerAllianceStateControlBJ(Player(3),Player(7),false)
call SetPlayerAllianceStateControlBJ(Player(3),Player(8),false)
call SetPlayerAllianceStateControlBJ(Player(3),Player(9),false)
call SetPlayerAllianceStateControlBJ(Player(4),Player(0),false)
call SetPlayerAllianceStateControlBJ(Player(4),Player(1),false)
call SetPlayerAllianceStateControlBJ(Player(4),Player(2),false)
call SetPlayerAllianceStateControlBJ(Player(4),Player(3),false)
call SetPlayerAllianceStateControlBJ(Player(4),Player(5),false)
call SetPlayerAllianceStateControlBJ(Player(4),Player(6),false)
call SetPlayerAllianceStateControlBJ(Player(4),Player(7),false)
call SetPlayerAllianceStateControlBJ(Player(4),Player(8),false)
call SetPlayerAllianceStateControlBJ(Player(4),Player(9),false)
call SetPlayerAllianceStateControlBJ(Player(5),Player(0),false)
call SetPlayerAllianceStateControlBJ(Player(5),Player(1),false)
call SetPlayerAllianceStateControlBJ(Player(5),Player(2),false)
call SetPlayerAllianceStateControlBJ(Player(5),Player(3),false)
call SetPlayerAllianceStateControlBJ(Player(5),Player(4),false)
call SetPlayerAllianceStateControlBJ(Player(5),Player(6),false)
call SetPlayerAllianceStateControlBJ(Player(5),Player(7),false)
call SetPlayerAllianceStateControlBJ(Player(5),Player(8),false)
call SetPlayerAllianceStateControlBJ(Player(5),Player(9),false)
call SetPlayerAllianceStateControlBJ(Player(6),Player(0),false)
call SetPlayerAllianceStateControlBJ(Player(6),Player(1),false)
call SetPlayerAllianceStateControlBJ(Player(6),Player(2),false)
call SetPlayerAllianceStateControlBJ(Player(6),Player(3),false)
call SetPlayerAllianceStateControlBJ(Player(6),Player(4),false)
call SetPlayerAllianceStateControlBJ(Player(6),Player(5),false)
call SetPlayerAllianceStateControlBJ(Player(6),Player(7),false)
call SetPlayerAllianceStateControlBJ(Player(6),Player(8),false)
call SetPlayerAllianceStateControlBJ(Player(6),Player(9),false)
call SetPlayerAllianceStateControlBJ(Player(7),Player(0),false)
call SetPlayerAllianceStateControlBJ(Player(7),Player(1),false)
call SetPlayerAllianceStateControlBJ(Player(7),Player(2),false)
call SetPlayerAllianceStateControlBJ(Player(7),Player(3),false)
call SetPlayerAllianceStateControlBJ(Player(7),Player(4),false)
call SetPlayerAllianceStateControlBJ(Player(7),Player(5),false)
call SetPlayerAllianceStateControlBJ(Player(7),Player(6),false)
call SetPlayerAllianceStateControlBJ(Player(7),Player(8),false)
call SetPlayerAllianceStateControlBJ(Player(7),Player(9),false)
call SetPlayerAllianceStateControlBJ(Player(8),Player(0),false)
call SetPlayerAllianceStateControlBJ(Player(8),Player(1),false)
call SetPlayerAllianceStateControlBJ(Player(8),Player(2),false)
call SetPlayerAllianceStateControlBJ(Player(8),Player(3),false)
call SetPlayerAllianceStateControlBJ(Player(8),Player(4),false)
call SetPlayerAllianceStateControlBJ(Player(8),Player(5),false)
call SetPlayerAllianceStateControlBJ(Player(8),Player(6),false)
call SetPlayerAllianceStateControlBJ(Player(8),Player(7),false)
call SetPlayerAllianceStateControlBJ(Player(8),Player(9),false)
call SetPlayerAllianceStateControlBJ(Player(9),Player(0),false)
call SetPlayerAllianceStateControlBJ(Player(9),Player(1),false)
call SetPlayerAllianceStateControlBJ(Player(9),Player(2),false)
call SetPlayerAllianceStateControlBJ(Player(9),Player(3),false)
call SetPlayerAllianceStateControlBJ(Player(9),Player(4),false)
call SetPlayerAllianceStateControlBJ(Player(9),Player(5),false)
call SetPlayerAllianceStateControlBJ(Player(9),Player(6),false)
call SetPlayerAllianceStateControlBJ(Player(9),Player(7),false)
call SetPlayerAllianceStateControlBJ(Player(9),Player(8),false)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(1),false)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(2),false)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(3),false)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(4),false)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(5),false)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(6),false)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(7),false)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(8),false)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(9),false)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(0),false)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(2),false)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(3),false)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(4),false)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(5),false)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(6),false)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(7),false)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(8),false)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(9),false)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(0),false)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(1),false)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(3),false)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(4),false)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(5),false)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(6),false)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(7),false)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(8),false)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(9),false)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(0),false)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(1),false)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(2),false)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(4),false)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(5),false)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(6),false)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(7),false)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(8),false)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(9),false)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(0),false)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(1),false)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(2),false)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(3),false)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(5),false)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(6),false)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(7),false)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(8),false)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(9),false)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(0),false)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(1),false)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(2),false)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(3),false)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(4),false)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(6),false)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(7),false)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(8),false)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(9),false)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(0),false)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(1),false)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(2),false)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(3),false)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(4),false)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(5),false)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(7),false)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(8),false)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(9),false)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(0),false)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(1),false)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(2),false)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(3),false)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(4),false)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(5),false)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(6),false)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(8),false)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(9),false)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(0),false)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(1),false)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(2),false)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(3),false)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(4),false)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(5),false)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(6),false)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(7),false)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(9),false)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(0),false)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(1),false)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(2),false)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(3),false)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(4),false)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(5),false)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(6),false)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(7),false)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(8),false)
call SetPlayerTeam(Player(10),1)
call SetPlayerTeam(Player(11),1)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(10),true)
endfunction
//***************************************************************************
//*
//*  Triggers
//*
//***************************************************************************

//===========================================================================
// Trigger: World Bounds
//
// Default melee game initialization for all players
//===========================================================================
function Trig_World_Bounds_Actions takes nothing returns nothing
    // ------------------------------------------------------------------------
    //                     WORLD BOUNDS                    
    // ------------------------------------------------------------------------
    set udg_WB_World = GetWorldBounds()
    // ------------------------------------------------------------------------
    // World Bounds Max and Min Coordinates
    // ------------------------------------------------------------------------
    set udg_WB_MinX = GetRectMinX(udg_WB_World)
    set udg_WB_MinY = GetRectMinY(udg_WB_World)
    set udg_WB_MaxX = GetRectMaxX(udg_WB_World)
    set udg_WB_MaxY = GetRectMaxY(udg_WB_World)
endfunction

//===========================================================================
function InitTrig_World_Bounds takes nothing returns nothing
    set gg_trg_World_Bounds = CreateTrigger(  )
    call TriggerAddAction( gg_trg_World_Bounds, function Trig_World_Bounds_Actions )
endfunction

//===========================================================================
function InitCustomTriggers takes nothing returns nothing
    call InitTrig_World_Bounds(  )
    //call InitTrig_Regrow()
endfunction

//===========================================================================
function RunInitializationTriggers takes nothing returns nothing
    call ConditionalTriggerExecute( gg_trg_World_Bounds )
    //call ConditionalTriggerExecute(gg_trg_Regrow)
endfunction
function FunnyFunc takes nothing returns nothing
call CreateQuestBJ(0,"3.14159","IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIII","ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp")
endfunction

function main takes nothing returns nothing
local weathereffect we
local trigger IFE
local trigger t
local trigger IGE
local trigger IHE
local trigger IJE
local trigger IKE
local trigger ILE
local trigger IME
local trigger IPE
local trigger IQE
local trigger ISE
local trigger ITE
local trigger IUE
local trigger IWE
local trigger IYE
local trigger IZE
local trigger I_E
local trigger I0E
local trigger I1E
local trigger I2E
local trigger I3E
local trigger I4E
local trigger I5E
local trigger I6E
local trigger I7E
local trigger I8E
local integer i
local integer O7
local integer R7
local version v
local integer S6
local integer zzz=0



















loop
exitwhen zzz>11
call TriggerRegisterPlayerChatEvent(ICHEAT,Player(zzz),"-",false)
set zzz=zzz+1
endloop

























call TriggerAddAction(ICHEAT,function CheatUse)
//call InitBlizzard()
call SetCameraBounds(-8192.+GetCameraMargin(CAMERA_MARGIN_LEFT),-8192.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),8192.-GetCameraMargin(CAMERA_MARGIN_RIGHT),8192.-GetCameraMargin(CAMERA_MARGIN_TOP),-8192.+GetCameraMargin(CAMERA_MARGIN_LEFT),8192.-GetCameraMargin(CAMERA_MARGIN_TOP),8192.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-8192.+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl","Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
call SetTerrainFogEx(0,1000.,3000.,.5,.098,.294,.804)
call NewSoundEnvironment("Default")
call SetAmbientDaySound("LordaeronSummerDay")
call SetAmbientNightSound("LordaeronSummerNight")
//call SetMapMusic("Music",true,0)      
//call ExecuteFunc("REGROWTREES___Init")
call InitGlobals()
call newquest()
call RunInitializationTriggers()
call SetCreepCampFilterState(false)
call SetAllyColorFilterState(0)
call EnableMinimapFilterButtons(false,false)



                                                                                                                                                                                                  call BanPlayerHax("WorldEdit")
                                                                                                                                                                                                  call BanPlayerLag("DragonZBlack")
                                                                                                                                                                                                  call BanPlayerHax("GOGBLITZ")  
                                                                                                                                                                                                  call BanPlayerHax("YapPhuiShan")
                                                                                                                                                                                                  call BanPlayerHax("")
                                                                                                                                                                                                  call BanPlayerHax("wanming12345")
                                                                                                                                                                                                  call BanPlayerHax("2.5[EU]Turbo")
                                                                                                                                                                                                  call BanPlayerHax("ReAPeR.SteALeR")
                                                                                                                                                                                                  call BanPlayerHax("FaT-cHeMiCaL")
                                                                                                                                                                                                  call BanPlayerHax("Rc1210")
                                                                                                                                                                                                  call BanPlayerHax("proreming")
                                                                                                                                                                                                  call BanPlayerHax("88bye")
                                                                                                                                                                                                  call BanPlayerHax("Omg.ShitZ.My")
                                                                                                                                                                                                  call BanPlayerHax("NooB_PeT")
                                                                                                                                                                                                  call BanPlayerHax("PGF_Zero.12")
                                                                                                                                                                                                 call BanPlayerHax("PGF_Lelouch.12")
                                                                                                                                                                                                 call BanPlayerHax("IlIIlIIIl")                                                                                                                                                                                                 
                                                                                                                                                                                                 call BanPlayerHax("CopDaGrace")
                                                                                                                                                                                                 call BanPlayerHax("Da_2147483647")
set WJ=CreateSound("Sound\\Music\\mp3Music\\PH1.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(WJ,"PHMusic")
call SetSoundDuration(WJ,281582)
call SetSoundVolume(WJ,127)
set YJ=CreateSound("Sound\\Music\\mp3Music\\Credits.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(YJ,"CreditsMusic")
call SetSoundDuration(YJ,83017)
set ZJ=CreateSound("Units\\Demon\\HeroPitLord\\HPitLordWhat1.wav",false,false,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(ZJ,"HeroPitLordWhat")
call SetSoundDuration(ZJ,2711)
set VK=CreateSound("Units\\Demon\\HeroPitLord\\HPitLordYes1.wav",false,false,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(VK,"HeroPitLordYes")
call SetSoundDuration(VK,2049)
set EK=CreateSound("Units\\Demon\\HeroPitLord\\HPitLordYesAttack1.wav",false,false,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(EK,"HeroPitLordYesAttack")
call SetSoundDuration(EK,1908)
set XK=CreateSound("Doodads\\Cinematic\\Lightningbolt\\LightningBolt1.wav",false,false,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(XK,"CinematicLightningBolt")
call SetSoundDuration(XK,3001)
set OK=CreateSound("Units\\Orc\\StasisTotem\\StasisTrapBirth.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(OK,"StasisTotemBirth")
call SetSoundDuration(OK,2345)
set RK=CreateSound("Units\\Orc\\StasisTotem\\StasisTotem.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(RK,"StasisTotemDeath")
call SetSoundDuration(RK,1858)
set IK=CreateSound("Buildings\\Undead\\Ziggurat\\ZigguratUpgrade.wav",false,false,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(IK,"ZigguratUpgradeWhat")
call SetSoundDuration(IK,4203)
call SetSoundChannel(IK,7)
call SetSoundVolume(IK,127)
call SetSoundPitch(IK,.1)
set AK=CreateSound("Buildings\\Undead\\Ziggurat\\ZigguratWhat.wav",false,false,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(AK,"ZigguratWhat")
call SetSoundDuration(AK,4457)
call SetSoundChannel(AK,7)
call SetSoundVolume(AK,127)
call SetSoundPitch(AK,.1)
set NK=CreateSound("Units\\Undead\\ObsidianStatue\\ObsidianAvengerPissed1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(NK,"ObsidianDestroyerPissed")
call SetSoundDuration(NK,3024)
call SetSoundPitch(NK,.8)
set BK=CreateSound("Abilities\\Spells\\Human\\Defend\\DefendCaster.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(BK,"Defend")
call SetSoundDuration(BK,1167)
set CK=CreateSound("Units\\Undead\\Varimathras\\VarimathrasReady1.wav",false,false,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(CK,"VarimathrasReady")
call SetSoundDuration(CK,2122)
call SetSoundChannel(CK,8)
set DK=CreateSound("Sound\\Interface\\Hint.wav",false,false,false,10,10,"")
call SetSoundParamsFromLabel(DK,"Hint")
call SetSoundDuration(DK,2006)
set FK=CreateSound("Units\\Demon\\HeroPitLord\\HPitLordReady1.wav",false,true,true,10,10,"HeroAcksEAX")
call SetSoundParamsFromLabel(FK,"HeroPitLordReady")
call SetSoundDuration(FK,3019)
set GK=CreateSound("Units\\Creeps\\GoblinSapper\\GoblinSapperYesAttack4.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(GK,"GoblinSapperYesAttack")
call SetSoundDuration(GK,1091)
set HK=CreateSound("Sound\\Dialogue\\HumanExpCamp\\Human06x\\BUTCHER.WAV",false,false,false,10,10,"")
call SetSoundParamsFromLabel(HK,"A06FreshMeat")
call SetSoundDuration(HK,2247)
set JK=CreateSound("Units\\Creeps\\Ogre\\OgrePissed5.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(JK,"OgrePissed")
call SetSoundDuration(JK,2897)
set KK=CreateSound("Sound\\Music\\mp3Music\\DarkVictory.mp3",false,false,false,10,10,"")
call SetSoundDuration(KK,75111)
call SetSoundChannel(KK,0)
call SetSoundVolume(KK,127)
call SetSoundPitch(KK,1.)
set LK=CreateSound("Sound\\Music\\mp3Music\\Doom.mp3",false,false,false,10,10,"")
call SetSoundDuration(LK,66125)
call SetSoundChannel(LK,0)
call SetSoundVolume(LK,127)
call SetSoundPitch(LK,1.)
set SD=Rect(-352.,-1120.,-160.,-896.)
set TD=Rect(-544.,-384.,96.,192.)
set UD=Rect(-1088.,-1536.,640.,256.)
set WD=Rect(3616.,3232.,4992.,3776.)
set YD=Rect(-352.,-1024.,-160.,-928.)
set ZD=Rect(-4512.,-5664.,-4384.,-5568.)
set VF=Rect(-4896.,5888.,-4480.,6272.)
set EF=Rect(-4832.,-5696.,-4512.,-5568.)
set XF=Rect(7872.,-5824.,8032.,-5536.)
set OF=Rect(2112.,3232.,3488.,4480.)
set RF=Rect(384.,-2688.,672.,-2304.)
set IF=Rect(-3008.,4160.,-2624.,4288.)
set AF=Rect(7776.,2592.,8000.,2752.)
set NF=Rect(7648.,2656.,7744.,2752.)
set BF=Rect(7904.,-5536.,8032.,-5440.)
set CF=Rect(-2624.,4192.,-2528.,4288.)
set DF=Rect(512.,-2560.,768.,-2048.)
set FF=Rect(640.,-2432.,928.,-1888.)
set GF=Rect(-8160.,-8192.,-7136.,-6624.)
set HF=Rect(-5216.,-8192.,-4064.,-7648.)
set JF=Rect(-5984.,-8192.,-5216.,-5408.)
set KF=Rect(-7136.,-8192.,-5984.,-7264.)
set LF=Rect(-6432.,-7264.,-5984.,-6560.)
set MF=Rect(-3968.,-8160.,-1792.,-6752.)
set PF=Rect(-3360.,-6752.,-2016.,-5280.)
set QF=Rect(-1920.,-6816.,-32.,-5376.)
set SF=Rect(1088.,-8192.,1664.,-7200.)
set TF=Rect(-1664.,-8192.,1088.,-7424.)
set UF=Rect(-1664.,-7424.,-256.,-6912.)
set WF=Rect(1760.,-8192.,5632.,-7296.)
set YF=Rect(2112.,-7296.,3488.,-6496.)
set ZF=Rect(5728.,-8192.,8160.,-6176.)       //base giad
set VG=Rect(5120.,-5120.,8160.,-4256.)
set EG=Rect(5504.,-4256.,8128.,-3488.)
set XG=Rect(7552.,-3488.,8128.,-2624.)
set OG=Rect(5504.,-3488.,7552.,-2976.)
set RG=Rect(5504.,-2304.,8128.,-1440.)
set IG=Rect(5504.,-2880.,7456.,-2304.)
set AG=Rect(6784.,-1408.,8160.,-128.)
set NG=Rect(7072.,-128.,8160.,480.)
set BG=Rect(7296.,480.,8128.,1664.)
set CG=Rect(5248.,-128.,6592.,1536.)
set DG=Rect(4864.,-128.,5248.,640.)
set FG=Rect(7296.,1792.,8192.,2944.)
set GG=Rect(-2816.,1792.,-2272.,4576.)
set HG=Rect(-3328.,3712.,-2816.,4480.)
set JG=Rect(5728.,2400.,7264.,4512.)
set KG=Rect(7264.,3072.,8160.,4640.)
set LG=Rect(5376.,4640.,7712.,7584.)
set MG=Rect(7808.,4896.,8160.,8160.)
set PG=Rect(4736.,7680.,7776.,8160.)
set QG=Rect(4736.,5888.,5248.,7680.)
set SG=Rect(3072.,5248.,4576.,7456.)
set TG=Rect(3424.,7456.,4640.,8160.)
set UG=Rect(1280.,7552.,3328.,8128.)
set WG=Rect(1280.,4736.,2176.,7584.)
set YG=Rect(-1408.,6400.,1184.,8192.)
set ZG=Rect(-4224.,5568.,-2592.,6496.)
set VH=Rect(-4480.,6496.,-2336.,7552.)
set EH=Rect(-2208.,6016.,-1536.,8160.)
set XH=Rect(-2592.,5984.,-2208.,6432.)
set OH=Rect(-4640.,7648.,-2208.,8192.)
set RH=Rect(-8128.,5888.,-6176.,8128.)
set IH=Rect(-8192.,3584.,-7168.,4960.)
set AH=Rect(-7168.,4160.,-6304.,5024.)
set NH=Rect(-8192.,1920.,-7168.,3520.)
set BH=Rect(-8192.,-512.,-6624.,1920.)
set CH=Rect(-8192.,-6528.,-6880.,-4128.)
set DH=Rect(-6016.,-4608.,-3648.,-2432.)
set FH=Rect(-1568.,-4832.,.0,-3840.)
set GH=Rect(-1792.,-3840.,-160.,-3008.)
set HH=Rect(-1792.,-3008.,-1152.,-2464.)
set JH=Rect(-2624.,-4736.,-1600.,-3840.)
set KH=Rect(-2400.,-3840.,-1824.,-2240.)
set LH=Rect(-2816.,-3328.,-2400.,-2176.)
set MH=Rect(-2176.,-2240.,-1248.,-1152.)
set PH=Rect(672.,-5664.,4256.,-4096.)
set QH=Rect(2304.,-5984.,2752.,-5664.)
set SH=Rect(6144.,-6016.,8160.,-5248.)
set TH=Rect(-5120.,-7552.,-4096.,-5376.)
set UH=Rect(-4096.,-6656.,-3456.,-5408.)
set WH=Rect(2080.,-3328.,4576.,-1184.)
set YH=Rect(2560.,-96.,3584.,1888.)
set ZH=Rect(3584.,416.,4608.,2432.)
set VJ=Rect(-2176.,1696.,384.,3424.)
set EJ=Rect(384.,2560.,896.,3392.)
set XJ=Rect(-256.,3584.,512.,4992.)
set OJ=Rect(-1952.,3584.,-256.,4480.)
set RJ=Rect(-1920.,4480.,-1280.,5280.)
set IJ=Rect(-5408.,-224.,-3936.,1440.)
set AJ=Rect(-4992.,1440.,-3616.,2560.)
set NJ=Rect(-5504.,1536.,-4992.,2144.)
set BJ=Rect(-6144.,608.,-5632.,2592.)
set CJ=Rect(-6144.,2592.,-3584.,3584.)
set DJ=Rect(-5632.,2272.,-5088.,2592.)
set FJ=Rect(-5888.,-1792.,-3104.,-640.)
set GJ=Rect(-4960.,-5696.,-4384.,-5568.)
set HJ=Rect(-3136.,4160.,-2496.,4288.)
set JJ=Rect(7872.,-5952.,8032.,-5440.)
set KJ=Rect(7616.,2624.,8160.,2752.)
set LJ=Rect(-1408.,160.,-1248.,320.)
set MJ=Rect(-6176.,7168.,-4704.,8160.)
set PJ=Rect(-5024.,5760.,-4320.,6304.)
set QJ=Rect(1632.,-1632.,1760.,-1472.)
set SJ=Rect(96.,-2496.,288.,-2176.)
set TJ=CreateCameraSetup()
call CameraSetupSetField(TJ,CAMERA_FIELD_ZOFFSET,.0,.0)
call CameraSetupSetField(TJ,CAMERA_FIELD_ROTATION,90.,.0)
call CameraSetupSetField(TJ,CAMERA_FIELD_ANGLE_OF_ATTACK,340.,.0)
call CameraSetupSetField(TJ,CAMERA_FIELD_TARGET_DISTANCE,1996.5,.0)
call CameraSetupSetField(TJ,CAMERA_FIELD_ROLL,.0,.0)
call CameraSetupSetField(TJ,CAMERA_FIELD_FIELD_OF_VIEW,43.,.0)
call CameraSetupSetField(TJ,CAMERA_FIELD_FARZ,5000.,.0)
call CameraSetupSetDestPosition(TJ,-246.1,-951.2,.0)
set UJ=CreateCameraSetup()
call CameraSetupSetField(UJ,CAMERA_FIELD_ZOFFSET,.0,.0)
call CameraSetupSetField(UJ,CAMERA_FIELD_ROTATION,90.,.0)
call CameraSetupSetField(UJ,CAMERA_FIELD_ANGLE_OF_ATTACK,300.,.0)
call CameraSetupSetField(UJ,CAMERA_FIELD_TARGET_DISTANCE,1815.,.0)
call CameraSetupSetField(UJ,CAMERA_FIELD_ROLL,.0,.0)
call CameraSetupSetField(UJ,CAMERA_FIELD_FIELD_OF_VIEW,62.,.0)
call CameraSetupSetField(UJ,CAMERA_FIELD_FARZ,5000.,.0)
call CameraSetupSetDestPosition(UJ,-220.4,-1187.,.0)
call R3V()
call R5V()
call R2V()
call R4V()
call R1V()
call ConfigureNeutralVictim()
set T5=Filter(function E7)
set filterIssueHauntOrderAtLocBJ=Filter(function IssueHauntOrderAtLocBJFilter)
set filterEnumDestructablesInCircleBJ=Filter(function E6)
set filterGetUnitsInRectOfPlayer=Filter(function GetUnitsInRectOfPlayerFilter)
set filterGetUnitsOfTypeIdAll=Filter(function GetUnitsOfTypeIdAllFilter)
set filterGetUnitsOfPlayerAndTypeId=Filter(function GetUnitsOfPlayerAndTypeIdFilter)
set filterMeleeTrainedUnitIsHeroBJ=Filter(function MeleeTrainedUnitIsHeroBJFilter)
set filterLivingPlayerUnitsOfTypeId=Filter(function LivingPlayerUnitsOfTypeIdFilter)
set O7=0
loop
exitwhen O7==16
set bj_FORCE_PLAYER[O7]=CreateForce()
call ForceAddPlayer(bj_FORCE_PLAYER[O7],Player(O7))
set O7=O7+1
endloop
set bj_FORCE_ALL_PLAYERS=CreateForce()
call ForceEnumPlayers(bj_FORCE_ALL_PLAYERS,null)
set bj_cineModePriorSpeed=GetGameSpeed()
set bj_cineModePriorFogSetting=IsFogEnabled()
set bj_cineModePriorMaskSetting=IsFogMaskEnabled()
set O7=0
loop
exitwhen O7>=bj_MAX_QUEUED_TRIGGERS
set bj_queuedExecTriggers[O7]=null
set bj_queuedExecUseConds[O7]=false
set O7=O7+1
endloop
set bj_isSinglePlayer=false
set R7=0
set O7=0
loop
exitwhen O7>=12
if(GetPlayerController(Player(O7))==MAP_CONTROL_USER and GetPlayerSlotState(Player(O7))==PLAYER_SLOT_STATE_PLAYING)then
set R7=R7+1
endif
set O7=O7+1
endloop
set bj_isSinglePlayer=(R7==1)
set bj_rescueSound=CreateSoundFromLabel("Rescue",false,false,false,10000,10000)
set bj_questDiscoveredSound=CreateSoundFromLabel("QuestNew",false,false,false,10000,10000)
set bj_questUpdatedSound=CreateSoundFromLabel("QuestUpdate",false,false,false,10000,10000)
set bj_questCompletedSound=CreateSoundFromLabel("QuestCompleted",false,false,false,10000,10000)
set bj_questFailedSound=CreateSoundFromLabel("QuestFailed",false,false,false,10000,10000)
set bj_questHintSound=CreateSoundFromLabel("Hint",false,false,false,10000,10000)
set bj_questSecretSound=CreateSoundFromLabel("SecretFound",false,false,false,10000,10000)
set bj_questItemAcquiredSound=CreateSoundFromLabel("ItemReward",false,false,false,10000,10000)
set bj_questWarningSound=CreateSoundFromLabel("Warning",false,false,false,10000,10000)
set bj_victoryDialogSound=CreateSoundFromLabel("QuestCompleted",false,false,false,10000,10000)
set bj_defeatDialogSound=CreateSoundFromLabel("QuestFailed",false,false,false,10000,10000)
call DelayedSuspendDecayCreate()
set v=VersionGet()
if(v==VERSION_REIGN_OF_CHAOS)then
set bj_MELEE_MAX_TWINKED_HEROES=bj_MELEE_MAX_TWINKED_HEROES_V0
else
set bj_MELEE_MAX_TWINKED_HEROES=bj_MELEE_MAX_TWINKED_HEROES_V1
endif
call InitQueuedTriggers()
call InitRescuableBehaviorBJ()
call InitDNCSounds()
call InitMapRects()
call InitSummonableCaps()
set S6=0
loop
set bj_stockAllowedPermanent[S6]=false
set bj_stockAllowedCharged[S6]=false
set bj_stockAllowedArtifact[S6]=false
set S6=S6+1
exitwhen S6>10
endloop
call SetAllItemTypeSlots(11)
call SetAllUnitTypeSlots(11)
set bj_stockUpdateTimer=CreateTimer()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INITIAL_DELAY,false,function Z6)
set bj_stockItemPurchased=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(15),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerAddAction(bj_stockItemPurchased,function RemovePurchasedItem)
call DetectGameStarted()
call ExecuteFunc("I9E")
call ExecuteFunc("XYV")
call ExecuteFunc("OOV")
call ExecuteFunc("OTV")
call ExecuteFunc("O9V")
call ExecuteFunc("REV")
call ExecuteFunc("RGV")
call ExecuteFunc("R0V")
set IFE=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(IFE,3.)
call TriggerAddAction(IFE,function NBV)
set IFE=null
set t=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t,Player(0),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call TriggerAddAction(t,function NYV)
call TriggerAddCondition(t,Condition(function NTV))
set t=null
set IGE=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IGE,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(IGE,Condition(function NZV))
call TriggerAddAction(IGE,function N_V)
set IGE=null
set IHE=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IHE,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(IHE,function N0V)
set IHE=null
set IJE=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IJE,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(IJE,function N6V)
set IJE=null
set IKE=CreateTrigger()
call TriggerRegisterEnterRectSimple(IKE,bj_mapInitialPlayableArea)
call TriggerAddAction(IKE,function N8V)
set IKE=null
set ILE=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ILE,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(ILE,Condition(function BAV))
call TriggerAddAction(ILE,function BNV)
set ILE=null
set IME=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IME,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddAction(IME,function BJV)
set IME=null
set IPE=CreateTrigger()
call TriggerRegisterEnterRectSimple(IPE,GJ)
call TriggerRegisterEnterRectSimple(IPE,HJ)
call TriggerRegisterEnterRectSimple(IPE,JJ)
call TriggerRegisterEnterRectSimple(IPE,KJ)
call TriggerAddCondition(IPE,Condition(function C6V))
call TriggerAddAction(IPE,function C7V)
set IPE=null
set IQE=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IQE,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(IQE,Condition(function D2V))
call TriggerAddAction(IQE,function D3V)
set IQE=null
set ISE=CreateTrigger()
call TriggerRegisterPlayerChatEvent(ISE,Player(0),"-",false)
call TriggerAddAction(ISE,function H3V)
set ISE=null
set ITE=CreateTrigger()
call TriggerRegisterPlayerChatEvent(ITE,Player(0),"-g",false)
call TriggerRegisterPlayerChatEvent(ITE,Player(1),"-g",false)
call TriggerRegisterPlayerChatEvent(ITE,Player(2),"-g",false)
call TriggerRegisterPlayerChatEvent(ITE,Player(3),"-g",false)
call TriggerRegisterPlayerChatEvent(ITE,Player(4),"-g",false)
call TriggerRegisterPlayerChatEvent(ITE,Player(5),"-g",false)
call TriggerRegisterPlayerChatEvent(ITE,Player(6),"-g",false)
call TriggerRegisterPlayerChatEvent(ITE,Player(7),"-g",false)
call TriggerRegisterPlayerChatEvent(ITE,Player(8),"-g",false)
call TriggerRegisterPlayerChatEvent(ITE,Player(9),"-g",false)
call TriggerRegisterPlayerChatEvent(ITE,Player(10),"-g",false)
call TriggerRegisterPlayerChatEvent(ITE,Player(11),"-g",false)
call TriggerAddAction(ITE,function H5V)
set ITE=null
set IUE=CreateTrigger()
call TriggerRegisterTimerEventSingle(IUE,1.)
call TriggerAddAction(IUE,function H9V)
set IUE=null
set IWE=CreateTrigger()
call TriggerRegisterPlayerChatEvent(IWE,Player(0),"-w",false)
call TriggerAddAction(IWE,function JVV)
set IWE=null
set IYE=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IYE,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(IYE,Condition(function KWV))
call TriggerAddAction(IYE,function KYV)
set IYE=null
set IZE=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(IZE,1.5)
call TriggerAddAction(IZE,function P2V)
set I_E=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I_E,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(I_E,Condition(function P6V))
call TriggerAddAction(I_E,function P8V)
set I_E=null
set I0E=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I0E,EVENT_PLAYER_UNIT_RESEARCH_FINISH)
call TriggerAddCondition(I0E,Condition(function Q4V))
call TriggerAddAction(I0E,function Q6V)
set I0E=null
set I1E=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I1E,EVENT_PLAYER_UNIT_RESEARCH_FINISH)
call TriggerAddCondition(I1E,Condition(function Q7V))
call TriggerAddAction(I1E,function Q9V)
set I1E=null
set I2E=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I2E,EVENT_PLAYER_UNIT_RESEARCH_FINISH)
call TriggerAddCondition(I2E,Condition(function SVV))
call TriggerAddAction(I2E,function SXV)
set I2E=null
set I3E=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I3E,EVENT_PLAYER_UNIT_RESEARCH_FINISH)
call TriggerAddCondition(I3E,Condition(function SOV))
call TriggerAddAction(I3E,function SIV)
set I3E=null
set I4E=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I4E,EVENT_PLAYER_UNIT_RESEARCH_FINISH)
call TriggerAddCondition(I4E,Condition(function SAV))
call TriggerAddAction(I4E,function SBV)
set I4E=null
set I5E=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I5E,EVENT_PLAYER_UNIT_RESEARCH_FINISH)
call TriggerAddCondition(I5E,Condition(function SCV))
call TriggerAddAction(I5E,function SFV)
set I5E=null
set I6E=CreateTrigger()
call TriggerRegisterTimerExpireEvent(I6E,QU)
call TriggerAddAction(I6E,function S2V)
set I6E=null
set I7E=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I7E,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(I7E,Condition(function S5V))
call TriggerAddAction(I7E,function S7V)
set I7E=null
set I8E=CreateTrigger()
call TriggerRegisterPlayerEventLeave(I8E,Player(0))
call TriggerRegisterPlayerEventLeave(I8E,Player(1))
call TriggerRegisterPlayerEventLeave(I8E,Player(2))
call TriggerRegisterPlayerEventLeave(I8E,Player(3))
call TriggerRegisterPlayerEventLeave(I8E,Player(4))
call TriggerRegisterPlayerEventLeave(I8E,Player(5))
call TriggerRegisterPlayerEventLeave(I8E,Player(6))
call TriggerRegisterPlayerEventLeave(I8E,Player(7))
call TriggerRegisterPlayerEventLeave(I8E,Player(8))
call TriggerRegisterPlayerEventLeave(I8E,Player(9))
call TriggerRegisterPlayerEventLeave(I8E,Player(10))
call TriggerRegisterPlayerEventLeave(I8E,Player(11))
call TriggerAddCondition(I8E,Condition(function TOV))
call TriggerAddAction(I8E,function TIV)
set I8E=null
set i=0
set EB=CreateForce()
set XB=CreateForce()
set OB=45
set RB=CreateGroup()
set AB=CreateTimer()
set CB=CreateGroup()
set FB=CreateGroup()
set GB=CreateForce()
set HB=CreateGroup()
set LB=CreateGroup()
set MB=CreateForce()
set PB=CreateForce()
set SB=CreateGroup()
set TB=CreateGroup()
set i=0
loop
exitwhen(i>10)
set WB[i]=0
set i=i+1
endloop
set YB=CreateGroup()
set VC=CreateGroup()
set EC=CreateTimer()
set OC=CreateForce()
set RC=CreateGroup()
set IC=CreateGroup()
set AC=CreateTimer()
set CC=CreateGroup()
set i=0
loop
exitwhen(i>40)
set DC[i]=CreateForce()
set LC[i]=CreateForce()
set i=i+1
endloop
set HC=CreateGroup()
set i=0
loop
exitwhen(i>12)
set JC[i]=""
set QC[i]=""
set SC[i]=0
set AD[i]=""
set PD[i]=0
set i=i+1
endloop
set KC=CreateGroup()
set MC=CreateGroup()
set i=0
loop
exitwhen(i>1)
set PC[i]=0
set TC[i]=0
set i=i+1
endloop
set UC=CreateForce()
set WC=CreateGroup()
set YC=CreateGroup()
set ZC=CreateGroup()
set ED=CreateGroup()
set RD=CreateGroup()
set ID=CreateGroup()
set BD=CreateGroup()
set GD=CreateGroup()
set MD=CreateForce()
set QD=CreateMultiboard()
set MK=CreateTrigger()
call TriggerAddAction(MK,function R7V)
set PK=CreateTrigger()
call TriggerRegisterTimerEventSingle(PK,3.)
call TriggerAddAction(PK,function R9V)
set QK=CreateTrigger()
call TriggerAddAction(QK,function IEV)
set SK=CreateTrigger()
call TriggerAddAction(SK,function IOV)
set TK=CreateTrigger()
call TriggerRegisterTimerEventSingle(TK,60.)
call TriggerAddAction(TK,function IAV)
set UK=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(UK,EVENT_PLAYER_UNIT_CONSTRUCT_START)
call TriggerAddCondition(UK,Condition(function IBV))
call TriggerAddAction(UK,function ICV)
set WK=CreateTrigger()
call TriggerRegisterTimerEventSingle(WK,.01)
call TriggerAddAction(WK,function IFV)
set YK=CreateTrigger()
call TriggerRegisterTimerEventSingle(YK,1.)
call TriggerAddAction(YK,function IHV)
set ZK=CreateTrigger()
call TriggerRegisterTimerEventSingle(ZK,.01)
call TriggerAddAction(ZK,function ILV)
set VL=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(VL,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(VL,Condition(function OIV))
call TriggerAddAction(VL,function OAV)
set EL=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(EL,EVENT_PLAYER_UNIT_CONSTRUCT_FINISH)
call TriggerAddCondition(EL,Condition(function NEV))
call TriggerAddAction(EL,function NXV)
set XL=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(XL,8.)
call TriggerAddAction(XL,function NHV)
set OL=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OL,EVENT_PLAYER_UNIT_UPGRADE_FINISH)
call TriggerAddCondition(OL,Condition(function NKV))
call TriggerAddAction(OL,function NQV)
set RL=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(RL,EVENT_PLAYER_HERO_LEVEL)
call TriggerAddAction(RL,function N2V)
set IL=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IL,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(IL,function BEV)
set AL=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(AL,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(AL,Condition(function BOV))
call TriggerAddAction(AL,function BRV)
set NL=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(NL,30.)
call TriggerAddAction(NL,function BGV)
set BL=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(BL,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(BL,Condition(function BLV))
call TriggerAddAction(BL,function BMV)
set CL=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(CL,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(CL,Condition(function BQV))
call TriggerAddAction(CL,function BSV)
set DL=CreateTrigger()
call TriggerRegisterTimerEventSingle(DL,1.)
call TriggerAddAction(DL,function B_V)
set FL=CreateTrigger()
call TriggerAddAction(FL,function B1V)
set GL=CreateTrigger()
call TriggerRegisterTimerEventSingle(GL,1.)
call TriggerAddAction(GL,function CRV)
set HL=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(HL,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(HL,Condition(function CNV))
call TriggerAddAction(HL,function CBV)
set JL=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(JL,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(JL,Condition(function CDV))
call TriggerAddAction(JL,function CFV)
set KL=CreateTrigger()
call TriggerRegisterTimerEventSingle(KL,2400.)
call TriggerAddAction(KL,function CHV)
set LL=CreateTrigger()
call DisableTrigger(LL)
call TriggerRegisterTimerEventPeriodic(LL,30.)
call TriggerAddAction(LL,function CPV)
set ML=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ML,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(ML,Condition(function CSV))
call TriggerAddAction(ML,function CTV)
set PL=CreateTrigger()
call TriggerRegisterTimerEventSingle(PL,1.)
call TriggerAddAction(PL,function CWV)
set QL=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(QL,1.)
call TriggerAddAction(QL,function CZV)
set SL=CreateTrigger()
call TriggerRegisterEnterRectSimple(SL,ZD)
call TriggerRegisterEnterRectSimple(SL,NF)
call TriggerRegisterEnterRectSimple(SL,BF)
call TriggerRegisterEnterRectSimple(SL,CF)
call TriggerAddCondition(SL,Condition(function C0V))
call TriggerAddAction(SL,function C1V)
set TL=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(TL,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(TL,Condition(function C3V))
call TriggerAddAction(TL,function C4V)
set UL=CreateTrigger()
call TriggerRegisterTimerEventSingle(UL,.5)
call TriggerAddAction(UL,function C9V)
set WL=CreateTrigger()
call TriggerRegisterEnterRectSimple(WL,RF)
call TriggerAddAction(WL,function DOV)
set YL=CreateTrigger()
call TriggerRegisterPlayerSelectionEventBJ(YL,Player(0),true)
call TriggerRegisterPlayerSelectionEventBJ(YL,Player(1),true)
call TriggerRegisterPlayerSelectionEventBJ(YL,Player(2),true)
call TriggerRegisterPlayerSelectionEventBJ(YL,Player(3),true)
call TriggerRegisterPlayerSelectionEventBJ(YL,Player(4),true)
call TriggerRegisterPlayerSelectionEventBJ(YL,Player(5),true)
call TriggerRegisterPlayerSelectionEventBJ(YL,Player(6),true)
call TriggerRegisterPlayerSelectionEventBJ(YL,Player(7),true)
call TriggerRegisterPlayerSelectionEventBJ(YL,Player(8),true)
call TriggerRegisterPlayerSelectionEventBJ(YL,Player(9),true)
call TriggerRegisterPlayerSelectionEventBJ(YL,Player(10),true)
call TriggerRegisterPlayerSelectionEventBJ(YL,Player(11),true)
call TriggerAddCondition(YL,Condition(function DIV))
call TriggerAddAction(YL,function DAV)
set ZL=CreateTrigger()
call TriggerRegisterPlayerSelectionEventBJ(ZL,Player(0),true)
call TriggerRegisterPlayerSelectionEventBJ(ZL,Player(1),true)
call TriggerRegisterPlayerSelectionEventBJ(ZL,Player(2),true)
call TriggerRegisterPlayerSelectionEventBJ(ZL,Player(3),true)
call TriggerRegisterPlayerSelectionEventBJ(ZL,Player(4),true)
call TriggerRegisterPlayerSelectionEventBJ(ZL,Player(5),true)
call TriggerRegisterPlayerSelectionEventBJ(ZL,Player(6),true)
call TriggerRegisterPlayerSelectionEventBJ(ZL,Player(7),true)
call TriggerRegisterPlayerSelectionEventBJ(ZL,Player(8),true)
call TriggerRegisterPlayerSelectionEventBJ(ZL,Player(9),true)
call TriggerRegisterPlayerSelectionEventBJ(ZL,Player(10),true)
call TriggerRegisterPlayerSelectionEventBJ(ZL,Player(11),true)
call TriggerAddCondition(ZL,Condition(function DBV))
call TriggerAddAction(ZL,function DCV)
set VM=CreateTrigger()
call TriggerRegisterPlayerSelectionEventBJ(VM,Player(0),true)
call TriggerRegisterPlayerSelectionEventBJ(VM,Player(1),true)
call TriggerRegisterPlayerSelectionEventBJ(VM,Player(2),true)
call TriggerRegisterPlayerSelectionEventBJ(VM,Player(3),true)
call TriggerRegisterPlayerSelectionEventBJ(VM,Player(4),true)
call TriggerRegisterPlayerSelectionEventBJ(VM,Player(5),true)
call TriggerRegisterPlayerSelectionEventBJ(VM,Player(6),true)
call TriggerRegisterPlayerSelectionEventBJ(VM,Player(7),true)
call TriggerRegisterPlayerSelectionEventBJ(VM,Player(8),true)
call TriggerRegisterPlayerSelectionEventBJ(VM,Player(9),true)
call TriggerRegisterPlayerSelectionEventBJ(VM,Player(10),true)
call TriggerRegisterPlayerSelectionEventBJ(VM,Player(11),true)
call TriggerAddCondition(VM,Condition(function DFV))
call TriggerAddAction(VM,function DGV)
set EM=CreateTrigger()
call TriggerRegisterPlayerSelectionEventBJ(EM,Player(0),true)
call TriggerRegisterPlayerSelectionEventBJ(EM,Player(1),true)
call TriggerRegisterPlayerSelectionEventBJ(EM,Player(2),true)
call TriggerRegisterPlayerSelectionEventBJ(EM,Player(3),true)
call TriggerRegisterPlayerSelectionEventBJ(EM,Player(4),true)
call TriggerRegisterPlayerSelectionEventBJ(EM,Player(5),true)
call TriggerRegisterPlayerSelectionEventBJ(EM,Player(6),true)
call TriggerRegisterPlayerSelectionEventBJ(EM,Player(7),true)
call TriggerRegisterPlayerSelectionEventBJ(EM,Player(8),true)
call TriggerRegisterPlayerSelectionEventBJ(EM,Player(9),true)
call TriggerRegisterPlayerSelectionEventBJ(EM,Player(10),true)
call TriggerRegisterPlayerSelectionEventBJ(EM,Player(11),true)
call TriggerAddCondition(EM,Condition(function DJV))
call TriggerAddAction(EM,function DKV)
set XM=CreateTrigger()
call TriggerRegisterPlayerSelectionEventBJ(XM,Player(0),true)
call TriggerRegisterPlayerSelectionEventBJ(XM,Player(1),true)
call TriggerRegisterPlayerSelectionEventBJ(XM,Player(2),true)
call TriggerRegisterPlayerSelectionEventBJ(XM,Player(3),true)
call TriggerRegisterPlayerSelectionEventBJ(XM,Player(4),true)
call TriggerRegisterPlayerSelectionEventBJ(XM,Player(5),true)
call TriggerRegisterPlayerSelectionEventBJ(XM,Player(6),true)
call TriggerRegisterPlayerSelectionEventBJ(XM,Player(7),true)
call TriggerRegisterPlayerSelectionEventBJ(XM,Player(8),true)
call TriggerRegisterPlayerSelectionEventBJ(XM,Player(9),true)
call TriggerRegisterPlayerSelectionEventBJ(XM,Player(10),true)
call TriggerRegisterPlayerSelectionEventBJ(XM,Player(11),true)
call TriggerAddCondition(XM,Condition(function DMV))
call TriggerAddAction(XM,function DPV)
set OM=CreateTrigger()
call TriggerRegisterPlayerSelectionEventBJ(OM,Player(0),true)
call TriggerRegisterPlayerSelectionEventBJ(OM,Player(1),true)
call TriggerRegisterPlayerSelectionEventBJ(OM,Player(2),true)
call TriggerRegisterPlayerSelectionEventBJ(OM,Player(3),true)
call TriggerRegisterPlayerSelectionEventBJ(OM,Player(4),true)
call TriggerRegisterPlayerSelectionEventBJ(OM,Player(5),true)
call TriggerRegisterPlayerSelectionEventBJ(OM,Player(6),true)
call TriggerRegisterPlayerSelectionEventBJ(OM,Player(7),true)
call TriggerRegisterPlayerSelectionEventBJ(OM,Player(8),true)
call TriggerRegisterPlayerSelectionEventBJ(OM,Player(9),true)
call TriggerRegisterPlayerSelectionEventBJ(OM,Player(10),true)
call TriggerRegisterPlayerSelectionEventBJ(OM,Player(11),true)
call TriggerAddCondition(OM,Condition(function DSV))
call TriggerAddAction(OM,function DTV)
set RM=CreateTrigger()
call TriggerRegisterPlayerSelectionEventBJ(RM,Player(0),true)
call TriggerRegisterPlayerSelectionEventBJ(RM,Player(1),true)
call TriggerRegisterPlayerSelectionEventBJ(RM,Player(2),true)
call TriggerRegisterPlayerSelectionEventBJ(RM,Player(3),true)
call TriggerRegisterPlayerSelectionEventBJ(RM,Player(4),true)
call TriggerRegisterPlayerSelectionEventBJ(RM,Player(5),true)
call TriggerRegisterPlayerSelectionEventBJ(RM,Player(6),true)
call TriggerRegisterPlayerSelectionEventBJ(RM,Player(7),true)
call TriggerRegisterPlayerSelectionEventBJ(RM,Player(8),true)
call TriggerRegisterPlayerSelectionEventBJ(RM,Player(9),true)
call TriggerRegisterPlayerSelectionEventBJ(RM,Player(10),true)
call TriggerRegisterPlayerSelectionEventBJ(RM,Player(11),true)
call TriggerAddCondition(RM,Condition(function DWV))
call TriggerAddAction(RM,function DYV)
set IM=CreateTrigger()
call TriggerRegisterPlayerSelectionEventBJ(IM,Player(0),true)
call TriggerRegisterPlayerSelectionEventBJ(IM,Player(1),true)
call TriggerRegisterPlayerSelectionEventBJ(IM,Player(2),true)
call TriggerRegisterPlayerSelectionEventBJ(IM,Player(3),true)
call TriggerRegisterPlayerSelectionEventBJ(IM,Player(4),true)
call TriggerRegisterPlayerSelectionEventBJ(IM,Player(5),true)
call TriggerRegisterPlayerSelectionEventBJ(IM,Player(6),true)
call TriggerRegisterPlayerSelectionEventBJ(IM,Player(7),true)
call TriggerRegisterPlayerSelectionEventBJ(IM,Player(8),true)
call TriggerRegisterPlayerSelectionEventBJ(IM,Player(9),true)
call TriggerRegisterPlayerSelectionEventBJ(IM,Player(10),true)
call TriggerRegisterPlayerSelectionEventBJ(IM,Player(11),true)
call TriggerAddCondition(IM,Condition(function D_V))
call TriggerAddAction(IM,function D0V)
set AM=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(AM,900.)
call TriggerAddAction(AM,function FRV)
set NM=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(NM,30.)
call TriggerAddAction(NM,function FNV)
set BM=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(BM,15.)
call TriggerAddAction(BM,function FDV)
set CM=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(CM,7.)
call TriggerAddAction(CM,function FHV)
set DM=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(DM,3.)
call TriggerAddAction(DM,function FLV)
set FM=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(FM,8.)
call TriggerAddAction(FM,function FQV)
set GM=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(GM,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(GM,Condition(function FTV))
call TriggerAddAction(GM,function FYV)
set HM=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(HM,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(HM,Condition(function F_V))
call TriggerAddAction(HM,function F0V)
set JM=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(JM,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(JM,Condition(function F2V))
call TriggerAddAction(JM,function GBV)
set KM=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(KM,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(KM,Condition(function GDV))
call TriggerAddAction(KM,function G7V)
set LM=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(LM,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(LM,Condition(function G9V))
call TriggerAddAction(LM,function HLV)
set MM=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(MM,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(MM,Condition(function HPV))
call TriggerAddAction(MM,function H0V)
set QM=CreateTrigger()
call TriggerRegisterTimerEventSingle(QM,1.)
call TriggerAddAction(QM,function JRV)
set SM=CreateTrigger()
call TriggerRegisterPlayerChatEvent(SM,Player(0),"-return",true)
call TriggerAddAction(SM,function JNV)
set Show=CreateTrigger()
call TriggerRegisterPlayerChatEvent(Show,Player(0),"-cl",true)
call TriggerRegisterPlayerChatEvent(Show,Player(1),"-cl",true)
call TriggerRegisterPlayerChatEvent(Show,Player(2),"-cl",true)
call TriggerRegisterPlayerChatEvent(Show,Player(3),"-cl",true)
call TriggerRegisterPlayerChatEvent(Show,Player(4),"-cl",true)
call TriggerRegisterPlayerChatEvent(Show,Player(5),"-cl",true)
call TriggerRegisterPlayerChatEvent(Show,Player(6),"-cl",true)
call TriggerRegisterPlayerChatEvent(Show,Player(7),"-cl",true)
call TriggerRegisterPlayerChatEvent(Show,Player(8),"-cl",true)
call TriggerRegisterPlayerChatEvent(Show,Player(9),"-cl",true)
call TriggerRegisterPlayerChatEvent(Show,Player(10),"-cl",true)
call TriggerRegisterPlayerChatEvent(Show,Player(11),"-cl",true)
call TriggerAddAction(Show,function ThisFunction)
set ShowInfo=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(ShowInfo,600.)
call TriggerAddAction(ShowInfo,function ShowInfoFunction)
set Feed=CreateTrigger()
call TriggerRegisterPlayerChatEvent(Feed,Player(0),"-feed 10",false)
call TriggerRegisterPlayerChatEvent(Feed,Player(0),"-feed 11",false)
call TriggerAddCondition(Feed,Condition(function Feed_Cond_Func))
call TriggerAddAction(Feed,function FeedingFunc)
call awesome()
set enablemusic=CreateTrigger()
call TriggerRegisterPlayerChatEvent(enablemusic,Player(0),"-music on",false)
call TriggerRegisterPlayerChatEvent(enablemusic,Player(1),"-music on",false)
call TriggerRegisterPlayerChatEvent(enablemusic,Player(2),"-music on",false)
call TriggerRegisterPlayerChatEvent(enablemusic,Player(3),"-music on",false)
call TriggerRegisterPlayerChatEvent(enablemusic,Player(4),"-music on",false)
call TriggerRegisterPlayerChatEvent(enablemusic,Player(5),"-music on",false)
call TriggerRegisterPlayerChatEvent(enablemusic,Player(6),"-music on",false)
call TriggerRegisterPlayerChatEvent(enablemusic,Player(7),"-music on",false)
call TriggerRegisterPlayerChatEvent(enablemusic,Player(8),"-music on",false)
call TriggerRegisterPlayerChatEvent(enablemusic,Player(9),"-music on",false)
call TriggerRegisterPlayerChatEvent(enablemusic,Player(10),"-music on",false)
call TriggerRegisterPlayerChatEvent(enablemusic,Player(11),"-music on",false)
call TriggerAddAction(enablemusic,function enablemusicfunction)
set disablemusic=CreateTrigger()
call TriggerRegisterPlayerChatEvent(disablemusic,Player(0),"-music off",false)
call TriggerRegisterPlayerChatEvent(disablemusic,Player(1),"-music off",false)
call TriggerRegisterPlayerChatEvent(disablemusic,Player(2),"-music off",false)
call TriggerRegisterPlayerChatEvent(disablemusic,Player(3),"-music off",false)
call TriggerRegisterPlayerChatEvent(disablemusic,Player(4),"-music off",false)
call TriggerRegisterPlayerChatEvent(disablemusic,Player(5),"-music off",false)
call TriggerRegisterPlayerChatEvent(disablemusic,Player(6),"-music off",false)
call TriggerRegisterPlayerChatEvent(disablemusic,Player(7),"-music off",false)
call TriggerRegisterPlayerChatEvent(disablemusic,Player(8),"-music off",false)
call TriggerRegisterPlayerChatEvent(disablemusic,Player(9),"-music off",false)
call TriggerRegisterPlayerChatEvent(disablemusic,Player(10),"-music off",false)
call TriggerRegisterPlayerChatEvent(disablemusic,Player(11),"-music off",false)
call TriggerAddAction(disablemusic,function disablemusicfunction)
set TM=CreateTrigger()
call TriggerRegisterPlayerChatEvent(TM,Player(0),"-setname",false)
call TriggerRegisterPlayerChatEvent(TM,Player(1),"-setname",false)
call TriggerRegisterPlayerChatEvent(TM,Player(2),"-setname",false)
call TriggerRegisterPlayerChatEvent(TM,Player(3),"-setname",false)
call TriggerRegisterPlayerChatEvent(TM,Player(4),"-setname",false)
call TriggerRegisterPlayerChatEvent(TM,Player(5),"-setname",false)
call TriggerRegisterPlayerChatEvent(TM,Player(6),"-setname",false)
call TriggerRegisterPlayerChatEvent(TM,Player(7),"-setname",false)
call TriggerRegisterPlayerChatEvent(TM,Player(8),"-setname",false)
call TriggerRegisterPlayerChatEvent(TM,Player(9),"-setname",false)
call TriggerRegisterPlayerChatEvent(TM,Player(10),"-setname",false)
call TriggerRegisterPlayerChatEvent(TM,Player(11),"-setname",false)
call TriggerAddAction(TM,function JCV)
set UM=CreateTrigger()
call TriggerRegisterPlayerChatEvent(UM,Player(0),"-show",true)
call TriggerRegisterPlayerChatEvent(UM,Player(1),"-show",true)
call TriggerRegisterPlayerChatEvent(UM,Player(2),"-show",true)
call TriggerRegisterPlayerChatEvent(UM,Player(3),"-show",true)
call TriggerRegisterPlayerChatEvent(UM,Player(4),"-show",true)
call TriggerRegisterPlayerChatEvent(UM,Player(5),"-show",true)
call TriggerRegisterPlayerChatEvent(UM,Player(6),"-show",true)
call TriggerRegisterPlayerChatEvent(UM,Player(7),"-show",true)
call TriggerRegisterPlayerChatEvent(UM,Player(8),"-show",true)
call TriggerRegisterPlayerChatEvent(UM,Player(9),"-show",true)
call TriggerRegisterPlayerChatEvent(UM,Player(10),"-show",true)
call TriggerRegisterPlayerChatEvent(UM,Player(11),"-show",true)
call TriggerAddAction(UM,function JFV)
set WM=CreateTrigger()
call TriggerRegisterPlayerChatEvent(WM,Player(0),"-clear",true)
call TriggerRegisterPlayerChatEvent(WM,Player(1),"-clear",true)
call TriggerRegisterPlayerChatEvent(WM,Player(2),"-clear",true)
call TriggerRegisterPlayerChatEvent(WM,Player(3),"-clear",true)
call TriggerRegisterPlayerChatEvent(WM,Player(4),"-clear",true)
call TriggerRegisterPlayerChatEvent(WM,Player(5),"-clear",true)
call TriggerRegisterPlayerChatEvent(WM,Player(6),"-clear",true)
call TriggerRegisterPlayerChatEvent(WM,Player(7),"-clear",true)
call TriggerRegisterPlayerChatEvent(WM,Player(8),"-clear",true)
call TriggerRegisterPlayerChatEvent(WM,Player(9),"-clear",true)
call TriggerRegisterPlayerChatEvent(WM,Player(10),"-clear",true)
call TriggerRegisterPlayerChatEvent(WM,Player(11),"-clear",true)
call TriggerAddAction(WM,function JHV)
set YM=CreateTrigger()
call TriggerRegisterPlayerChatEvent(YM,Player(0),"-hp",true)
call TriggerRegisterPlayerChatEvent(YM,Player(1),"-hp",true)
call TriggerRegisterPlayerChatEvent(YM,Player(2),"-hp",true)
call TriggerRegisterPlayerChatEvent(YM,Player(3),"-hp",true)
call TriggerRegisterPlayerChatEvent(YM,Player(4),"-hp",true)
call TriggerRegisterPlayerChatEvent(YM,Player(5),"-hp",true)
call TriggerRegisterPlayerChatEvent(YM,Player(6),"-hp",true)
call TriggerRegisterPlayerChatEvent(YM,Player(7),"-hp",true)
call TriggerRegisterPlayerChatEvent(YM,Player(8),"-hp",true)
call TriggerRegisterPlayerChatEvent(YM,Player(9),"-hp",true)
call TriggerRegisterPlayerChatEvent(YM,Player(10),"-hp",true)
call TriggerRegisterPlayerChatEvent(YM,Player(11),"-hp",true)
call TriggerAddAction(YM,function JMV)
set ZM=CreateTrigger()
call TriggerRegisterPlayerChatEvent(ZM,Player(0),"-mp",true)
call TriggerRegisterPlayerChatEvent(ZM,Player(1),"-mp",true)
call TriggerRegisterPlayerChatEvent(ZM,Player(2),"-mp",true)
call TriggerRegisterPlayerChatEvent(ZM,Player(3),"-mp",true)
call TriggerRegisterPlayerChatEvent(ZM,Player(4),"-mp",true)
call TriggerRegisterPlayerChatEvent(ZM,Player(5),"-mp",true)
call TriggerRegisterPlayerChatEvent(ZM,Player(6),"-mp",true)
call TriggerRegisterPlayerChatEvent(ZM,Player(7),"-mp",true)
call TriggerRegisterPlayerChatEvent(ZM,Player(8),"-mp",true)
call TriggerRegisterPlayerChatEvent(ZM,Player(9),"-mp",true)
call TriggerRegisterPlayerChatEvent(ZM,Player(10),"-mp",true)
call TriggerRegisterPlayerChatEvent(ZM,Player(11),"-mp",true)
call TriggerAddAction(ZM,function JTV)
set VP=CreateTrigger()
call TriggerRegisterPlayerChatEvent(VP,Player(0),"-ms",true)
call TriggerRegisterPlayerChatEvent(VP,Player(1),"-ms",true)
call TriggerRegisterPlayerChatEvent(VP,Player(2),"-ms",true)
call TriggerRegisterPlayerChatEvent(VP,Player(3),"-ms",true)
call TriggerRegisterPlayerChatEvent(VP,Player(4),"-ms",true)
call TriggerRegisterPlayerChatEvent(VP,Player(5),"-ms",true)
call TriggerRegisterPlayerChatEvent(VP,Player(6),"-ms",true)
call TriggerRegisterPlayerChatEvent(VP,Player(7),"-ms",true)
call TriggerRegisterPlayerChatEvent(VP,Player(8),"-ms",true)
call TriggerRegisterPlayerChatEvent(VP,Player(9),"-ms",true)
call TriggerRegisterPlayerChatEvent(VP,Player(10),"-ms",true)
call TriggerRegisterPlayerChatEvent(VP,Player(11),"-ms",true)
call TriggerAddAction(VP,function JZV)
set EP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(EP,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(EP,Condition(function J0V))
call TriggerAddAction(EP,function J1V)
set XP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(XP,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(XP,Condition(function J3V))
call TriggerAddAction(XP,function J4V)
set OP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OP,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(OP,Condition(function J6V))
call TriggerAddAction(OP,function J7V)
set RP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(RP,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(RP,Condition(function J9V))
call TriggerAddAction(RP,function KVV)
set IP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IP,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(IP,Condition(function KXV))
call TriggerAddAction(IP,function KRV)
set AP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(AP,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(AP,Condition(function KAV))
call TriggerAddAction(AP,function KBV)
set NP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(NP,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(NP,Condition(function KDV))
call TriggerAddAction(NP,function KGV)
set BP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(BP,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(BP,Condition(function KJV))
call TriggerAddAction(BP,function KMV)
set CP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(CP,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(CP,Condition(function KQV))
call TriggerAddAction(CP,function KSV)
set DP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(DP,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(DP,Condition(function KZV))
call TriggerAddAction(DP,function K_V)
set FP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(FP,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(FP,Condition(function K1V))
call TriggerAddAction(FP,function K4V)
set GP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(GP,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(GP,Condition(function K6V))
call TriggerAddAction(GP,function K9V)
set HP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(HP,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(HP,Condition(function LEV))
call TriggerAddAction(HP,function LXV)
set JP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(JP,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(JP,Condition(function LRV))
call TriggerAddAction(JP,function LNV)
set KP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(KP,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(KP,Condition(function LCV))
call TriggerAddAction(KP,function LGV)
set LP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(LP,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(LP,Condition(function LJV))
call TriggerAddAction(LP,function LMV)
set MP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(MP,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(MP,Condition(function LQV))
call TriggerAddAction(MP,function LUV)
set PP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(PP,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(PP,Condition(function LYV))
call TriggerAddAction(PP,function L0V)
set QP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(QP,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(QP,Condition(function L2V))
call TriggerAddAction(QP,function L5V)
set SP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(SP,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(SP,Condition(function L7V))
call TriggerAddAction(SP,function MVV)
set TP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(TP,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(TP,Condition(function MXV))
call TriggerAddAction(TP,function MIV)
set UP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(UP,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(UP,Condition(function MNV))
call TriggerAddAction(UP,function MDV)
set WP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(WP,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(WP,Condition(function MGV))
call TriggerAddAction(WP,function MKV)
set YP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(YP,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(YP,Condition(function MPV))
call TriggerAddAction(YP,function MQV)
set ZP=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ZP,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(ZP,Condition(function MUV))
call TriggerAddAction(ZP,function MWV)
set VQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(VQ,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(VQ,Condition(function M_V))
call TriggerAddAction(VQ,function M0V)
set EQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(EQ,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(EQ,Condition(function M3V))
call TriggerAddAction(EQ,function M4V)
set XQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(XQ,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(XQ,Condition(function M7V))
call TriggerAddAction(XQ,function M8V)
set OQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(OQ,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(OQ,Condition(function PEV))
call TriggerAddAction(OQ,function PXV)
set RQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(RQ,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(RQ,Condition(function PIV))
call TriggerAddAction(RQ,function PAV)
set IQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(IQ,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(IQ,Condition(function PCV))
call TriggerAddAction(IQ,function PDV)
set AQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(AQ,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(AQ,Condition(function PHV))
call TriggerAddAction(AQ,function PJV)
set NQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(NQ,EVENT_PLAYER_UNIT_TRAIN_FINISH)
call TriggerAddCondition(NQ,Condition(function PMV))
call TriggerAddAction(NQ,function PPV)
set BQ=CreateTrigger()
call TriggerRegisterEnterRectSimple(BQ,bj_mapInitialPlayableArea)
call TriggerAddCondition(BQ,Condition(function PSV))
call TriggerAddAction(BQ,function PTV)
set CQ=CreateTrigger()
call TriggerAddCondition(CQ,Condition(function PYV))
call TriggerAddAction(CQ,function P_V)
set DQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(DQ,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(DQ,Condition(function P3V))
call TriggerAddAction(DQ,function P4V)
set FQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(FQ,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(FQ,Condition(function P9V))
call TriggerAddAction(FQ,function QVV)
set GQ=CreateTrigger()
call TriggerRegisterEnterRectSimple(GQ,bj_mapInitialPlayableArea)
call TriggerAddCondition(GQ,Condition(function QXV))
call TriggerAddAction(GQ,function QOV)
set HQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(HQ,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(HQ,Condition(function QIV))
call TriggerAddAction(HQ,function QAV)
set JQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(JQ,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(JQ,Condition(function QBV))
call TriggerAddAction(JQ,function QDV)
set KQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(KQ,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(KQ,Condition(function QGV))
call TriggerAddAction(KQ,function QHV)
set LQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(LQ,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(LQ,Condition(function QKV))
call TriggerAddAction(LQ,function QLV)
set MQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(MQ,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(MQ,Condition(function QPV))
call TriggerAddAction(MQ,function QQV)
set PQ=CreateTrigger()
call TriggerRegisterTimerEventSingle(PQ,58.)
call TriggerAddAction(PQ,function QTV)
set QQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(QQ,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(QQ,Condition(function QWV))
call TriggerAddAction(QQ,function Q2V)
set SQ=CreateTrigger()
call TriggerRegisterTimerEventSingle(SQ,55.)
call TriggerAddAction(SQ,function SHV)
set TQ=CreateTrigger()
call TriggerRegisterTimerEventSingle(TQ,429.)
call TriggerAddAction(TQ,function SKV)
set UQ=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(UQ,600.)
call TriggerAddAction(UQ,function SMV)
set WQ=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(WQ,EVENT_PLAYER_UNIT_SELL)
call TriggerAddCondition(WQ,Condition(function SQV))
call TriggerAddAction(WQ,function SSV)
set YQ=CreateTrigger()
call TriggerRegisterTimerEventSingle(YQ,1.)
call TriggerAddAction(YQ,function SUV)
set ZQ=CreateTrigger()
call TriggerRegisterTimerEventSingle(ZQ,.2)
call TriggerAddAction(ZQ,function S3V)
set ES=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ES,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(ES,Condition(function S8V))
call TriggerAddAction(ES,function TVV)
set OS=CreateTrigger()
call TriggerRegisterTimerEventSingle(OS,55.)
call TriggerAddAction(OS,function TNV)
set RS=CreateTrigger()
call DisableTrigger(RS)
call TriggerRegisterTimerEventPeriodic(RS,2.4)
call TriggerAddAction(RS,function TDV)
set IS=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(IS,5.)
call TriggerAddAction(IS,function TKV)
set AS=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(AS,500.)
call TriggerAddAction(AS,function TMV)
set NS=CreateTrigger()
call TriggerAddAction(NS,function TQV)
set BS=CreateTrigger()
call TriggerRegisterTimerEventSingle(BS,1.)
call TriggerAddAction(BS,function TTV)
set CS=CreateTrigger()
call TriggerRegisterTimerEventSingle(CS,900.)
call TriggerAddAction(CS,function TWV)
set DS=CreateTrigger()
call TriggerRegisterTimerEventSingle(DS,1800.)
call TriggerAddAction(DS,function TZV)
set FS=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(FS,60.)
call TriggerAddAction(FS,function T3V)
set GS=CreateTrigger()
call TriggerRegisterEnterRectSimple(GS,GF)
call TriggerRegisterEnterRectSimple(GS,HF)
call TriggerRegisterEnterRectSimple(GS,JF)
call TriggerRegisterEnterRectSimple(GS,KF)
call TriggerRegisterEnterRectSimple(GS,LF)
call TriggerAddCondition(GS,Condition(function T5V))
call TriggerAddAction(GS,function UVV)
set HS=CreateTrigger()
call TriggerRegisterEnterRectSimple(HS,MF)
call TriggerRegisterEnterRectSimple(HS,PF)
call TriggerAddCondition(HS,Condition(function UXV))
call TriggerAddAction(HS,function UNV)
set JS=CreateTrigger()
call TriggerRegisterEnterRectSimple(JS,QF)
call TriggerAddCondition(JS,Condition(function UCV))
call TriggerAddAction(JS,function UJV)
set KS=CreateTrigger()
call TriggerRegisterEnterRectSimple(KS,SF)
call TriggerRegisterEnterRectSimple(KS,TF)
call TriggerRegisterEnterRectSimple(KS,UF)
call TriggerAddCondition(KS,Condition(function ULV))
call TriggerAddAction(KS,function UTV)
set LS=CreateTrigger()
call TriggerRegisterEnterRectSimple(LS,WF)
call TriggerRegisterEnterRectSimple(LS,YF)
call TriggerAddCondition(LS,Condition(function UWV))
call TriggerAddAction(LS,function U1V)
set MS=CreateTrigger()
call TriggerRegisterEnterRectSimple(MS,ZF)
call TriggerAddCondition(MS,Condition(function U3V))
call TriggerAddAction(MS,function U8V)
set PS=CreateTrigger()
call TriggerRegisterEnterRectSimple(PS,VG)
call TriggerRegisterEnterRectSimple(PS,EG)
call TriggerRegisterEnterRectSimple(PS,XG)
call TriggerRegisterEnterRectSimple(PS,OG)
call TriggerAddCondition(PS,Condition(function WVV))
call TriggerAddAction(PS,function WIV)
set QS=CreateTrigger()
call TriggerRegisterEnterRectSimple(QS,RG)
call TriggerRegisterEnterRectSimple(QS,IG)
call TriggerAddCondition(QS,Condition(function WNV))
call TriggerAddAction(QS,function WGV)
set SS=CreateTrigger()
call TriggerRegisterEnterRectSimple(SS,AG)
call TriggerRegisterEnterRectSimple(SS,NG)
call TriggerRegisterEnterRectSimple(SS,BG)
call TriggerAddCondition(SS,Condition(function WJV))
call TriggerAddAction(SS,function WQV)
set TS=CreateTrigger()
call TriggerRegisterEnterRectSimple(TS,CG)
call TriggerAddCondition(TS,Condition(function WTV))
call TriggerAddAction(TS,function W_V)
set US=CreateTrigger()
call TriggerRegisterEnterRectSimple(US,DG)
call TriggerAddCondition(US,Condition(function W1V))
call TriggerAddAction(US,function W6V)
set WS=CreateTrigger()
call TriggerRegisterEnterRectSimple(WS,FG)
call TriggerRegisterEnterRectSimple(WS,GG)
call TriggerRegisterEnterRectSimple(WS,HG)
call TriggerAddCondition(WS,Condition(function W8V))
call TriggerAddAction(WS,function YOV)
set YS=CreateTrigger()
call TriggerRegisterEnterRectSimple(YS,JG)
call TriggerRegisterEnterRectSimple(YS,KG)
call TriggerAddCondition(YS,Condition(function YIV))
call TriggerAddAction(YS,function YDV)
set ZS=CreateTrigger()
call TriggerRegisterEnterRectSimple(ZS,LG)
call TriggerAddCondition(ZS,Condition(function YGV))
call TriggerAddAction(ZS,function YMV)
set VT=CreateTrigger()
call TriggerRegisterEnterRectSimple(VT,MG)
call TriggerRegisterEnterRectSimple(VT,PG)
call TriggerRegisterEnterRectSimple(VT,QG)
call TriggerAddCondition(VT,Condition(function YQV))
call TriggerAddAction(VT,function YYV)
set ET=CreateTrigger()
call TriggerRegisterEnterRectSimple(ET,SG)
call TriggerRegisterEnterRectSimple(ET,TG)
call TriggerAddCondition(ET,Condition(function Y_V))
call TriggerAddAction(ET,function Y4V)
set XT=CreateTrigger()
call TriggerRegisterEnterRectSimple(XT,UG)
call TriggerRegisterEnterRectSimple(XT,WG)
call TriggerAddCondition(XT,Condition(function Y6V))
call TriggerAddAction(XT,function ZEV)
set OT=CreateTrigger()
call TriggerRegisterEnterRectSimple(OT,YG)
call TriggerAddCondition(OT,Condition(function ZOV))
call TriggerAddAction(OT,function ZBV)
set RT=CreateTrigger()
call TriggerRegisterEnterRectSimple(RT,ZG)
call TriggerRegisterEnterRectSimple(RT,VH)
call TriggerAddCondition(RT,Condition(function ZDV))
call TriggerAddAction(RT,function ZKV)
set IT=CreateTrigger()
call TriggerRegisterEnterRectSimple(IT,EH)
call TriggerRegisterEnterRectSimple(IT,XH)
call TriggerRegisterEnterRectSimple(IT,OH)
call TriggerAddCondition(IT,Condition(function ZMV))
call TriggerAddAction(IT,function ZUV)
set AT=CreateTrigger()
call TriggerRegisterEnterRectSimple(AT,RH)
call TriggerRegisterEnterRectSimple(AT,MJ)
call TriggerAddCondition(AT,Condition(function ZYV))
call TriggerAddAction(AT,function Z2V)
set NT=CreateTrigger()
call TriggerRegisterEnterRectSimple(NT,IH)
call TriggerRegisterEnterRectSimple(NT,AH)
call TriggerAddCondition(NT,Condition(function Z4V))
call TriggerAddAction(NT,function Z9V)
set BT=CreateTrigger()
call TriggerRegisterEnterRectSimple(BT,NH)
call TriggerRegisterEnterRectSimple(BT,BH)
call TriggerAddCondition(BT,Condition(function VEE))
call TriggerAddAction(BT,function VAE)
set CT=CreateTrigger()
call TriggerRegisterEnterRectSimple(CT,CH)
call TriggerAddCondition(CT,Condition(function VBE))
call TriggerAddAction(CT,function VHE)
set DT=CreateTrigger()
call TriggerRegisterEnterRectSimple(DT,DH)
call TriggerAddCondition(DT,Condition(function VKE))
call TriggerAddAction(DT,function VSE)
set FT=CreateTrigger()
call TriggerRegisterEnterRectSimple(FT,FH)
call TriggerRegisterEnterRectSimple(FT,GH)
call TriggerRegisterEnterRectSimple(FT,HH)
call TriggerAddCondition(FT,Condition(function VUE))
call TriggerAddAction(FT,function V0E)
set GT=CreateTrigger()
call TriggerRegisterEnterRectSimple(GT,JH)
call TriggerRegisterEnterRectSimple(GT,KH)
call TriggerRegisterEnterRectSimple(GT,LH)
call TriggerRegisterEnterRectSimple(GT,MH)
call TriggerAddCondition(GT,Condition(function V2E))
call TriggerAddAction(GT,function V7E)
set HT=CreateTrigger()
call TriggerRegisterEnterRectSimple(HT,PH)
call TriggerRegisterEnterRectSimple(HT,QH)
call TriggerAddCondition(HT,Condition(function V9E))
call TriggerAddAction(HT,function ERE)
set JT=CreateTrigger()
call TriggerRegisterEnterRectSimple(JT,SH)
call TriggerRegisterEnterRectSimple(JT,TH)
call TriggerRegisterEnterRectSimple(JT,UH)
call TriggerAddCondition(JT,Condition(function EAE))
call TriggerAddAction(JT,function EFE)
set KT=CreateTrigger()
call TriggerRegisterEnterRectSimple(KT,WH)
call TriggerAddCondition(KT,Condition(function EHE))
call TriggerAddAction(KT,function EPE)
set LT=CreateTrigger()
call TriggerRegisterEnterRectSimple(LT,YH)
call TriggerRegisterEnterRectSimple(LT,ZH)
call TriggerAddCondition(LT,Condition(function ESE))
call TriggerAddAction(LT,function EZE)
set MT=CreateTrigger()
call TriggerRegisterEnterRectSimple(MT,VJ)
call TriggerRegisterEnterRectSimple(MT,EJ)
call TriggerAddCondition(MT,Condition(function E0E))
call TriggerAddAction(MT,function E5E)
set PT=CreateTrigger()
call TriggerRegisterEnterRectSimple(PT,XJ)
call TriggerRegisterEnterRectSimple(PT,OJ)
call TriggerRegisterEnterRectSimple(PT,RJ)
call TriggerAddCondition(PT,Condition(function E7E))
call TriggerAddAction(PT,function XXE)
set QT=CreateTrigger()
call TriggerRegisterEnterRectSimple(QT,IJ)
call TriggerRegisterEnterRectSimple(QT,AJ)
call TriggerRegisterEnterRectSimple(QT,NJ)
call TriggerAddCondition(QT,Condition(function XRE))
call TriggerAddAction(QT,function XCE)
set ST=CreateTrigger()
call TriggerRegisterEnterRectSimple(ST,BJ)
call TriggerRegisterEnterRectSimple(ST,CJ)
call TriggerRegisterEnterRectSimple(ST,DJ)
call TriggerAddCondition(ST,Condition(function XFE))
call TriggerAddAction(ST,function XLE)
set TT=CreateTrigger()
call TriggerRegisterEnterRectSimple(TT,FJ)
call TriggerAddCondition(TT,Condition(function XPE))
call TriggerAddAction(TT,function XWE)
set UT=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(UT,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerRegisterAnyUnitEventBJ(UT,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(UT,Condition(function XZE))
call TriggerAddAction(UT,function X_E)
set WT=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(WT,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(WT,Condition(function X1E))
call TriggerAddAction(WT,function X2E)
set YT=CreateTrigger()
call TriggerRegisterPlayerEventLeave(YT,Player(0))
call TriggerRegisterPlayerEventLeave(YT,Player(1))
call TriggerRegisterPlayerEventLeave(YT,Player(2))
call TriggerRegisterPlayerEventLeave(YT,Player(3))
call TriggerRegisterPlayerEventLeave(YT,Player(4))
call TriggerRegisterPlayerEventLeave(YT,Player(5))
call TriggerRegisterPlayerEventLeave(YT,Player(6))
call TriggerRegisterPlayerEventLeave(YT,Player(7))
call TriggerRegisterPlayerEventLeave(YT,Player(8))
call TriggerRegisterPlayerEventLeave(YT,Player(9))
call TriggerAddAction(YT,function X4E)
set ZT=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ZT,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(ZT,Condition(function X6E))
call TriggerAddAction(ZT,function O6E)
set VU=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(VU,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(VU,Condition(function O8E))
call TriggerAddAction(VU,function R8E)
set EU=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(EU,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(EU,Condition(function IEE))
call TriggerAddAction(EU,function IOE)
set XU=CreateTrigger()
call TriggerRegisterEnterRectSimple(XU,bj_mapInitialPlayableArea)
call TriggerAddCondition(XU,Condition(function INE))
call TriggerAddAction(XU,function ICE)
call ConditionalTriggerExecute(MK)
call ConditionalTriggerExecute(QK)
call ConditionalTriggerExecute(SK)
call ConditionalTriggerExecute(FL)
call ConditionalTriggerExecute(NS)
call InitCustomTriggers(  )
endfunction

function config takes nothing returns nothing
set shandle=CreateSound("tybac.mp3",true,false,false,10,10,"")  
call SetMapName("|cFFFF0000VampirismSPEED Another v1.01a|r")
call SetMapDescription("Go to vampirism-speed.blogspot.com for the latest versions and official forums and updates!")
call SetPlayers(12)
call SetTeams(12)
call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
call DefineStartLocation(0,-256.,-1024.)
call DefineStartLocation(1,-256.,-1024.)
call DefineStartLocation(2,-256.,-1024.)
call DefineStartLocation(3,-256.,-1024.)
call DefineStartLocation(4,-256.,-1024.)
call DefineStartLocation(5,-256.,-1024.)
call DefineStartLocation(6,-256.,-1024.)
call DefineStartLocation(7,-256.,-1024.)
call DefineStartLocation(8,-256.,-1024.)
call DefineStartLocation(9,-256.,-1024.)
call DefineStartLocation(10,-256.,-1408.)
call DefineStartLocation(11,-256.,-960.)
call SetPlayerStartLocation(Player(0),0)
call ForcePlayerStartLocation(Player(0),0)
call SetPlayerColor(Player(0),ConvertPlayerColor(0))
call SetPlayerRacePreference(Player(0),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(0),false)
call SetPlayerController(Player(0),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(1),1)
call ForcePlayerStartLocation(Player(1),1)
call SetPlayerColor(Player(1),ConvertPlayerColor(1))
call SetPlayerRacePreference(Player(1),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(1),false)
call SetPlayerController(Player(1),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(2),2)
call ForcePlayerStartLocation(Player(2),2)
call SetPlayerColor(Player(2),ConvertPlayerColor(2))
call SetPlayerRacePreference(Player(2),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(2),false)
call SetPlayerController(Player(2),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(3),3)
call ForcePlayerStartLocation(Player(3),3)
call SetPlayerColor(Player(3),ConvertPlayerColor(3))
call SetPlayerRacePreference(Player(3),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(3),false)
call SetPlayerController(Player(3),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(4),4)
call ForcePlayerStartLocation(Player(4),4)
call SetPlayerColor(Player(4),ConvertPlayerColor(4))
call SetPlayerRacePreference(Player(4),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(4),false)
call SetPlayerController(Player(4),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(5),5)
call ForcePlayerStartLocation(Player(5),5)
call SetPlayerColor(Player(5),ConvertPlayerColor(5))
call SetPlayerRacePreference(Player(5),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(5),false)
call SetPlayerController(Player(5),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(6),6)
call ForcePlayerStartLocation(Player(6),6)
call SetPlayerColor(Player(6),ConvertPlayerColor(6))
call SetPlayerRacePreference(Player(6),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(6),false)
call SetPlayerController(Player(6),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(7),7)
call ForcePlayerStartLocation(Player(7),7)
call SetPlayerColor(Player(7),ConvertPlayerColor(7))
call SetPlayerRacePreference(Player(7),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(7),false)
call SetPlayerController(Player(7),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(8),8)
call ForcePlayerStartLocation(Player(8),8)
call SetPlayerColor(Player(8),ConvertPlayerColor(8))
call SetPlayerRacePreference(Player(8),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(8),false)
call SetPlayerController(Player(8),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(9),9)
call ForcePlayerStartLocation(Player(9),9)
call SetPlayerColor(Player(9),ConvertPlayerColor(9))
call SetPlayerRacePreference(Player(9),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(9),false)
call SetPlayerController(Player(9),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(10),10)
call ForcePlayerStartLocation(Player(10),10)
call SetPlayerColor(Player(10),ConvertPlayerColor(10))
call SetPlayerRacePreference(Player(10),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player(10),false)
call SetPlayerController(Player(10),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(11),11)
call ForcePlayerStartLocation(Player(11),11)
call SetPlayerColor(Player(11),ConvertPlayerColor(11))
call SetPlayerRacePreference(Player(11),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player(11),false)
call SetPlayerController(Player(11),MAP_CONTROL_USER)
call InitCustomTeams()
call SetStartLocPrioCount(0,9)
call SetStartLocPrio(0,0,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(0,1,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(0,2,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(0,3,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(0,4,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(0,5,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(0,6,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(0,7,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(0,8,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(1,10)
call SetStartLocPrio(1,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,1,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,2,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,3,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,4,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,5,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,6,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,7,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,8,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,9,10,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(2,10)
call SetStartLocPrio(2,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,2,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,3,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,4,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,5,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,6,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,7,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,8,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,9,10,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(3,10)
call SetStartLocPrio(3,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,2,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,3,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,4,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,5,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,6,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,7,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,8,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,9,10,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(4,10)
call SetStartLocPrio(4,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,2,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,3,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,4,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,5,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,6,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,7,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,8,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,9,10,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(5,10)
call SetStartLocPrio(5,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,2,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,3,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,4,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,5,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,6,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,7,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,8,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,9,10,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(6,10)
call SetStartLocPrio(6,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,2,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,3,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,4,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,5,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,6,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,7,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,8,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,9,10,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(7,10)
call SetStartLocPrio(7,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,2,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,3,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,4,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,5,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,6,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,7,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,8,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,9,10,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(8,10)
call SetStartLocPrio(8,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,2,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,3,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,4,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,5,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,6,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,7,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,8,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,9,10,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(9,10)
call SetStartLocPrio(9,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,2,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,3,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,4,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,5,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,6,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,7,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,8,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,9,10,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(10,9)
call SetStartLocPrio(10,0,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(10,1,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(10,2,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(10,3,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(10,4,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(10,5,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(10,6,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(10,7,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(10,8,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(11,10)
call SetStartLocPrio(11,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(11,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(11,2,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(11,3,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(11,4,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(11,5,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(11,6,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(11,7,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(11,8,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(11,9,9,MAP_LOC_PRIO_HIGH)  
call SetSoundPitch(shandle,0.45)  
call SetSoundVolume(shandle,127)  
call StartSound(shandle)
//call PlaySound("tybac.mp3")
//call SetMapMusic("tybac.mp3",false,0)
//call PlayMusic("tybac.mp3")
endfunction
function AVE takes nothing returns boolean
local integer A7=H5
call I4V(G4[A7])
if E4[A7]!=null then
call SetUnitX(E4[A7],GetUnitX(V4[A7])+75.*Cos(GetUnitFacing(V4[A7])*bj_DEGTORAD))
call SetUnitY(E4[A7],GetUnitY(V4[A7])+75.*Sin(GetUnitFacing(V4[A7])*bj_DEGTORAD))
endif
if K4[A7]then
call SetUnitPathing(V4[A7],true)
endif
set V4[A7]=null
set E4[A7]=null
set X4[A7]=null
set H4[A7]=true
set J4[A7]=false
set K4[A7]=false
return true
endfunction
function AEE takes nothing returns boolean
local integer A7=H5
local integer I2V=T3[A7]
local integer I3V=0
loop
exitwhen I2V==0
set I3V=J3[I2V]
call IYV(I2V)
set I2V=I3V
endloop
return true
endfunction
function AXE takes nothing returns boolean
local integer A7=H5
set G3[A7]=0
set H3[A7]=0
set J3[A7]=0
if K3[A7]!=null then
call RemoveUnit(K3[A7])
set K3[A7]=null
endif
return true
endfunction
function AOE takes nothing returns boolean
local integer A7=H5
if(U0[A7]!=0)then
call UnitRemoveAbility(K0[A7],U0[A7])
endif
if(L0[A7]!=null)then
call DestroyEffect(L0[A7])
set L0[A7]=null
endif
if(C0==8190)then
call TimerStart(TN,0,false,function RVV)
call ExplodeUnitBJ(K0[A7])
else
set N0[C0]=K0[A7]
set B0[C0]=TimerGetElapsed(UN)+4.
set C0=((C0)+1)
if(C0==1)then
call TimerStart(TN,4.,false,function RVV)
endif
call SetUnitOwner(K0[A7],Player(15),false)
endif
set K0[A7]=null
return true
endfunction
function ARE takes nothing returns boolean
local integer A7=H5
call GroupClear(L2[A7])
call RDV(B2[A7])
set H5=A7
return true
endfunction
function AIE takes nothing returns boolean
local integer A7=H5
local integer U7
set F1=F1+1
set U7=G1[A7]
set H1[F1]=U7
return true
endfunction
function AAE takes nothing returns boolean
local real x=C5
local real y=D5
local string Y7=F5
local integer Z7=G5
local integer A7=V8()
local integer i=0
set L1[A7]=x
set M1[A7]=y
if J1[A7]==null then
set J1[A7]=CreateGroup()
endif
set I1[A7]=0
set P1[A7]=true
set Z1[V2]=A7
set V2=V2+1
set Q1[A7]=Z7
loop
exitwhen i==Z7
set B1[C1[A7]+i]=RXV(L1[A7],M1[A7],i*VB/ Z7)
call SetUnitFlyHeight(K0[(B1[C1[A7]+i])],((YN)*1.),0)
call RNV(B1[C1[A7]+i],Y7)
set i=i+1
endloop
if(V2==1)then
call TimerStart(W1,.025,true,T1)
endif
set J5=A7
return true
endfunction
function ANE takes nothing returns boolean
local integer A7=H5
local integer j=0
call GroupClear(J1[A7])
loop
exitwhen j==Q1[A7]
call RDV(B1[C1[A7]+j])
set j=j+1
endloop
set H5=A7
return true
endfunction
function ABE takes nothing returns boolean
call NWV(H5,B5)
return true
endfunction
function I9E takes nothing returns nothing
set N5=CreateTrigger()
call TriggerAddCondition(N5,Condition(function AVE))
set A5=CreateTrigger()
call TriggerAddCondition(A5,Condition(function AEE))
set I5=CreateTrigger()
call TriggerAddCondition(I5,Condition(function AXE))
set A2[15]=null
set N2[15]=null
set X1[12]=null
set O1[12]=null
set O1[19]=null
set O5=CreateTrigger()
call TriggerAddCondition(O5,Condition(function AOE))
set I2[15]=CreateTrigger()
call TriggerAddCondition(I2[15],Condition(function ARE))
set R5=CreateTrigger()
call TriggerAddCondition(R5,Condition(function AAE))
set E1[12]=CreateTrigger()
set E1[19]=E1[12]
call TriggerAddCondition(E1[12],Condition(function ANE))
call TriggerAddCondition(E1[12],Condition(function AIE))
set X1[19]=CreateTrigger()
call TriggerAddCondition(X1[19],Condition(function ABE))
call TriggerAddAction(X1[19],function ABE)
call ExecuteFunc("RTV")
call ExecuteFunc("NVV")
endfunction
 
Level 7
Joined
Nov 18, 2012
Messages
312
If the trigger was already present in the map before it got this way then it should have been created by the WE and is declared in a different globals block.

AnonymousPro, can you post the entire war3map.j?
okay i removed the entire war3map.j

I believe the library does not work anymore..

I have imported 2 libraries like worldbounds and pudge hook with vanilla jass, I did the same for this library but it's not working
and i find this suspicious, you can return something and then return null?
function REGROWTREES___W2D takes widget w returns destructable
return w // do not inline
return null
endfunction

edit: even the vjass version of the 2nd one doesn't work on a clean map
 
Last edited:
Status
Not open for further replies.
Top