|
发表于 2007-12-7 20:10:03
|
显示全部楼层
//===========================================================================
//
// 世界末日
//
// Warcraft III map script
// Generated by the Warcraft III World Editor
// Date: Fri Dec 07 20:10:05 2007
// Map Author: 死神
//
//===========================================================================
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// Generated
trigger gg_trg_ZB = null
trigger gg_trg________________u = null
endglobals
function InitGlobals takes nothing returns nothing
endfunction
//***************************************************************************
//*
//* Unit Creation
//*
//***************************************************************************
//===========================================================================
function CreateBuildingsForPlayer0 takes nothing returns nothing
local player p = Player(0)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nntt', -2560.0, 6400.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer1 takes nothing returns nothing
local player p = Player(1)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nntt', 1280.0, 6528.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer2 takes nothing returns nothing
local player p = Player(2)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nntt', 7040.0, 3456.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer3 takes nothing returns nothing
local player p = Player(3)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nntt', 7040.0, 2112.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer4 takes nothing returns nothing
local player p = Player(4)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nntt', 6336.0, -4096.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer5 takes nothing returns nothing
local player p = Player(5)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nntt', 6208.0, -1536.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer6 takes nothing returns nothing
local player p = Player(6)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nntt', 1280.0, -6656.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer7 takes nothing returns nothing
local player p = Player(7)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nntt', -2112.0, -6528.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer8 takes nothing returns nothing
local player p = Player(8)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nntt', -6208.0, -4160.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer9 takes nothing returns nothing
local player p = Player(9)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nntt', -6272.0, -1600.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer10 takes nothing returns nothing
local player p = Player(10)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nntt', -6208.0, 2560.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer11 takes nothing returns nothing
local player p = Player(11)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nntt', -6272.0, 4288.0, 270.000 )
endfunction
//===========================================================================
function CreateNeutralHostile takes nothing returns nothing
local player p = Player(PLAYER_NEUTRAL_AGGRESSIVE)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ngh2', -425.6, 307.7, 357.363 )
set u = CreateUnit( p, 'nsll', -805.6, 669.6, 60.701 )
set u = CreateUnit( p, 'nsll', -481.9, 2.4, 60.569 )
set u = CreateUnit( p, 'nsll', -726.8, -27.9, 3.065 )
set u = CreateUnit( p, 'nsll', -250.3, 306.5, 274.623 )
set u = CreateUnit( p, 'nsll', 75.5, 163.5, 70.282 )
set u = CreateUnit( p, 'nsln', -619.5, 447.5, 291.773 )
set u = CreateUnit( p, 'ngnb', -200.4, 617.6, 132.389 )
set u = CreateUnit( p, 'nogl', -639.6, 766.9, 323.799 )
set u = CreateUnit( p, 'nogl', -530.1, 496.3, 80.818 )
set u = CreateUnit( p, 'nogl', -464.5, 372.7, 74.786 )
set u = CreateUnit( p, 'nrwm', -76.5, -106.9, 250.672 )
set u = CreateUnit( p, 'nrwm', -411.6, 446.0, 331.621 )
set u = CreateUnit( p, 'nrwm', -707.4, -103.4, 93.167 )
set u = CreateUnit( p, 'nrwm', -75.7, 566.5, 56.054 )
set u = CreateUnit( p, 'nrwm', -693.4, 825.2, 169.041 )
set u = CreateUnit( p, 'nogl', -730.5, 380.5, 203.517 )
set u = CreateUnit( p, 'nogl', -390.7, 777.1, 150.946 )
set u = CreateUnit( p, 'nogl', -61.7, 380.5, 193.102 )
set u = CreateUnit( p, 'nogl', -354.9, -78.5, 125.863 )
set u = CreateUnit( p, 'nfsh', -513.8, 605.5, 356.177 )
set u = CreateUnit( p, 'nfsh', -284.1, 612.0, 319.899 )
set u = CreateUnit( p, 'nfsh', -497.5, 112.4, 178.973 )
set u = CreateUnit( p, 'nfsh', -279.1, 129.2, 235.400 )
set u = CreateUnit( p, 'ninf', -2441.1, 2189.1, 188.806 )
set u = CreateUnit( p, 'ninf', -2376.5, 1314.6, 225.380 )
set u = CreateUnit( p, 'ninf', 1578.3, 2193.3, 320.613 )
set u = CreateUnit( p, 'ninf', 1630.2, 1306.5, 21.007 )
set u = CreateUnit( p, 'nbal', -865.1, 3609.1, 124.644 )
set u = CreateUnit( p, 'nbal', 75.1, 3555.3, 266.218 )
set u = CreateUnit( p, 'nbal', -862.1, -2823.7, 180.115 )
set u = CreateUnit( p, 'nbal', 54.3, -2818.5, 118.557 )
set u = CreateUnit( p, 'nerw', -2410.4, -424.1, 168.338 )
set u = CreateUnit( p, 'nerw', -2428.1, -1079.8, 36.630 )
set u = CreateUnit( p, 'nerw', 1554.1, -400.6, 298.683 )
set u = CreateUnit( p, 'nerw', 1617.8, -1158.7, 261.021 )
set u = CreateUnit( p, 'nndr', -146.1, 670.6, 258.088 )
set u = CreateUnit( p, 'nndr', -554.2, 12.9, 13.843 )
set u = CreateUnit( p, 'nndr', -158.8, 23.8, 274.579 )
set u = CreateUnit( p, 'nndr', -361.4, 3541.9, 129.895 )
set u = CreateUnit( p, 'nndr', -374.7, -2724.5, 284.741 )
set u = CreateUnit( p, 'nndr', 1584.4, -780.5, 27.533 )
set u = CreateUnit( p, 'nndr', -2400.8, -742.5, 257.945 )
set u = CreateUnit( p, 'nndr', -2420.7, 1524.6, 124.160 )
set u = CreateUnit( p, 'nndr', 1654.0, 1695.3, 186.488 )
set u = CreateUnit( p, 'nfov', -898.3, 320.4, 115.613 )
set u = CreateUnit( p, 'nfov', -432.5, 1079.2, 188.333 )
set u = CreateUnit( p, 'nfov', 227.5, 374.5, 278.007 )
set u = CreateUnit( p, 'nfov', -310.0, -362.5, 134.664 )
set u = CreateUnit( p, 'nggr', -1012.3, 777.6, 115.920 )
set u = CreateUnit( p, 'nggr', -980.8, -82.0, 265.317 )
set u = CreateUnit( p, 'nggr', 204.2, 793.2, 264.185 )
set u = CreateUnit( p, 'nggr', 276.0, -150.9, 246.002 )
set u = CreateUnit( p, 'nrwm', -939.8, 735.5, 281.610 )
set u = CreateUnit( p, 'nrwm', 147.1, -18.2, 188.729 )
set u = CreateUnit( p, 'nrwm', 142.1, 705.2, 215.976 )
set u = CreateUnit( p, 'ngnv', -530.5, 3228.2, 223.249 )
set u = CreateUnit( p, 'ngnv', -147.1, 3225.0, 340.982 )
set u = CreateUnit( p, 'ngnv', -596.7, -2485.0, 45.122 )
set u = CreateUnit( p, 'ngnv', -219.8, -2508.4, 197.485 )
set u = CreateUnit( p, 'nmrm', -477.0, -2302.1, 118.678 )
set u = CreateUnit( p, 'nmrm', -343.7, -2302.1, 248.606 )
set u = CreateUnit( p, 'nmrm', -438.5, 3030.3, 92.112 )
set u = CreateUnit( p, 'nmrm', -256.5, 3021.8, 232.928 )
set u = CreateUnit( p, 'nina', -2107.1, 1992.2, 140.838 )
set u = CreateUnit( p, 'nina', -2089.7, 1459.4, 108.570 )
set u = CreateUnit( p, 'nina', 1220.8, 1885.3, 229.105 )
set u = CreateUnit( p, 'nina', 1293.4, 1495.9, 297.255 )
set u = CreateUnit( p, 'ndrs', 1350.4, -616.5, 3.263 )
set u = CreateUnit( p, 'ndrs', 1393.8, -967.8, 168.931 )
set u = CreateUnit( p, 'ndrs', -2199.1, -640.9, 190.278 )
set u = CreateUnit( p, 'ndrs', -2158.6, -920.0, 303.748 )
set u = CreateUnit( p, 'ndqs', -2002.3, -609.2, 95.628 )
set u = CreateUnit( p, 'ndqs', -2008.3, -924.0, 284.137 )
set u = CreateUnit( p, 'ndqs', 1115.9, -618.6, 264.779 )
set u = CreateUnit( p, 'ndqs', 1214.8, -980.2, 108.361 )
set u = CreateUnit( p, 'nelb', -808.3, 3244.0, 106.406 )
set u = CreateUnit( p, 'nelb', 77.4, 3143.7, 72.083 )
set u = CreateUnit( p, 'nelb', -848.0, -2367.3, 249.232 )
set u = CreateUnit( p, 'nelb', -122.6, -2349.4, 11.327 )
set u = CreateUnit( p, 'nwzd', 1021.7, -610.4, 79.994 )
set u = CreateUnit( p, 'nwzd', 1051.3, -913.5, 132.170 )
set u = CreateUnit( p, 'nwzd', -2147.4, -463.0, 165.437 )
set u = CreateUnit( p, 'nwzd', -2190.4, -1088.3, 208.010 )
set u = CreateUnit( p, 'nbld', -1868.1, 1856.6, 41.892 )
set u = CreateUnit( p, 'nbld', -1861.6, 1603.5, 351.211 )
set u = CreateUnit( p, 'nbld', 950.2, 1952.3, 330.424 )
set u = CreateUnit( p, 'nbld', 1034.1, 1642.6, 48.231 )
set u = CreateUnit( p, 'nrvi', -995.8, 1139.9, 309.681 )
set u = CreateUnit( p, 'nrvi', -37.5, 1126.5, 288.609 )
set u = CreateUnit( p, 'nrvi', -950.8, -307.2, 63.217 )
set u = CreateUnit( p, 'nrvi', 111.3, -315.6, 45.441 )
set u = CreateUnit( p, 'nstw', -696.1, 1148.9, 115.151 )
set u = CreateUnit( p, 'nstw', -191.3, 1100.0, 314.438 )
set u = CreateUnit( p, 'nstw', -593.4, -317.7, 46.023 )
set u = CreateUnit( p, 'nstw', -97.8, -315.6, 18.556 )
set u = CreateUnit( p, 'nsln', -974.0, 557.2, 315.746 )
set u = CreateUnit( p, 'nsln', -889.2, 160.5, 187.498 )
set u = CreateUnit( p, 'nsln', 224.6, 592.2, 322.217 )
set u = CreateUnit( p, 'nsln', 265.6, 169.4, 285.236 )
set u = CreateUnit( p, 'ngh2', 213.1, 1038.5, 107.395 )
set u = CreateUnit( p, 'ngh2', 336.2, -335.3, 16.810 )
set u = CreateUnit( p, 'ngh2', -1166.4, 1030.6, 12.876 )
set u = CreateUnit( p, 'ngh2', -1104.6, -324.3, 125.995 )
set u = CreateUnit( p, 'nowk', -1255.3, 828.3, 148.858 )
set u = CreateUnit( p, 'nowk', -1216.9, -80.6, 193.728 )
set u = CreateUnit( p, 'nowk', 412.3, 840.4, 259.648 )
set u = CreateUnit( p, 'nowk', 431.6, -3.5, 292.882 )
set u = CreateUnit( p, 'nsgg', 433.1, 617.8, 31.784 )
set u = CreateUnit( p, 'nsgg', 426.5, 265.9, 103.165 )
set u = CreateUnit( p, 'nsgg', -1295.1, 571.9, 223.996 )
set u = CreateUnit( p, 'nsgg', -1223.3, 168.7, 115.810 )
set u = CreateUnit( p, 'nsw3', -1219.2, 359.3, 116.975 )
set u = CreateUnit( p, 'nsw3', 433.1, 441.9, 308.209 )
set u = CreateUnit( p, 'nogl', -633.0, 35.4, 167.953 )
set u = CreateUnit( p, 'nogl', -758.6, 163.8, 222.546 )
set u = CreateUnit( p, 'nogl', -739.9, 261.1, 42.782 )
endfunction
//===========================================================================
function CreateNeutralPassiveBuildings takes nothing returns nothing
local player p = Player(PLAYER_NEUTRAL_PASSIVE)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ngol', -7872.0, 4416.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, 3904.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, 3392.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, 2880.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, 2368.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, 1856.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, 1344.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'nfoh', -2880.0, 1728.0, 270.000 )
set u = CreateUnit( p, 'nfoh', 1984.0, 1728.0, 270.000 )
set u = CreateUnit( p, 'ngol', -6336.0, 1280.0, 270.000 )
call SetResourceAmount( u, 12500 )
set u = CreateUnit( p, 'ngol', -7872.0, -384.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, -896.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, -1408.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, -1920.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, -2432.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, -2944.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, -3456.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -7872.0, -3968.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -2688.0, 8064.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -2176.0, 8064.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -1664.0, 8064.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -1152.0, 8064.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -512.0, 8064.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 64.0, 8064.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 640.0, 8064.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 1280.0, 8064.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, 4416.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, 3840.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, 3328.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, 2816.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, 2304.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, 1792.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, 1280.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, -384.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, -896.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, -1408.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, -1920.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, -2432.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, -2944.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, -3456.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 7936.0, -3968.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -2176.0, -8000.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -1664.0, -8000.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -1152.0, -8000.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -640.0, -8000.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', -128.0, -8000.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 384.0, -8000.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 896.0, -8000.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'ngol', 1408.0, -8000.0, 270.000 )
call SetResourceAmount( u, 1000000 )
set u = CreateUnit( p, 'nmoo', -384.0, 3584.0, 270.000 )
set u = CreateUnit( p, 'nmoo', -384.0, -2816.0, 270.000 )
set u = CreateUnit( p, 'nmoo', -2432.0, 1728.0, 270.000 )
set u = CreateUnit( p, 'nmoo', -2432.0, -768.0, 270.000 )
set u = CreateUnit( p, 'nmoo', 1600.0, 1792.0, 270.000 )
set u = CreateUnit( p, 'nmoo', 1600.0, -768.0, 270.000 )
set u = CreateUnit( p, 'ngme', -2304.0, -3776.0, 270.000 )
set u = CreateUnit( p, 'nfoh', -448.0, 4032.0, 270.000 )
set u = CreateUnit( p, 'ngme', -2496.0, 4992.0, 270.000 )
set u = CreateUnit( p, 'ngme', 1344.0, 4800.0, 270.000 )
set u = CreateUnit( p, 'ntav', 960.0, 4800.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ntav', -1984.0, 4928.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ndrr', -2240.0, 5440.0, 270.000 )
set u = CreateUnit( p, 'ndrr', 1152.0, 5248.0, 270.000 )
set u = CreateUnit( p, 'ngme', 2816.0, 3520.0, 270.000 )
set u = CreateUnit( p, 'ngme', 3392.0, 4480.0, 270.000 )
set u = CreateUnit( p, 'ntav', 3904.0, 4416.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ntav', 3072.0, 3968.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ndrr', 2816.0, 3072.0, 270.000 )
set u = CreateUnit( p, 'ndrr', 4352.0, 4352.0, 270.000 )
set u = CreateUnit( p, 'ngme', 3584.0, -3904.0, 270.000 )
set u = CreateUnit( p, 'ngme', 3264.0, -3520.0, 270.000 )
set u = CreateUnit( p, 'ntav', 3072.0, -3008.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ntav', 2880.0, -2496.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ndrr', 4160.0, -4224.0, 270.000 )
set u = CreateUnit( p, 'ndrr', 4672.0, -4224.0, 270.000 )
set u = CreateUnit( p, 'ngme', -3712.0, 3392.0, 270.000 )
set u = CreateUnit( p, 'ngme', -4288.0, 3904.0, 270.000 )
set u = CreateUnit( p, 'ntav', -4672.0, 4224.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ntav', -5056.0, 4352.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ndrr', -4480.0, 1280.0, 270.000 )
set u = CreateUnit( p, 'ndrr', -3968.0, 1280.0, 270.000 )
set u = CreateUnit( p, 'ndrr', -4224.0, -3840.0, 270.000 )
set u = CreateUnit( p, 'ndrr', -3968.0, -3328.0, 270.000 )
set u = CreateUnit( p, 'ntav', -3712.0, -2752.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ntav', -3712.0, -2368.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ngme', -4608.0, -4544.0, 270.000 )
set u = CreateUnit( p, 'ngme', -4672.0, -4160.0, 270.000 )
set u = CreateUnit( p, 'ngme', 1408.0, -3712.0, 270.000 )
set u = CreateUnit( p, 'ntav', 1024.0, -3776.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ntav', -1920.0, -3776.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ndrg', -2112.0, -4224.0, 270.000 )
set u = CreateUnit( p, 'ndrg', 1280.0, -4224.0, 270.000 )
set u = CreateUnit( p, 'nfoh', 1984.0, -768.0, 270.000 )
set u = CreateUnit( p, 'nfoh', -2880.0, -768.0, 270.000 )
set u = CreateUnit( p, 'nfoh', -384.0, -3200.0, 270.000 )
endfunction
//===========================================================================
function CreatePlayerBuildings takes nothing returns nothing
call CreateBuildingsForPlayer0( )
call CreateBuildingsForPlayer1( )
call CreateBuildingsForPlayer2( )
call CreateBuildingsForPlayer3( )
call CreateBuildingsForPlayer4( )
call CreateBuildingsForPlayer5( )
call CreateBuildingsForPlayer6( )
call CreateBuildingsForPlayer7( )
call CreateBuildingsForPlayer8( )
call CreateBuildingsForPlayer9( )
call CreateBuildingsForPlayer10( )
call CreateBuildingsForPlayer11( )
endfunction
//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
endfunction
//===========================================================================
function CreateAllUnits takes nothing returns nothing
call CreateNeutralPassiveBuildings( )
call CreatePlayerBuildings( )
call CreateNeutralHostile( )
call CreatePlayerUnits( )
endfunction
//***************************************************************************
//*
//* Custom Script Code
//*
//***************************************************************************
function H2I takes handle h returns integer
return h
return 0
endfunction
function I2U takes integer i returns unit
return i
return null
endfunction
function I2Tm takes integer i returns timer
return i
return null
endfunction
function GetUnitCurrentFree_Func takes unit u returns boolean
local string s = OrderId2String(GetUnitCurrentOrder(u))
if s == null then
return true
endif
return false
endfunction
function SetGuard_Func takes nothing returns nothing
local timer tm = GetExpiredTimer()
local unit pet = I2U(GetStoredInteger(udg_GC, I2S(H2I(tm)), "Pet"))
local unit captain = I2U(GetStoredInteger(udg_GC, I2S(H2I(tm)), "Captain"))
local real x = GetUnitX(captain) - GetUnitX(pet)
local real y = GetUnitY(captain) - GetUnitY(pet)
local real d = x*x + y*y
local real v
local real a
local effect e
local real life = GetStoredReal(udg_GC, I2S(H2I(tm)), "Life")
local integer p = GetStoredInteger(udg_GC,I2S(H2I(tm)), "Percent")
set v = GetStoredReal(udg_GC, I2S(H2I(tm)), "GuardRanger")
if GetUnitState(pet, UNIT_STATE_LIFE) > 0 then
if d<v*v then
if GetUnitCurrentFree_Func(pet)==true and GetRandomInt(0,100)<p then
set x = GetUnitX(captain)
set y = GetUnitY(captain)
set d = GetRandomReal(0,v)
set a = GetRandomReal(0,360)
call IssuePointOrder(pet, "patrol", x+d*CosBJ(a), y+d*SinBJ(a))
endif
else
set v = GetStoredReal(udg_GC, I2S(H2I(tm)), "ReturnRanger")
if d<v*v then
if GetUnitCurrentFree_Func(pet)==true then
call IssuePointOrder(pet, "patrol", GetUnitX(captain), GetUnitY(captain))
endif
else
set v = GetStoredReal(udg_GC, I2S(H2I(tm)), "OutRanger")
if d!=0 and d>v*v then
call SetUnitPosition(pet,GetUnitX(captain),GetUnitY(captain))
set e =AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\MassTeleport\\\\MassTeleportTarget.mdl" ,captain,"chest")
call DestroyEffect(e)
else
call IssuePointOrder(pet, "move", GetUnitX(captain), GetUnitY(captain))
endif
endif
endif
endif
set tm = null
set pet = null
set captain = null
endfunction
function SetGuard takes unit pet, unit captain, real timeout, real guardRanger, real returnRanger, real outRanger,integer percent returns nothing
local timer tm = CreateTimer()
call StoreInteger(udg_GC, I2S(H2I(pet)), "Timer", H2I(tm))
call StoreInteger(udg_GC, I2S(H2I(tm)), "pet",H2I(pet))
call StoreInteger(udg_GC, I2S(H2I(tm)), "Captain", H2I(captain))
call StoreInteger(udg_GC, I2S(H2I(tm)), "Percent", percent)
call StoreReal(udg_GC, I2S(H2I(tm)), "GuardRanger", guardRanger)
call StoreReal(udg_GC, I2S(H2I(tm)), "ReturnRanger", returnRanger)
call StoreReal(udg_GC, I2S(H2I(tm)), "OutRanger", outRanger)
call TimerStart(tm, timeout, true, function SetGuard_Func)
set tm = null
endfunction
function RemoveGuard takes unit pet returns nothing
local integer tm = GetStoredInteger(udg_GC, I2S(H2I(pet)), "Timer")
call FlushStoredMission(udg_GC, I2S(H2I(pet)))
call FlushStoredMission(udg_GC, I2S(tm))
call DestroyTimer(I2Tm(tm))
endfunction
//***************************************************************************
//*
//* Triggers
//*
//***************************************************************************
//===========================================================================
// Trigger: ZB
//===========================================================================
function Trig_ZB_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 100, 'hfoo', GetTriggerPlayer(), GetPlayerStartLocationLoc(GetTriggerPlayer()), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_ZB takes nothing returns nothing
set gg_trg_ZB = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_ZB, Player(0), "我是星之痕", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ZB, Player(1), "我是星之痕", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ZB, Player(2), "我是星之痕", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ZB, Player(3), "我是星之痕", true )
call TriggerAddAction( gg_trg_ZB, function Trig_ZB_Actions )
endfunction
//===========================================================================
// Trigger: 对战初始化
//
// 默认的对所有玩家的对战游戏初始化
//===========================================================================
function Trig________________u_Actions takes nothing returns nothing
call MeleeStartingVisibility( )
call MeleeStartingHeroLimit( )
call MeleeGrantHeroItems( )
call MeleeStartingResources( )
call MeleeClearExcessUnits( )
call MeleeStartingUnits( )
call MeleeStartingAI( )
call MeleeInitVictoryDefeat( )
endfunction
//===========================================================================
function InitTrig________________u takes nothing returns nothing
set gg_trg________________u = CreateTrigger( )
call TriggerAddAction( gg_trg________________u, function Trig________________u_Actions )
endfunction
//===========================================================================
function InitCustomTriggers takes nothing returns nothing
call InitTrig_ZB( )
call InitTrig________________u( )
endfunction
//===========================================================================
function RunInitializationTriggers takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg________________u )
endfunction
//***************************************************************************
//*
//* Players
//*
//***************************************************************************
function InitCustomPlayerSlots takes nothing returns nothing
// Player 0
call SetPlayerStartLocation( Player(0), 0 )
call ForcePlayerStartLocation( Player(0), 0 )
call SetPlayerColor( Player(0), ConvertPlayerColor(0) )
call SetPlayerRacePreference( Player(0), RACE_PREF_RANDOM )
call SetPlayerRaceSelectable( Player(0), true )
call SetPlayerController( Player(0), MAP_CONTROL_USER )
// Player 1
call SetPlayerStartLocation( Player(1), 1 )
call ForcePlayerStartLocation( Player(1), 1 )
call SetPlayerColor( Player(1), ConvertPlayerColor(1) )
call SetPlayerRacePreference( Player(1), RACE_PREF_RANDOM )
call SetPlayerRaceSelectable( Player(1), true )
call SetPlayerController( Player(1), MAP_CONTROL_USER )
// Player 2
call SetPlayerStartLocation( Player(2), 2 )
call ForcePlayerStartLocation( Player(2), 2 )
call SetPlayerColor( Player(2), ConvertPlayerColor(2) )
call SetPlayerRacePreference( Player(2), RACE_PREF_RANDOM )
call SetPlayerRaceSelectable( Player(2), true )
call SetPlayerController( Player(2), MAP_CONTROL_USER )
// Player 3
call SetPlayerStartLocation( Player(3), 3 )
call ForcePlayerStartLocation( Player(3), 3 )
call SetPlayerColor( Player(3), ConvertPlayerColor(3) )
call SetPlayerRacePreference( Player(3), RACE_PREF_RANDOM )
call SetPlayerRaceSelectable( Player(3), true )
call SetPlayerController( Player(3), MAP_CONTROL_USER )
// Player 4
call SetPlayerStartLocation( Player(4), 4 )
call ForcePlayerStartLocation( Player(4), 4 )
call SetPlayerColor( Player(4), ConvertPlayerColor(4) )
call SetPlayerRacePreference( Player(4), RACE_PREF_RANDOM )
call SetPlayerRaceSelectable( Player(4), true )
call SetPlayerController( Player(4), MAP_CONTROL_USER )
// Player 5
call SetPlayerStartLocation( Player(5), 5 )
call ForcePlayerStartLocation( Player(5), 5 )
call SetPlayerColor( Player(5), ConvertPlayerColor(5) )
call SetPlayerRacePreference( Player(5), RACE_PREF_RANDOM )
call SetPlayerRaceSelectable( Player(5), true )
call SetPlayerController( Player(5), MAP_CONTROL_USER )
// Player 6
call SetPlayerStartLocation( Player(6), 6 )
call ForcePlayerStartLocation( Player(6), 6 )
call SetPlayerColor( Player(6), ConvertPlayerColor(6) )
call SetPlayerRacePreference( Player(6), RACE_PREF_RANDOM )
call SetPlayerRaceSelectable( Player(6), true )
call SetPlayerController( Player(6), MAP_CONTROL_USER )
// Player 7
call SetPlayerStartLocation( Player(7), 7 )
call ForcePlayerStartLocation( Player(7), 7 )
call SetPlayerColor( Player(7), ConvertPlayerColor(7) )
call SetPlayerRacePreference( Player(7), RACE_PREF_RANDOM )
call SetPlayerRaceSelectable( Player(7), true )
call SetPlayerController( Player(7), MAP_CONTROL_USER )
// Player 8
call SetPlayerStartLocation( Player(8), 8 )
call ForcePlayerStartLocation( Player(8), 8 )
call SetPlayerColor( Player(8), ConvertPlayerColor(8) )
call SetPlayerRacePreference( Player(8), RACE_PREF_RANDOM )
call SetPlayerRaceSelectable( Player(8), true )
call SetPlayerController( Player(8), MAP_CONTROL_USER )
// Player 9
call SetPlayerStartLocation( Player(9), 9 )
call ForcePlayerStartLocation( Player(9), 9 )
call SetPlayerColor( Player(9), ConvertPlayerColor(9) )
call SetPlayerRacePreference( Player(9), RACE_PREF_RANDOM )
call SetPlayerRaceSelectable( Player(9), true )
call SetPlayerController( Player(9), MAP_CONTROL_USER )
// Player 10
call SetPlayerStartLocation( Player(10), 10 )
call ForcePlayerStartLocation( Player(10), 10 )
call SetPlayerColor( Player(10), ConvertPlayerColor(10) )
call SetPlayerRacePreference( Player(10), RACE_PREF_NIGHTELF )
call SetPlayerRaceSelectable( Player(10), false )
call SetPlayerController( Player(10), MAP_CONTROL_USER )
// Player 11
call SetPlayerStartLocation( Player(11), 11 )
call ForcePlayerStartLocation( Player(11), 11 )
call SetPlayerColor( Player(11), ConvertPlayerColor(11) )
call SetPlayerRacePreference( Player(11), RACE_PREF_RANDOM )
call SetPlayerRaceSelectable( Player(11), true )
call SetPlayerController( Player(11), MAP_CONTROL_USER )
endfunction
function InitCustomTeams takes nothing returns nothing
// Force: TRIGSTR_006
call SetPlayerTeam( Player(0), 0 )
call SetPlayerState( Player(0), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(1), 0 )
call SetPlayerState( Player(1), PLAYER_STATE_ALLIED_VICTORY, 1 )
// Allied
call SetPlayerAllianceStateAllyBJ( Player(0), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(0), true )
// Shared Vision
call SetPlayerAllianceStateVisionBJ( Player(0), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(0), true )
// Force: TRIGSTR_020
call SetPlayerTeam( Player(2), 1 )
call SetPlayerState( Player(2), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(3), 1 )
call SetPlayerState( Player(3), PLAYER_STATE_ALLIED_VICTORY, 1 )
// Allied
call SetPlayerAllianceStateAllyBJ( Player(2), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(2), true )
// Shared Vision
call SetPlayerAllianceStateVisionBJ( Player(2), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(2), true )
// Force: TRIGSTR_021
call SetPlayerTeam( Player(4), 2 )
call SetPlayerState( Player(4), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(5), 2 )
call SetPlayerState( Player(5), PLAYER_STATE_ALLIED_VICTORY, 1 )
// Allied
call SetPlayerAllianceStateAllyBJ( Player(4), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(4), true )
// Shared Vision
call SetPlayerAllianceStateVisionBJ( Player(4), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(4), true )
// Force: TRIGSTR_022
call SetPlayerTeam( Player(6), 3 )
call SetPlayerState( Player(6), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(7), 3 )
call SetPlayerState( Player(7), PLAYER_STATE_ALLIED_VICTORY, 1 )
// Allied
call SetPlayerAllianceStateAllyBJ( Player(6), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(6), true )
// Shared Vision
call SetPlayerAllianceStateVisionBJ( Player(6), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(6), true )
// Force: TRIGSTR_023
call SetPlayerTeam( Player(8), 4 )
call SetPlayerState( Player(8), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(9), 4 )
call SetPlayerState( Player(9), PLAYER_STATE_ALLIED_VICTORY, 1 )
// Allied
call SetPlayerAllianceStateAllyBJ( Player(8), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(8), true )
// Shared Vision
call SetPlayerAllianceStateVisionBJ( Player(8), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(8), true )
// Force: TRIGSTR_024
call SetPlayerTeam( Player(10), 5 )
call SetPlayerState( Player(10), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(11), 5 )
call SetPlayerState( Player(11), PLAYER_STATE_ALLIED_VICTORY, 1 )
// Allied
call SetPlayerAllianceStateAllyBJ( Player(10), Player(11), true )
call SetPlayerAllianceStateAllyBJ( Player(11), Player(10), true )
// Shared Vision
call SetPlayerAllianceStateVisionBJ( Player(10), Player(11), true )
call SetPlayerAllianceStateVisionBJ( Player(11), Player(10), true )
endfunction
function InitAllyPriorities takes nothing returns nothing
call SetStartLocPrioCount( 0, 1 )
call SetStartLocPrio( 0, 0, 1, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 1, 1 )
call SetStartLocPrio( 1, 0, 0, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 2, 1 )
call SetStartLocPrio( 2, 0, 3, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 3, 1 )
call SetStartLocPrio( 3, 0, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 4, 1 )
call SetStartLocPrio( 4, 0, 5, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 5, 2 )
call SetStartLocPrio( 5, 0, 3, MAP_LOC_PRIO_LOW )
call SetStartLocPrio( 5, 1, 4, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 6, 1 )
call SetStartLocPrio( 6, 0, 7, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 7, 1 )
call SetStartLocPrio( 7, 0, 6, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 8, 1 )
call SetStartLocPrio( 8, 0, 9, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 9, 2 )
call SetStartLocPrio( 9, 0, 8, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 9, 1, 10, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 10, 1 )
call SetStartLocPrio( 10, 0, 11, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 11, 1 )
call SetStartLocPrio( 11, 0, 10, MAP_LOC_PRIO_HIGH )
endfunction
//***************************************************************************
//*
//* Main Initialization
//*
//***************************************************************************
//===========================================================================
function main takes nothing returns nothing
call SetCameraBounds( -8192.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -8192.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 8192.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 8192.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -8192.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 8192.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 8192.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -8192.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
call SetDayNightModels( "Environment\\\\DNC\\\\DNCLordaeron\\\\DNCLordaeronTerrain\\\\DNCLordaeronTerrain.mdl", "Environment\\\\DNC\\\\DNCLordaeron\\\\DNCLordaeronUnit\\\\DNCLordaeronUnit.mdl" )
call NewSoundEnvironment( "Default" )
call SetAmbientDaySound( "LordaeronSummerDay" )
call SetAmbientNightSound( "LordaeronSummerNight" )
call SetMapMusic( "Music", true, 0 )
call CreateAllUnits( )
call InitBlizzard( )
call InitGlobals( )
call InitCustomTriggers( )
call RunInitializationTriggers( )
endfunction
//***************************************************************************
//*
//* Map Configuration
//*
//***************************************************************************
function config takes nothing returns nothing
call SetMapName( "TRIGSTR_001" )
call SetMapDescription( "TRIGSTR_003" )
call SetPlayers( 12 )
call SetTeams( 12 )
call SetGamePlacement( MAP_PLACEMENT_TEAMS_TOGETHER )
call DefineStartLocation( 0, -1792.0, 6912.0 )
call DefineStartLocation( 1, 384.0, 6848.0 )
call DefineStartLocation( 2, 7040.0, 3968.0 )
call DefineStartLocation( 3, 7040.0, 2048.0 )
call DefineStartLocation( 4, 7104.0, -3712.0 )
call DefineStartLocation( 5, 7040.0, -1408.0 )
call DefineStartLocation( 6, 512.0, -7104.0 )
call DefineStartLocation( 7, -1408.0, -7040.0 )
call DefineStartLocation( 8, -6976.0, -3904.0 )
call DefineStartLocation( 9, -6976.0, -1216.0 )
call DefineStartLocation( 10, -6976.0, 1984.0 )
call DefineStartLocation( 11, -7040.0, 4032.0 )
// Player setup
call InitCustomPlayerSlots( )
call InitCustomTeams( )
call InitAllyPriorities( )
endfunction |
|