//TESH.scrollpos=0
//TESH.alwaysfold=0
Name | Type | is_array | initial_value |
activespawn | integer | Yes | |
Allplayerforce | force | No | |
allystring | string | Yes | |
allyvshordehero | unitcode | Yes | |
avhgoldcalc | integer | Yes | |
base | unit | Yes | |
baseinteger | integer | Yes | |
baseinteger2 | integer | Yes | |
Basicattack | abilcode | No | |
begprovince | integer | Yes | |
botmode | integer | No | |
bounty | integer | No | |
bountymoney | real | Yes | |
bountyreal | real | No | |
bountystring | string | No | |
Capitalbuilder | unit | Yes | |
Capitalcontroller | unit | Yes | |
capitalrace | integer | Yes | |
centerstring | string | No | |
circlepos | location | Yes | |
CircleRect | rect | Yes | |
CircleRegion | region | Yes | |
colorcode | string | Yes | |
colorcodeplayer | string | Yes | |
colorcodetimer | string | No | |
colorname | string | Yes | |
colorname2 | string | Yes | |
colornameshort | string | Yes | |
colorrealpercent1 | real | Yes | |
colorrealpercent2 | real | Yes | |
colorrealpercent3 | real | Yes | |
counter | integer | Yes | |
counternextpl | integer | Yes | |
countryregion | rect | Yes | |
Countrystring | string | Yes | |
currentlocation | location | No | |
currentlocation2 | location | No | |
currentlocation3 | location | No | |
currentstring | string | No | |
currentunitgroup | group | No | |
customvalueunit | integer | Yes | |
D | integer | No | |
Deaths | integer | Yes | |
defender | unit | Yes | |
domcapital | integer | Yes | |
domslavenumber | integer | Yes | |
domteaminteger | integer | Yes | |
E | integer | No | |
empirecontrol | integer | Yes | |
empireowned | boolean | No | |
empireregion | integer | Yes | |
endinteger | integer | No | |
exodus | integer | Yes | |
exodus2secw8 | integer | No | |
Exodusdia | dialog | No | |
exoduseventsover | boolean | No | |
exodusvisible | fogmodifier | Yes | |
F | integer | No | |
Flee | button | No | |
floatingtext | texttag | Yes | |
Fog | integer | No | |
gameHasBegun | boolean | No | false |
gameisOn | integer | No | |
gameIsOver | boolean | No | false |
giveteam3goldbonus | integer | No | |
giveteamGoldBonus | boolean | Yes | false |
goldBonus | integer | Yes | |
goldbonuscalc | integer | Yes | |
Haven | unit | Yes | |
Havenarea | rect | Yes | |
Havenbuilding | unitcode | Yes | |
Haveninteger | integer | Yes | |
Havennumber | integer | No | 0 |
Haventype | integer | Yes | |
heromod | integer | No | |
heromodstring | string | No | |
highestnumber | integer | No | |
Hostchooses | timer | No | |
hostoptionsunit | unit | No | |
hoststarted | integer | No | |
I | integer | No | |
Incomemod | integer | No | |
Incomemodifier | integer | No | |
intarrAlliedTo2 | integer | Yes | |
intarrReqAllTo2 | imagetype | Yes | |
intCOPImpBasCntr | integer | No | |
intCurrentNumber | integer | No | |
intInc1To2 | integer | No | |
intInc2To2 | integer | No | |
intIncCompTo2 | integer | No | |
isFirst | boolean | No | true |
ismiddle | boolean | No | true |
isTeamsMode | boolean | No | false |
iteminteger | integer | Yes | |
Itemseller | unit | Yes | |
K | integer | No | |
Kills | integer | Yes | |
lastPlayer | player | No | |
mageabilityinteger | integer | No | |
mageinteger | integer | No | |
Mapsizemod | integer | No | |
maxspawn | integer | No | |
middleplayer | player | No | |
modeinteger | integer | No | |
modlocation | location | No | |
Multiboard | multiboard | No | |
multiboardmode | integer | No | |
N | integer | No | |
nationowner | integer | Yes | |
nextpl | player | Yes | |
numbases | integer | No | |
numcitiesempire | integer | Yes | |
numcitiesregion | integer | Yes | |
numempire | integer | No | |
numheros | integer | No | |
nummerationbase | integer | No | |
numraces | integer | No | |
numregions | integer | No | |
O | integer | No | |
outlandportmod | integer | No | |
Outlandstring | string | No | |
P | integer | No | |
Pinggroup | force | No | |
Pinglocation | location | No | |
plagrTo2TempPG | force | No | |
playercheckowner | integer | No | |
Playerheroselector | unit | Yes | |
playerinmulti | integer | Yes | |
playerLeft | boolean | Yes | false |
Playername | string | Yes | |
playerplaying | force | No | |
playerrowed | integer | No | |
playerrowednumbers | integer | Yes | |
playersNumber | integer | No | |
Playertools | unit | Yes | |
pntarrCOPImpBas | location | Yes | |
R | integer | No | |
Racearea | integer | Yes | |
raceareainteger | integer | No | |
Racearecounter | integer | Yes | |
racebase | unitcode | Yes | |
racebaseallowed | integer | No | |
racecapital | unitcode | Yes | |
Raceitem | itemcode | Yes | |
Racemodtimer | timer | No | |
raceplayer | integer | Yes | |
racetaken | boolean | Yes | |
RaceTavern | unit | Yes | |
random1 | integer | No | |
random2 | integer | No | |
Randommode | integer | No | |
randommodestring | string | No | |
regionactive | integer | Yes | |
regionbasesowned | integer | Yes | |
regioncontrol | integer | Yes | |
regionplayer | integer | Yes | |
riskgameplay | integer | No | |
shiprouteregion | rect | Yes | |
shiproutes | unit | Yes | |
shiproutesthere | boolean | No | |
shiproutestring | string | No | |
Shiproutetext | texttag | Yes | |
sortingvalues | integer | Yes | |
spawn | boolean | No | |
spawncorrection | integer | Yes | |
spawner | unit | Yes | |
spawnfromplayers | integer | Yes | |
spawningnumber | integer | Yes | |
spawnlocation | location | Yes | |
spawnsperround | integer | Yes | |
spawnstring | string | No | |
spawnunit | unitcode | Yes | |
spawnunit2 | unitcode | Yes | |
spawnX | real | Yes | |
spawnY | real | Yes | |
Stay | button | No | |
stringfog | string | No | |
stringgame | string | No | |
stringmode | string | No | |
stringmode2 | string | No | |
stringmultiboardmode | string | No | |
stringtournament | string | No | |
T | integervar | No | |
telelastused | integer | Yes | -5 |
tempboolean | boolean | No | |
tempInteger | integer | No | |
tempinteger10 | integer | No | |
tempinteger2 | integer | No | |
tempinteger3 | integer | No | |
tempinteger4 | integer | No | |
tempinteger6 | integer | No | |
tempinteger7 | integer | No | |
tempIntegerArray | integer | Yes | |
Tempplayergroup1 | force | No | |
Tempplayergroup2 | force | No | |
tempString | string | No | |
Testmode | integer | No | |
Testmodestring | string | No | |
timeinteger | integer | No | |
timeintegerstart | integer | No | |
timestring | string | No | |
Tournament | integer | No | |
Traingold | integer | Yes | |
Turns | integer | No | |
uniarrCOPImpBases | unit | Yes | |
unitinspawn | unit | Yes | |
version | string | No | |
wininteger | integer | No | |
won | boolean | Yes | false |
//TESH.scrollpos=3
//TESH.alwaysfold=0
function Trig_Turntimeonmulitboard_Actions takes nothing returns nothing
local multiboarditem mbitem = MultiboardGetItem( udg_Multiboard, 0, 0 )
if udg_timeinteger == 0 then
call ConditionalTriggerExecute( gg_trg_Give_Gold )
set udg_timeinteger = udg_timeintegerstart
endif
set udg_colorcodetimer = "|cffffcc00"
if udg_timeinteger <= 15 then
set udg_colorcodetimer = "|cffffff00"
if udg_timeinteger == 10 and udg_maxspawn != 0 then
call ConditionalTriggerExecute( gg_trg_Supplyspawn )
endif
endif
if udg_timeinteger < 10 then
set udg_colorcodetimer = "|cffff7700"
endif
if udg_timeinteger <= 3 then
set udg_colorcodetimer = "|cffff0000"
call StartSound( gg_snd_BattleNetTick )
endif
call MultiboardSetItemValue(mbitem, ( ( "Turn Time: " + udg_colorcodetimer ) + ( I2S(udg_timeinteger) + "|r" ) ))
call MultiboardReleaseItem(mbitem)
set udg_timeinteger = ( udg_timeinteger - 1 )
set mbitem=null
endfunction
//===========================================================================
function InitTrig_Turntimeonmulitboard takes nothing returns nothing
set gg_trg_Turntimeonmulitboard = CreateTrigger( )
call DisableTrigger( gg_trg_Turntimeonmulitboard )
call TriggerRegisterTimerEventPeriodic( gg_trg_Turntimeonmulitboard, 1.00 )
call TriggerAddAction( gg_trg_Turntimeonmulitboard, function Trig_Turntimeonmulitboard_Actions )
endfunction
//TESH.scrollpos=17
//TESH.alwaysfold=0
function Trig_give_spawns_new1_Actions takes nothing returns nothing
local integer c = 101
local integer r = 1
local integer numsp
local integer s
local integer e
local location rally
loop
exitwhen r > udg_numempire
set udg_activespawn[r] = udg_empirecontrol[r]
set r = r + 1
endloop
loop
exitwhen c > udg_numempire + 700
set s = c/100
set r = c - s*100
set e = udg_activespawn[r]
if r <= udg_numempire and r != 0 and e != 0 then
set numsp = udg_spawnsperround[r]
if s <= numsp then
if udg_spawningnumber[( r + ( ( e - 1 ) * 100 ) )] < numsp * udg_maxspawn then
call SetUnitOwner(udg_unitinspawn[c], Player(e-1), true)
set udg_Traingold[e] = udg_Traingold[e]+GetUnitPointValue(udg_unitinspawn[c])
call SetUnitPosition(udg_unitinspawn[c], udg_spawnX[r], udg_spawnY[r])
call ShowUnit(udg_unitinspawn[c], true)
set rally = GetUnitRallyPoint(udg_spawner[r])
call IssuePointOrderLoc( udg_unitinspawn[c], "attack", rally )
set udg_spawningnumber[( r + ( e - 1 ) * 100 )] = ( udg_spawningnumber[( r + ( e - 1 ) * 100 )] + 1 )
call SetItemCharges( UnitItemInSlot(udg_spawner[r], 0), ( GetItemCharges(UnitItemInSlot(udg_spawner[r], 0)) - 1 ) )
set udg_unitinspawn[c] = null
call RemoveLocation ( rally )
endif
endif
endif
if c == s*100 then
call PolledWait(0.7)
endif
set c = c + 1
endloop
set rally=null
endfunction
//===========================================================================
function InitTrig_give_spawns takes nothing returns nothing
set gg_trg_give_spawns = CreateTrigger( )
call TriggerAddAction( gg_trg_give_spawns, function Trig_give_spawns_new1_Actions )
endfunction
//TESH.scrollpos=5
//TESH.alwaysfold=0
function Trig_Supply_Actions takes nothing returns nothing
local integer c = 101
local integer r
local integer numsp
local integer s
loop
exitwhen c > udg_numempire + 200
set s = c/100
set r = c - s*100
if r <= udg_numempire and r != 0 then
set numsp = udg_spawnsperround[r]
if s <= numsp then
if udg_unitinspawn[c] == null then
if s==1 then
set udg_unitinspawn[c] = CreateUnit( Player(15), udg_spawnunit[r], udg_spawnX[r], udg_spawnY[r], 90.00 )
else
set udg_unitinspawn[c] = CreateUnit( Player(15), udg_spawnunit2[r], udg_spawnX[r], udg_spawnY[r], 90.00 )
endif
call SetUnitUserData( udg_unitinspawn[c], r )
call ShowUnit(udg_unitinspawn[c], false)
endif
endif
if s <= 2 and (r == 14 or r == udg_numempire) then
call PolledWait(.1)
endif
endif
set c = c + 1
endloop
endfunction
//===========================================================================
function InitTrig_Supplyspawn takes nothing returns nothing
set gg_trg_Supplyspawn = CreateTrigger( )
call TriggerAddAction( gg_trg_Supplyspawn, function Trig_Supply_Actions )
endfunction
//TESH.scrollpos=12
//TESH.alwaysfold=0
function Trig_Chat_commands_Actions takes nothing returns nothing
local force f = CreateForce()
local location l
local integer i=1
call ForceAddPlayer(f, GetTriggerPlayer())
if GetEventPlayerChatString() == "-item" and udg_heromod != 0 then
loop
exitwhen i > 19
if udg_iteminteger[i] == 1 then
set l = GetUnitLoc(udg_Itemseller[i])
call PingMinimapLocForForceEx( f, l, 7.00, bj_MINIMAPPINGSTYLE_SIMPLE, 100, 100, 100 )
endif
set i = i + 1
endloop
endif
if GetEventPlayerChatString() == "-clear" then
call ClearTextMessagesBJ( f )
endif
/*set udg_currentlocation=GetUnitLoc(udg_base[udg_capitalrace[udg_raceplayer[udg_P]]]) //for -capital command
call PingMinimapLocForForceEx(GetForceOfPlayer(ConvertedPlayer(udg_P)), udg_currentlocation, 15.00, bj_MINIMAPPINGSTYLE_SIMPLE, 0.00, 100, 0.00)
call RemoveLocation(udg_currentlocation) */
if GetEventPlayerChatString() == "-far" or GetEventPlayerChatString() == "-f" then
call SetCameraFieldForPlayer( GetTriggerPlayer(), CAMERA_FIELD_TARGET_DISTANCE, 3500.00, 0.00 )
call SetCameraFieldForPlayer( GetTriggerPlayer(), CAMERA_FIELD_ANGLE_OF_ATTACK, -75.00, 0.00 )
endif
if GetEventPlayerChatString() == "-medium" or GetEventPlayerChatString() == "-m" then
call SetCameraFieldForPlayer( GetTriggerPlayer(), CAMERA_FIELD_TARGET_DISTANCE, 3100.00, 0.00 )
call SetCameraFieldForPlayer( GetTriggerPlayer(), CAMERA_FIELD_ANGLE_OF_ATTACK, -65.00, 0.00 )
endif
if GetEventPlayerChatString() == "-close" or GetEventPlayerChatString() == "-near" then
call SetCameraFieldForPlayer( GetTriggerPlayer(), CAMERA_FIELD_TARGET_DISTANCE, bj_CAMERA_DEFAULT_DISTANCE, 0.00 )
call SetCameraFieldForPlayer( GetTriggerPlayer(), CAMERA_FIELD_ANGLE_OF_ATTACK, bj_CAMERA_DEFAULT_AOA, 0.00 )
endif
if SubStringBJ(GetEventPlayerChatString(), 1, 6) == "-zoom " then
if S2I(SubStringBJ(GetEventPlayerChatString(), 7, 10)) > 1000 and S2I(SubStringBJ(GetEventPlayerChatString(), 7, 10)) < 5000 then
call SetCameraFieldForPlayer( GetTriggerPlayer(), CAMERA_FIELD_TARGET_DISTANCE, S2I(SubStringBJ(GetEventPlayerChatString(), 7, 10)), 0.00 )
endif
endif
if SubStringBJ(GetEventPlayerChatString(), 1, 3) == "-c " then
set udg_centerstring = SubStringBJ(GetEventPlayerChatString(), 4, 7)
set i = 1
loop
exitwhen i > udg_numregions
if udg_centerstring == SubStringBJ(udg_Countrystring[i], 1, 4) or udg_centerstring == SubStringBJ(StringCase(udg_Countrystring[i], false), 1, 4) then
set l = GetRectCenter(udg_countryregion[i])
call PanCameraToTimedLocForPlayer( GetTriggerPlayer(), l, 0 )
endif
set i = i + 1
endloop
endif
call DestroyForce(f)
set f = null
call RemoveLocation(l)
set l=null
endfunction
//===========================================================================
function InitTrig_Chat_commands takes nothing returns nothing
set gg_trg_Chat_commands = CreateTrigger( )
call TriggerAddAction( gg_trg_Chat_commands, function Trig_Chat_commands_Actions )
endfunction
//TESH.scrollpos=166
//TESH.alwaysfold=0
function Trig_Activate_Region_Conditions2 takes nothing returns boolean
if GetUnitAbilityLevel(GetChangingUnit(), 'A001') == 1 then
return true
endif
return false
endfunction
function Trig_Activate_Region_Func2 takes nothing returns boolean
return GetFilterPlayer() != GetChangingUnitPrevOwner() or GetFilterPlayer() != ConvertedPlayer(udg_domteaminteger[GetConvertedPlayerId(GetTriggerPlayer())])
endfunction
function Trig_Activate_Region_Actions2 takes nothing returns nothing
local integer a = udg_baseinteger2[GetUnitUserData(GetChangingUnit())]
local integer b = GetPlayerId(GetOwningPlayer(GetChangingUnit())) + 1
local integer c = GetPlayerId(GetChangingUnitPrevOwner()) + 1
local string s
local integer x = udg_empireregion[a]
local integer z
local integer h=1
local integer g=1
local force f = CreateForce()
set udg_regionbasesowned[( a + ( 100 * ( b - 1 ) ) )] = ( udg_regionbasesowned[(a + ( 100 * ( b - 1 ) ) )] + 1 )
set udg_regionbasesowned[(a + ( 100 * ( c - 1 ) ) )] = ( udg_regionbasesowned[(a + ( 100 * ( c - 1 ) ) )] - 1 )
set udg_counter[c] = ( udg_counter[c] - 1 )
set udg_counter[b] = ( udg_counter[b] + 1 )
if udg_regioncontrol[a] == c then
if udg_Haveninteger[a] != 0 then
call SetUnitOwner( udg_Haven[udg_Haveninteger[a]], Player(PLAYER_NEUTRAL_PASSIVE), true )
call UnitAddAbility( udg_Haven[udg_Haveninteger[a]], 'Ane2' )
endif
set udg_goldBonus[c] = ( udg_goldBonus[c] - udg_numcitiesregion[a] )
set udg_regioncontrol[a] = 0
call ForceAddPlayer(f, GetChangingUnitPrevOwner())
if udg_empirecontrol[x] != 0 then
call DisplayTextToForce(f, "|cffff0000You lost " + udg_Countrystring[a] + " and its Empire Spawn." )
set udg_empirecontrol[x] = 0
call SetUnitOwner( udg_spawner[x], Player(PLAYER_NEUTRAL_PASSIVE), true )
call SetUnitAnimation( udg_spawner[x], "death")
else
call DisplayTextToForce(f, "|cffff0000You lost " + udg_Countrystring[a] + "." )
endif
call ForceRemovePlayer(f, GetChangingUnitPrevOwner())
set udg_regionplayer[c] = ( udg_regionplayer[c] - 1 )
if udg_riskgameplay == 5 then
set udg_goldBonus[c] = ( udg_goldBonus[c] + ( udg_numcitiesregion[a] / 2 ) )
endif
endif
if b <= 12 then
if udg_regionbasesowned[(a + ( 100 * ( b - 1 ) ) )] == udg_numcitiesregion[a] then
set udg_regionplayer[b] = ( udg_regionplayer[b] + 1 )
set udg_regioncontrol[a] = b
set z = udg_numregions
set h = 1
loop
exitwhen h > z
if udg_empireregion[h] == x then
if b != udg_regioncontrol[h] then
set z = 0
endif
endif
set h = h + 1
endloop
call ForceAddPlayer(f, GetOwningPlayer(GetChangingUnit()))
if z != 0 then
set udg_empirecontrol[x] = b
call IssuePointOrderLoc(udg_spawner[x], "setrally", udg_spawnlocation[x])
call SetUnitOwner( udg_spawner[x], Player(b - 1), true )
call SetUnitAnimation( udg_spawner[x], "stand")
call DisplayTextToForce(f, "|cffffcc00You have conquered " + udg_Countrystring[a] + " and its Empire Spawn." )
else
call DisplayTextToForce(f, "|cffffcc00You have conquered " + udg_Countrystring[a] + "." )
endif
set udg_goldBonus[b] = ( udg_goldBonus[b] + udg_numcitiesregion[a] )
if udg_riskgameplay == 5 then
set udg_goldBonus[b] = ( udg_goldBonus[b] - ( udg_numcitiesregion[a] / 2 ) )
endif
if udg_Haveninteger[a] != 0 then
call SetUnitOwner( udg_Haven[udg_Haveninteger[a]], Player(b - 1), true )
call UnitRemoveAbility( udg_Haven[udg_Haveninteger[a]], 'Ane2' )
endif
if udg_modeinteger == 5 then
if a == udg_domcapital[c] then
call SetTextTagTextBJ( udg_floatingtext[udg_domcapital[c]], ( "|cffffcc00" + ( udg_Countrystring[udg_domcapital[c]] + "|r" ) ), 15.00 )
set udg_domcapital[c] = 0
set z = 0
if udg_regionplayer[c] != 0 then
set h = GetRandomInt(1, udg_regionplayer[c])
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_numregions
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if udg_regioncontrol[GetForLoopIndexA()] == c then
set z = ( z + 1 )
if h == z then
set udg_domcapital[c] = GetForLoopIndexA()
call SetTextTagTextBJ( udg_floatingtext[GetForLoopIndexA()], ( udg_colorcodeplayer[c] + ( udg_Countrystring[GetForLoopIndexA()] + "|r" ) ), 15.00 )
set g = GetForLoopIndexA()
call DisplayTextToForce( GetForceOfPlayer(GetChangingUnitPrevOwner()), ( "" + ( "Your capital was moved to " + ( udg_Countrystring[g] + "" ) ) ) )
endif
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endif
if udg_goldBonus[c] <= 30 then
if udg_domteaminteger[GetConvertedPlayerId(GetTriggerPlayer())] != udg_domteaminteger[c] then
if udg_domslavenumber[udg_domteaminteger[GetConvertedPlayerId(GetTriggerPlayer())]] < 2 then
if udg_domteaminteger[c] != c then
call DisplayTimedTextToForce( GetForceOfPlayer(ConvertedPlayer(udg_domteaminteger[c])), 30, ( ( ( "You lost your team member " + ( ( udg_colorcodeplayer[c] + GetPlayerName(GetChangingUnitPrevOwner()) ) + "|r to " ) ) + ( udg_colorcodeplayer[udg_domteaminteger[b]] + GetPlayerName(ConvertedPlayer(udg_domteaminteger[b])) ) ) + "|r. You´re former ally is your enemy now." ) )
set udg_domslavenumber[udg_domteaminteger[c]] = ( udg_domslavenumber[udg_domteaminteger[c]] - 1 )
else
endif
set udg_domslavenumber[udg_domteaminteger[b]] = ( udg_domslavenumber[udg_domteaminteger[b]] + 1 )
set udg_domslavenumber[c] = 0
set udg_domteaminteger[c] = udg_domteaminteger[b]
call DisplayTextToForce( GetPlayersMatching(Condition(function Trig_Activate_Region_Func2)), ( GetPlayerName(GetChangingUnitPrevOwner()) + ( " has lost his capital region. He is now part of " + ( ( udg_colorcodeplayer[b] + GetPlayerName(GetTriggerPlayer()) ) + "'s|r team." ) ) ) )
call DisplayTimedTextToForce( GetForceOfPlayer(ConvertedPlayer(udg_domteaminteger[b])), 30, ( ( "You took the capital region of " + ( udg_colorcodeplayer[c] + GetPlayerName(GetChangingUnitPrevOwner()) ) ) + "|r. He is part of your team now. You can unally him by entering -unally \"color\". Your new Team Member must also give you 25% of his income." ) )
call DisplayTimedTextToForce( GetForceOfPlayer(GetChangingUnitPrevOwner()), 30, ( ( "Your capital region was taken by " + ( udg_colorcodeplayer[udg_domteaminteger[b]] + GetPlayerName(ConvertedPlayer(udg_domteaminteger[b])) ) ) + "|r. He is your Team Leader now. You may ask him for regions by using Request A Region F1. You cannot unally him unless he leaves the game, but he can can unally you. 25% of your income now goes to your Team Leader." ) )
call SetPlayerName( GetChangingUnitPrevOwner(), ( udg_colorname[udg_domteaminteger[b]] + "´s Team Member" ) )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 12
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if udg_domteaminteger[GetForLoopIndexB()] == udg_domteaminteger[b] then
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexB()), GetChangingUnitPrevOwner(), bj_ALLIANCE_ALLIED_VISION )
call SetPlayerAllianceStateBJ( GetChangingUnitPrevOwner(), ConvertedPlayer(GetForLoopIndexB()), bj_ALLIANCE_ALLIED_VISION )
else
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexB()), GetChangingUnitPrevOwner(), bj_ALLIANCE_UNALLIED )
call SetPlayerAllianceStateBJ( GetChangingUnitPrevOwner(), ConvertedPlayer(GetForLoopIndexB()), bj_ALLIANCE_UNALLIED )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_domteaminteger[b]), GetChangingUnitPrevOwner(), bj_ALLIANCE_ALLIED_VISION )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if udg_domteaminteger[GetForLoopIndexA()] == c then
set udg_domteaminteger[GetForLoopIndexA()] = GetForLoopIndexA()
call SetPlayerName( ConvertedPlayer(GetForLoopIndexA()), udg_Playername[GetForLoopIndexA()] )
call DisplayTimedTextToForce( GetForceOfPlayer(ConvertedPlayer(GetForLoopIndexA())), 30, ( ( ( "Your Team Leader " + ( udg_colorcodeplayer[c] + ( GetPlayerName(GetChangingUnitPrevOwner()) + "|r lost his capital region and had less than 30 gold income. You are no longer part of his team." ) ) ) + " " ) + "" ) )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 12
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexB()), ConvertedPlayer(GetForLoopIndexA()), bj_ALLIANCE_UNALLIED )
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexA()), ConvertedPlayer(GetForLoopIndexB()), bj_ALLIANCE_UNALLIED )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DisplayTimedTextToForce( GetForceOfPlayer(ConvertedPlayer(udg_domteaminteger[b])), 30, ( ( "You took the capital region of " + ( udg_colorcodeplayer[c] + GetPlayerName(GetChangingUnitPrevOwner()) ) ) + "|r. As you already have 2 allies, he will not join your team. You can enter -unally \"color\" to get rid of one of your allies." ) )
if udg_domteaminteger[c] != c then
call DisplayTimedTextToForce( GetForceOfPlayer(ConvertedPlayer(udg_domteaminteger[c])), 30, ( ( ( "The capital region of your ally " + ( ( udg_colorcodeplayer[c] + GetPlayerName(GetChangingUnitPrevOwner()) ) + "|r was taken by " ) ) + ( udg_colorcodeplayer[udg_domteaminteger[b]] + GetPlayerName(ConvertedPlayer(udg_domteaminteger[b])) ) ) + "|r. As your ally has over 30 income, he will remain apart of your team. Protect his capital region better or you will lose him to the enemy!" ) )
call DisplayTimedTextToForce( GetForceOfPlayer(GetChangingUnitPrevOwner()), 30, ( ( "Your capital region was taken by " + ( udg_colorcodeplayer[udg_domteaminteger[b]] + GetPlayerName(ConvertedPlayer(udg_domteaminteger[b])) ) ) + "|r. You cannot join his team as he already has 2 allies." ) )
else
call DisplayTimedTextToForce( GetForceOfPlayer(GetChangingUnitPrevOwner()), 30, ( ( "Your capital region was taken by " + ( udg_colorcodeplayer[udg_domteaminteger[b]] + GetPlayerName(ConvertedPlayer(udg_domteaminteger[b])) ) ) + "|r. You cannot join his team as he already has 2 allies." ) )
endif
endif
else
endif
else
call DisplayTextToForce( GetPlayersAll(), ( ( udg_colorcodeplayer[c] + GetPlayerName(GetChangingUnitPrevOwner()) ) + ( "|r has lost his capital region. But he still has over 30 income, so his capital region was moved to " + udg_Countrystring[g] ) ) )
endif
endif
if udg_domcapital[GetConvertedPlayerId(GetTriggerPlayer())] == 0 and udg_Turns >= 3 then
call SetTextTagTextBJ( udg_floatingtext[a], ( udg_colorcodeplayer[b] + ( udg_Countrystring[a] + "|r" ) ), 15.00 )
set udg_domcapital[b] =a
endif
endif
endif
endif
call DestroyForce(f)
set f=null
endfunction
//===========================================================================
function InitTrig_Activate_Region2 takes nothing returns nothing
set gg_trg_Activate_Region2 = CreateTrigger( )
call DisableTrigger( gg_trg_Activate_Region2 )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Activate_Region2, EVENT_PLAYER_UNIT_CHANGE_OWNER )
call TriggerAddCondition( gg_trg_Activate_Region2, Condition( function Trig_Activate_Region_Conditions2 ) )
call TriggerAddAction( gg_trg_Activate_Region2, function Trig_Activate_Region_Actions2 )
endfunction
//TESH.scrollpos=36
//TESH.alwaysfold=0
function Trig_EnterCircle_Conditions takes nothing returns boolean
if IsUnitType(GetEnteringUnit(), UNIT_TYPE_ANCIENT) == true or GetOwningPlayer(GetEnteringUnit()) == Player(PLAYER_NEUTRAL_PASSIVE) then
return false
endif
return true
endfunction
function Trig_EnterCircle_Actions takes nothing returns nothing
local integer c = 0
local unit e = GetEnteringUnit()
local unit h
local unit old
local integer p = GetPlayerId(GetOwningPlayer(e)) + 1
loop
exitwhen c > udg_nummerationbase
if GetTriggeringRegion() == udg_CircleRegion[c] then
if GetWidgetLife(udg_defender[c])<=.405 or udg_defender[c] == null or IsUnitInRegion(udg_CircleRegion[c], udg_defender[c]) == false then
set udg_defender[c] = e
call UnitAddAbility( udg_defender[c], udg_Basicattack )
call IssueImmediateOrder( udg_defender[c], "flamingattack" )
set udg_customvalueunit[c] = GetUnitUserData(udg_defender[c])
call SetUnitUserData( udg_defender[c], ( c + 100 ) )
call SetUnitPositionLoc( e, udg_circlepos[c] )
if GetOwningPlayer(e)!= GetOwningPlayer(udg_base[c]) then
call SetUnitOwner( udg_base[c], GetOwningPlayer(e), true )
if udg_riskgameplay == 3 or udg_riskgameplay == 4 then
call ShowUnit(udg_base[c], false)
set old=udg_base[c]
if c == udg_capitalrace[udg_raceplayer[p]] and udg_Mapsizemod != 3 then
set udg_base[c] = CreateUnit(GetOwningPlayer(e), udg_racecapital[udg_raceplayer[p]], GetUnitX(old), GetUnitY(old), GetUnitFacing(old))
else
set udg_base[c] = CreateUnit(GetOwningPlayer(e), udg_racebase[udg_raceplayer[p]], GetUnitX(old), GetUnitY(old), GetUnitFacing(old))
endif
call KillUnit(old)
call RemoveUnit(old)
call UnitAddAbility( udg_base[c], 'A001' )
call UnitAddAbility( udg_base[c], 'Avul' )
call SetUnitUserData( udg_base[c], c )
call IssuePointOrderLoc(udg_base[c], "setrally", udg_circlepos[c])
endif
endif
endif
endif
set c = c + 1
endloop
set e=null
set h=null
set old=null
endfunction
//===========================================================================
function InitTrig_EnterCircle takes nothing returns nothing
set gg_trg_EnterCircle = CreateTrigger( )
call TriggerAddCondition( gg_trg_EnterCircle, Condition( function Trig_EnterCircle_Conditions ) )
call TriggerAddAction( gg_trg_EnterCircle, function Trig_EnterCircle_Actions )
endfunction
//TESH.scrollpos=37
//TESH.alwaysfold=0
function Trig_Leavecircle_Conditions takes nothing returns boolean
if GetUnitUserData(GetLeavingUnit()) >= 100 and GetUnitTypeId(GetLeavingUnit()) != 'n01k' then
return true
endif
return false
endfunction
function Trig_EnterCircle_1 takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetLeavingUnit()) and GetWidgetLife(GetFilterUnit()) > .405 and IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == false
endfunction
function Trig_Leavecircle_Actions takes nothing returns nothing
local group k
local unit le = GetLeavingUnit()
local integer c = GetUnitUserData(le) - 100
local integer e = GetPlayerId(GetOwningPlayer(le)) + 1
local integer unithp
local integer lowesthpint = 50000
local unit lowesthpunit
local integer t
local unit h
set k = GetUnitsInRangeOfLocMatching(256, udg_circlepos[c], Condition(function Trig_EnterCircle_1))
if FirstOfGroup(k) != null then
set lowesthpunit = le
loop
set h = FirstOfGroup(k)
exitwhen h == null
set t = GetUnitPointValue(h)
set unithp = R2I(GetWidgetLife(h)) + t*40
if unithp <= lowesthpint then
set lowesthpint = unithp
set lowesthpunit = h
endif
call GroupRemoveUnit(k, h)
endloop
call SetUnitUserData( udg_defender[c], udg_customvalueunit[c] )
call UnitRemoveAbility( udg_defender[c], udg_Basicattack )
set udg_defender[c] = lowesthpunit
call UnitAddAbility( udg_defender[c], udg_Basicattack )
call IssueImmediateOrder( udg_defender[c], "flamingattack" )
set udg_customvalueunit[c] = GetUnitUserData(udg_defender[c])
call SetUnitUserData( udg_defender[c], ( c + 100 ) )
call SetUnitPositionLoc( udg_defender[c], udg_circlepos[c] )
endif
call DestroyGroup(k)
set k = null
set le=null
set lowesthpunit=null
set h=null
endfunction
//===========================================================================
function InitTrig_Leavecircle takes nothing returns nothing
set gg_trg_Leavecircle = CreateTrigger( )
call TriggerAddCondition( gg_trg_Leavecircle, Condition( function Trig_Leavecircle_Conditions ) )
call TriggerAddAction( gg_trg_Leavecircle, function Trig_Leavecircle_Actions )
endfunction
//TESH.scrollpos=41
//TESH.alwaysfold=0
function Trig_Pass_defend_base_Unit_Conditions takes nothing returns boolean
if GetIssuedOrderId() == OrderId("frostnova") and IsUnitType(GetOrderedUnit(), UNIT_TYPE_STRUCTURE) == true and GetUnitUserData(GetOrderTargetUnit()) < 100 then
return true
endif
return false
endfunction
function Trig_Pass_defend_base_Unit_Actions takes nothing returns nothing
local integer bnum = GetUnitUserData(GetOrderedUnit())
local player target = GetOwningPlayer(GetOrderTargetUnit())
local unit old = udg_defender[bnum]
local unit oldb
local location loc = GetUnitLoc(GetOrderTargetUnit())
call IssueImmediateOrder( GetOrderedUnit(), "stop" )
if udg_modeinteger != 5 or target == GetOwningPlayer(udg_base[bnum]) or udg_baseinteger2[bnum] != udg_domcapital[GetPlayerId(target) + 1 ] then
call SetUnitUserData( udg_defender[bnum], udg_customvalueunit[bnum] )
if target != GetOwningPlayer(udg_base[bnum]) then
call SetUnitOwner( udg_base[bnum], target, true )
if udg_riskgameplay == 3 or udg_riskgameplay == 4 then
call ShowUnit(udg_base[bnum], false)
set oldb=udg_base[bnum]
if bnum == udg_capitalrace[udg_raceplayer[GetPlayerId(target) + 1]] and udg_Mapsizemod != 3 then
set udg_base[bnum] = CreateUnit(target, udg_racecapital[udg_raceplayer[GetPlayerId(target) + 1]], GetUnitX(oldb), GetUnitY(oldb), GetUnitFacing(oldb))
else
set udg_base[bnum] = CreateUnit(target, udg_racebase[udg_raceplayer[GetPlayerId(target) + 1]], GetUnitX(oldb), GetUnitY(oldb), GetUnitFacing(oldb))
endif
call KillUnit(oldb)
call RemoveUnit(oldb)
call UnitAddAbility( udg_base[bnum], 'A001' )
call UnitAddAbility( udg_base[bnum], 'Avul' )
call SetUnitUserData( udg_base[bnum], bnum )
endif
call IssuePointOrderLoc( udg_base[bnum], "setrally", udg_circlepos[bnum] )
endif
if GetUnitTypeId(udg_defender[bnum]) == 'n01K' or GetUnitTypeId(udg_defender[bnum]) == 'n00W' or GetUnitTypeId(udg_defender[bnum]) == 'n01J' then
call RemoveUnit( old )
else
call SetUnitPositionLoc( udg_defender[bnum], loc )
call UnitRemoveAbility( old, udg_Basicattack )
endif
set udg_defender[bnum] = GetOrderTargetUnit()
set udg_customvalueunit[bnum] = GetUnitUserData(udg_defender[bnum])
call SetUnitUserData( udg_defender[bnum], ( bnum + 100 ) )
call SetUnitPositionLoc( GetOrderTargetUnit(), udg_circlepos[bnum] )
call UnitAddAbility( udg_defender[bnum], udg_Basicattack )
call IssueImmediateOrder( udg_defender[bnum], "flamingattack" )
endif
call RemoveLocation ( loc )
set loc=null
set target=null
set old=null
set oldb=null
endfunction
//===========================================================================
function InitTrig_Pass_defend_base_Unit takes nothing returns nothing
set gg_trg_Pass_defend_base_Unit = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pass_defend_base_Unit, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition( gg_trg_Pass_defend_base_Unit, Condition( function Trig_Pass_defend_base_Unit_Conditions ) )
call TriggerAddAction( gg_trg_Pass_defend_base_Unit, function Trig_Pass_defend_base_Unit_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Massorder_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderId() == String2OrderIdBJ("shockwave") ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'o006' ) ) then
return false
endif
return true
endfunction
function Trig_Massorder_Func001001003 takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and GetUnitUserData(GetFilterUnit())<100 and GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetOrderedUnit())
endfunction
function Trig_Massorder_Actions takes nothing returns nothing
local unit h
local location l=GetOrderPointLoc()
local location s=GetUnitLoc(GetTriggerUnit())
local group k= GetUnitsInRangeOfLocMatching(750.00, s, Condition(function Trig_Massorder_Func001001003))
loop
set h = FirstOfGroup(k)
exitwhen h == null
call IssuePointOrderLoc( h, "attack", l )
call GroupRemoveUnit(k, h)
endloop
call KillUnit( GetOrderedUnit())
call DestroyGroup(k)
set k=null
call RemoveLocation(l)
call RemoveLocation(s)
set h=null
set l=null
set s=null
endfunction
//===========================================================================
function InitTrig_Massorder takes nothing returns nothing
set gg_trg_Massorder = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Massorder, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Massorder, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Massorder, Condition( function Trig_Massorder_Conditions ) )
call TriggerAddAction( gg_trg_Massorder, function Trig_Massorder_Actions )
endfunction
//TESH.scrollpos=75
//TESH.alwaysfold=0
function Trig_Mageabilities_Func007C takes nothing returns boolean
if ( ( GetIssuedOrderId() == OrderId("taunt") ) ) then
return true
endif
if ( ( GetIssuedOrderId() == OrderId("summonwareagle") ) ) then
return true
endif
if ( ( GetIssuedOrderId() == OrderId("spiritofvengeance") ) ) then
return true
endif
if ( ( GetIssuedOrderId() == OrderId("howlofterror") ) ) then
return true
endif
if ( ( GetIssuedOrderId() == OrderId("berserk") ) ) then
return true
endif
if ( ( GetIssuedOrderId() == OrderId("fanofknives") ) ) then
return true
endif
return false
endfunction
function Trig_Mageabilities_Conditions takes nothing returns boolean
if ( not Trig_Mageabilities_Func007C() ) then
return false
endif
if ( not ( IsUnitType(GetOrderedUnit(), UNIT_TYPE_MECHANICAL) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetOrderedUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetWidgetLife(GetOrderedUnit()) > .405 ) ) then
return false
endif
if ( not ( udg_gameHasBegun == true ) ) then
return false
endif
return true
endfunction
function Trig_Mageabilities_Func002C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetOrderedUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() != String2OrderIdBJ("berserk") ) ) then
return false
endif
return true
endfunction
function Trig_Mageabilities_Func003Func003002002 takes nothing returns boolean
return ( IsUnitSelected(GetFilterUnit(), GetOwningPlayer(GetOrderedUnit())) == true )
endfunction
function Trig_Mageabilities_Func003Func004Func001Func002C takes nothing returns boolean
if ( not ( udg_currentstring == "taunt" ) ) then
return false
endif
if ( not ( GetPlayerState(GetOwningPlayer(GetOrderedUnit()), PLAYER_STATE_RESOURCE_GOLD) >= ( 2 - udg_mageinteger ) ) ) then
return false
endif
return true
endfunction
function Trig_Mageabilities_Func003Func004Func001Func003C takes nothing returns boolean
if ( not ( udg_currentstring == "summonwareagle" ) ) then
return false
endif
if ( not ( GetPlayerState(GetOwningPlayer(GetOrderedUnit()), PLAYER_STATE_RESOURCE_GOLD) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Mageabilities_Func003Func004Func001Func004C takes nothing returns boolean
if ( not ( udg_currentstring == "spiritofvengeance" ) ) then
return false
endif
if ( not ( GetPlayerState(GetOwningPlayer(GetOrderedUnit()), PLAYER_STATE_RESOURCE_GOLD) >= ( 3 - udg_mageinteger ) ) ) then
return false
endif
return true
endfunction
function Trig_Mageabilities_Func003Func004Func001Func005C takes nothing returns boolean
if ( not ( udg_currentstring == "howlofterror" ) ) then
return false
endif
if ( not ( GetPlayerState(GetOwningPlayer(GetOrderedUnit()), PLAYER_STATE_RESOURCE_GOLD) >= ( 3 - udg_mageinteger ) ) ) then
return false
endif
return true
endfunction
function Trig_Mageabilities_Func003Func004Func001Func006C takes nothing returns boolean
if ( not ( udg_currentstring == "fanofknives" ) ) then
return false
endif
if ( not ( GetPlayerState(GetOwningPlayer(GetOrderedUnit()), PLAYER_STATE_RESOURCE_GOLD) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Mageabilities_Func003Func004Func001Func007C takes nothing returns boolean
if ( not ( udg_mageabilityinteger == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Mageabilities_Func003Func004A takes nothing returns nothing
if GetUnitAbilityLevelSwapped('A04G', GetEnumUnit()) == 1 then
set udg_mageabilityinteger = 0
if ( Trig_Mageabilities_Func003Func004Func001Func002C() ) then
call UnitAddAbilityBJ( 'A053', GetEnumUnit() )
call UnitAddItemByIdSwapped( 'I011', GetEnumUnit() )
call UnitAddAbilityBJ( 'A04F', GetEnumUnit() )
call UnitAddAbilityBJ( 'A04H', GetEnumUnit() )
call IssueImmediateOrder( GetEnumUnit(), "healon" )
call AdjustPlayerStateBJ( ( udg_mageinteger - 2 ), GetOwningPlayer(GetEnumUnit()), PLAYER_STATE_RESOURCE_GOLD )
set udg_mageabilityinteger = 1
else
endif
if ( Trig_Mageabilities_Func003Func004Func001Func003C() ) then
call UnitAddAbilityBJ( 'A053', GetEnumUnit() )
call UnitAddItemByIdSwapped( 'I014', GetEnumUnit() )
call UnitAddAbilityBJ( 'A02N', GetEnumUnit() )
call UnitAddAbilityBJ( 'A02P', GetEnumUnit() )
call IssueImmediateOrder( GetEnumUnit(), "autodispelon" )
call AdjustPlayerStateBJ( ( udg_mageinteger - 2 ), GetOwningPlayer(GetEnumUnit()), PLAYER_STATE_RESOURCE_GOLD )
set udg_mageabilityinteger = 1
else
endif
if ( Trig_Mageabilities_Func003Func004Func001Func004C() ) then
call UnitAddAbilityBJ( 'A053', GetEnumUnit() )
call UnitAddItemByIdSwapped( 'I012', GetEnumUnit() )
call UnitAddAbilityBJ( 'A01H', GetEnumUnit() )
call UnitAddAbilityBJ( 'A050', GetEnumUnit() )
call IssueImmediateOrder( GetEnumUnit(), "bloodluston" )
call AdjustPlayerStateBJ( ( udg_mageinteger - 3 ), GetOwningPlayer(GetEnumUnit()), PLAYER_STATE_RESOURCE_GOLD )
set udg_mageabilityinteger = 1
else
endif
if ( Trig_Mageabilities_Func003Func004Func001Func005C() ) then
call UnitAddAbilityBJ( 'A053', GetEnumUnit() )
call UnitAddItemByIdSwapped( 'I013', GetEnumUnit() )
call UnitAddAbilityBJ( 'A04V', GetEnumUnit() )
call UnitAddAbilityBJ( 'A051', GetEnumUnit() )
call IssueImmediateOrder( GetEnumUnit(), "faeriefireon" )
call AdjustPlayerStateBJ( ( udg_mageinteger - 3 ), GetOwningPlayer(GetEnumUnit()), PLAYER_STATE_RESOURCE_GOLD )
set udg_mageabilityinteger = 1
else
endif
if ( Trig_Mageabilities_Func003Func004Func001Func006C() ) then
call UnitAddAbilityBJ( 'A053', GetEnumUnit() ) //Gives unit invarmage, aka 1 inventory slot
call UnitAddItemByIdSwapped( 'I021', GetEnumUnit() ) //Gives unit slow item
call UnitAddAbilityBJ( 'Aslo', GetEnumUnit() ) //Gives unit slow ability
call UnitAddAbilityBJ( 'A06C', GetEnumUnit() ) //Gives unit Mage's Sacrifice
call IssueImmediateOrder( GetEnumUnit(), "slowon" ) //Turns slow on autocast
call AdjustPlayerStateBJ( ( udg_mageinteger - 2 ), GetOwningPlayer(GetEnumUnit()), PLAYER_STATE_RESOURCE_GOLD ) //Reduces players gold by 1
set udg_mageabilityinteger = 1
else
endif
if ( Trig_Mageabilities_Func003Func004Func001Func007C() ) then
call UnitRemoveAbilityBJ( 'A04G', GetEnumUnit() )
call UnitRemoveAbilityBJ( 'A04W', GetEnumUnit() )
call UnitRemoveAbilityBJ( 'A052', GetEnumUnit() )
call UnitRemoveAbilityBJ( 'A04Y', GetEnumUnit() )
call UnitRemoveAbilityBJ( 'A02R', GetEnumUnit() )
else
endif
endif
endfunction
function Trig_Mageabilities_Func009C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("berserk") ) ) then
return false
endif
return true
endfunction
function Trig_Mageabilities_Actions takes nothing returns nothing
local group g
set udg_currentstring = OrderId2StringBJ(GetIssuedOrderId())
if ( Trig_Mageabilities_Func002C() ) then
call UnitRemoveAbilityBJ( 'A04G', GetEnumUnit() )
call UnitRemoveAbilityBJ( 'A04W', GetEnumUnit() )
call UnitRemoveAbilityBJ( 'A052', GetEnumUnit() )
call UnitRemoveAbilityBJ( 'A04Y', GetEnumUnit() )
call UnitRemoveAbilityBJ( 'A02R', GetEnumUnit() )
endif
if GetOwningPlayer(GetOrderedUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) and GetIssuedOrderId() != String2OrderIdBJ("berserk") then
set udg_mageinteger = 1
set g = GetUnitsOfPlayerMatching(GetOwningPlayer(GetOrderedUnit()), Condition(function Trig_Mageabilities_Func003Func003002002))
call ForGroup( g, function Trig_Mageabilities_Func003Func004A )
endif
if ( Trig_Mageabilities_Func009C() ) then
call UnitAddAbilityBJ( 'A02Q', GetOrderedUnit() )
call UnitAddAbilityBJ( 'A02R', GetOrderedUnit() )
endif
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Mageabilities takes nothing returns nothing
set gg_trg_Mageabilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mageabilities, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Mageabilities, Condition( function Trig_Mageabilities_Conditions ) )
call TriggerAddAction( gg_trg_Mageabilities, function Trig_Mageabilities_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Hero_selection_Func001002002 takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL) == true and IsUnitAliveBJ(GetFilterUnit()) == true
endfunction
function Trig_Hero_selection_Func003A takes nothing returns nothing
local location l = GetUnitLoc(GetEnumUnit())
call PanCameraToTimedLocForPlayer( GetTriggerPlayer(), l, 0 )
call SelectUnitAddForPlayer( GetEnumUnit(), GetTriggerPlayer() )
call RemoveLocation(l)
set l=null
endfunction
function Trig_Hero_selection_Actions takes nothing returns nothing
local group g = GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Hero_selection_Func001002002))
call SelectUnitRemoveForPlayer( GetTriggerUnit(), GetTriggerPlayer() )
call ForGroupBJ( g, function Trig_Hero_selection_Func003A )
call DestroyGroup( g )
set g = null
endfunction
//===========================================================================
function InitTrig_Hero_selection takes nothing returns nothing
set gg_trg_Hero_selection = CreateTrigger( )
call DisableTrigger( gg_trg_Hero_selection )
call TriggerAddAction( gg_trg_Hero_selection, function Trig_Hero_selection_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Empire_spawn_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSpellAbilityUnit()) == 'h074' ) ) then
return false
endif
return true
endfunction
function Trig_Empire_spawn_Func001Func004002003 takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit()) == 'h074' and GetOwningPlayer(GetFilterUnit()) == GetTriggerPlayer()
endfunction
function Trig_Empire_spawn_Func001Func005A takes nothing returns nothing
local force f = CreateForce()
local location l = GetUnitLoc(GetEnumUnit())
call ForceAddPlayer(f, GetTriggerPlayer())
call PingMinimapLocForForceEx( f, l, 1.00, bj_MINIMAPPINGSTYLE_SIMPLE, 100.00, 100, 100.00 )
call SelectUnitAddForPlayer( GetEnumUnit(), GetTriggerPlayer() )
call RemoveLocation ( l )
call DestroyForce( f )
set f = null
set l=null
endfunction
function Trig_Empire_spawn_Actions takes nothing returns nothing
local location loc = GetUnitLoc(GetSpellAbilityUnit())
local group g = GetUnitsInRangeOfLocMatching(10000.00, loc, Condition(function Trig_Empire_spawn_Func001Func004002003))
local integer i=1
if GetSpellAbilityId() == 'A00E' then
call IssueImmediateOrder( GetSpellAbilityUnit(), "stop" )
call ForGroupBJ( g, function Trig_Empire_spawn_Func001Func005A )
endif
if GetSpellAbilityId() == 'A00J' then
call IssueImmediateOrder( GetSpellAbilityUnit(), "stop" )
loop
exitwhen i > udg_numempire
if udg_empirecontrol[i] == udg_empirecontrol[GetUnitUserData(GetSpellAbilityUnit())] then
call IssuePointOrderLoc( udg_spawner[i], "setrally", udg_spawnlocation[i] )
endif
set i = i + 1
endloop
endif
call DestroyGroup( g )
set g = null
call RemoveLocation ( loc )
set loc=null
endfunction
//===========================================================================
function InitTrig_Empire_spawn takes nothing returns nothing
set gg_trg_Empire_spawn = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Empire_spawn, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Empire_spawn, Condition( function Trig_Empire_spawn_Conditions ) )
call TriggerAddAction( gg_trg_Empire_spawn, function Trig_Empire_spawn_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Showneededregions_Actions takes nothing returns nothing
local integer a = 0
local integer b
local real x
local real y
local force f = CreateForce()
loop
exitwhen a > 11
if IsUnitSelected(GetTriggerUnit(), Player(a)) == true then
call ForceAddPlayer(f, Player(a))
set b = 1
loop
exitwhen b > udg_numregions
if udg_empireregion[b] == GetUnitUserData(GetTriggerUnit()) then
set x = GetRectCenterX(udg_countryregion[b])
set y = GetRectCenterY(udg_countryregion[b])
call PingMinimapForForceEx( f, x, y, 3.00, bj_MINIMAPPINGSTYLE_SIMPLE, 100.00, 0.00, 0.00 )
endif
set b = b + 1
endloop
endif
set a = a + 1
endloop
call DestroyForce(f)
set f = null
endfunction
//===========================================================================
function InitTrig_Showneededregions takes nothing returns nothing
set gg_trg_Showneededregions = CreateTrigger( )
call TriggerAddAction( gg_trg_Showneededregions, function Trig_Showneededregions_Actions )
endfunction
//TESH.scrollpos=122
//TESH.alwaysfold=0
function Trig_Deathtrigger_Conditions takes nothing returns boolean
if GetKillingUnit() == null then
return false
else
return true
endif
endfunction
function Trig_Deathtrigger_Func005Func004Func001002003 takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetDyingUnit()) and IsUnitType(GetFilterUnit(), UNIT_TYPE_DEAD)==false and IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == false
endfunction
function AdjustPlayerGold takes player pl, integer j returns nothing
call SetPlayerState( pl, PLAYER_STATE_RESOURCE_GOLD, GetPlayerState( pl, PLAYER_STATE_RESOURCE_GOLD) + j)
call SetPlayerState( pl, PLAYER_STATE_GOLD_GATHERED, GetPlayerState( pl, PLAYER_STATE_GOLD_GATHERED) + j)
endfunction
function Trig_Deathtrigger_Func005Func004Func002Func008002003 takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetKillingUnit()) and IsUnitType(GetFilterUnit(), UNIT_TYPE_DEAD)==false and IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == false and GetUnitUserData(GetFilterUnit()) < 100
endfunction
function Trig_Deathtrigger_Actions takes nothing returns nothing
local unit ds = GetDyingUnit()
local unit ks = GetKillingUnit()
local player pl = GetOwningPlayer(ks)
local integer e = GetPlayerId(pl) + 1
local integer f = GetPlayerId(GetOwningPlayer(ds)) + 1
local integer g = 0
local integer m = GetUnitPointValue(ds)
local integer t = GetUnitPointValue(ks)
local unit old=null
local real i = I2R(m)
local unit h = null
local group k = null
local integer j = 0
local real re = 0
local integer z = 0
local integer lowesthpint = 15000
local unit lowesthpunit=null
local integer unithp
if GetUnitAbilityLevel( ds, 'A053') == 1 then
call RemoveItem( UnitItemInSlot(ds, 0) )
endif
if udg_bounty >= 1 and IsUnitType(ds, UNIT_TYPE_SUMMONED) == false and e != f then
set re = udg_bountymoney[ e] + (i * udg_bountyreal)
set j = R2I( re)
if j > 0 then
call AdjustPlayerGold( pl, j)
endif
set udg_bountymoney[ e] = re - j
endif
set udg_Deaths[f] = ( udg_Deaths[f] + m )
set udg_Kills[e] = ( udg_Kills[e] + m )
if GetUnitUserData(ds) >= 100 then
set g = GetUnitUserData(ds) - 100
call SetUnitUserData( ds, udg_customvalueunit[g] )
if IsUnitType(ks, UNIT_TYPE_STRUCTURE) == true or IsUnitType(ks, UNIT_TYPE_DEAD)==true or GetUnitUserData(ks) >= 100 then
else
set k = GetUnitsInRangeOfLocMatching(256, udg_circlepos[g], Condition(function Trig_Deathtrigger_Func005Func004Func001002003))
if FirstOfGroup(k) == null then
call DestroyGroup( k )
set k = null
set lowesthpunit = ks
set k = GetUnitsInRangeOfLocMatching(700.00, udg_circlepos[g], Condition(function Trig_Deathtrigger_Func005Func004Func002Func008002003))
loop
set h = FirstOfGroup(k)
exitwhen h == null
set t = GetUnitPointValue(h)
set unithp = R2I(GetWidgetLife(h)) + t*40
if unithp < lowesthpint then
set lowesthpint = unithp
set lowesthpunit = h
endif
call GroupRemoveUnit(k, h)
endloop
if lowesthpunit != null and IsUnitType(lowesthpunit, UNIT_TYPE_DEAD)==false then
set udg_defender[g] = lowesthpunit
set udg_customvalueunit[g] = GetUnitUserData(udg_defender[g])
call SetUnitUserData( udg_defender[g], ( g + 100 ) )
call SetUnitPositionLoc( lowesthpunit, udg_circlepos[g] )
call SetUnitOwner( udg_base[g], GetOwningPlayer(lowesthpunit), true )
call UnitAddAbility( lowesthpunit, udg_Basicattack )
call IssueImmediateOrder( lowesthpunit, "flamingattack" )
if udg_riskgameplay == 3 or udg_riskgameplay == 4 then
call ShowUnit(udg_base[g], false)
set old=udg_base[g]
if g == udg_capitalrace[udg_raceplayer[e]] and udg_Mapsizemod != 3 then
set udg_base[g] = CreateUnit(pl, udg_racecapital[udg_raceplayer[e]], GetUnitX(old), GetUnitY(old), GetUnitFacing(old))
else
set udg_base[g] = CreateUnit(pl, udg_racebase[udg_raceplayer[e]], GetUnitX(old), GetUnitY(old), GetUnitFacing(old))
endif
call KillUnit(old)
call RemoveUnit(old)
call UnitAddAbility( udg_base[g], 'A001' )
call UnitAddAbility( udg_base[g], 'Avul' )
call SetUnitUserData( udg_base[g], g )
call IssuePointOrderLoc(udg_base[g], "setrally", udg_circlepos[g])
endif
endif
else
loop
set h = FirstOfGroup(k)
exitwhen h == null
set t = GetUnitPointValue(h)
set unithp = R2I(GetWidgetLife(h)) + t*40
if unithp < lowesthpint then
set lowesthpint = unithp
set lowesthpunit = h
endif
call GroupRemoveUnit(k, h)
endloop
set udg_defender[g] = lowesthpunit
set udg_customvalueunit[g] = GetUnitUserData(udg_defender[g])
call SetUnitUserData( udg_defender[g], ( g + 100 ) )
call SetUnitPositionLoc( udg_defender[g], udg_circlepos[g] )
call UnitAddAbility( udg_defender[g], udg_Basicattack )
call IssueImmediateOrder( udg_defender[g], "flamingattack" )
endif
endif
endif
if GetUnitUserData(ds) != 0 and GetOwningPlayer(ds) != Player(PLAYER_NEUTRAL_AGGRESSIVE) then
set udg_spawnfromplayers[( GetUnitUserData(ds) + ( ( f - 1 ) * 100 ) )] = ( udg_spawnfromplayers[( GetUnitUserData(ds) + ( ( f - 1 ) * 100 ) )] - 1 )
endif
if GetUnitPointValue(GetTriggerUnit()) == 75 then
call DisplayTextToForce( udg_Allplayerforce, ( udg_colorcodeplayer[f] + GetPlayerName(Player(f-1)) + "|r's hero " + GetUnitName(ds) + " was slain by " + udg_colorcodeplayer[e] + GetPlayerName(Player(e-1)) ) )
endif
call DestroyGroup( k )
set k = null
set ds=null
set ks=null
set pl=null
set old=null
set h=null
set lowesthpunit=null
endfunction
//===========================================================================
function InitTrig_Deathtrigger takes nothing returns nothing
set gg_trg_Deathtrigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Deathtrigger, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Deathtrigger, Condition( function Trig_Deathtrigger_Conditions ) )
call TriggerAddAction( gg_trg_Deathtrigger, function Trig_Deathtrigger_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Display_heros_Actions takes nothing returns nothing
if GetUnitPointValue(GetTrainedUnit()) == 75 then
call DisplayTextToForce( bj_FORCE_ALL_PLAYERS, ( GetUnitName(GetTrainedUnit()) + " has joined " + udg_colorcodeplayer[GetPlayerId(GetTriggerPlayer()) +1 ] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s|r army" ) )
endif
endfunction
//===========================================================================
function InitTrig_Text_heros takes nothing returns nothing
set gg_trg_Text_heros = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Text_heros, EVENT_PLAYER_UNIT_TRAIN_FINISH )
call TriggerAddAction( gg_trg_Text_heros, function Trig_Display_heros_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Mass_Teleport_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSpellAbilityUnit()) == 'h074' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A025' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) == 'h074' ) ) then
return false
endif
return true
endfunction
function Trig_Mass_Teleport_Func001Func001002003 takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == false and GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetSpellAbilityUnit()) and GetUnitUserData( GetFilterUnit()) < 100
endfunction
function Trig_Mass_Teleport_Actions takes nothing returns nothing
local group g
local location l
local location k
local unit h
local force f = CreateForce()
call ForceAddPlayer(f, GetOwningPlayer(GetSpellAbilityUnit()))
if udg_telelastused[GetPlayerId(GetTriggerPlayer())+1] <= udg_Turns - 3 then
set udg_telelastused[GetPlayerId(GetTriggerPlayer())+1] = udg_Turns
call DisplayTimedTextToForce( f, 20.00, ( "You may use this ability again in Turn "+ I2S(udg_Turns+3) ) )
set k=GetUnitLoc(GetSpellAbilityUnit())
set g = GetUnitsInRangeOfLocMatching(700.00, k, Condition(function Trig_Mass_Teleport_Func001Func001002003))
set l = GetUnitLoc(GetSpellTargetUnit())
loop
set h = FirstOfGroup(g)
exitwhen h == null
call SetUnitPositionLoc( h, l )
call GroupRemoveUnit(g, h)
endloop
else
call DisplayTimedTextToForce( f, 20.00, ( "Cannot use ability right now. Wait until Turn "+ I2S(udg_telelastused[GetPlayerId(GetTriggerPlayer())+1]+3) ) )
endif
call DestroyGroup(g)
set g = null
call RemoveLocation(l)
call RemoveLocation(k)
call DestroyForce( f )
set f = null
set l=null
set k=null
set h=null
endfunction
//===========================================================================
function InitTrig_Mass_Teleport takes nothing returns nothing
set gg_trg_Mass_Teleport = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mass_Teleport, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Mass_Teleport, Condition( function Trig_Mass_Teleport_Conditions ) )
call TriggerAddAction( gg_trg_Mass_Teleport, function Trig_Mass_Teleport_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Player_Options3_Func001Func001002003 takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == false and GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetSpellAbilityUnit()) and GetUnitUserData( GetFilterUnit()) < 100
endfunction
function Trig_Player_Options3_Func001Func007C takes nothing returns boolean
if ( ( GetUnitTypeId(GetSpellTargetUnit()) == 'n011' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellTargetUnit()) == 'n00I' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellTargetUnit()) == 'n00T' ) ) then
return true
endif
return false
endfunction
function Trig_Player_Options3_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00U' ) ) then
return false
endif
if ( not Trig_Player_Options3_Func001Func007C() ) then
return false
endif
return true
endfunction
function Trig_Player_Options3_Actions takes nothing returns nothing
local group g
local location l
local location k
local unit h
if ( Trig_Player_Options3_Func001C() ) then
set k=GetUnitLoc(GetSpellTargetUnit())
set g = GetUnitsInRangeOfLocMatching(1000.00, k, Condition(function Trig_Player_Options3_Func001Func001002003))
set l = WaygateGetDestinationLocBJ(GetSpellTargetUnit())
loop
set h = FirstOfGroup(g)
exitwhen h == null
call SetUnitPositionLoc( h, l )
call GroupRemoveUnit(g, h)
endloop
endif
call DestroyGroup(g)
set g = null
call RemoveLocation(l)
call RemoveLocation(k)
set h=null
set k=null
set l=null
endfunction
//===========================================================================
function InitTrig_Player_Options3 takes nothing returns nothing
set gg_trg_Player_Options3 = CreateTrigger( )
call TriggerAddAction( gg_trg_Player_Options3, function Trig_Player_Options3_Actions )
endfunction
//TESH.scrollpos=71
//TESH.alwaysfold=0
function Trig_Player_Options2_Func002Func001002003 takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetSpellAbilityUnit())
endfunction
function Trig_Player_Options2_Func002Func002A takes nothing returns nothing
call IssueImmediateOrder( GetEnumUnit(), "holdposition" )
endfunction
function Trig_Player_Options2_Func003Func001002003 takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetSpellAbilityUnit()) and GetUnitUserData(GetFilterUnit()) < 100
endfunction
function Trig_Player_Options2_Func003Func007C takes nothing returns boolean
if ( ( GetUnitTypeId(GetSpellTargetUnit()) == 'n011' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellTargetUnit()) == 'n00I' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellTargetUnit()) == 'n00T' ) ) then
return true
endif
return false
endfunction
function Trig_Player_Options2_Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00U' ) ) then
return false
endif
if ( not Trig_Player_Options2_Func003Func007C() ) then
return false
endif
return true
endfunction
function Trig_Player_Options2_Actions takes nothing returns nothing
local force f = CreateForce()
local group g
local location l
call ForceAddPlayer(f, GetOwningPlayer(GetSpellAbilityUnit()))
if GetSpellAbilityId() == 'A061' then
set l = GetSpellTargetLoc()
set g = GetUnitsInRangeOfLocMatching(1000.00,l, Condition(function Trig_Player_Options2_Func002Func001002003))
call ForGroupBJ( g, function Trig_Player_Options2_Func002Func002A )
endif
if GetSpellAbilityId() == 'A00M' then
set l = GetSpellTargetLoc()
call PingMinimapLocForForceEx( udg_Pinggroup, l, 4.00, bj_MINIMAPPINGSTYLE_FLASHY, udg_colorrealpercent1[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], udg_colorrealpercent2[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], udg_colorrealpercent3[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] )
endif
if GetSpellAbilityId() == 'A005' then
call IssueImmediateOrder( GetSpellAbilityUnit(), "stop" )
call ClearTextMessagesBJ( f )
call DisplayTimedTextToForce( f, 20.00, ( "Selected Game: " + udg_stringgame ) )
call DisplayTimedTextToForce( f, 20.00, ( "Selected Mode: " + udg_stringmode ) )
call DisplayTimedTextToForce( f, 20.00, ( "Max Spawn Support: " + ( udg_spawnstring + " Turns" ) ) )
call DisplayTimedTextToForce( f, 20.00, ( "Time per turn: " + ( udg_timestring + " seconds" ) ) )
call DisplayTimedTextToForce( f, 20.00, ( "Fog of War: " + udg_stringfog ) )
call DisplayTimedTextToForce( f, 20.00, ( "Bounty: " + udg_bountystring ) )
call DisplayTimedTextToForce( f, 20.00, ( "Transport: " + udg_shiproutestring ) )
call DisplayTimedTextToForce( f, 20.00, ( "Heros allowed: " + udg_heromodstring ) )
call DisplayTimedTextToForce( f, 20.00, ( "Fill Player slots: " + udg_stringtournament ) )
call DisplayTimedTextToForce( f, 20.00, ( "Mapsize: " + udg_Outlandstring ) )
if udg_riskgameplay == 5 or udg_riskgameplay == 3 or udg_riskgameplay == 4 then
call DisplayTimedTextToForce( f, 20.00, ( "Allrandom: " + udg_randommodestring ) )
else
endif
if udg_Testmode == 1 then
call DisplayTimedTextToForce( f, 20.00, ( "Testmode: " + udg_Testmodestring ) )
else
endif
endif
if GetSpellAbilityId() == 'A04X' then
call IssueImmediateOrder( GetSpellAbilityUnit(), "stop" )
if udg_riskgameplay == 3 or udg_riskgameplay == 4 then
set l = GetUnitLoc(udg_base[udg_capitalrace[udg_raceplayer[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))]]])
endif
call PingMinimapLocForForceEx( f, l, 10.00, bj_MINIMAPPINGSTYLE_SIMPLE, 0.00, 100, 0.00 )
endif
call RemoveLocation ( l )
call DestroyForce( f )
set f = null
call DestroyGroup( g )
set g = null
set l=null
endfunction
//===========================================================================
function InitTrig_Player_Options2 takes nothing returns nothing
set gg_trg_Player_Options2 = CreateTrigger( )
call TriggerAddAction( gg_trg_Player_Options2, function Trig_Player_Options2_Actions )
endfunction